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.
It is strongly recommended that emergency objects are evaluated - they provide a valuable source of information.
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:
11 bit identifier | 8 bytes of user data | |||||||
---|---|---|---|---|---|---|---|---|
0x80 (=128dec) + node-ID | EC0 | EC1 | EReg | Bit field 0: | Bit field 1: | EMCY | Info 0 | Info 1 |
Parameters | Explanation | |
---|---|---|
EC0 | Error Code Low-Byte. Not used (always zero) | |
EC1 | Error Code High-Byte. 0x50 = device error, 0x81 = communication error, 0x00 = error reset | |
EReg | Error register. 0x81 = device error, 0x91 = communication error | |
Bit field 0: Comm | Bit field communication error: | |
0x01 | Guarding delayed or failed | |
0x02 | Sync delayed or failed | |
0x04 | Incorrect PDO length parameterized | |
0x08 | Event timer timeout: RxPDO not received in time | |
0x10 | Receive queue overrun | |
0x20 | Transmit queue overrun | |
0x40 | CAN bus OFF | |
0x80 | CAN warning limit exceeded | |
Bit field 1: DevErr | Bit field device error: | |
0x01 | Terminal error | |
0x02 | K-Bus error / IP-Link error | |
0x03 | - | |
0x04 | EEPROM error | |
0x10 | Unsupported terminal plugged in (BK5110, LC5100) | |
0x80 | Altered HW configuration. | |
EMCY trigger | The emergency trigger byte contains the code for the particular error that has triggered the emergency telegram. If an error has been rectified, an emergency telegram with the error code 0x0000 is sent, and the emergency trigger contains the description of the error that has been corrected. Errors that are still current are signaled here in the bit fields. Once the Bus Coupler is free of errors, it sends an emergency telegram containing zeros everywhere other than in the emergency trigger. | |
0x01 | CAN warning limit exceeded (too many error frames) | |
0x02 | CAN bus OFF state has been reached. Since the coupler can no longer send an emergency telegram, an emergency telegram with trigger 0x40 is sent when the bus leaves the "off" state (a new CAN controller initialization). | |
0x03 | Transmit queue overrun: CAN messages are being lost | |
0x04 | Transmit queue overrun: CAN messages are being lost | |
0x06 | Incorrect PDO length parameterized (check mapping). | |
0x07 | Sync delayed (time-out after communication cycle period, index 0x1006) or failed | |
0x08 | Guarding or heartbeat delayed (timeout following guard time x lifetime factor, or following consumer heartbeat time) or failed. | |
0x09 | Altered HW configuration. The inserted terminals or the composition of the extension modules has been changed since the last save. | |
0x0A | Event timer timeout: RxPDO not received in time | |
0x0B | Logical Tx queue overrun: SYNC interval too short. | |
0x0C | Unsupported terminal plugged in (BK5110 or LC5100) Info 1: terminal number (1...64) | |
0x0E | EEPROM error; an error occurred when saving the configuration in the EEPROM | |
0x0F | K-Bus error 0x05: Error in register communication | |
0x10 | Terminal error See the status register of the terminal or of the extension module for more detailed information about the type of error. | |
Info 0, Info 1 | Contains additional error information; its meaning depends on the emergency trigger (see above) |
Example of emergency behaviour
- 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. - 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. - 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. - 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