![GE PACSystems RSTi-EP Cpu Programmer'S Reference Manual Download Page 23](http://html.mh-extra.com/html/ge/pacsystems-rsti-ep/pacsystems-rsti-ep_cpu-programmers-reference-manual_123065023.webp)
Chapter 2. Program Organization
8
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
2.1.5
Types of Blocks
PACSystems supports four types of blocks.
Block Type
Local Data
Programming
Languages
Size Limit
Parameters
Block
Has its own local
data
LD
FBD
ST
128 KB
0 inputs
1 output
Parameterized
Block
Inherits local data
from caller
LD
FBD
ST
128 KB
63 inputs
64 outputs
User Defined
Function Block
(UDFB)
Has its own local
data
LD
FBD
ST
128 KB
63 inputs
64 outputs
Unlimited internal member
variables
External Block
Inherits local data
from caller
C
user memory
size limit (10
MB)
63 inputs
64 outputs
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.
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...