Introduction to STEP 5 S5-115F Manual
PB 3
Parameter list for
second call
Actual operands
Parameter list for
first call
Formal operands
FB 5
: JU FB5
NAME : EXAMPLE
X1 : I 4.1
X2 : F 1.3
X3 : Q 0.1
: JC FB5
NAME : EXAMPLE
X1 : I 4.5
X2 : I 5.3
.
.
: A I 5.2
Formal operands
NAME: EXAMPLE
DECL.: X1 I BI
DECL : X2 I BI
DECL : X3 Q BI
: A = X1
: A = X2
: = = X3
: BE
A I 4.1
A F 1.3
= Q 0.1
A I 4.5
A I 5.3
= Q 0.1
Executed program
X3 : Q 0.1
Figure 2-7. Programming a Function Block
2.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 process states)
• Hexadecimal, binary, or decimal numbers (times, results of arithmetic operations)
• Alphanumeric characters (message texts)
Programming:
Begin data block programming by specifying a block number between 4 and 255. (DB 0 is reserved
for the block address list. DB 1 is reserved for configuration, and DB 2 and DB 3 are reserved for
error DBs.) Data is stored in words. If the information takes up less than 16 bits, the remaining bits
are assigned zeros. Data input begins at data word 0 and continues in ascending order. A data
block can hold up to 4096 data words. You can access a data block up to DW 255 with the
”L DW"”and ”T DW” operations. Figure 2-8 shows an example of data block contents.
2-18
EWA 4NEB 811 6149-02