Structure Of A Pacsystems Application Program; Blocks; Functions And Function Blocks - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

Chapter 2. Program Organization

2.1 Structure of a PACSystems Application Program

A PACSystems application consists of one block-structured application program. The application
program contains all the logic needed to control the operations of the CPU and the modules in the
system. Application programs are created using the programming software and transferred to the
CPU. Programs are stored in the CPU's non-volatile memory.
During the CPU Sweep, the CPU reads input data from the modules in the system and stores the
data in its configured input memory locations. The CPU then executes the entire application program
once, using this fresh input data. Executing the application program creates new output data that is
placed in the configured output memory locations.
After the application program completes its execution, the CPU writes the output data to modules in
the system. This completes the CPU Sweep.
A block-structured program always includes a _MAIN block. Program execution begins with the
_MAIN block. Counting the _MAIN block, the program can contain up to 512 blocks.
2.1.1

Blocks

A block is a named section of executable logic that can be downloaded to and run on the target
controller. The logic in a block can include functions, function blocks and calls to other blocks.
2.1.2

Functions and Function Blocks

A function is a type of instruction that has no internal storage (instance data). Therefore, it produces
the same result for the same set of input values every time it executes.
A function block defines data as a set of inputs and output parameters that can be used as software
connections to other blocks and internal variables. It has an algorithm that runs every time the
function block is executed. Because a function block has instance data, that is it can store values, it
has a defined state.
The following table describes the types of instructions that make up the PACSystems instruction set.
Instruction Type
Functions
Built-in function blocks
Standard function blocks
Note: A user defined function block (UDFB) is a block of logic that can be called in your program
logic to create multiple instances of the block, allowing you to create a block of logic once
and reuse it as if it was a standard function block instruction. For additional information,
refer to Types of Blocks and User-Defined Function Blocks (UDFBs).
6
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
Instance Data
None
WORD array.
Structure variable. (Refer to
Instance Data Structures.)
Examples
BIT_SEQ, ADD, RANGE
TMR, PID_IND, PID_ISA
TP, TOF, TON
GFK-2950C

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents