100BBasic instructions
7.8 Program control
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
217
7.8.11
Jump and label instructions
Table 7- 107 JMP, JMPN, and LABEL instruction
LAD
FBD
SCL
Description
See the GOTO (Page 216)
statement.
If there is power flow to a JMP coil (LAD), or if the
JMP box input is true (FBD), then program execution
continues with the first instruction following the
specified label.
If there is no power flow to a JMPN coil (LAD), or if
the JMPN box input is false (FBD), then program
execution continues with the first instruction following
the specified label.
Destination label for a JMP or JMPN jump instruction.
1
You create your label names by typing in the LABEL instruction directly. Use the parameter helper icon to select the
available label names for the JMP and JMPN label name field. You can also type a label name directly into the JMP or
JMPN instruction.
Table 7- 108 Data types for the parameters
Parameter
Data type
Description
Label_name
Label identifier
Identifier for Jump instructions and the corresponding jump
destination program label
●
Each label must be unique within a code block.
●
You can jump within a code block, but you cannot jump from one code block to another
code block.
●
You can jump forward or backward.
●
You can jump to the same label from more than one place in the same code block.
7.8.12
JMP_LIST instruction
Table 7- 109 JMP_LIST instruction
LAD / FBD
,
SCL
Description
CASE k OF
0: GOTO dest0;
1: GOTO dest1;
2: GOTO dest2;
[n: GOTO destn;]
END_CASE;
The JMP_LIST instruction acts as a program jump distributor to control
the execution of program sections. Depending on the value of the K
input, a jump occurs to the corresponding program label. Program
execution continues with the program instructions that follow the
destination jump label. If the value of the K input exceeds the number of
labels - 1, then no jump occurs and processing continues with the next
program network.