Emergency Object
In order to be able to inform other participating devices on the CANopen bus about internal device errors or CAN bus errors, CANopen Bus Couplers can make use of the emergency object. It has a high priority, and provides valuable information about the state of the device and of the network.
Structure of the emergency message
The emergency object is always 8 bytes long; it contains first the 2-byte error code, then the 1-byte error register, and finally the additional code of 5 bytes. This is divided into a 2-byte bit field and a 3-byte parameter field:
Key
Example of emergency behaviour
- 1.
- The CAN error counter in a Bus Coupler has exceeded the warning limit (too many error frames). It sends an emergency telegram with the identifier 0x80 + node address (default setting) with the following contents:
00 81 91 80 00 01 00 00
The first three bytes (0x00 81 91) identify a communication error, while the bit field 0 (0x80) indicates that the CAN Warning Limit has been exceeded. The EMCY trigger (0x01) shows that the emergency was triggered as a result of exceeding the warning limit.
- 2.
- Immediately afterwards a cable goes open circuit on the second channel of the 4-20 mA analog input terminal plugged into the tenth location. The Bus Coupler sends another emergency telegram with the following contents:
00 50 91 80 01 10 0A 82
The first two bytes (0x00 50) identify a hardware error. Bits 0 (generic error), 4 (communication) and 7 (manufacturer-specific) are set in the error register (0x91). Bit 7 is set in bit field 0 (0x80), showing that the CAN warning limit continues to be exceeded. Bit 0 is set in bit field 1 (0x01), indicating a terminal error. The EMCY trigger (0x10) indicates that it is this terminal error that has triggered the emergency telegram. Finally, Info 0 (0x0A) indicates the terminal number (10) while Info 1 (0x82) shows in bit 1 and bit 7 that channel 2 has an error.
- 3.
- If the error counter now falls below the warning limit again, the coupler sends the following emergency telegram:
00 00 81 00 01 01 0A 82
The error code (00 00) in the first two bytes shows that an error has been reset. The error register (0x81) continues to show the device error, because the cable is still broken. Bit field 0 (0x00) shows that the communication error is no longer present. According to bit field 1 (0x01) the terminal error continues to be present. The EMCY trigger (0x01) indicates that the reason for the transmission was the resetting of the CAN warning limit. Info 0 and Info 1 continue to show the terminal's diagnostics status code.
- 4.
- Once the broken cable has been repaired this error is also reset, and the coupler sends the following emergency telegram:
00 00 00 00 00 00 00 00