Structure Of Function Blocks - Siemens CPU 948 Programming Manual

Simatic s5 s5-155u
Table of Contents

Advertisement

Function Blocks
2.3.1
Structure of Function Blocks The block header (five words) of a function block has the same
Absolute or symbolic
operands
Skip formal
operand
list
Name of the FB/FX
Formal operand 1
Formal operand 2
Formal operand
STEP 5
user
program
Fig. 2-4
Structure of a function block (FB/FX)
2 - 24
structure as the headers of the other STEP 5 block types.
The block body on the other hand, has a different structure from the
bodies of the other block types. The block body contains the function
to be executed in the form of a statement list in the STEP 5
programming language. Between the block header and the STEP 5
statements, the function block needs additional memory space for its
name and for a list of formal operands. Since this list contains no
statements for the CPU, it is skipped with an unconditional jump that
the programmer generates automatically. This jump statement is not
displayed when the function block is displayed on the PG!
When a function block is called, only the block body is processed.
You can enter operands in a function block in absolute form
(e.g. F 2.5) or symbolically (e.g. MOTOR1). You must store the
assignment of the symbolic operands in an assignment list before you
enter the operands in a function block (see /3/).
Fig. 2-4 shows the structure of a function block in the memory of a
programmable controller.
JU
n
1st STEP 5 user operation
BE
Block
5 words
header
1 word
4 words
List of
3 words
formal
operands
3 words
Block
body
3 words
CPU 948 Programming Guide
C79000-G8576-C848-04

Advertisement

Table of Contents
loading

Table of Contents