Introduction to STEP 5
S5-95F
Figure 7-6. Programming a Function Block
PB 3
Parameter list for
second call
Actual operands
Parameter list for
first call
Formal operands
FB 5
: JU
FB5
NAME : EXAMPLE
X1
:
I 0.0
X2
:
F 1.3
X3
:
Q 1.0
:
JC FB5
NAME : EXAMPLE
X1
:
I 0.3
X2
:
I 0.2
.
.
:
A I 0.1
Formal operands
NAME : EXAMPLE
DES:
X1 I BI
DES:
X2 I BI
DES:
X3Q BI
: A = X1
: A = X2
: = =
X3
: BE
A
I 0.0
A
F 1.3
=
Q 1.0
A
I 0.3
A
I 0.2
=
Q 1.0
Executed
program
X3
:
Q 1.0
First call
Second call
7.3.5
Data Blocks (DBs)
Data blocks store data to be processed in a program.
The following data types are permissible.
•
Bit pattern (representation of controlled system states)
•
Hexadecimal, binary or decimal numbers (times, results of arithmetic operations)
•
Alphanumeric characters (ASCII message texts)
Note
In the safety mode, you cannot change the contents of data blocks via the programmer.
The only exception is the access to the parameter control DB in the STOP mode.
The following data blocks are provided for special S5-95F functions:
•
DB1
Parameterization of the S5-95F
•
DB252 SINEC L1 failsafe data path 1
•
DB253 SINEC L1 failsafe data path 2
•
DB254 System event DB
7-16
EWA 4NEB 812 6210-02