CanOpen Message – PDO Message Configuration

In the article “CanOpen Message – Understanding PDO Messages“, a brief introduction to PDO messages is provided. For SDO messages, there are read/write identifiers and object indices, allowing the receiving end to recognize the messages. Meanwhile, PDO messages contain only valid data, so for the receiving end to identify them, both the sending and receiving ends must agree on the configuration beforehand.

PDO is divided into TPDO (Transmitting PDO) and RPDO (Receiving PDO), with sending and receiving being relative to the slave device. The configuration of PDO messages is specifically described in the CanOpen documentation.

With sending comes receiving, so both the sender and receiver need corresponding configurations to ensure the data sent and received matches up. A common configuration for PDO information is shown in the table below.

CanOpen Message - PDO Message Configuration

The object indices for TPDO configuration are mainly 0x1800 and 0x1A00.

  • Index: 0x1800

    • 0x00: The number of sub-indices for object index 0x1800, ranging from 2 to 5.

    • 0x01: COB-ID and control bit identifier.

    • 0x02: Transmission type, meaning of value n.

      • 0x01-0xF0: Transmit data every n cycles in synchronous mode.

      • 0xFD: After receiving a PDO request.

      • 0xFE: Event-driven (manufacturer specified).

      • 0xFF: Event transmission, node spontaneously transmits PDO.

    • 0x03: Inhibit time.

    • 0x04: Compatibility entry.

    • 0x05: Cycle time.

  • Index: 0x1A00

    • 0x00: Number of mapped PDO object indices.

    • 0x01: Information of the first PDO mapped object (index + sub-index + size in bits).

    • 0x02: Information of the second PDO mapped object (index + sub-index + size in bits).

    • ……

For RPDO, the specific meanings are similar to those of TPDO. The object indices 0x1400 and 0x1600 are a pair, and others are similar.

Example: The controller reads the temperature value from the temperature sensor. The CAN-ID of the controller is 1, the CAN-ID of the temperature sensor is 2, and the object index for the temperature value is 0x2030, sub-index 0x06, with a data width of 16 bits, sending the temperature value every 20ms.

The configuration information for station 2 is as follows:

  • Set 0x1800:0x01, set COB-ID to 0x182, and disable this PDO.

602 23 01 18 01 02 18 00 80

  • Set 0x1800:0x02, set to synchronous mode, transmit once per cycle.

602 23 00 18 02 01 00 00 00

  • Set 0x1800:0x05, cycle time to 20ms.

602 23 00 18 05 32 00 00 00

  • Set 0x1A00:0x00 to empty.

602 23 00 1A 00 00 00 00 00

  • Set 0x1A00:0x01, map 0x2030:0x06 to PDO, with a width of 16 bits.

602 23 00 1A 01 10 06 30 20

  • Set 0x1A00:0x00 to 1, indicating one PDO is active.

602 23 00 1A 00 01 00 00 00

  • Set 0x1800:0x01, enable this PDO.

602 23 01 18 01 02 18 00 00

Once the PDO configuration for station 2 is complete, after starting the PDO, every 20ms, station 2 will send out a message. Assuming the temperature is 0x1234, the message will be as follows:

182 34 12

After receiving this message, station 1 will know it is the temperature value from station 2.

Leave a Comment