5.5 Standard Selection Functions
5.5.2 Multiplexer
5-153
5
APPLICATION
FUNCTIONS
MUX(_E)
MUX(_E)
Operation Error
No operation error occurs in the execution of the MUX(_E) function.
Program Example
The program which selects the value to be output among the values input to variables and
according to the value input to , and outputs the operation result from in the same data type
as that of variable or .
(a) Function without EN/ENO (MUX)
[Structured ladder]
[ST]
g_int4 := MUX (g_int1, g_int2, g_int3);
(b) Function with EN/ENO (MUX_E)
[Structured ladder]
[ST]
g_bool3 := MUX_E (g_bool1, g_int1, g_int2, g_int3, g_int4);
s1
s2
n
d
s1
s2