Search code examples
embeddedcan-busidentificationcanopen

What is the difference between RPDO and TPDO?


deviceA: nodeID: 1
deviceB: nodeID: 2

Device A sends an TPDO 181, so B gets an RPDO 181.
Device B sends an TPDO 182, so A gets an RPDO 182.

There is an address range for RPDOs, for example 200 + ID. If A sends data it will be an TPDO.

When will a CAN frame for example with 200 + 1 ID appear on the bus?

As I see it all nodes transmit TPDOs so RPDOs can't appear on the bus. But it's not clear for me. If you can please provide some concrete example.


Solution

  • CANopen is not "plug & play", but it is almost ridiculously flexible in terms of features available.

    In order to establish communication, you need to change the COBID either of the transmitters TPDOs or of the receivers RPDOs.

    It is up to the system designer to decide where it would be most convenient to change the COBIDs. Suppose for example that you have a control system with a PLC sending out messages which in turn controls x number of standard I/O modules. All nodes have a standard factory mapping as specified by CANopen.

    Since the system designer knows that all I/O modules have standardized identifiers for all RPDOs, depending on their node id, it might be more convenient to just change the PLC's TPDO COBID and leave the others with their factory setting - meaning you only need to change at once place.

    Alternatively, perhaps the PLC will configure all COBIDs of the I/O modules during start-up through SDO access. In that case maybe it's more convenient to keep the PLCs TPDO COBIDs as defaults, but to change the slave's RPDO COBIDs. This would also allow multiple slaves to listen to the same TPDO simultaneously.

    There's no obvious right or wrong, or even a standard implementation. Every CAN (open) bus implementation is unique and someone needs to take system level decisions about everything happening at that specific bus. Timing and identifier priorities is a big part of this - for example higher priority messages should be given lower identifiers.