Node Monitoring

The heartbeat and guarding mechanisms are available for monitoring CANopen device failures. These mechanisms are particularly important for CANopen, since in the event-driven operating mode the devices do not report on a regular basis. In the case of "guarding", the devices are cyclically interrogated about their status by means of a data request telegram (remote frame), whereas with "heartbeat" the nodes transmit their status on their own initiative.

Guarding: Node Guarding and Life Guarding

Node guarding is used to monitor the slaves, which themselves use life guarding to detect a faulty guarding master.

Node guarding involves the master issuing request telegrams, referred to as remote frames (remote transmit requests) to the guarding identifiers of the slaves to be monitored. The slaves respond with a guarding message. The message contains the node state of the slave and toggle bit, which has to change after each message. If the node state or the toggle bit do not match the values expected by the master or if there is a general lack of response, the master assumes an error.

Node Monitoring 1:


At the time of the first guarding message of the slave the toggle bit has the value 0. Subsequently, the toggle bit alternates after each guarding message and enables lost messages to be detected. The remaining seven bits contain the node state, thereby transferring the slave status to the master.

Node State

Status

4 = 0x04

Stopped

5 = 0x05

Operational

127 = 0x7F

Pre-Operational

 

Sample

The guarding message for node 27 (0x1B) must be requested by a remote frame having identifier 0x71B (1819dec). If the node is Operational, the first data byte of the answer message alternates between 0x05 and 0x85, whereas in the Pre-Operational state it alternates between 0x7F and 0xFF.

Guard time and life time factor

If the master requests the guard messages in a strict cycle, the slave can detect the failure of the master. In this case, if the slave fails to receive a message request from the master within the set Node Life Time (a guarding error), the slave assumes that the master has failed (the watchdog function).

In this case the slave sets its outputs to error state, sends an emergency telegram and returns to pre-operational state. After a guarding time-out the procedure can be triggered again with a new guarding message.

The node life time is calculated based on the following parameters:

  • guard time (object 0x100C) and
  • life-time factor (object 0x100D)

Life time = guard time x life time factor

If one of the two parameters is 0 (default), the master is not monitored (no life guarding) (see: CAN node tab).

Heartbeat: Node Monitoring without Remote Frame

If the heartbeat method is active, the devices automatically send their respective status messages cyclically. In contrast to the guarding method, the heartbeat method does not involve sending of remote frames, resulting in less bus load. The master also sends its heartbeat telegram cyclically, enabling the slaves to detect a master failure (see: CAN node tab).

Node Monitoring 2:


The toggle bit is not used with the heartbeat method, and the devices send their respective status cyclically.