54
Programming with Tasks Section 2-1
2-1-4 Types of Tasks
Tasks are broadly classified as either cyclic tasks or interrupt tasks. Interrupt
tasks are further divided into scheduled, input, high-speed counter, and exter-
nal interrupt tasks. Interrupt tasks can also be executed as extra cyclic tasks.
Cyclic Tasks A cyclic task that is READY will be executed once each cycle (from the top of
the program until the END(001) instruction) in numerical order starting at the
task with the lowest number. The maximum number of cyclic tasks is 32.
(Cyclic task numbers: 00 to 31).
Interrupt Tasks An interrupt task will be executed if an interrupt occurs even if a cyclic task
(including extra cyclic tasks) is currently being executed. The interrupt task
will be executed using any time in the cycle, including during user program
execution, I/O refreshing, or peripheral servicing, when the execution condi-
tion for the interrupt is met.
Interrupt tasks can also be executed as extra cyclic tasks.
END
END
END
END
Cyclic task 0
Executed in order starting at
lowest number of the cyclic tasks.
Normal cyclic tasks
Cyclic task n
Extra cyclic task 0
Executed in order starting at lowest
number of the extra cyclic tasks.
Extra cyclic tasks
Extra cyclic task m
I/O refresh
Peripheral
processing