Specifications
SIMATIC Instructions
9-144
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Jump to Label, Label
The Jump to Label instruction performs a branch to the
specified label (n) within the program. When a jump is
taken, the top of stack value is always a logical 1.
The Label instruction marks the location of the jump
destination (n).
Operands: n: 0 to 255
Data Types: WORD
Both the Jump and corresponding Label must be in the
main program, a subroutine, or an interrupt routine. You
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.
Jump to Label Example
LAD
SM0.2
.
.
.
/
If the retentive data has not been lost,
jump to LBL 4.
Network
LDN SM0.2
JMP 4
.
.
.
Network
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).
Network 14
Network 33
LBL
JMP
4
STL
4
FBD
JMP
SM0.2
4
LBL
4
Network 14
Network 33
.
.
.
.
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).
Figure 9-52 Example of Jump to Label and Label Instructions for LAD, STL, and FBD
L
A
D
S
T
L
JMP n
JMP
LBL
LBL n
n
n
F
B
D
JMP
LBL
n
n
222 224
333
221