100BBasic instructions
7.9 Word logic operations
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
229
Table 7- 134 Data types for the SEL instruction
Parameter
Data type
1
Description
G
Bool
0 selects IN0
1 selects IN1
IN0, IN1
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word, DWord,
Time, Char
Inputs
OUT
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word, DWord,
Time, Char
Output
1
Input variables and the output variable must be of the same data type.
Condition codes: ENO is always TRUE following execution of the SEL instruction.
Table 7- 135 MUX (multiplex) instruction
LAD / FBD
SCL
Description
out := MUX(
k:=_unit_in,
in0:=variant_in,
in1:=variant_in,
[...in32:=variant_in,]
inelse:=variant_in);
MUX copies one of many input values to parameter OUT, depending
on the parameter K value. If the parameter K value exceeds (IN
n
- 1),
then the parameter ELSE value is copied to parameter OUT.
1
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
To add an input, click the "Create" icon or right-click on an input stub for one of
the existing IN parameters and select the "Insert input" command.
To remove an input, right-click on an input stub for one of the existing IN parameters (when
there are more than the original two inputs) and select the "Delete" command.
Table 7- 136 Data types for the MUX instruction
Parameter
Data type
Description
K
UInt
0 selects IN0
1 selects IN1
n
selects IN
n
IN0, IN1, .. INn
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word, DWord,
Time, Char
Inputs
ELSE
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word, DWord,
Time, Char
Input substitute value (optional)
OUT
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word, DWord,
Time, Char
Output
1
Input variables and the output variable must be of the same data type.