PDOs are type of messages used for more efficient and asynchronous messages. PDOs can be sent on a timer, in response to a SYNC message or in response to an event (like a digital input changing). All 8 bytes of the CAN bus message payload is available for your data. This is in contrast to an SDO where only 4 bytes are available (there are multi-message SDOs like block transfer).
PDOs can only transfer 8 bytes at a time because that is the maximum transfer size of a CAN bus message. Contrast this to an SDO where a command byte and 3 byte address must be sent, leaving a maximum of 4 bytes of information.
By default a device has 4 RPDOs and 4 TPDOs allocated. 4 is just the default number of PDOs. More can be arranged, but you are responsible for creating the "channels" for them. That is picking an arbitration ID and making sure no other device on the bus is going to talk using that ID. You want multiple PDOs because:
- The messages have different bus priorities.
0x180+$NODEID
wins the bus arbitration over 0x280+$NODEID
, etc.
- PDOs gain their efficiency by nodes agreeing on what data will be sent ahead of time. This means they do not have wait for a request to send nor do they have say what data they are sending like SDOs do.
- The choice of data inside a PDO is not very dynamic. Devices often have to be brought out of the operational state to change the PDO mapping. In some devices the PDO mapping is completely static and cannot be changed at all.
TPDOs are messages transmitted from a device while RPDOs are messages that are received and write to a devices object dictionary.
The object dictionary defines the interface of a CANopen device. The dictionary is addressed using a 16-bit index and an 8-bit sub-index. The dictionary is split into ranges. 0x6000 through 0x6FFF is the range of indexes allocated to Device Profile variables. Device profiles provide standardized interfaces for more specialized classes of devices.
PDO mapping is how the information that is contained in a PDO is agreed upon. PDO mappings are entries in a devices object dictionary like any other. The 3 byte index, sub-index and the size of the parameter in bits are encoded in an UNSIGNED32.