MUX4

Multiplexer with four entries; selects a value between four integer values.
lrsf_mu41
Arguments
SEL
SEL
DINT
Selector integer value (must be in set [0..3])
IN1...IN4
IN1...IN4
DINT
Any integer values
MUX4
Q
DINT
= value1 if SEL = 0
= value2 if SEL = 1
= value3 if SEL = 2
= value4 if SEL = 3
= 0 for all other values of the selector
Example
(* FBD Program using "MUX4" Function *)
lrsf_mu42
(* ST Equivalence: *)
range := MUX4 (choice, 1, 10, 100, 1000); (* select from 4 predefined ranges, for example, if choice is 1, range will be 10 *)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal