Why Is CANopen Communication So Popular in Servo Control?

Click the blue text to follow Servo and Motion Control

Why Is CANopen Communication So Popular in Servo Control?

1. The Origin of CANopen, Where Did CANopen Come From?
The CAN protocol was developed by the German company Bosch in 1983 for network communication in automotive transmission systems. It later became the international standard ISO11898, and currently, CANopen is drafted and reviewed by the non-profit organization CiA (CAN in Automation). The basic CANopen device and communication sub-protocols are defined in the CAN in Automation (CiA) draft standard 301. Sub-protocols for specific devices are expanded based on CiA 301, such as CiA401 for I/O modules and CiA402 for motion control.
2. What Are the Advantages of CANopen Hardware?
The most prominent feature of the CAN protocol is error detection, limitation, and handling. When a CAN device detects a bus error, it will reject the previously received bit sequence and send an “error frame,” which is entirely handled by the CAN chip itself without the need for human programming.
It supports multiple masters, similar to Profibus DP, where each device on the bus is both a master and a slave, eliminating the need for manual arbitration, making it easier for users to develop.
With a short frame structure, CAN messages are typically only 8 bytes long, making data frames very short and giving them an inherent advantage in anti-interference capability. To explain why short frame structures are better at resisting interference: if the communication message is long, sending a frame takes longer; if interference occurs, the hard-earned message may not be received by the other party, leading to frustration.
Low cost is another advantage, as CAN peripherals can be found on most mainstream chips today, with MCUs costing around 20 yuan that support CAN peripherals, and some even support two CANs. This is due to the active promotion by CiA.
3. What Are the Advantages of CANopen Software?
CANopen is primarily promoted by CiA, a non-profit organization. There is a wealth of CANopen protocol documentation available online for anyone to download. Commonly used documents like DS301 (Draft Standard) and DS402 are almost like the “Sunflower Manual” for CAN enthusiasts, and it’s essential to have a copy.
There are many open-source projects for CANopen protocol development, one of which is CanFestival. I have done a port on the Beike MT4414TE-CAN touchscreen using an 8-bit microcontroller. This source code is somewhat resource-intensive, but there are many streamlined versions based on MCUs available online.
Developing a complete CANopen protocol stack is a challenging task, and doing it well is very difficult. The difficulty lies in your understanding of the CANopen protocol, such as EMCY, resetting nodes, whether “NO Initialization” is needed, heartbeat, and node guard requirements. This cannot be considered an advantage.
4. Why Are So Many Companies Promoting CANopen?
CANopen is an excellent communication protocol for motion control, adopting some object-oriented design ideas such as object dictionaries, Process Data Objects (PDO), and Service Data Objects (SDO).
CANopen has become the most common protocol in Europe, with every automation company having a CANopen communication interface, making it a low-cost option. Low-cost does not mean poor quality; it simply indicates a better cost-performance ratio. CANopen defines a complete synchronization control mechanism, making it a mainstream motion control protocol. Besides running on the CAN bus, it has also been adapted to Ethernet (CANopen over Ethernet), forming the well-known PowerLink and EtherCat industrial Ethernet protocols.
To elaborate further, the so-called motion control bus standards have little significance because motion control technology is in the hands of various manufacturers. Each slightly larger manufacturer has its proprietary motion control protocol, such as Mitsubishi’s SSCNET, Yaskawa’s MECHATROLINK, Beckhoff’s CANOPEN and EtherCat, Schneider’s CANopen, Siemens’ SiMotion, B&R’s PowerLink, and Bosch Rexroth’s SERCOS.
Due to the advantages of CANopen (see DS402, servo control standard) in motion control, especially synchronization control, regardless of the manufacturer’s tier, they have incorporated their elements into motion control systems, resulting in systems that are typically closed and rarely interconnected. In fact, achieving interconnectivity is quite challenging.
Second and third-tier manufacturers develop their own CANopen protocols based on their needs, moving them to different physical layers to run, forming their motion control systems. The performance quality depends on their understanding of the CANopen protocol.
Basics: Nine Obscure Concepts in the World of CANopen
1. DCF
The DCF is the configuration data archive file for the CAN network. Its role is minimal, as this option is available in Codesys software.
2. EDS
The Electronic Data Sheet describes the attributes and parameters of a slave device and serves as a description of the object dictionary for the slave device. For example, if a servo drive’s internal parameters (each parameter corresponds to a position in the object dictionary, determined by index and sub-index) have not changed, its corresponding EDS file will not change. It should be noted that not all master controllers need to use EDS; for example, Beckhoff does not require it; they need you to be sufficiently familiar with CANopen DS301 and DS402 to manually align configurations. Beike FD and JD servos follow the DS402 standard to create EDS files that users can directly configure, reducing development cycles.
3. Reset Node
When a device encounters an exception (such as a slave disconnecting and reconnecting, using M258 to test Beike FD servo), the master controller will send a “reset node” command. Beike’s ED servo resets the driver to factory values and also restores the CAN communication parameters to default values. For FD and JD servos, all configuration parameters except for CAN communication parameters are reset to factory values.
4. EMCY
The Emergency Message is sent by a slave like a servo after a power failure to inform the master controller of its status. Generally, after a servo loses power, the capacitor can ensure that it sends this message.
5. Heartbeat and Node Guard
Configuring the heartbeat parameters involves setting the heartbeat cycle and heartbeat consumer time. This consumer time acts as a timeout parameter. After the master station receives a heartbeat, it starts timing; if the next heartbeat is not received within the timeout period, it assumes the slave is offline and reports an error, handling it according to the user’s configured error handling method.
Each node in the network can configure a heartbeat; the master can listen to the slave, and the slave can listen to the master, and slaves can also listen to each other. There is a producer-consumer concept here: devices on the bus define themselves as either heartbeat producers or consumers. Producers generate heartbeats, and consumers listen for heartbeats, then respond accordingly upon detecting an anomaly.
Personally, I believe the heartbeat’s role is minimal. Suppose a device disconnects and reconnects, and this device happens to be a servo using the homing function. After power is restored, the home position changes. In some customer applications, this situation arises, and the advice is, “Young man, quickly power off and restart!”
Node guard functions similarly to heartbeat but can read the CANopen communication status of the slave device (initialization, pre-operation, operating, stopped), which falls under the DS301 category.
6. The Difference Between DS301 and DS402
DS301 is a communication protocol stack, while DS402 is an upper-level protocol built on DS301, belonging to servo control protocols. The protocol defines the function of each object dictionary value, such as 0x6040, which is the control word. DS402 defines all the functions that a servo should possess, and manufacturers can develop according to the protocol definitions.
7. Object Dictionary
From a software perspective, the object dictionary is essentially a collection of data structures. It can be understood as a book that CANopen devices must refer to for their behavior guidelines. Regardless of what they do, as long as their behavior references the object dictionary, they must consult the dictionary first to decide whether to act. For example, when to send TPDO, this action requires checking the corresponding transmission type and Event Timer in the object dictionary. Additionally, the principle of PDO mapping, such as the data to be sent, is derived from consulting this book to see what content is written there, and then sending that content in the form of PDO.
For instance, if your program receives a CAN message, and the accessible object in the object dictionary is SDO, you must first determine if it is an SDO object. If so, your program needs to look up the object dictionary (a sorted collection of data structures) using the specified index and sub-index in the SDO to find the corresponding object and then operate on this object according to the instructions in the SDO, such as assigning a value to a variable in the dictionary.
8. SDO
This is simple; it operates in a request-response mode similar to serial communication, where the master sends a request frame and the slave replies with a response frame.
Here are a few examples for clarity.
To write the 1 byte data: 0xFD in the object dictionary of node 5, at index 0x1400, subindex 2, send:
605 2F 00 14 02 FD 00 00 00
If successful, node 5 responds:
585 60 00 14 02 00 00 00 00
To write the 4 bytes data: 0x60120208 in the object dictionary of node 5, at index 0x1603, subindex 1, send:
605 23 03 16 01 08 02 12 60
If successful, node 5 responds:
585 60 03 16 01 00 00 00 00
9. PDO
Divided into TX-PDO and RX-PDO.
Why Is CANopen Communication So Popular in Servo Control?
Why Is CANopen Communication So Popular in Servo Control?
The above images illustrate the PDO configuration process, 0x1402 (receive PDO communication parameters), the cob-id used by PDO, transmission type, Inhibit time, Event Timer.
0x1602 (mapping object), in the example above, mapped to Control word and Target position.
Why Is CANopen Communication So Popular in Servo Control?
Here, I want to emphasize the Transmission Type; the following are the supported centralized methods in Codesys:
Acyclic sync (value 0): Synchronous PDO, with the synchronization method defined by the specific device protocol.
Cyclic sync (value 1-240): Synchronous PDO, sent every N SYNC cycles.
Sync rtr (value 253): Synchronous PDO, sent upon receiving a remote frame request.
Async (value 253): Asynchronous PDO, sent upon receiving a remote frame.
The last two Async (254, 255) are defined by the device manufacturer and are commonly used. Events trigger their sending. Most manufacturers employ a data change sending method, and both FD and JD servos operate similarly, sending data changes. It’s important to set the “Inhibit time” to reduce CANOPEN communication bandwidth.
Specific Case
The master controller writes target position and mode of operation to the servo, with this PDO’s cob-id being 0x200 node id. The transmission method is 255 or 254, and the inhibit time is 100, which is 10ms.
– END –

Popular Articles

Why Is CANopen Communication So Popular in Servo Control?

Servo and PLC Dual Drive, Hexin Strengthens Its Position in the Motion Control Market

Why Is CANopen Communication So Popular in Servo Control?
The low latency required by servos may not be met by 5G
Why Is CANopen Communication So Popular in Servo Control?

Have You Seen a More Comprehensive Motor Control Summary?

Why Is CANopen Communication So Popular in Servo Control?

Conversation with Engineers: The Matters of Mask Machine Production

Why Is CANopen Communication So Popular in Servo Control?

Beginner’s Guide | Quick Start with Panasonic Servos

Why Is CANopen Communication So Popular in Servo Control?
Special Note: This article’s material comes from Industrial Control Sharing, representing only the original author’s views. Copyright belongs to the original author! After the editor collects and organizes it, it is shared for learning! If you believe any content infringes your rights, please contact the editor! We will verify and correct it immediately!

Leave a Comment