100BBasic instructions
7.8 Program control
S7-1200 Programmable controller
218
System Manual, 11/2011, A5E02486680-05
Table 7- 110 Data types for parameters
Parameter
Data type
Description
K
UInt
Jump distributor control value
DEST0, DEST1, ..,
DESTn.
Program Labels
Jump destination labels corresponding to specific K parameter values:
If the value of K equals 0, then a jump occurs to the program label
assigned to the DEST0 output. If the value of K equals 1, then a jump
occurs to the program label assigned to the DEST1 output, and so on. 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.
For LAD and FBD: The JMP_LIST box is first placed in your program, there are two jump
label outputs. You can add or delete jump destinations.
Click the create icon inside the box (on the left of the last DEST parameter)
to add new outputs for jump labels.
Right-click on an output stub and select the "Insert output" command.
Right-click on an output stub and select the "Delete" command.
7.8.13
SWITCH instruction
Table 7- 111 SWITCH instruction
LAD / FBD
SCL
Description
Not available
The SWITCH instruction acts as a program jump distributor to
control the execution of program sections. Depending on the
result of comparisons between the value of the K input and the
values assigned to the specified comparison inputs, a jump occurs
to the program label that corresponds to the first comparison test
that is true. If none of the comparisons is true, then a jump to the
label assigned to ELSE occurs. Program execution continues with
the program instructions that follow the destination jump label.
1
For LAD and FBD: Click below the box name and select a data type from the drop-down menu.
2
For SCL: Use an IF-THEN set of comparisons.