
Publication 20D-UM002C-EN-P - November 2003
2-8 What Is DriveLogix?
Programmatically Determine if an EVENT Instruction Triggered
aTask
To determine if an EVENT instruction triggered an event task, use a
Get System Value (GSV) instruction to monitor the Status attribute of the
task.
The controller does not clear the bits of the Status attribute once they are set.
• To use a bit for new status information, you must manually clear the bit.
• Use a Set System Value (SSV) instruction to set the attribute to a
different value.
Checklist for an EVENT Instruction Task
For more information on using the event task, see Logix5000 Controllers
Common Procedures programming manual, publication 1756-PM001.
Table 2.2 Status Attribute of the TASK Object
Attribute: Data Type: Instruction: Description:
Status DINT GSV
SSV
Provides status information about the task. Once the controller sets a bit, you
must manually clear the bit to determine if another fault of that type occurred.
To determine if: Examine this bit:
An EVENT instruction triggered the task (event task
only).
0
A timeout triggered the task (event task only). 1
An overlap occurred for this task. 2
For this: Make sure you:
❑ 1. EVENT instruction Use a Trigger Event Task (EVNT) instruction at each point in your logic that you
want to trigger the event task.
❑ 2. Task priority Configure the event task as the highest priority task.
If a periodic task has a higher priority, the event task may have to wait until the
periodic task is done.
❑ 3. Number of event tasks Limit the number of event tasks.
Each additional task reduces the processing time that is available for other tasks.
This could cause an overlap.
❑ 4. Automatic Output Processing For an event task, you can typically disable automatic output processing (default).
This reduces the elapsed time of the task.