BECKHOFF Fieldbus Components: Diagnostics and Error Handling

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.

Emergency Object 1:Warning 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:
Comm
Bit field 1:
DevErr
EMCY
Trigger
Info 0 Info 1
Key
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).
Info 0: parameterized (expected ) PDO length in bytes
Info 1: current PDO length (results from the added lengths of the mapped objects)
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.
The coupler could not deliver all the TxPDOs before the following SYNC telegram. The TxPDOs are then, for instance, delivered in every second SYNC interval.
Remedy: Lengthen the SYNC interval or raise the transmission type. In some cases it may be appropriate to reduce the I/O count at this bus station (e.g. by moving I/Os to the neighboring station)
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
Info 0: Error type:
0x03: command error (no terminal number),
0x04: Interruption in the K-Bus or in IP-Link

0x05: Error in register communication
0x0B: Timeout in extension box
0x0C: More than 120 modules in the IP-Link ring
0x0D: K-Bus command error, or IP-Link: Unknown extension box
0x0E: Alignment error
0x0F: Number of terminals changed
0x10: K-Bus reset: Bit length of K-Bus changed
0x11: K-Bus reset: Number of terminals changed
0x12: K-Bus reset: Type of a terminal changed
Info 1: terminal number (1...64)

0x10 Terminal error
Info 0: terminal number (1...64)
Info 1: general diagnostic status code for the terminal:
Bit 0,1: Channel number (00: channel 1; 01: channel 2; 10: channel 3; 11: channel 4)
Bit 2...6: reserved
Bit 7: Error (=1: occurred; =0: corrected).

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

  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