L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 778

Advertising
background image

L-force | PLC Designer

General Editors

776

DMS 4.1 EN 03/2011 TD29

2. Single time overrun: Exception if the cycle time for the current cycle is greater than
(Time * Sensitivity). Example: Time=t#10ms, Sensitivity=5 -> Exception as soon as the
task (once) runs longer than 50ms. This serves to detect endless loops in the first cycle.
Time (e.g. t#200ms): Watchdog time; description see above: Enable. Depending on the
target system the time has to be entered as percentage of the task interval. In this case
the unit selection box will be greyed and show "%".
Sensitivity: Number; description see above: Enable;

Note: In the initialisation phase directly after a restart of the PLC application, single
PLC cycles with an extended runtime occur. In order to ensure that the watchdog
does not respond when this happens, the following parameterisation should be
chosen:
Time : double the cycle time of the task to be monitored
Sensitivity : 3


Note that a watchdog may be disabled for particular SPS cycles by use of the functions
provided by the library CmpIecTask.library; this may be useful for SPS cycles requiring
more time as usual due to initialization processes.
After declaring an appropriate variable for the handle of the task (of type
RTS_IEC_HANDLE),

hIecTask : RTS_IEC_HANDLE;

the disabling (and succeeding reenabling) can be handled by employing the interface
functions in the following manner:

hIecTask := IecTaskGetCurrent(0);
IecTaskDisableWatchdog(hIecTask);
... // Code that is protected against watchdog
IecTaskEnableWatchdog(hIecTask);

Advertising