Configuring CANopen PDO Mapping and Communication Parameters

Daniel Price3 min read
Industrial NetworkingOther ManufacturerTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

How PDO Configuration Works

CANopen devices require no specialized software: all configuration happens over the CAN bus using SDOs (Service Data Objects), and a basic USB CAN dongle is sufficient, though manually constructing SDO frames is tedious. Vendor-supplied configuration GUIs (where available) or general-purpose CANopen configuration tools reduce that effort and should be preferred when offered. Unlike SDOs, PDOs (Process Data Objects) carry no metadata describing their contents, and TPDOs can be transmitted without a request from the master — this is what makes them bus-efficient. The trade-off is that producer and consumer must agree on message contents ahead of time, and that agreement is defined in each device's Object Dictionary through the PDO Communication Parameters and PDO Mapping Parameters. Whether and how these entries can be modified is device-dependent; the most common case is runtime configuration via SDO while the node is in pre-operational mode. If the device's default PDO set already covers your data, no remapping is needed.

PDO Mapping Parameters (0x1A00 / 0x1600)

TPDO mapping parameters begin at index 0x1A00 — TPDO0 maps to 0x1A00, TPDO1 to 0x1A01, and so on. RPDOs are configured identically, starting at 0x1600. Each mapped variable occupies a sub-index and is encoded as a 32-bit unsigned integer: the upper 16 bits hold the Object Dictionary index, the next 8 bits the sub-index, and the low 8 bits the data size in bits. Size granularity is device-dependent; some devices only support byte-level granularity.

// Map a REAL32 variable at OD 0x2000 sub 0x02 as the only parameter of TPDO0
// Format: [index:16][sub-index:8][size in bits:8]
// 0x2000 << 16 | 0x02 << 8 | 0x20 (32 bits) = 0x20000220
SDO write: 0x1A00 sub 0x01 = 0x20000220

PDO Communication Parameters (0x1800)

TPDO communication parameters start at 0x1800 and correspond to TPDOs the same way the mapping indexes do. RPDOs normally do not require this configuration; TPDOs do. The arbitration/COB-ID at sub-index 0x01 becomes the CAN arbitration ID of the transmitted frame, and each mapped parameter is appended to the payload in mapping order. The device performs this packing internally for TPDOs; for RPDOs the master packs the frame and the receiving device decodes it, writing each field into its Object Dictionary.

Sub-index Name Type Function
0x01 COBID UNSIGNED32 Arbitration/COB-ID the PDO will use
0x02 XMIT_TYPE UNSIGNED8 When the PDO is transmitted
0x03 INHIBIT_TIME UNSIGNED16 Minimum time between PDO messages (microseconds)
0x05 EVENT_TIME UNSIGNED16 Timeout for sending (milliseconds)

Starting PDO Exchange with NMT

The default connection set provides four TPDOs and four RPDOs per node; devices may support up to 512 of each. PDOs are only transmitted and received once the node is in Operational mode, which you enter by sending an NMT start command (Code Specifier = 1). NMT messages use COB-ID 0 with a 2-byte payload: byte 0 is the Code Specifier and byte 1 is the Node ID. A Node ID of 0 broadcasts the command to all nodes on the network.


FAQ

Do I need special software to configure CANopen PDO mapping?

No. Any CANopen device can be configured over the bus with SDOs using a basic USB CAN dongle. Vendor-specific GUIs or general CANopen configuration tools simply make the process less tedious.

How is a CANopen PDO mapping entry encoded?

Each mapping sub-index is a 32-bit unsigned integer: 16-bit OD index, 8-bit sub-index, then 8-bit size in bits. For example, mapping a REAL32 at 0x2000 sub 0x02 into TPDO0 means writing 0x20000220 to 0x1A00 sub 0x01.

Why is my CANopen node not sending PDOs after configuration?

PDOs only transfer in Operational mode.

Back to blog