Use the event task, Prioritizing periodic and event tasks – Rockwell Automation 1794-L34 FlexLogix Controller System User Manual User Manual
Page 85
![background image](/manuals/579129/85/background.png)
Publication 1794-UM001G-EN-P - January 2007
Develop Applications 85
Use the Event Task
The event task is available with FlexLogix controllers using firmware
version 12.x or greater. Previously, the only tasks available were the
continuous task and periodic task. However, the event task offers
FlexLogix controller users a task that executes a section of logic
immediately when an event occurs.
An event task performs a function only when a specific event (trigger)
occurs. Whenever the trigger for the event task occurs, the event task:
• interrupts any lower priority tasks
• executes one time
• returns control to where the previous task left off
For FlexLogix controller, the event task trigger can only be the EVENT
instruction or a consume tag.
Prioritizing Periodic and Event Tasks
Although a FlexLogix project can contain up to 8 tasks, the controller
executes only one task at a time. If a periodic or event task is
triggered while another task is currently executing, the priority of each
task tells the controller what to do.
The FlexLogix controller has 15 priority levels for its tasks. To assign a
priority to a task, use the guidelines described in the table..
If you want:
Then
Notes:
this task to interrupt another
task
Assign a priority number
that is less than (higher
priority) the priority number
of the other task.
• A higher priority task
interrupts all lower
priority tasks.
• A higher priority task can
interrupt a lower priority
task multiple times.
another task to interrupt this
task
Assign a priority number
that is greater than (lower
priority) the priority number
of the other task.
this task to share controller
time with another task
Assign the same priority
number to both tasks.
The controller switches back
and forth between each task
and executes each one for
1ms.