Basic instructions
8.9 Word logic operations
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
331
Table 8- 180 Data types for the DEMUX instruction
K UInt Selector value:
• 0 selects OUT1
• 1 selects OUT2
• n selects OUTn
IN SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word,
DWord, Time, Date, TOD, Char, WChar
Input
OUT0, OUT1, ..
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word,
DWord, Time, Date, TOD, Char, WChar
Outputs
ELSE SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word,
DWord, Time, Date, TOD, Char, WChar
Substitute output when K is greater than
(OUTn - 1)
1
The input variable and the output variables must be of the same data type.
Table 8- 181 ENO status for the MUX and DEMUX instructions
1 No error MUX: Selected IN value is copied to
OUT
DEMUX: IN value is copied to selected
0 MUX: K is greater than the number of inputs -1
• No ELSE provided: OUT is un-
changed,
•
ELSE provided, ELSE value assigned
to OUT
DEMUX: K is greater than the number of outputs -1
• No ELSE provided: outputs are un-
changed,
• ELSE provided, IN value copied to
ELSE