Use Periodic Tasks

To make synchronization, crossloads, and HMI updates as fast as possible, avoid using a continuous task. Instead, use periodic tasks. The fewer periodic tasks, the better the performance.
IMPORTANT:
While a continuous task is fully supported, you can manage performance easier without a continuous task. With a continuous task, the performance of some types of communication can be negatively impacted under certain conditions, such as heavy messaging or HMI data table writes of tags to the controller.

Multiple Periodic Tasks

Only the single highest-priority periodic task provides bumpless output switching on switchover.
ATTENTION:
If you use multiple periodic tasks, program all crucial outputs within the highest priority task. Failure to program outputs in the highest-priority task can result in outputs that change state if a switchover occurs.
If you use multiple periodic tasks, verify the following:
  • There are no task overlaps during synchronized steady state. The execution time of each task is smaller than its period.
  • The total execution time of all your tasks is less than the period of the task with the largest period.
  • The lower priority tasks have longer periods than higher priority tasks to allow time for task interruption by the higher priority tasks.
In the following example, the execution time of the highest priority task (Task 1) is smaller than its period. The total execution time of all tasks is less than the specified period of the lowest priority task.
Example of Periodic Task Configurations
Task
Priority
Execution Time
Period Specified
1
Higher
20 ms
80 ms
2
Lower
30 ms
100 ms
Total execution time: 50 ms
To tune the period you specify for periodic tasks, do the following:
  • To check for overlaps, go online with the controller and access the Task Properties dialog box. On the Monitor tab, note the maximum scan time. Verify that the maximum scan time is smaller than the period for the periodic task.
  • To determine how may task overlaps occurred since the last reset, check the Task Overlap Count parameter. Because task overlaps are expected during qualification, check the number of task overlaps while the controller is in a synchronized steady state.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal