1、Special Protocols (Specialprotocols)
To facilitate CANopen master station management of slave stations. In the CANopen protocol, special COB-ID has been predefined for special functions, mainly including the following types of special messages.
1.Synchronization Protocol (Syncprotocol)
Synchronization (SYNC), this message object mainly implements synchronized transmission across the entire network, as shown in the figure, just like the formations in a military parade, where all soldiers march in unison.
1Synchronization Protocol and Military Parade Formation
Each node uses this synchronization message as a PDO trigger parameter, so the COB-ID of this synchronization message has a relatively high priority and the shortest transmission time.Typically, 80h is chosen as the CAN-ID for the synchronization message.
2Synchronization Message
The synchronization message is generally sent by the NMT master, and the CAN message data is 0 bytes. However, if there are 2 synchronization mechanisms within a network, different synchronization cycles need to be set. For example, some nodes send 1 PDO per 1 synchronization frame, while other nodes send 1 PDO after receiving 2 synchronization frames. Therefore, the synchronization starting value in the PDO parameters plays a role.
In the synchronization protocol, there are 2 constraints:
Synchronization Window Time: Index 1007h constrains the timeliness of PDO transmission from nodes after the synchronization frame is sent; only PDOs sent within this time are valid, and those sent after this time will be discarded.
Communication Cycle Period: Index 1006h specifies the cycle period of the synchronization frame.
2.Timestamp Protocol (Time-stamp protocol)
The timestamp object (Time Stamp) is sent by the NMT master to provide a common time reference for all nodes in the network, effectively synchronizing the network, as shown in Figure 9.3. This is crucial for fault diagnosis, such as fire alarms in trains, where maintenance personnel need to know the exact time of the alarm and correlate it with the operational status of other devices at that moment.
3Timestamp and Time Synchronization
The timestamp protocol uses a broadcast method, requiring no node response, with the CAN-ID set to 100h, data length of 6, and data representing the time difference from January 1, 1984, at 0 hours. As shown in the figure, nodes store this time in the object dictionary 1012h index.
4Timestamp Protocol
Since time conversion can be quite cumbersome, a conversion function has been prepared for the convenience of readers.
5Conversion Function
6Conversion Function
3.Emergency Message Protocol (Emergency protocol)
The emergency object (Emergency) is triggered when an internal error occurs in the device, sending the internal error code to notify theNMT master station. Emergency messages are diagnostic messages and generally do not affect CANopen communication; their CAN-ID is stored in 1014h index, generally defined as 080h+node-ID, with data consisting of 8 bytes.
7Emergency Message
It includes EEC: Emergency Time Error Code, ER: Error Register, MEF: Vendor-specific Error Code. Of course, these all require a lookup table to diagnose.
8Emergency Message Error Codes
Similar to the production prohibitive time of PDO, emergency messages also have a production prohibitive time, stored in the object dictionary 1015h, to limit the continuous sending of emergency messages by nodes, which could overload the bus.
This article is reproduced from Guangzhou Zhiyuan (Original authors: Zhou Ligong, Huang Minsi)