Rockwell Automation Logix5000 Controllers Tasks, Programs, and Routines Programming Manual User Manual
Page 10

Chapter 1 Manage tasks
If you want to run a section of your
logic
Then use this type of
task
Description
•
At a constant period (for
example, every 100 ms)
•
Multiple times within the scan of
your other logic
Periodic Task
A periodic task performs a function at a specific period.
When the time for the periodic task expires, the periodic
task:
•
Interrupts any lower priority tasks.
•
Runs one time.
•
Returns control to where the previous task left off.
You can configure the time period from 0.1 ms…2000 s.
The default is 10 ms.
Immediately when an event occurs
Event Task
An event task performs a function only when a specific
event (trigger) occurs. When the trigger for the event task
occurs, the event task:
•
Interrupts any lower priority tasks.
•
Runs one time.
•
Returns control to where the previous task left off.
The trigger can be a:
•
Change of a digital input.
•
New sample of analog data.
•
Certain motion operations.
•
Consumed tag.
•
EVENT instruction.
Important: Some Logix5000 controllers do not support
all triggers.
The following table lists example situations for the tasks.
For this example situation
Use this type of task
Fill a tank to its maximum level and then open a drain valve.
Continuous task
Collect and process system parameters and send them to a display.
Continuous task
Complete step 3 in a control sequence—reposition the bin diverter.
Continuous task
Your system must check the position of a field arm each 0.1 s and calculate the average
rate of change in its position. This is used to determine braking pressure.
Periodic task
Read the thickness of a paper roll every 20 ms.
Periodic task
A packaging line glues boxes closed. When a box arrives at the gluing position, the
controller must immediately run the gluing routine.
Event task
In a high-speed assembly operation, an optical sensor detects a certain type of reject.
When the sensor detects a reject, the machine must immediately divert the reject.
Event task
In an engine test stand, you want to capture and archive each analog data immediately
after each sample of data.
Event task
Immediately after receiving new production data, load the data into the station.
Event task
In a line that packages candy bars, you have to make sure that the perforation occurs in
the correct location on each bar. Each time the registration sensor detects the
registration mark, check the accuracy of an axis and perform any required adjustment.
Event task
A gluing station must adjust the amount of glue it applies to compensate for changes in
the speed of the axis. After the motion planner runs, check the command speed of the
axis and vary the amount of glue, if needed.
Event task
10
Rockwell Automation Publication 1756-PM005-EN-P - October 2014