beautypg.com

Rockwell Automation GMLC Reference Manual User Manual

Page 370

background image

Publication GMLC-5.2 - November 1999

End Program

333

An End type block, in the When End or Fault sequence, unconditionally
stops all tasks and ends the program.

When End or Fault Type

Select the When End or Fault option to provide a marker in the diagram
that leads to the execution of any required blocks when a fault occurs, or
when the program is intentionally stopped. A diagram can contain only
one End Program block, with When End or Fault selected.

An End Program block with When End or Fault selected enables two
options:

Go to When End if Runtime Fault Occurs.

Go to When End if Global Fault Occurs.

The Go to When End if Runtime Fault Occurs option reroutes program
flow to this block when a runtime fault occurs during program execution.

The Go to When End if Global Fault Occurs option reroutes program flow
to this block when a global fault occurs during program execution.

Program flow does not branch to the End Program block, with When End
or Fault selected, when a fault occurs. An End Program block with When
End or Fault selected, but with neither Go to When End… option
selected, does nothing unless the program also contains at least one End
Program block with End selected.

For example, the following diagram shows how an End Program block
with When End or Fault selected can be used to execute a common
shutdown routine when stopping the program from either of two places.