The following diagram shows the physical wiring of the complete experimental platform. A Kvaser CAN adapter has also been added to capture raw CANopen messages on the bus—the hardware arrangement used to inspect packets during debugging.
Figure 1. Hardware wiring: PC, USB, Kvaser adapter, 24 V power supply, and 120 Ω termination resistor. (Image source: ADI)
Hardware Modules
- PC: Two USB cables are used:
- One USB connection goes to the Schneider TM251MESC PLC for downloading PLC programs and performing online debugging in EcoStruxure.
- The other USB connection goes to the Kvaser CAN adapter, which collects CAN bus communication logs in TMCL-IDE and captures CAN frames.
- TM251MESC PLC (master): Powered by a 24 V DC supply. Its built-in CAN interface operates as a CANopen master and sends motion commands to the TMCM-6212 drive.
- Kvaser CAN adapter (CAN capture interface): Connected in parallel to the CAN bus to passively monitor all messages. It does not interfere with normal PLC-to-drive communication and is dedicated to packet capture.
- 120 Ω CAN bus termination: A 120 Ω resistor must be installed at each end of a CAN bus to suppress signal reflections. The resistor shown in the diagram is installed at one end of the bus. Missing termination can cause unstable communication and packet loss.
- TMCM-6212 ADI Trinamic multi-axis drive module: CAN signals are routed through an RJ45 adapter board and cable to the drive board, which is also powered by 24 V.
- QSH4218-35-10-027 stepper motor: Connected to the TMCM-6212 Motor 0 interface through a motor cable. The drive output current directly rotates the motor.
Practical Tips for Packet-Capture Debugging
Tip 1: Reverse the Byte Order Before Converting Values
CANopen data fields use little-endian storage, with the least significant byte first. Reading the bytes from left to right as a value will produce the wrong result. Reverse the byte order first, then convert the value to decimal.
For example, suppose a TPDO frame is captured as follows:
Rx: 0x281: f3 dc 0a 00 f5 0a 00 00
Split the frame according to the TPDO mapping:
- Actual position (object 6064h):
f3 dc 0a 00→ reverse to00 0a dc f3= 711923 - Actual velocity (object 606Ch):
f5 0a 00 00→ reverse to00 00 0a f5= 2805
Figure 2. TPDO message parsing: COB-ID 281h = TPDO2 + Node 1, with position and velocity mapped into 64 bits. (Image source: ADI)
Tip 2: Velocity Is a Signed Value
Actual velocity (object 606Ch) is a 32-bit signed value. As shown in Table 4, the velocity gradually decreases as the motor approaches the target position and eventually becomes negative (ff ff ff 42 = –190), indicating that the motor has begun moving in the reverse direction. A negative velocity does not mean that the data is invalid—it indicates that the motor is reversing, or rotating counterclockwise. The highly irregular timestamps also confirm that the PDO is event-triggered.
Figure 3. TPDO triggering mechanism: event-driven transmission. (Image source: ADI)
Tip 3: Use Heartbeats to Confirm That Devices Are Online
Rx: 0x701: 05 NMT-EC Heartbeat (Node: 1, State: operational)
Rx: 0x77f: 05 NMT-EC Heartbeat (Node: 127, State: operational)
In both heartbeat frames above, 05 indicates that the device is in the Operational state. Node 1 is the TMCM-6212 server, and Node 127 is the Schneider PLC client. The two devices exchange heartbeats to confirm that both are online and operational.
Tip 4: Reading RPDOs—The PLC Is Sending the Target
Rx: 0x301: c0 22 f5 ff
Rx: 0x201: 1f 00
RPDO 0x201 carries the control word (object 6040h) sent by the PLC. RPDO 0x301 maps the target position (object 607Ah), a 32-bit signed value. Reversing the byte order gives ff f5 22 c0 = –712000 (Figure 4). In other words, the PLC sends a target position of –712000 to the motor controller through an RPDO, causing the motor to change direction and move toward the target.
Figure 4. RPDO message parsing: 0x301 maps target position object 607Ah. (Image source: ADI)
Summary
Three points summarize CANopen:
- SDO: Slow but reliable, with a request-and-response exchange; used to configure parameters in the Pre-Operational state.
- PDO: Fast and efficient, with no response required; used to transmit real-time data in the Operational state. TPDOs transmit and RPDOs receive.
- NMT: The state machine and heartbeat mechanism control the network’s operating modes and provide continuous visibility into which devices are online or offline.
Once these concepts are understood, CANopen capture logs become easier to read and motor-communication faults easier to troubleshoot. The same approach can be applied to robotics, laboratory automation, semiconductor equipment, conveyor systems, renewable-energy systems, and other industrial applications. The configuration method can also be reused with other ADI Trinamic CANopen modules and other CANopen-capable PLCs.
Related products:
- Motor drive: ADI TMCM-6212
- Stepper motor: ADI QSH4218-35-10-027



