Я использую этот код на python для управления машиной через CANopen и CANbus, но я получаю эту ошибку, пожалуйста, помогите мне решить эту проблему.
Traceback (последний последний вызов):
File "FW_CANopen_main_V1.1.py", line 718, in <module>
initialisation()
File "FW_CANopen_main_V1.1.py", line 35, in initialisation
set_parameter() # Parameter der INI Datei an FU schreiben
File "FW_CANopen_main_V1.1.py", line 49, in set_parameter
node2.sdo[0x202C].raw = L_SPEED_default * 10 # POSITION_speed_Y2; Faktor:10
File "C:\Program Files (x86)\Python37-32\lib\site-packages\canopen\common.py", line 90, in raw
self.data = self.od.encode_raw(value)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\canopen\common.py", line 42, in data
self.set_data(data)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\canopen\sdo.py", line 265, in set_data
self.sdo_node.download(self.index, self.subindex, data, force_segment)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\canopen\sdo.py", line 194, in download
fp.close()
File "C:\Program Files (x86)\Python37-32\lib\site-packages\canopen\sdo.py", line 528, in write
response = self.sdo_client.request_response(request)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\canopen\sdo.py", line 120, in request_response
self.send_request(sdo_request)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\canopen\sdo.py", line 91, in send_request
self.network.send_message(self.rx_cobid, request)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\canopen\network.py", line 170, in send_message
raise RuntimeError("Not connected to CAN bus")
RuntimeError: Not connected to CAN bus[