CANopen networks: installation, CiA 402 and debugging
CANopen runs the CiA 301 communication profile over a CAN bus, with the CiA 402 device profile for drives. It is robust and widely understood at moderate axis counts; most problems in the field come from termination, bit rate and the axis state machine.
5 questions answered
Basics
Commissioning
Troubleshooting
Basics
01
How does CANopen bit rate relate to bus length?
The higher the bit rate, the shorter the permitted bus, because within one bit time the signal must reach the far end of the line and come back. CiA's recommended values are about 25 m at 1 Mbit/s, 100 m at 500 kbit/s, 250 m at 250 kbit/s and 500 m at 125 kbit/s. Every node must run at the same bit rate.
Stub lengths count too; keep drops short
A single node at another rate disturbs the whole bus
How do I terminate a CANopen bus, and how do I measure that it is right?
A 120 Ω termination resistor goes at each of the two physical ends of the CAN line, between CAN_H and CAN_L, and nowhere in between. With power off, measure between CAN_H and CAN_L: about 60 Ω is correct, 120 Ω means only one resistor is fitted, and around 40 Ω means there is one too many.
The CANopen drive communicates but the motor will not enable. What is missing?
There are two separate state machines. First the node must be put into Operational with NMT; only then do PDOs flow. Then the CiA 402 axis state machine is walked through with the controlword (0x6040): Shutdown (0x0006), Switch On (0x0007), Enable Operation (0x000F), with the statusword (0x6041) confirming every step. The mode of operation is selected with object 0x6060.
If in Fault, reset first with bit 7 of the controlword
What is the difference between PDO and SDO, and which do I use for what?
PDOs (Process Data Objects) are for cyclic process data: values that change every cycle, such as target position, actual position, controlword and statusword, sent without waiting for a reply. SDOs (Service Data Objects) are for parameter access: they read or write one object and wait for an answer. Carry motion commands in PDOs and settings in SDOs.
Synchronous PDOs are triggered by the SYNC message
The node must be in Pre-Operational to change the PDO mapping
The CAN bus goes bus-off and shows error frames. What can cause it?
Bus-off is a node disconnecting itself after its error counter passes the limit. The root cause is almost always physical: missing or extra termination, one node at a different bit rate, two devices with the same node ID, CAN_H and CAN_L swapped, or a long line with no common reference (CAN_GND) connected.
Repeat the 60 Ω measurement with power off
Confirm every node ID is unique
Ground the shield properly along the line, not left floating