You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cant seem to get a working connection between my Seeedstudio adapter and my CANopen supported Servo-drive.
I installed my adapter via: https://python-can.readthedocs.io/en/stable/interfaces/seeedstudio.html#interface.
My code and debug messages are listed below.
It goes wrong in the network coding, NMT messages are also not working.
I checked incoming messages on the CANopen network with a 2nd USBCAN adapter, messages from my python code are not visable.
this is my code:
`import canopen
from canopen.profiles.p402 import BaseNode402
import time
import logging
logging.basicConfig(level=logging.DEBUG)
`DEBUG:canopen.pdo:TPDO Map as 4
DEBUG:canopen.pdo:RPDO Map as 4
DEBUG:canopen.pdo:TPDO Map as 4
DEBUG:canopen.pdo:RPDO Map as 4
DEBUG:can:can config: {'bitrate': 1000000, 'interface': 'seeedstudio', 'channel': 'COM3'}
DEBUG:seeedbus:init_frm: aa55120101000000000000000000010000000015
INFO:canopen.network:Connected to 'Serial interface: COM3'
WARNING:seeedbus:fileno is not implemented using current CAN bus: fileno
DEBUG:seeedbus:sending: aac0800055
INFO:canopen.nmt:Changing NMT state on node 1 from INITIALISING to INITIALISING
INFO:canopen.nmt:Sending NMT command 0x81 to node 1
DEBUG:seeedbus:sending: aac20000810155
INFO:canopen.nmt:Changing NMT state on node 1 from INITIALISING to OPERATIONAL
INFO:canopen.nmt:Sending NMT command 0x1 to node 1
DEBUG:seeedbus:sending: aac20000010155
DEBUG:canopen.variable:Writing Control word (0x6040:0) = 3
DEBUG:seeedbus:sending: aac801062b4060000300000055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac80106800000000000040555
ERROR:canopen.sdo.client:Transfer aborted by client with code 0x05040000
Traceback (most recent call last):
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\client.py", line 66, in read_response
block=True, timeout=self.RESPONSE_TIMEOUT)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\queue.py", line 178, in get
raise Empty
_queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:/Users/thomk/OneDrive - Saxion/Documenten/python code test 3.py", line 24, in
node.sdo[0x6040].raw = 0x03 # write enable profile velocity mode (control word)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\variable.py", line 89, in raw
DEBUG:seeedbus:sending: aac0800055
self.data = self.od.encode_raw(value)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\variable.py", line 41, in data
self.set_data(data)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\base.py", line 133, in set_data
self.sdo_node.download(self.od.index, self.od.subindex, data, force_segment)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\client.py", line 160, in download
fp.write(data)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\client.py", line 388, in write
response = self.sdo_client.request_response(request)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\client.py", line 84, in request_response
return self.read_response()
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\client.py", line 68, in read_response
raise SdoCommunicationError("No SDO response received")
canopen.sdo.exceptions.SdoCommunicationError: No SDO response received
PS C:\Users\thomk> `
The text was updated successfully, but these errors were encountered:
Hi,
I cant seem to get a working connection between my Seeedstudio adapter and my CANopen supported Servo-drive.
I installed my adapter via: https://python-can.readthedocs.io/en/stable/interfaces/seeedstudio.html#interface.
My code and debug messages are listed below.
It goes wrong in the network coding, NMT messages are also not working.
I checked incoming messages on the CANopen network with a 2nd USBCAN adapter, messages from my python code are not visable.
this is my code:
`import canopen
from canopen.profiles.p402 import BaseNode402
import time
import logging
logging.basicConfig(level=logging.DEBUG)
node = BaseNode402(1, 'C:\Users\thomk\Documents\CANOPEN-EDS-MBDV-Servo-DulAxes-V1.0.eds')
node2 = BaseNode402(2, 'C:\Users\thomk\Documents\CANOPEN-EDS-MBDV-Servo-DulAxes-V1.0.eds')
network = canopen.Network()
network.connect(bustype='seeedstudio', channel='COM3', bitrate=1000000)
network.add_node(node)
network.add_node(node2)
network.check()
network.sync.start(0.005)
node.nmt.send_command(0x81) # node reset and init
node.nmt.send_command(0x1) # node operational
node.sdo[0x6040]
node.sdo[0x6040].raw = 0x03 # write enable profile velocity mode (control word)
node.sdo[0x6041]
node.sdo[0x6041].raw # read status word`
this is de debugging message I get:
`DEBUG:canopen.pdo:TPDO Map as 4
DEBUG:canopen.pdo:RPDO Map as 4
DEBUG:canopen.pdo:TPDO Map as 4
DEBUG:canopen.pdo:RPDO Map as 4
DEBUG:can:can config: {'bitrate': 1000000, 'interface': 'seeedstudio', 'channel': 'COM3'}
DEBUG:seeedbus:init_frm: aa55120101000000000000000000010000000015
INFO:canopen.network:Connected to 'Serial interface: COM3'
WARNING:seeedbus:fileno is not implemented using current CAN bus: fileno
DEBUG:seeedbus:sending: aac0800055
INFO:canopen.nmt:Changing NMT state on node 1 from INITIALISING to INITIALISING
INFO:canopen.nmt:Sending NMT command 0x81 to node 1
DEBUG:seeedbus:sending: aac20000810155
INFO:canopen.nmt:Changing NMT state on node 1 from INITIALISING to OPERATIONAL
INFO:canopen.nmt:Sending NMT command 0x1 to node 1
DEBUG:seeedbus:sending: aac20000010155
DEBUG:canopen.variable:Writing Control word (0x6040:0) = 3
DEBUG:seeedbus:sending: aac801062b4060000300000055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac0800055
DEBUG:seeedbus:sending: aac80106800000000000040555
ERROR:canopen.sdo.client:Transfer aborted by client with code 0x05040000
Traceback (most recent call last):
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\client.py", line 66, in read_response
block=True, timeout=self.RESPONSE_TIMEOUT)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\queue.py", line 178, in get
raise Empty
_queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:/Users/thomk/OneDrive - Saxion/Documenten/python code test 3.py", line 24, in
node.sdo[0x6040].raw = 0x03 # write enable profile velocity mode (control word)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\variable.py", line 89, in raw
DEBUG:seeedbus:sending: aac0800055
self.data = self.od.encode_raw(value)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\variable.py", line 41, in data
self.set_data(data)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\base.py", line 133, in set_data
self.sdo_node.download(self.od.index, self.od.subindex, data, force_segment)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\client.py", line 160, in download
fp.write(data)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\client.py", line 388, in write
response = self.sdo_client.request_response(request)
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\client.py", line 84, in request_response
return self.read_response()
File "C:\Users\thomk\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\canopen\sdo\client.py", line 68, in read_response
raise SdoCommunicationError("No SDO response received")
canopen.sdo.exceptions.SdoCommunicationError: No SDO response received
PS C:\Users\thomk> `
The text was updated successfully, but these errors were encountered: