MUX
PROGRAM MUX_DEMO
VAR
REAL1: REAL;
INT1:INT;
END_VAR
REAL3:= MUX(K:=0, IN0:=1, IN2:=3, IN3:=4);
END_PROGRAM
The function multiplexes the input signals to a single output. The input signal K specifies which of the IN inputs will be brought to the output. At K=0 the output has value of IN0. For K, that is out of range of defined inputs, output will always be value from the first valid input.
Input | Type | Description |
---|---|---|
IN0.. | ANY | Input value |
K | ANY_INT | Input value selector |
Output | Type | Description |
---|---|---|
=> | ANY | Output value |