Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 481
Program Control Instructions (JMP, LBL, JSR, RET, SBR, JXR, TND, MCR, UID, UIE, AFI, NOP, EOT, SFP, SFR, EVENT) Chapter 11
Trigger Event Task (EVENT)
The EVENT instruction triggers one execution of an event task.
Operands:
Relay Ladder
Structured Text
The operands are the same as those for the relay ladder EVENT instruction.
Description: Use the EVENT instruction to programmatically execute an event task:
· Each time the instruction executes, it triggers the specified event task.
· Make sure that you give the event task enough time to complete its execution
before you trigger it again. If not, an overlap occurs.
· If you execute an EVENT instruction while the event task is already executing,
the controller increments the overlap counter but it does not trigger the event
task.
Programmatically Determine if an EVENT Instruction Triggered
a Task
To determine if an EVENT instruction triggered an event task, use a
Get SystemValue (GSV) instruction to monitor the Status attribute of the task.
Operand Type Format Description
Task TASK Name Event task to execute
The instruction lets you choose other types of
tasks, but it does not execute them.
Table 6 - 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 time-out triggered the task (event task only). 1
An overlap occurred for this task. 2