CANopen protocol is a high-level protocol based on CAN serial bus system and application layer CAL, and it is also a standardized protocol for various industries. CANopen protocol provides necessary implementation methods for distributed control and embedded system applications, mainly providing: (1) interoperability and interchangeability between different CAN devices. (2) Standardized and unified system communication model. (3) Device description method and network functionality. (4) Arbitrary expansion of network node functions.
CANopen protocol is based on the communication specification CiA DS-301, which defines a series of device specifications, such as CiA DSP-401, CiA DSP-404 and others, thus providing methods for configuring communication parameters and data, defining communication between devices and specific behaviors between specific devices ( such as digital I/O, analog I/O, RS485 communication, etc.), and defining standardized application objects, basic functions, and network functionalities.
CANopen protocol uses a series of concepts such as Object Dictionary (OD), Electronic Data Sheet (EDS) to describe device and protocol related information, and also specifies various communication mechanisms including Service Data Objects (SDO), Process Data Objects (PDO), and network management. In this article, we will briefly analyze the Object Dictionary, Service Data Objects (SDO), and Process Data Objects (PDO).
1 Object Dictionary (OD)
The Object Dictionary is the most important part of the device specification. In fact, it is an ordered collection of parameters and variables, which contains all parameters for device description and device network status, meaning that it is a set of objects that can be accessed in a predefined ordered manner over the network. CANopen protocol adopts an Object Dictionary with 16 bit index and 8 bit sub-index, the structure of the Object Dictionary is shown in Table 1. A master node or configuration tool can access all values in the Object Dictionary of the slave nodes.
Table 1 Object Dictionary Structure
The implementation of the Object Dictionary is key to the entire CANopen protocol. Therefore, when using the Object Dictionary to establish object descriptions, it is crucial to accurately describe the meaning of the established objects. For example, the description of the Object Dictionary for two analog channels of a node is shown in Table 2. For such a description, it can be achieved by creating a library file containing all object information, similar to C language implementation.
Table 2 Object Dictionary Description
The C language structure used to implement the above Object Dictionary:
2 Electronic Data Sheet (EDS)
The Electronic Data Sheet EDS file is an ASCII file that provides a detailed description of CANopen devices. EDS files facilitate the integration of slave devices from different manufacturers into master station systems, or the integration of slave devices from different manufacturers into the master station system; each CANopen device manufacturer needs to provide EDS files related to the devices.
EDS files can be imported into different manufacturers’ CANopen master station configuration software, allowing users to quickly configure setting parameters (Object Dictionary).
EDS file structure is similar to Windows INI configuration files.
For further information, please pay attention to the next WeChat update.
(Original article reprinted from: “Embedded Network Technology Applications”, authors: Wang Junbo, Xu Bugong, South China University of Technology)