End And Wdr Example; Jump To Label, Label; Jump To Label Example - Siemens Simatic S7-200 CPU 210 System Manual

Table of Contents

Advertisement

Instruction Set

END and WDR Example

Network 15
M0.1
.
.
.
Network 78
Figure 5-8
Example of END and WDR Instructions

Jump to Label, Label

L
A
D
S
JMP
T
L
LBL

Jump to Label Example

Network 14
SM0.1
/
.
.
.
Network 33
4
LBL
Figure 5-9
Example of Jump to Label and Label Instructions
5-12
LAD
When M0.1 is on, retrigger the
WDR
Watchdog Reset (WDR) to allow
the scan time to be extended.
Terminate the main program.
END
The Jump to Label instruction performs a branch to the
n
specified label (n) within the program. When a jump is taken, the
JMP
top of stack value is always a logical 1.
The Label instruction marks the location of the jump destination
n
(n).
LBL
Operands:
n
Both the Jump and corresponding Label must be in the main
n
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.
LAD
If this is not the first scan, jump to
4
JMP
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
LD
WDR
.
.
.
Network
MEND
n:
0 to 63
Network
LDN
JMP
.
.
.
Network
LBL
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
STL
M0.1
STL
SM0.1
4
4

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents