
In the last issue, we introduced the basics of CANopen: the OSI 7-layer model, different data communication methods, and the object dictionary:
Do you know these basics about the CANopen communication protocol?
This time, we will focus on the three different communication models and definitions between nodes in the CANopen protocol.

Note: A CANopen network can support a maximum of 127 nodes. The main communication model relationships between nodes are as follows:
-
Master/Slave Relationship
-
Client/Server Relationship
-
Producer/Consumer Relationship

Master/Slave Relationship
In the master/slave relationship, the master node controls the message traffic, while the slave nodes only respond to requests from the master node. Messages can be exchanged either on a non-confirmation basis or on a confirmation basis.
-
For messages that do not require confirmation, they can be received by all nodes, a single node, or not received by any node.
-
For messages that require confirmation, the master node requests a message from the slave node. The slave node responds with the requested data frame.

The master/slave relationship is the most basic relationship in a CANopen network, mainly used for network management and node status control.
-
Master: Usually the Network Manager (NMT), responsible for controlling the overall state of the network, such as starting, stopping, or resetting nodes. The master node manages slave nodes by sending NMT commands (e.g., entering pre-operational state, entering operational state, etc.).
-
Slave: The slave nodes are other devices in the network that respond to the commands of the master node and enter the corresponding states based on the master node’s instructions. Upon startup, the slave nodes send a Boot-up message to notify the master node that they have joined the network.
The master/slave relationship is mainly used for network initialization, state management, and node configuration.

Client/Server Relationship
The client/server relationship is always established between two nodes and is bidirectional. The message exchange is always initiated by the client. The client sends a request to the server and expects to receive a confirmation (usually containing response data). Therefore, the client/server relationship always involves at least two frames (request/response).

The client/server relationship is mainly used for non-periodic data exchange, especially for device configuration and parameter read/write through Service Data Objects (SDO).
-
Client: Usually the master node or other devices that need to read or write parameters of slave nodes. The client requests access to the object dictionary of the slave node via SDO.
-
Server: Usually the slave node, which responds to the client’s SDO requests, providing or receiving parameter data.
This relationship is based on a request/response mechanism, where the client initiates the request and the server provides the response, suitable for device configuration, debugging, and parameter management.

Producer/Consumer Relationship
The producer/consumer relationship is used in scenarios requiring fast data exchange without data management. The producer sends a frame that can be received by one or more nodes (consumer devices). To avoid unnecessary reduction of bus bandwidth, data transmission is without confirmation.
The producer/consumer relationship is mainly used for periodic real-time data exchange, especially for data transmission through Process Data Objects (PDO).
-
Producer: The producer is the sender of the data, usually a sensor or another device that needs to send real-time data. The producer sends PDO data according to preset trigger conditions (such as events, time, or synchronization signals).
-
Consumer: The consumer is the receiver of the data, usually an actuator or another device that needs to receive real-time data. The consumer receives and processes data by mapping PDO data to its own object dictionary.
This relationship is suitable for scenarios with high real-time requirements, such as the transmission of control commands and the collection of sensor data.

Conclusion
These three relationships together constitute the communication models between nodes in the CANopen protocol, suitable for different application scenarios, ensuring efficient operation of the network and correct data transmission.
-
Master/Slave Relationship: Used for network management and node status control.
-
Client/Server Relationship: Used for non-periodic device configuration and parameter read/write.
-
Producer/Consumer Relationship: Used for periodic real-time data transmission.
Reference Links:
-
https://cscapehelp.hornerautomation.com/Content/Networking%20and%20Communications/NC-CANopen-Overview.htm#CANopen2
-
https://www.simmasoftware.com/canopen-explained/
-
https://www.can-cia.org/can-knowledge/canopen/

- [Video Course] Codesys V3.5 Series Introduction Course(13 people have learned)
- [Video Course] Codesys SoftMotion Basics Course(39 people have learned)
- [Video Course] Codesys SoftMotion Electronic Gear Course(12 people have learned)
- [Video Course] Codesys SoftMotion Electronic Cam Course(9 people have learned)
- [Video Course] Making Custom Libraries in Codesys(22 people have learned)
-
Codesys V3.5 Series Comprehensive Free Resource Compilation
-
Top Ten Common Filtering Algorithms (ST Language)
-
What Does a PLC Integrated with Chat GPT Look Like?
-
Sharing of the Top 10 PLC Programming Books of 2023
-
Customize Your CODESYS Motion Controller
-
MC_Power.status = FALSE, Can the Axis Still Move?
-
ST Language Learning Resource Compilation

——–END——–

If you like this article, please share and “like” it below