Siemens SIMATIC S5 Manual page 133

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

Manual S5-115F
Block end "BE"
The "BE" operation terminates a block. Data blocks do not need to be terminated. "BE" is always
the last statement in a block.
In structured programming, program scanning jumps back to the block where the call for the
current block was made.
Binary logic operations cannot be continued in a higher-order block.
Example: Program block PB 3 is terminated by the "BE" statement.
Program Sequence
OB 1
JU PB 3
Unconditional block end "BEU"
The "BEU" operation causes a return within a block. However, jump operations can by-pass the
"BEU" operation in function blocks ( 3.2.9).
Binary logic operations cannot be continued in a higher-order block.
Example:
Scanning of function block FB 21 is terminated regardless of the RLO.
Program sequence
PB 8
JU FB 21
EWA 4NEB 811 6149-02
STL
PB 3
BE
FB 21
JC=
BEU
BE
.
.
The "BE" statement terminates
.
program block PB 3 and causes
.
program scanning to return to
.
organization block OB 1.
.
BE
STL
.
.
The "BEU" statement causes program
.
scanning to leave function block
.
FB 21 and return to program block
JC=
PB 8.
BEU
.
.
.
.
BE
STEP 5 Operations
Explanation
Explanation
3-37

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents