Checklist for an event instruction task – Rockwell Automation 1794-L34 FlexLogix Controller System User Manual User Manual

Page 87

Advertising
background image

Publication 1794-UM001G-EN-P - January 2007

Develop Applications 87

Programmatically Determine if an EVENT Instruction Triggered
a 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.

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.

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:

q

1. EVENT instruction

Use a Trigger Event Task (EVNT) instruction at each point in your logic that you
want to trigger the event task.

q

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.

q

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.

q

4. Automatic Output Processing

For an event task, you can typically disable automatic output processing (default).
This reduces the elapsed time of the task.

Advertising