Example Of Jump To Label And Label Instructions For Simatic Lad, Stl, And Fbd - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

SIMATIC Instructions
Jump to Label, Label
L
A
D
F
B
D
S
JMP
T
L
LBL
221
222 224
Jump to Label Example
Network 14
SM0.2
/
.
.
.
Network 33
4
LBL
Network 14
.
.
.
.
Network 33
Figure 9-52
9-148
The Jump to Label instruction performs a branch to the
n
specified label (n) within the program. When a jump is
JMP
taken, the top of stack value is always a logical 1.
The Label instruction marks the location of the jump
n
destination (n)
LBL
Operands:
Data Types: WORD
n
JMP
Both the Jump and corresponding Label must be in the
main program, a subroutine, or an interrupt routine. You
n
LBL
cannot jump from the main program to a label in either a
subroutine or an interrupt routine. Likewise, you cannot
jump from a subroutine or interrupt routine to a label
outside that subroutine or interrupt routine.
n
n
226
LAD
4
If the retentive data has not been lost,
JMP
jump to LBL 4.
You can use the JMP to LBL instruction
in the main program, in subroutines, or
in interrupt routines.The JMP and its
corresponding LBL must always be
located within the same segment of
code (either the main program, a
subroutine, or an interrupt routine).
4
JMP
SM0.2
4
LBL
Example of Jump to Label and Label Instructions for SIMATIC LAD, STL, and
FBD
.
n:
Constant (0 to 255)
Network
LDN
JMP
.
.
.
Network
LBL
FBD
If the retentive data has not been lost,
jump to LBL 4.
You can use the JMP to LBL instruction
in the main program, in subroutines, or
in interrupt routines.The JMP and its
corresponding LBL must always be
located within the same segment of
code (either the main program, a
subroutine, or an interrupt routine).
S7-200 Programmable Controller System Manual
STL
SM0.2
4
4
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents