Figure 2: Block Call With Parameters - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

Using Parameters with a Program Block
Every block is automatically defined to have one formal 'power flow' (or OK) output parameter,
named Y0. Y0 is a BOOL parameter of LENGTH 1, passed by initial-value result. It indicates successful
execution of the block. It can be read and written to by the logic within the block.
Parameterized Blocks
Any block except _MAIN can be a parameterized block. When you declare a parameterized block, you
must assign it a unique block name. A parameterized block can be configured with up to 63 input and
64 output parameters.
A parameterized block executes when called from the program logic in the _MAIN block, another
block, or itself. In the following example, if %I00001 is set, the parameterized block named LOAD_41
will be executed.
Parameterized Blocks and Local Data
Parameterized blocks support the use of %P global data. Parameterized blocks do not have their
own %L data, but instead inherit the %L data of their calling blocks. Parameterized blocks also inherit
the FST_EXE system reference and time-stamp data that is used to update timer functions from their
calling blocks. If %L references are used within a parameterized block and the block is called by
_MAIN, %L references will be inherited from the %P references wherever encountered in the
parameterized block (for example, %L0005 = %P0005).
Note: It is possible, by using Online Editing in the programming software to cause a parameterized
block to use %L higher than allowed because of the way it inherits data. Using a word-for-
word change to restore this reference to a valid address does not correct the block because
the variable still exists in the variable list. Deleting the variable from the variable list does not
cause an update to the CPU, so the parameterized block still sees the reference out of range
fault. To correct this condition, you must remove the unused variables from the variable list
after deleting them from the logic.
Using Parameters with a Parameterized Block
A parameterized block may be defined to have between 0 and 63 formal input parameters, and
between 1 and 64 formal output parameters. A 'power-flow out' (or OK) parameter, named Y0, is
automatically defined for every parameterized block. It is a BOOL parameter of LENGTH 1, and
indicates the successful execution of the parameterized block. It can be read and written to by the
parameterized block's logic.
The following table lists the TYPEs, LENGTHs, and parameter-passing mechanisms allowed for
parameterized block parameters. (For definitions of the parameter passing types, refer to Parameter
Passing Mechanisms.)
GFK-2950C

Figure 2: Block Call with Parameters

February 2018
Chapter 2. Program Organization
9

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents