Jmp (Jump To Label) - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Program instructions
7.13 Program control
7.13.2

JMP (jump to label)

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.
LAD / FBD
STL
JMP N
LBL N
Input / output
Data type
n
WORD
Example: Jump to Label
LAD
344
Description
The JMP (Jump) instruction performs a branch to the label N within the program.
The LBL (Label) instruction marks the location of the jump destination n.
Operand
Constant (0 to 255)
If the retentive data has not been
lost, jump to label 4.
Label 4
STL
Network 1
LDN SM0.2
JMP 4
Network 2
LBL 4
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents