Sel (Select), Mux (Multiplex), And Demux (Demultiplex) Instructions - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents
Basic instructions
7.9 Word logic operations
7.9.4

SEL (Select), MUX (Multiplex), and DEMUX (Demultiplex) instructions

Table 7- 136 SEL (select) instruction
LAD / FBD
SCL
out := SEL(
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
1
Table 7- 137 Data types for the SEL instruction
Parameter
Data type
G
Bool
IN0, IN1
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word, DWord,
Time, Char
OUT
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word, DWord,
Time, Char
Input variables and the output variable must be of the same data type.
1
Condition codes: ENO is always TRUE following execution of the SEL instruction.
Table 7- 138 MUX (multiplex) instruction
LAD / FBD
SCL
out := MUX(
k:=_unit_in,
in1:=variant_in,
in2:=variant_in,
[...in32:=variant_in,]
inelse:=variant_in);
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
1
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.
278
g:=_bool_in,
in0:-_variant_in,
in1:=_variant_in);
1
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.
Description
SEL assigns one of two input values to parameter OUT, depending
on the parameter G value.
Description
MUX copies one of many input values to parameter OUT, depending
on the parameter K value. If the parameter K value exceeds (IN
then the parameter ELSE value is copied to parameter OUT.
Description
0 selects IN0
1 selects IN1
Inputs
Output
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
n
- 1),

Hide quick links:

Table of Contents
loading

Table of Contents