EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Basic instructions
8.9 Word logic operations
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
329
8.9.4
SEL (Select), MUX (Multiplex), and DEMUX (Demultiplex) instructions
Table 8- 175 SEL (select) instruction
LAD / FBD
SCL
Description
out := SEL(
g:=_bool_in,
in0:-_variant_in,
in1:=_variant_in);
SEL assigns one of two input values to parameter OUT, depending
on the parameter G value.
1
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
Table 8- 176 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, Date, TOD, Char, WChar
Inputs
OUT SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word, DWord,
Time, Date, TOD, Char, WChar
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 8- 177 MUX (multiplex) instruction
LAD / FBD
SCL
Description
out := MUX(
k:=_unit_in,
in1:=variant_in,
in2:=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.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals