Quickly understand CANopen communication (Brief description of CANopen protocol)
CANopen is a high-level communication protocol based on the CAN (Controller Area Network) bus. It defines a series of standard communication objects and communication services, allowing devices from different manufacturers to communicate and exchange data with each other.
This article will briefly explain the CANopen communication message and protocol:
1. CANopen Protocol Overview
Definition:CANopen is a high-level communication protocol based on the CAN bus, including communication sub-protocols and device sub-protocols. It is often used in embedded systems and is also a field bus commonly used in industrial control.
Standard:CANopen is drafted and reviewed by the non-profit organization CiA (CAN in Automation). The basic CANopen devices and communication sub-protocols are defined in CAN in Automation (CiA) draft standard 301.
Application:CANopen protocol has been widely used in many fields such as motor control (such as stepper/servo motors), robotics, medical equipment, and the automotive industry.
2. CANopen message structure
CANopen messages are mainly composed of the following parts:
COB-ID:Communication object identifier, used to distinguish different communication objects and message types. It consists of a function code and a node ID, where the function code is used to indicate the message type (such as NMT, PDO, SDO, etc.), and the node ID is used to identify the device sending the message.
Data field:Contains the actual transmitted data content, and the data length and specific content depend on the message type.
3. CANopen main message types
1.NMT (Network Management) message
Used for network management, such as starting, stopping and resetting nodes.
Example: NMT messages may contain control commands, such as starting a device, stopping a device, etc.
2.PDO (Process Data Object) Message
Used for real-time data transmission, usually for fast exchange of control and status information.
PDO messages can be sent based on event triggers, remote frames or synchronization mechanisms.
Example: PDO messages may contain real-time position, speed and other information of the motor.
3.SDO (Service Data Object) Message
Used for non-real-time data transmission, usually for reading and writing configuration and parameters.
SDO messages support segmented transmission and can transmit data exceeding the length of the CAN frame.
Example: SDO messages may be used to read or write configuration parameters of the device.
4.EMCY (Emergency) Message
Used for the transmission of emergency messages to report errors and abnormal conditions.
When a fatal error occurs in a device, an EMCY message will be sent to notify other devices in the network.
4. CANopen communication model
Communication between CANopen devices can be divided into the following three communication models:
Master/Slave Model:A CANopen device acts as a Master and is responsible for transmitting or receiving data from other devices (called Slaves). The NMT protocol uses this model.
Client/Server Model:Defined in the SDO protocol, the SDO Client transmits the index and sub-index of the object dictionary to the SDO Server to request or write data.
5. CANopen Object Dictionary
Definition:The object dictionary is the core concept of the CANopen protocol. It is an ordered group of objects. Each object is addressed by a 16-bit index value, which is usually called an index. Its valid range is between 0x1000 and 0x9FFF. In order to allow access to individual elements in the data structure, an 8-bit index value is also defined, which is usually called a sub-index.
Function:The object dictionary contains all the parameters that describe the device and its network behavior, and is the basis for device communication and configuration.



















