Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is PDO mapping?

After reading several CiA specifications, I am still having difficulty understanding PDO mapping, Process Image, and Process Data Exchange in CANopen.

I know SDO is used for configuration settings in the pre-operational state and has protocol overhead (since it can transfer more than 8 bytes of data).

In operational state, PDOs are well suited for inputs and outputs of process data. PDOs can transfer a maximum 8 bytes of data only.

There is the COB-ID of 11 bits which has a function code and a node number. Since the node number uses 7 bits, we can have a maximum of 127 nodes (for CANopen 2.0A network).

But there are four TPDOs` and four RPDOs which is confusing me. Why would you need multiple TPDOs and RPDOs? Also somewhere I read the device profiles may use entries from 6000h to 6FFFh to describe the device parameters and the device functionality and within this range up to 8 different devices can be described. But there can be 127 nodes in network then what's this 8 device?

like image 832
Vishwanath Kamath Avatar asked May 16 '13 12:05

Vishwanath Kamath


1 Answers

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:

  1. The messages have different bus priorities. 0x180+$NODEID wins the bus arbitration over 0x280+$NODEID, etc.
  2. 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.
  3. 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.

like image 122
LogicG8 Avatar answered Sep 20 '22 12:09

LogicG8