beautypg.com

Rockwell Automation GMLC Reference Manual User Manual

Page 372

background image

Publication GMLC-5.2 - November 1999

End Program

335

Global Faults

A diagram that includes an End Program block with both When End or
Fault and Go to When End if Global Fault Occurs selected, causes the
program flow to branch to the When End or Fault type block when either
of the following occurs:

a global fault occurs (Global_fault

0)

an End type block executes.

This provides a convenient mechanism for building a fault handling
routine. If multitasking is ongoing when a global fault occurs, all tasks
(including the main task) are suspended automatically as if a task control
block with stop dispatcher selected had been executed.

Handling Faults in GML Commander

Using a When End or Fault type block with both Go to When End if
Runtime Fault Occurs and Go to When End if Global Fault Occurs
selected lets you handle all possible faults in the motion controller in a
single fault handler module, as shown below:

The fault handler module must determine if the End Program block, with
When End or Fault selected, was executed due to a global fault, a runtime
fault, or an End type block elsewhere in the diagram, and then take the
appropriate action, as shown below.