5-12
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
END and WDR Example
M0.1
.
.
.
When M0.1 is on, retrigger the
Watchdog Reset (WDR) to allow
the scan time to be extended.
Terminate the main program.
Network
LD M0.1
WDR
.
.
.
Network
MEND
Network 15
Network 78
WDR
END
LAD STL
Figure 5-8 Example of END and WDR Instructions
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 63
Both the Jump and corresponding Label must be in the main
program or in the interrupt routine. You cannot jump from the
main program to a label in the interrupt routine. Likewise, you
cannot jump from the interrupt routine to a label outside the
interrupt routine.
Jump to Label Example
LAD
SM0.1
.
.
.
/
If this is not the first scan, jump to
LBL 4.
Network
LDN SM0.1
JMP 4
.
.
.
Network
LBL 4
You can use the JMP to LBL instruction in the
main program or in the interrupt routine. The
JMP and its corresponding LBL must always be
located within the same segment of code (either
the main program, or the interrupt routine).
Network 14
Network 33
LBL
JMP
4
STL
4
Figure 5-9 Example of Jump to Label and Label Instructions
Instruction Set
L
A
D
S
T
L
JMP n
JMP
LBL
LBL n
n
n