Learning the CAN Bus Communication Protocol – CANopen Protocol

Learning the CAN Bus Communication Protocol - CANopen Protocol

Click the blue text

Follow us

1. Definition and Background

CANopen is a high-level protocol based on the CAN (Controller Area Network) bus, used for communication between devices in various fields such as industrial automation, vehicles, ships, and medical equipment.

It is an application layer protocol built on top of the CAN physical layer and data link layer, released in 1993 by the CiA (CAN in Automation) organization,

with the aim of enabling devices from different manufacturers to communicate easily over the CAN bus.

Learning the CAN Bus Communication Protocol - CANopen Protocol

2. Layered Structure and Communication Model

Layered Structure

  • The CANopen protocol architecture follows the OSI (Open Systems Interconnection) basic reference model, mainly including the communication protocol (Communication Profile), device sub-protocol (Device Profile), and application sub-protocol (Application Profile).

  • The communication protocol specifies the usage rules for basic communication objects (Communication Object, COB-ID), service data objects (Service Data Object, SDO), and process data objects (Process Data Object, PDO), which are used to achieve basic data transmission between devices.

  • The device sub-protocol defines the functions, behaviors, and parameters for different types of devices (such as motor drivers, sensors, etc.), ensuring that devices of the same type have a unified interface for interchangeability and interoperability.

  • The application sub-protocol further specifies the communication standards for specific application scenarios, such as motion control applications and distributed I/O applications.

Communication Model

  • CANopen adopts a master-slave communication model, where there is one master node (NMT Master) and multiple slave nodes in a CANopen network. The master node is mainly responsible for network management tasks, such as starting and stopping slave nodes, and configuring slave node parameters. The slave nodes send and receive data based on commands and configurations from the master node.

  • Data exchange between devices is primarily achieved through PDO and SDO.

  • PDO is used for fast, real-time transmission of process data, such as sensor values or control commands, with high transmission efficiency and no protocol overhead, typically for periodic data transmission;

  • SDO is mainly used for configuring device parameters, reading device status, and other non-real-time, occasional data transmissions, which include protocol overhead to ensure the accuracy and integrity of data transmission.

The IDs are as follows

Learning the CAN Bus Communication Protocol - CANopen ProtocolLearning the CAN Bus Communication Protocol - CANopen Protocol

3. Object Dictionary

  • The object dictionary is one of the core concepts of the CANopen protocol. It is an ordered collection of objects used to store all parameters, configuration information, and accessible data of a device. Each object in the object dictionary has a unique 16-bit index (Index) and an 8-bit sub-index (Sub-Index).

  • For example, a device’s manufacturer name, device type, communication parameters, etc., are stored in the object dictionary. By accessing the object dictionary, various information about the device can be obtained and the device can be configured. During communication, the mapping of PDO and SDO is usually associated with the object dictionary, where the data transmitted by PDO typically corresponds to certain objects in the object dictionary, and SDO can perform read and write operations on the objects in the object dictionary.

4. Network Management

  • The network management function of CANopen is mainly implemented by the master node through the NMT (Network Management) service. The master node can send NMT commands to start, stop, or reset slave nodes, and can also obtain status information from the slave nodes. Upon receiving NMT commands, the slave nodes execute the corresponding operations as required by the commands, such as entering pre-operational state, operational state, or stopped state.

  • This network management mechanism allows the entire CANopen network to initialize, configure, and operate in an orderly manner, and facilitates fault diagnosis and recovery in case of failures.

Learning the CAN Bus Communication Protocol - CANopen Protocol

Learning the CAN Bus Communication Protocol - CANopen Protocol

Learning the CAN Bus Communication Protocol - CANopen ProtocolLearning the CAN Bus Communication Protocol - CANopen Protocol

*Disclaimer: This article is original or forwarded by the author.If it inadvertently infringes on someone’s intellectual property, please inform us and we will delete it.The above images and text are sourced from the internet. If there is any infringement, please contact us in a timely manner, and we will delete it within 24 hours.The content of the article represents the author’s personal views,and the Automotive Ethernet Technology Research Laboratory reprints it only to convey a different perspective, not representingthe Automotive Ethernet Technology Research Laboratory’s endorsement or support of this view. If there are any objections, please contact the Automotive Ethernet Technology Research Laboratory.

Original link:

https://blog.csdn.net/weixin_60324241/article/details/143724814

Leave a Comment