Control Expert · Modicon M580 · the execution model

Tasks, sections & priority

A Modicon application can schedule several tasks with different priorities. The MAST task does the everyday work, sliced into ordered Sections. The FAST task cuts in for time-critical checks. An EVENT task responds to a configured event. The pumping-station simulation shows the tasks competing for CPU time and lets you trigger an event to inspect the order of execution.

⏱️ MAST⚡ FAST🔔 EVENT
01 · The pumping station

Three tasks, one wet well

The wet well fills with inflow. MAST runs the level control in three Sections every period; FAST checks the high level on a shorter periodic cycle, while the EVENT task responds to the simulated high-level float. Increase the inflow, then select 🔔 Trip high-level float to see the event task interrupt the lower-priority work shown in the scheduler. These are ordinary process-control examples; a safety function requires an appropriate safety relay or safety PLC.

MAST · running
level: 20%
HI float
Pump 1 · duty
🌀
OFF
Pump 2 · standby
🌀
OFF
ePAC scheduler: newest execution on the rightMAST scans: 0
EVENT prio
FAST 10 ms
MAST periodic

MAST program · sections execute top → bottom each scan

SECTION 1
Inlet
Read level transmitter, scale to %
SECTION 2
PumpControl
Start/stop duty pump on level
SECTION 3
Alarms
Latch faults, drive the HMI
MAST mode
inflow

The red EVENT bar appears on top of the green MAST bar because the event interrupts that simulated execution. MAST resumes afterward. FAST runs at its configured interval with priority over MAST, but all tasks still depend on the available CPU time and scheduling rules; a short period is not a guarantee of zero response delay.

02 · The task hierarchy

Who interrupts whom

⏱️
MAST
priority: lowest · always present
The main task. Cyclic (loops back-to-back as fast as it can) or Periodic (a configured period, for example 50 ms). The task contains the main application sections, which run in their configured order.
⚡
FAST
priority: higher · periodic
A short, high-priority periodic task (e.g. 5–10 ms) for time-critical logic. It preempts MAST. Keep its execution time short enough for the lower-priority work to receive the CPU time it needs.
🔔
EVENT
priority: highest · on demand
The event task runs when its configured timer or I/O event (TIMERx / EVTx) is recognized. The example gives it priority over the other displayed tasks. Check the CPU's supported events, priorities and response limits for the actual application.

There's also an AUX task for additional work on supported CPUs. Compare the supported task types and priorities before deciding where logic belongs. Higher-priority execution reduces the CPU time available to other work, and the task's watchdog provides execution-time monitoring. Check the configured limit and CPU response rather than assuming every missed period has the same effect.

03 · Check yourself

Where does it go?

A process-control high-level response must run sooner than the 50 ms MAST period. Which task suits that ordinary control check? If the response is safety-related, it belongs in an appropriate safety relay or safety PLC, not merely a higher-priority standard task.