All PACSystems block types automatically provide an OK output parameter. The name used to
reference the OK parameter within a block is Y0. Logic within the block can read and write the Y0
parameter. When a block is called, its Y0 parameter is automatically initialized to TRUE. This will
result in a positive power flow out of the block call instruction when the block completes execution,
unless Y0 is set to FALSE within the logic of the block.
For all block types, the maximum number of input parameters is one less than the maximum number
of output parameters. This is because the EN input to the block call is not considered to be an input
parameter to the block. It is used in LD language to determine whether or not to call the block, but is
not passed into the block if the block is called.
Program Blocks
Any block can be a program block. The _MAIN block is automatically declared when you create a
block-structured program. When you declare any other block, you must assign it a unique block
name. A block is automatically configured with no input parameters and one output parameter (OK).
When a block-structured program is executed, the _MAIN block is automatically executed. Other
blocks execute when called from the program logic in the _MAIN block, another block, or itself. In the
following example, if %M00001 is ON, the block named ProcessEGD will be executed:
Figure 1: Conditional Block Call
Program Blocks and Local Data
Program blocks support the use of %P global data. In addition, each block, except _MAIN, has its own
%L local data. Blocks do not inherit %L local data from their callers.