Glossary · PLC and control programming
Cyclic task
Also known as: Periodic task, Cyclic interrupt
German: Zyklische Task
In IEC 61131-3 programming, a cyclic task is a task that starts the programs assigned to it at a fixed time interval, independent of events.
- PLC programming
- Standards
In one sentence
A cyclic task runs its assigned PLC programs at a fixed interval, for example every 10 ms, and is the basis of most control logic.
Example
A packaging machine runs its motion coordination in a 2 ms cyclic task and its HMI data handling in a 100 ms cyclic task.
How it applies
- Engineering: Programs are assigned to tasks with an interval and a priority. Fast, time-critical logic goes into a short-cycle, high-priority task; slow logic such as data logging goes into a longer interval. Some controllers additionally have a free-running cyclic program that restarts as soon as it ends.
- Commissioning: Engineers check the actual execution time of each task against its interval. If a task regularly exceeds its interval, cycles are skipped or the Watchdog timer stops the controller.
- Operation: Execution time varies from cycle to cycle, and higher-priority tasks interrupt lower ones. The resulting Jitter matters for motion control and measurement.
- Documentation: The software documentation should list all tasks with interval, priority, watchdog setting and assigned programs. This task overview is one of the first things a service engineer needs when analyzing timing problems.
Cyclic task vs. event task
A cyclic task runs because time has passed. An Event task runs because a condition occurred, such as a rising edge of a variable. Cyclic tasks give predictable timing; event tasks reduce load when nothing happens.