Watchdog mechanism

Watchdog mechanism 1:

Monitoring PLC by CNC, PLC task which triggers PLC’s sign of life alive_rw, must be executed with higher task priority than the two CNC-tasks SDA and COM (s. example TwinCAT). In order to prevent problems with CNC block preparation and large PLC projects it is additionally recommended to create an extra PLC task for the watchdog mechanism and to set a higher priority only for this task.

Watchdog mechanism 2:

Monitoring CNC by PLC, PLC task which monitors CNC’s sign of life alive_rw, must be executed with higher task priority than the two CNC-tasks SDA and COM (s. example TwinCAT). In order to prevent problems with CNC block preparation and large PLC projects it is additionally recommended to create an extra PLC task for the watchdog mechanism and to set a higher priority only for this task.

Watchdog, CNC monitors PLC

Description

The CNC uses the data of this unit to monitor whether the PLC is still ready for operation.

Data type

MCWatchDogUnit

ST path

pMC[channel_idx]^.addr^.HLIHeadChannel_Data.MCWatchDogUnit_mc

PLC operates functionality

Description

By setting this element to the value TRUE, the PLC indicates to the CNC that it supplies to the data for the watchdog functionality.see "Extracted nested table 11"

ST element

. X_enable_w

Data type

BOOL

Value range

[TRUE = PLC supplies the data for a watchdog monitor, FALSE]

Access

PLC writes

Signal of the PLC

Description

CNC uses this element to determine whether the PLC is still ready for operation. This check is performed if elements PLC operates functionality and “PLC present “ have the value TRUE.

ST element

. X_alive_rw

Data type

BOOL

Value range

[TRUE = PLC signals that it is ready for operation, FALSE]

Access

CNC detects whether this element changes from FALSE to TRUE within the time preset by element “Watchdog cycle time“. The CNC sets the value to FALSE after successful detection.

PLC writes the value TRUE to this element in each PLC cycle in order to confirm its readiness for operation.

Signal “PLC not ready for operation“

Description

If the CNC detects that the PLC is no longer ready for operation, it sets this element to TRUE.

ST element

.X_alive_state_r

Data type

BOOL

Value range

[TRUE = PLC is ready for operation, FALSE = PLC is not ready for operation]

Access

CNC writes

Watchdog cycle time

Description

The values for the watchdog cycle time must be greater than the cycle time of the PLC in order to allow practical monitoring of the PLC by the CNC.

ST element

.D_cycle_time_w

Unit

1 µs

Data type

UDINT

Access

PLC writes

Watchdog, PLC monitors CNC

Description

The PLC uses the data of this unit to monitor whether the CNC is still ready for operation.see "Extracted nested table 6"

Data type

LCWatchDogUnit

ST path

pMC[channel_idx]^.addr^.HLIHeadChannel_Data.LCWatchDogUnit_lc

Signal of the CNC

Description

The CNC writes the value TRUE in this element in each interpolation cycle in order to confirm that it is ready for operation.

ST path

.X_alive_rw

Data type

BOOL

Access

CNC writes the value TRUE in this element in each CNC cycle to confirm its readiness for operation.

PLC detects whether this element changes from FALSE to TRUE within the time preset by element Watchdog cycle time. The PLC sets the value to FALSE after successful detection.

Signal “CNC not ready for operation“

Description

If the PLC determines that the CNC is no longer ready for operation, it sets this element to TRUE.

ST path

.X_alive_state_w

Data type

BOOL

Value range

[TRUE = CNC is ready for operation, FALSE = CNC is not ready for operation]

Access

PLC writes

Watchdog cycle time

Description

The NC kernel writes the cycle time of the interpolator in this element. The values for the watchdog cycle time must be greater than the cycle time of the PLC to allow practical monitoring of the CNC by the PLC.

ST path

.D_cycle_time_r

Unit

1 µs

Data type

UDINT

Access

PLC reads

Watchdog mechanism 3:
Figure 10- 1 : Priorities for watchdog mechanism (example TwinCAT)