beautypg.com

Rockwell Automation GMLC Reference Manual User Manual

Page 376

background image

Publication GMLC-5.2 - November 1999

End Program

339

When using this technique, it is important that task 0 (the main task) be
the last task resumed. Once task 0 is resumed, the When End or Fault
sequence is aborted and any blocks following a Resume Task 0 block are
not executed.

As with any Task Control block, with Resume Task selected, each task
continues from where it was interrupted when the fault occurred. Do not
use Task Control blocks, with Start New Task selected, to start or restart
tasks in the fault handler.

If a global or runtime fault is still active when a Task Control block with
Resume Task selected executes, the task dispatcher does not restart and
the task does not resume—the fault handler is immediately called again
via the End Program block with When End or Fault selected. This ensures
that all faults are cleared before any task resumes. The connection from

the Resume Task 0 block to the

block of the diagram never

executes, but is required to avoid a translation error due to an
unconnected output node on the task control block, with resume task
selected, when the diagram is translated to a script.

!

ATTENTION: Blocks following a Resume Task 0
block, in the When End or Fault sequence, are not
executed.