CANopen

CAN Application Layer Protocol

Definition

CANopen is a high-level application protocol built on the CAN bus, defining object dictionaries, SDO/PDO communication, device state machines, etc. It is widely used in motion control, servo drives, inverters, I/O modules, and more. It belongs to the CAN protocol family along with DeviceNet, and protocol converters can convert CANopen data to Modbus or OPC UA for system interconnection.

Protocol Architecture

CANopen is based on CAN 2.0A/2.0B, using 11-bit or 29-bit identifiers. The Object Dictionary is a standardized storage structure for device parameters, with each object having a 16-bit index and an 8-bit sub-index. SDO (Service Data Object) is used for point-to-point parameter read and write, supporting segmented transfer of large objects; PDO (Process Data Object) is used for real-time data exchange, supporting synchronous/asynchronous and RTR modes. NMT (Network Management) manages node states (initialization, pre-operational, operational, stopped), and heartbeat and node monitoring can detect node offline status. EDS (Electronic Data Sheet) describes the device's object dictionary, facilitating configuration and integration.

Application Areas

CANopen is widely used in the field of motion control: servo drives receive position/velocity commands via PDO and provide status feedback; inverters support speed control and fault diagnosis; I/O modules collect digital and analog signals; sensors such as encoders and limit switches are connected. Industrial gateways and protocol converters can interconnect CANopen networks with Modbus, EtherNet/IP, OPC UA, etc., achieving data acquisition and monitoring of field devices by DCS, SCADA, and MES.

Comparison with DeviceNet

DeviceNet was developed by ODVA and is mainly popular in North America; CANopen is maintained by CiA and is widely used in Europe and global automation markets. Both are based on the CAN physical layer, but their application layer protocols differ. DeviceNet shares the CIP protocol with EtherNet/IP, making it convenient to integrate with equipment from manufacturers like Rockwell; CANopen is often used together with European Ethernet protocols such as EtherCAT and Powerlink. Selection should consider the existing device ecosystem, regional practices, and system integration requirements.

How the object dictionary and process data divide the work

The object dictionary is the index of device parameters. Process data is what is exchanged every cycle. A service data object is the right tool at power-up to write a limit, write a gear ratio, or read a fault code. It is acknowledged and it can be segmented, but it is the wrong tool for position on every control cycle. A process data object packs a few pre-mapped objects into one frame, sends them inside the sync window, and the slave updates its target from the mapping it received. If the mapping was never done, or the order does not match the master, the master still sees frames, while the drive treats the velocity word as the position word. An electronic data sheet only states the objects the manufacturer declared. If the firmware on site is a different revision, writing a sub-index that does not exist returns an abort code. The device will not fall back to the default you imagined.

The conditions are a single baud rate for the whole network, terminating resistors only at the two ends of the trunk, and node IDs set before power-up. There is usually one sync producer. If several nodes emit sync frames, slave timing falls apart. Process data length is limited by the CAN frame. More than eight bytes means segmentation or a different mapping. A long service-data object cannot be pushed into process data. The heartbeat or node-guarding time must be longer than the slave's worst response and shorter than the time the process can be left uncontrolled. Enable only one of those two guards. If both are configured and they do not match, the master will decide the slave is offline.

What a wrong node state machine does

After power-up a slave starts in initialization, then enters pre-operational. In pre-operational, service data can be read and written, and process data has no effect. If the master never sends Start Node, parameters can be read and the motor does not move. The stopped state turns process data off. After an emergency stop, if the start sequence is not run again, the drive stays without a command. An identifier clash is harder to find than a broken wire. Two nodes on the same node ID succeed intermittently, and the error-frame count rises. A baud rate that is off by one step makes some nodes invisible and lets others answer a short frame by chance. The bit time on a scope is what confirms it.

When the bus is tied to a higher-level system, the gateway should publish data only after the operational state is stable. Reporting a zero from the pre-operational state as "speed is zero" makes the platform think the device is online and stopped. Fault codes live in the object dictionary, not in process data. Mapping only one bit of the status word drops the specific cause. Reusing an old mapping after a drive is replaced will silently shift process data if the new firmware moved object indexes. The debug order is bus electrics, node ID, a service-data read of the version, mapping, then operational. Do not write a target position every cycle from the moment of power-up.

Overflow inside the sync window

The sync period has to hold the sync frame and every process-data frame. If more nodes are added and the old sync period is kept, later frames spill into the next window. Slaves keep the old beat, and position following lags by a fixed amount. After several lost sync frames, a slave should go to the agreed stop or hold. It should not keep executing the last target until someone notices. An emergency frame's identifier has higher priority than ordinary process data. If that identifier is given a low priority, an emergency stop waits behind cyclic data.

Service-data timeouts should be split by object length. Reading one byte and reading a whole record cannot share a very short timeout, or long objects always fail while short ones look fine. After a factory reset or a node replacement, mapping and heartbeat both have to be sent again. Restoring the node ID is not enough. When error frames suddenly increase, look at the terminators and the drops first. Do not edit the object dictionary first. The master log should keep the abort code as received. "Communication failed" cannot tell a missing index from write protection or a wrong length.

Related Terms

Return to hardware knowledge base