The MC80 processor supports MAST task with periodic and cyclic modes.
The master task represents the application program’s main task. You can choose from the following MAST task execution modes:
-
Cyclical (default setup): execution cycles are performed in sequence, one after the other.
-
Periodical: a new cycle is started periodically, according to a user-defined time period (1…255 ms) with 1 ms increment.
If the execution time is longer than the period configured by you, then the bit %S19 is set to 1 and a new cycle is launched.
Both MAST task cycle modes are controlled by a watchdog.
The watchdog is triggered if the MAST task execution time is longer than the watchdog value in the configuration, and causes a software error. The application then goes into HALT status, and the bit %S11 is set to 1 (you must reset it to 0).
The watchdog value (%SW11) may be configured between 10 ms and 1,500 ms (default value: 250 ms).
NOTE: Configuring the watchdog to a value that is less than the period is not allowed.
The system tasks with higher priority than MAST will have an impact of MAST task duration.
The following table shows how the main services are assigned to a priority (highest priority impacts all services with lowest priority):
Highest priority
|
Interrupts: system timer, CAN, ETH, USB, serial ports
|
Exception handler task (1)
|
RSTP
|
Ethernet frame process
|
PLC operating mode transition management (run, stop, new download) (2)
|
CANopen process
|
MAST task
|
PLC low priority task: online change, application backup to flash
|
Lowest priority
|
Other Ethernet services: DHCP, SNMP
|
(1) Exception lead to error state and permanent reset of the function
(2) Task activated only on PLC state change
|