Search code examples
codesyscanopen

Codesys and CANopen multisame NodeID


If I have Codesys project with CANopen manager and I add a CANopen slave node to the CAN with node id 19, the system is clear to me, but if I add two same sensor devices with same factory preset nodeid 19, how do I change the nodeID of either of two? I do not have any idea. Devices support LSS but i dont have idea how to implement nodeid change with or without it. Should I code it or should the canopen manager change the nodeid somehow. Any ideas are welcome. Of course I could change it by adding first device to the CANand change it and after that I could add the second one to the CAN bus. But I want to change the dynamically when both are in the CAN bus same time so it should be same situation as in future production line.


Solution

  • You can either write a small program in CODESYS that changes the ID, or if you have a USB to CAN tool you can send the commands to change the ID.

    This is normally done in a 2 step process.

    1- Set the parameter 2- Save the parameter (usually with some "magic word).

    The message to change the ID will depend on the manufacturer.

    Sometimes this is in the EDS file, so it might be worth it to have a look in there.