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

Page 51

Advertising
background image

Manage event tasks Chapter 2

Task_1 (event task)
The GSV instruction sets Task_Status (DINT tag) = Status attribute for the event task. In the Instance Name attribute,
THIS means the TASK object for the task that the instruction is in (that is, Task_1).

If Task_Status.0 = 1 then an EVENT instruction triggered the event task. In the continuous task, the EVENT runs to arm

registration for the first time.

The JMP instruction causes the controller to jump to the Arm LBL instruction. This skips all the logic of the routine

except the rung that arms registration for the axis.

Other logic

The MAR instruction runs each time the task runs and arms Axis_1 for registration.

The OTU instruction sets the EN bit of the MAR instruction = 0.

The MAR instruction is a transitional instruction.

For the MAR instruction to run, its rung-condition-in must go from false to true.

By first clearing the EN bit, the instruction responds as if its rung-condition-in changed from false to true.

The MAR instruction arms the axis for registration.

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.
If Task_Status.0 = 1 then clear that bit.

The OTU instruction sets Task_Status.0 = 0.
The SSV instruction sets the Status attribute of THIS task (Task_1) = Task_Status. This includes the cleared bit.

Rockwell Automation Publication 1756-PM005-EN-P - October 2014

51

Advertising