beautypg.com

On task – Rockwell Automation GMLC Reference Manual User Manual

Page 384

background image

Publication GMLC-5.2 - November 1999

On Task

347

Unlike the Stop Current Task and Stop Other Task type commands—

which are equivalent to the

block in a diagram without

multitasking—the Stop Dispatcher command suspends execution of all
other tasks. It is sometimes useful to suspend multitasking briefly to
accomplish time critical functions or calculations as quickly as possible,
or to ensure full control over the operator interface so that multiple tasks
do not interfere with each other.

After executing a Task Control block with Stop Dispatcher selected, the
task containing this block is the only active task. You can resume the
suspended tasks by turning multitasking

ON

again using a Task Control

block with Restart Dispatcher selected.

Restart Dispatcher

Restart Dispatcher turns multitasking

ON

again by re-enabling the task

dispatcher. This re-activates all tasks suspended by a previous Task
Control block with Stop Dispatcher selected. Each task continues from
where it left off when the task dispatcher was stopped.

On Task

The On Task block is a conditional block. Use the On Task block to:

Check the task dispatcher to determine whether or not a selected task
is running

Pause the program until the selected task is running

The On Task block resides on the Main Palette.

If Task

If Task checks the task dispatcher to determine whether or not the selected
task is running. The On Task block, with If Task selected, has two output
nodes. Program flow branches to the top (true) node if the selected task is
running, and to the bottom (false) node if not.

A task is not running if it has:

not been started