General

The period of master task execution, in cyclic or periodic operation, is controlled by the PLC (watchdog) and must not exceed the value defined in Tmax configuration (1500 ms by default, 1.5 s maximum).

Software Watchdog (Periodic or Cyclic Operation)

If watchdog overflow should occur, the application is declared in error, which causes the PLC to stop immediately (HALT state).

The bit %S11 indicates a watchdog overflow. It is set to 1 by the system when the cycle time becomes greater than the watchdog.

The word %SW11 contains the watchdog value in ms. This value is not modifiable by the program.

NOTE:
  • The reactivation of the task requires the terminal to be connected in order to analyze the cause of the error, correct it, reinitialize the PLC and switch it to RUN.

  • It is not possible to exit HALT by switching to STOP. To do this you must reinitialize the application to ensure consistency of data.

Control in Periodic Operation

In periodic operation, an additional control enables a period overrun to be detected. A period overrun does not cause the PLC to stop if it remains less than the watchdog value.

The bit %S19 indicates a period overflow. It is set to 1 by the system, when the cycle time becomes greater than the task period.

The word %SW0 contains the value of the period (in ms). It is initialized on cold restart by the defined value. It can be changed by the user.

Exploitation of Master Task Execution Times

The following system words can be used to obtain information on the cycle time:

  • %SW30 contains the execution time of the last cycle

  • %SW31 contains the execution time of the longest cycle

  • %SW32 contains the execution time of the shortest cycle

NOTE: These different items of information can also be accessed explicitly from the configuration editor.