Programming Function Blocks - Siemens CPU 948 Programming Manual

Simatic s5 s5-155u
Table of Contents

Advertisement

Function Blocks
2.3.2
Programming
Function Blocks
2 - 26
You can program a function block only in the "statement list"
method of representation. When entering a function block at a
programmer, perform the following steps:
Step
1
Enter the block type (FB/FX) and the number of the
function block.
Number your function blocks in descending order
starting with FB 255, so that they do not collide with
the standard function blocks. The standard function
blocks are numbered from FB 1 to FB 199.
2
Enter the name of the function block.
The name can have a maximum of eight characters
and must start with a letter.
3
If the function block is to process formal operands:
Enter the formal operands you require in the block as
block parameters.
Enter the following information for each formal
operand:
-
the name of the block parameter (maximum
4 characters),
-
the type of block parameter and the data type of
the block parameter (if applicable)
You can define a maximum of 40 formal operands.
4
Enter your STEP 5 program in the form of a statement
list (STL). The formal operands are preceded by an
equality sign (e.g. A = X1). They can also be referenced
more than once at various positions in the function block.
5
Terminate your program input with the block end
operation "BE".
Action
CPU 948 Programming Guide
C79000-G8576-C848-04

Advertisement

Table of Contents
loading

Table of Contents