Using multiple PDOs with the CANopen DeviceDesigner

The use of the emotas CANopen Stack and the great emotas CANopen DeviceDesigner allows for the development of devices that support up to 512 PDOs in each direction. However, should one wish to utilize more than 4 PDOs in each direction, a number of considerations must be taken into account.

By default the CANopen stack uses the Pre-defined connection set for PDO COB-IDs, which means e.g. for Transmit-PDOs that the COB-IDs of the first 4 PDOs are set to 0x180+NodeId,0x280+NodeId,0x380+NodeId and 0x480+NodeId and all additional PDOs are disabled.

If one wants to deviate from that, it is possible to enable “Overwrite pre-defined connection set” in the CANopen DeviceDesigner: CANopen Stack Settings -> basic CANopen Settings.

Screenshot CDD Overwrite Predefined connection set.

After that, one can specify the desired COB-ID for each PDO e.g. like this:

CDD PDO COB ID
(In the example above the COB-ID is 0x20123456 which means that the bit 29 is set and thus this PDO is send using 29-bit CAN-IDs.)

Beyond that additional steps are necessary.

Enabling “Overwrite pre-defined connection set” just activates the generation of the function RET_T userOverwriteCobIdSettings() in the file gen_objdict.c:

CDD User Overwrite

This generated function userOverwriteCobIdSettings() needs to be called in the load indication function to overwrite the settings set by the CANopen stack itself.
The load indication function is a function which can be passed to coCanOpenStackInit() and it will be called at start-up and each time a NMT reset command has been received.