Program instructions
7.13 Program control
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
301
When I2.0 is ON, the outside
loop (Network 1 - 4) is exe-
cuted 100 times.
LD I2.0
FOR VW100, +1,
+100
The inside loop (Network 2 -
3) is executed twice for each
execution of the outside loop
when I2.1 is on.
LD I2.1
FOR VW225, +1, +2
End of inside loop
NEXT
End of outside loop
NEXT
You can use the JMP (Jump) instruction in the main program, in subroutines, or in interrupt
routines. The JMP and its corresponding LBL (Label) instruction must be located within the
same program segment either in the main program, a subroutine, or an interrupt routine.
Note
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.
You can use a Jump instruction within an SCR program segment, but the corresponding
Label instruction must be located within
the same SCR program segment.