Overview of CANOpen Protocol: Tutorial Series 07

Follow our public account to not miss any updates!

Overview of CANOpen Protocol: Tutorial Series 07

This tutorial is originally published by the author strongerHuang in October 2018.

Tags: CAN, CANOpen, CanFestival

Copyright: Commercial use is prohibited

Disclaimer:This document is for personal learning purposes only. Please contact the author through the public account for authorization if you wish to reprint.

1Introduction

The example provided in the previous chapter is a standard transmission example of data frame format. Based on the theoretical knowledge from earlier, I believe you can implement remote frames and other types of data transmission using the reference examples.

The previous tutorials discussed the CAN bus protocol, which relates to some low-level hardware aspects. From this article onward, we will officially discuss the CANOpen protocol.

The CANOpen protocol is a higher-level software protocol based on the CAN bus. The previous tutorial content establishes the underlying communication, and only upon successful underlying communication can the upper-level communication protocol be implemented.

Note: The content of the CANOpen protocol is extensive, and many aspects are abstract concepts. Therefore, some content may be relatively difficult to understand, but those doubts will be resolved as we delve deeper.

2

Overview of CANopen Protocol

CANopen is an application layer protocol for a network transmission system based on the CAN serial bus, adhering to the ISO/OSI standard model.

Different devices in the network exchange data through an object dictionary or objects, where the master node can obtain or modify data in the object dictionary list of other nodes via Process Data Objects (PDO) or Service Data Objects (SDO).

The main content of the CANOpen protocol is divided into three major parts, as shown in the device model diagram of CANopen.

Overview of CANOpen Protocol: Tutorial Series 07

The CANOpen protocol can be broadly divided into three major parts as shown in the diagram above. However, the content within these three major parts involves many…

Beginners can use the model in the diagram as a center and combine it with practical examples to understand the various abstract concepts of the CANOpen protocol.

The following sections will further elaborate on some concepts of the three major parts of the model, and beginners should try to understand as much as possible; if not, they can simply familiarize themselves with the content.

3

Communication Objects

The commonly used communication objects in the CANopen protocol include the following:

1) Network Management Object (NMT)

The network management object includes Boot-up messages, Heartbeat protocol, and NMT messages. Based on the master-slave communication model, NMT is used to manage and monitor each node in the network, primarily achieving three functions: node state control, error control, and node startup.

2) Service Data Object (SDO)

  • Includes receiving SDO (R-SDO) and sending SDO (T-SDO).

  • By using indexes and sub-indexes, SDO enables the client to access items in the device’s object dictionary.

  • SDO is implemented via the multi-domain CMS object in CAL, allowing the transmission of data of any length. When the data exceeds 4 bytes, it is split into several messages.

  • The protocol is a confirmed service type that generates a response for each message. SDO request and response messages always contain 8 bytes.

3) Process Data Object (PDO)

  • Includes receiving PDO (RPDO) and sending PDO (TPDO).

  • Used for transmitting real-time data, where data is sent from one creator to one or more receivers. Data transmission is limited to 1 to 8 bytes.

  • Each CANopen device contains 8 default PDO channels: 4 sending PDO channels and 4 receiving PDO channels.

  • PDO supports both synchronous and asynchronous transmission modes, determined by the corresponding communication parameters of the PDO.

  • The content of the PDO message is predefined and determined by the mapping parameters corresponding to that PDO.

4) Synchronization Object (SYNC)

The synchronization object is a message periodically broadcast by the CANopen master to the CAN bus, used to implement a basic network clock signal. Each device can decide whether to use this event for synchronized communication with other network devices based on its configuration.

5) Emergency Message (EMCY)

Messages sent during internal communication failures or application errors.

4

Object Dictionary

The object dictionary is the most important part of device specifications. It is an ordered collection of parameters and variables that contains all parameters describing the device and its network status.

Through the network, a set of objects can be accessed in an ordered predefined manner. This involves the issue of defining the generation of the object dictionary, which I will discuss later regarding object dictionary generation tools.

The CANopen protocol uses an object dictionary with a 16-bit index and an 8-bit sub-index. You can think of it as a Chinese dictionary; when we need to find a specific character (which can be understood as a defined piece of data), we look for the corresponding position through pinyin or strokes (index).

The main index of the CANOpen protocol object dictionary is shown in the diagram below; this is just a primary index. In fact, it can be further subdivided, but I will not elaborate on it here. Further details will be discussed later.

Overview of CANOpen Protocol: Tutorial Series 07

5

Application

This section on applications includes the implementation of application programs and device sub-protocols. From the CANopen device model, it is clear that the external interface is the IO interface, which is the interface we call.

This section on applications contains the upper-level content of the CANOpen protocol, which can be simply understood as encapsulated functions for user read and write operations.

This section on applications will be involved in later analysis with examples, and beginners can simply understand that there is such a section and know its general role in the CANOpen protocol.

6

Notes

1. Some content of this document comes from the internet and is for personal learning use only. Copyright is reserved, and commercial use is prohibited.

2. This article is edited and organized by me alone, and there may inevitably be some errors.

3. This article is included in the public account “strongerHuang”; follow the public account and reply with [CANOpen Tutorial Series] to view the entire series of tutorials.

7Conclusion

If you find the article helpful, remember to give me a thumbs up and share it. (A thumbs up is the motivation for the author to update articles)

Scan the QR code below and follow the public account to see more exciting content in the bottom menu!

Overview of CANOpen Protocol: Tutorial Series 07

Long press to recognize the QR code in the image to follow

Overview of CANOpen Protocol: Tutorial Series 07

Appreciation is recognition and support for the author!

Leave a Comment