Rockwell Automation 1794-L34 FlexLogix Controller System User Manual User Manual

Page 72

Advertising
background image

Publication 1794-UM001G-EN-P - January 2007

72 Develop Applications

However, if you schedule two high priority tasks (1 to 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 to 15).

The following example shows the task execution order for an
application with periodic tasks and a continuous task.

TIP

For example, if your program needs to react to inputs and control outputs at a
deterministic rate, configure a periodic task with a priority higher than 5 (1 through
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 through 15), such as the
continuous task, so that the dedicated I/O task is not adversely affected by your
program.

Task:

Priority Level:

Task Type:

Example Execution
Time:

Worst Case Completion
Time:

1

5

20 ms periodic task

2 ms

2 ms

2

6

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

0

30

25

20

15

10

5

45

40

35

50

65

60

55

Task 1

Task 2

Task 3

Task 4

Time (ms)

Advertising