beautypg.com

End program – Rockwell Automation GMLC Reference Manual User Manual

Page 369

background image

Publication GMLC-5.2 - November 1999

332

Program Control Blocks

End Program

Use the End Program block to:

Stop the execution of your GML Commander program.

Provide a marker in the diagram that leads to other program blocks,
which must be executed prior to ending the GML Commander
program, when a fault occurs or when the program is intentionally
stopped.

The End Program block resides on the Main Palette.

End Type

The End Program block, with End selected, stops the application
program.

When you stop execution of the program using an End Program block
with End type selected, program flow immediately branches either to
another End Program block with When End or Fault type selected (if the

diagram contains a When End or Fault type block) or to the

block if there is no When End or Fault type block in the diagram.

The End Program block, with End type selected, has no output node.
None is needed, because program flow branches directly either to

the

block, or to an End Program block, with When End or Fault

selected, when the block executes. In some cases, the lack of an output

node on this block means that there is no connection to the

block

in the diagram. This missing connection generates a warning when the
diagram is translated which, in most cases, can be ignored.

A diagram, in order to stop the program from many different places, can
contain any number of End Program blocks with End type selected. There
can be only one End Program block with When End or Fault type selected
in the diagram.