Tasks and Watchdogs
For each idle task, user event task and cyclic task, a watchdog time can be set. The watchdog checks whether the task execution has been finished within the defined watchdog time interval. If a task could not be finished, a 'Watchdog error' is reported and the controller passes into the 'STOP' state, unless no other actions are programmed using the system event task 'Watchdog time exceeded' (see also the list of actions below).
The watchdog time interval has to be set in the 'Tasks and Events' table. The watchdog timer is started when the task is ready for execution.
Note
System event tasks cannot be monitored by the watchdog because they are not executed in the context of a user event task. |
What happens if a task execution has not been finished during the watchdog time?
- A 'Watchdog error' is reported.
- All tasks are stopped and deactivated.
- If a system event task 'Watchdog time exceeded' has been inserted, all programs assigned to this task are executed.
- All outputs are updated.
- The close functions of all I/O drivers are executed.
- The controller passes into the 'STOP' state.
Note
If the task execution time and the watchdog time have nearly the same value and a high CPU load is given, it might be possible that the watchdog time exceeds while executing, for example, some online operations. |
Online operations, which result in a read or write access to the hard disk, may also interrupt the task execution for a short time.
Note
The TASK_INFOS system variable (device-dependent variable) can be used for monitoring the application behavior. For details on the TASK_INFOS system variable, refer to the PLCnext Info Center and the respective controller manual. |