Defining tasks – Rockwell Automation 1794-L34 FlexLogix Controller System User Manual User Manual

Page 71

Advertising
background image

Publication 1794-UM001G-EN-P - January 2007

Develop Applications 71

Defining tasks

A task provides scheduling and priority information for a set of one or
more programs. You can configure tasks as continuous, periodic, or
event. Only one task can be continuous.

A task can have as many as 100 separate programs, each with its own
executable routines and program-scoped tags. Once a task is triggered
(activated), all the programs assigned to the task execute in the order
in which they are grouped. Programs can only appear once in the
Controller Organizer and cannot be shared by multiple tasks.

Specifying task priorities

Each task in the controller has a priority level. The operating system
uses the priority level to determine which task to execute when
multiple tasks are triggered. You can configure periodic tasks to
execute from the lowest priority of 15 up to the highest priority of 1. A
higher priority task will interrupt any lower priority task. The
continuous task has the lowest priority and is always interrupted by a
periodic task.

The FlexLogix controller uses a dedicated periodic task at priority 6 to
process I/O data. This periodic task executes at the RPI you configure
for the FlexBus, which can be as fast as once every 2 ms. Its total
execution time is as long as it takes to scan the configured
I/O modules.

How you configure your tasks affects how the controller receives I/O
data. Tasks at priorities 1 to 5 take precedence over the dedicated I/O
task. Tasks in this priority range can impact I/O processing time.

For example, if you use the following configuration:

• I/O RPI = 2 ms
• a task of priority = 1 to 5 that requires 500 μs to execute and is

scheduled to run every millisecond

this configuration leaves the dedicated I/O task 500 μs to complete its
job of scanning the configured I/O.

Advertising