Download ang.

Transcript
Dividing Logic into Tasks, Programs, and Routines
2-9
For more information on event tasks, see:
• Logix5000 Controllers Common Procedures Programming
Manual, publication 1756-PM001
• Using Event Tasks with Logix5000 Controllers, LOGIX-WP003
Guidelines for Configuring an Event Task
Place the I/O module being used
to trigger an event in the same
chassis as the controller
Limit events on digital inputs to
a single input bit on a module
Set the priority of the event task
as the highest priority on the
controller
Limit the number of event tasks
Placing the I/O module in a remote chassis adds additional network communications and
processing to the response time.
All inputs on a module trigger a single event, so using multiple bits increases the chance of a
task overlap. Configure the module to detect change-of-state on the trigger input and turn off
the other bits.
If the priority of the event task is lower than a periodic task, the event task will have to wait
for the periodic task to complete execution.
Increasing the number of event tasks reduces the available CPU bandwidth and increases
the chances of task overlap.
Additional considerations for event tasks
Consideration:
Description:
amount of code in the event task
Each logic element (rung, instruction, structured text construct, etc…) adds to scan time.
task priority
If the event task is not the highest priority task, a higher priority task may delay or interrupt
the execution of the event task.
CPS and UID instructions
If one of these instructions are active, the event task cannot interrupt the currently
executing task. (The task with the CPS or UID.)
communication interrupts
The following actions interrupt a task, regardless of the priority of the task:
• arrival of scheduled module and consumed tag information via the backplane
• serial port communication
motion planner
The motion planner takes precedence over an event task.
trends
Trend data collection takes precedence over an event task.
Publication 1756-RM094A-EN-P - May 2004