MUX4B (multiplexer of 4 BOOL inputs)

Multiplexer between four BOOL inputs. It outputs a BOOL value.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
MUX4B
MUX4B
MUX4B parameters
Parameter
Parameter Type
Data Type
Description
Selector
Input
USINT
Selector integer value, must be in set [0...3].
IN0
Input
BOOL
Any BOOL input value.
  • TRUE: When Selector is 0.
  • FALSE: When Selector is not 0.
IN1
Input
BOOL
Any BOOL input value.
  • TRUE: When Selector is 1.
  • FALSE: When Selector is not 1.
IN2
Input
BOOL
Any BOOL input value.
  • TRUE: When Selector is 2.
  • FALSE: When Selector is not 2.
IN3
Input
BOOL
Any BOOL input value.
  • TRUE: When Selector is 3.
  • FALSE: When Selector is not 3.
MUX4B
Output
BOOL
  • TRUE when:
    • In0 if Selector = 0
    • In1 if Selector = 1
    • In2 if Selector = 2
    • In3 if Selector = 3
  • FALSE: For all other values of the Selector.

MUX4B examples

MUX4B function block diagram example
MUX4B function block diagram example
MUX4B ladder diagram example
MUX4B ladder diagram example
MUX4B structured text example
MUX4B structured text example
(* ST Equivalence: *) range := MUX4 (choice, 1, 10, 100, 1000); (* select from 4 predefined ranges, for example, if choice is 1, range will be 10 *)
Results
Results
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal