I used CoDeSys to set up a PLC controller as a CANopen slave node on the bus, some global variables are defined as SDO objects in the Parameter Manager. However, when I tried to test it with PCANview by manually sending a 0x601 message (slave node ID = 1, first byte = 0x40, followed by index and sub-index of the SDO object I wanted to read), I always got a reply 0x581 message with the first byte as 0x80, which is a slave abort message. I want to know what was wrong, I guess the SDO reply message should be automatically handled by CoDeSys library as long as the SDO object is defined, is it true? Do I need to call CanOpenSendSDO function in the program to manually send out the reply every time after receiving a request? Thank you for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I used CoDeSys to set up a PLC controller as a CANopen slave node on the bus, some global variables are defined as SDO objects in the Parameter Manager. However, when I tried to test it with PCANview by manually sending a 0x601 message (slave node ID = 1, first byte = 0x40, followed by index and sub-index of the SDO object I wanted to read), I always got a reply 0x581 message with the first byte as 0x80, which is a slave abort message. I want to know what was wrong, I guess the SDO reply message should be automatically handled by CoDeSys library as long as the SDO object is defined, is it true? Do I need to call CanOpenSendSDO function in the program to manually send out the reply every time after receiving a request? Thank you for your help.