MUX4![This function or function block supports PLCopen motion PLCopen motion icon](../Resources/Images/Icon_PLCopen.png)
A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - Select one of the inputs - 4 inputs.
Inputs
SELECT : DINT Selection command
IN1 : ANY First input
IN2 : ANY Second input
... :
IN4 : ANY Last input
Outputs
Q : ANY IN1 or IN2 ... or IN4 depending on SELECT (see truth table)
Truth table
SELECT | Q |
---|---|
0 |
IN1 |
1 |
IN2 |
2 |
IN3 |
3 |
IN4 |
other |
0 |
Remarks
In FFLD language, the input rung (EN) enables the selection. The output rung keeps the
same state as the input rung. In IL"Instruction list"
This is a low-level language and resembles assembly language, the first parameter (selector) must be
loaded in the current result before calling the function. Other inputs are operands of the
function, separated by comas.
ST Language
Q := MUX4 (SELECT, IN1, IN2, IN3, IN4);
FBD Language
FFLD Language
(* the selection is performed only if EN is TRUE *)
(* ENO has the same value as EN *)
IL Language
See also