Chapter 8 Logic Instructions
8-145
FB/FC
FC
MUX is used for selecting one of two or more variables or constants and the
result is output to Out.
Parameters
Meaning
Description Valid range
K Gate Input Gate
Depends on the data type of the
variable that the input parameter is
connected to.
In0, In1 to
InN
Selections Input
added or removed while
the program is being
written. The maximum
number of selections is 8.
Depends on the data type of the
variable that the input parameter is
connected to.
Out
Selection
result
Output Selection result
Depends on the data type of the
variable that the output parameter is
Boolean
Bit string Integer
Real
number
Time, date
String
BOOL
BYTE
WORD
LWORD
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
STRING
K
●
In1
to
● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out
● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data
type.
Function Explanation
Based on the selection condition K, the MUX instruction selects one of In0~InN and the selection
result is output to Out. The value of Out corresponds to the value of K as shown in the following table.
MUX
EN ENO
K Out
In1
In0
InN
.
.
.