pythoncan-buscanopen

Python canopen send a domain


I'm using the canopen python library, see https://canopen.readthedocs.io/en/latest/index.html.

I'm trying to send a domain to my CANopen node:

# nodeHeadPort.sdo['Config Data2'].phys = b'\x11\x22\x33\x44\x55'
nodeHeadPort.sdo.download(0x6006, 0, b'\x11\x22\x33\x44\x55')

But the python gives an exception with: canopen.sdo.exceptions.SdoAbortedError: Code 0x06090011, Subindex does not exist

And in the eds file I have the following:

[6006]
ParameterName=Config Data2
ObjectType=0x7
;StorageLocation=RAM
DataType=0x000F
AccessType=rw
DefaultValue=
PDOMapping=0

I guess my call in the python program should be different (without any subindex)? Does somebody know how to do?

This is what's going on the bus:

canopen trace


Solution

  • The reason for the issue was in the CANopen slave. I have to add their support for data type domain.

    https://github.com/CANopenNode/CANopenDemo/blob/master/demo/domainDemo.c