
Chapter 2 Manage event tasks
Description
Program A runs an EVENT instruction.
The event task that is specified by the EVENT instruction runs one time.
Program B runs an EVENT instruction.
The event task that is specified by the EVENT instruction runs one time.
Programmatically determine if EVENT Instruction triggered task
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.
Table 8 - 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
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 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 finished.
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.
64 Rockwell Automation Publication 1756-PM005-EN-P - October 2014
Comentários a estes Manuais