100 Rockwell Automation Publication 1769-UM011H-EN-P - April 2012
Chapter 7 Develop Applications
However, if you schedule two high priority tasks 1...5 to run every millisecond,
and they both require 500 µs or more to execute, no CPU time would be left for
the dedicated I/O task. Furthermore, if you have so much configured I/O that
the execution time of the dedicated I/O task approaches 2 ms (or the
combination of the high priority tasks and the dedicated I/O task approaches 2
ms) no CPU time is left for low priority tasks 7...15.
For example, if your program needs to react to inputs and control outputs at
a set rate, configure a periodic task with a priority higher than 6 (1...5). This
keeps the dedicated I/O task from affecting the periodic rate of your
program. However, if your program contains a lot of math and data
manipulation, place this logic in a task with priority lower than 6 (7...15),
such as the continuous task, so that the dedicated I/O task is not adversely
affected by your program.
Table 26 - Multiple Tasks Example
Task Priority Level Task Type Example Execution Time Worst-Case Completion Time
1 5 20 ms periodic task 2 ms 2 ms
2 7 Dedicated I/O task
5 ms selected RPI
1 ms 3 ms
3 10 10 ms periodic task 4 ms 8 ms
4 None (lowest) Continuous task 25 ms 60 ms
030252015105 454035 50 656055
Task 1
Task 2
Task 3
Task 4
Time (ms)