2.3.1
Structure of Function Blocks
The block header (five words) of a function block has the same
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.
Absolute or symbolic
operands
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
Name of the FB/FX
Formal operand 1
Formal operand 2
Formal operand
n
5 words
1 word
4 words
3 words
Block
header
Block
body
BE
3 words
Skip formal
operand
list
1st STEP 5 user operation
3 words
List of
formal
operands
STEP 5
user
program
Fig. 2-4
Structure of a function block (FB/FX)
Function Blocks
CPU 948 Programming Guide
2 - 24
C79000-G8576-C848-04
Содержание CPU 948
Страница 10: ...Contents CPU 948 Programming Guide 1 2 C79000 G8576 C848 04 ...
Страница 32: ...Contents CPU 948 Programming Guide 2 2 C79000 G8576 C848 04 ...
Страница 72: ...Data Blocks CPU 948 Programming Guide 2 42 C79000 G8576 C848 04 ...
Страница 74: ...Contents CPU 948 Programming Guide 3 2 C79000 G8576 C848 04 ...
Страница 154: ...Contents CPU 948 Programming Guide 4 2 C79000 G8576 C848 04 ...
Страница 200: ...Contents CPU 948 Programming Guide 5 2 C79000 G8576 C848 04 ...
Страница 308: ...Contents CPU 948 Programming Guide 7 2 C79000 G8576 C848 04 ...
Страница 324: ...Examples of Parameter Assignment CPU 948 Programming Guide 7 18 C79000 G8576 C848 04 ...
Страница 326: ...Contents CPU 948 Programming Guide 8 2 C79000 G8576 C848 04 ...
Страница 370: ...Addressable System Data Area CPU 948 Programming Guide 8 46 C79000 G8576 C848 04 ...
Страница 372: ...Contents CPU 948 Programming Guide 9 2 C79000 G8576 C848 04 ...
Страница 404: ...Operations with the Base Address Register BR Register CPU 948 Programming Guide 9 34 C79000 G8576 C848 04 ...
Страница 486: ...Contents CPU 948 Programming Guide 11 2 C79000 G8576 C848 04 ...
Страница 522: ...PG Functions via the S5 Bus CPU 948 Programming Guide 11 38 C79000 G8576 C848 04 ...
Страница 524: ...Contents CPU 948 Programming Guide 12 2 C79000 G8576 C848 04 ...
Страница 538: ...Contents CPU 948 Programming Guide 13 2 C79000 G8576 C848 04 ...
Страница 546: ...List of Key Words CPU 948 Programming Guide Index 6 C79000 G8576 C848 04 ...