100BBasic instructions
7.8 Program control
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
219
Table 7- 112 Data types for parameters
Parameter
Data type
1
Description
K
SInt, Int, DInt, USInt, UInt, UDInt, Real,
LReal, Byte, Word, DWord, Time,
TOD, Date
Common comparison value input
==, <>, <, <=, >. >= SInt, Int, DInt, USInt, UInt, UDInt, Real,
LReal, Byte, Word, DWord, Time,
TOD, Date
Separate comparison value inputs for specific comparison
types
DEST0, DEST1, ..,
DESTn. ELSE
Program Labels
Jump destination labels corresponding to specific
comparisons:
The comparison input below and next to the K input is
processed first and causes a jump to the label assigned to
DEST0, if the comparison between the K value and this
input is true. The next comparison test uses the next input
below and causes a jump to the label assigned to DEST1, if
the comparison is true, The remaining comparisons are
processed similarly and if none of the comparisons are true,
then a jump to the label assigned to the ELSE output
occurs.
1
The K input and comparison inputs (==, <>, <, <=, >, >=) must be the same data type.
Adding inputs, deleting inputs, and specifying comparison types
When the LAD or FBD SWITCH box is first placed in your program there are two comparison
inputs. You can assign comparison types and add inputs/jump destinations, as shown below.
Click a comparison operator inside the box and select a new operator
from the drop-down list.
Click the create icon inside the box (to the left of the last DEST
parameter) to add new comparison-destination parameters.
Right-click on an input stub and select the "Insert input" command.
Right-click on an input stub and select the "Delete" command.