MUX4

PLCopen motion icon

FunctionClosed 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

Inputs

Data Type

Description

K

DINT

Selection command.

IN0

ANY

First input.

IN1

ANY

Second input.

IN2

ANY

Third input.

IN3

ANY

Last input.

Outputs

Output

Data Type

Description

Q

ANY

IN0 or IN1 ... or IN3 depending on K.

See Truth Table.

Truth Table

K

Q

0

IN0

1

IN1

2

IN2

3

IN3

Other

0

Remarks

FBD Language

FFLD Language

(* the selection is performed only if EN is TRUE. *)
(* ENO has the same value as EN. *)

IL Language

Op1: LDClosed "Ladder diagram"
Ladder logic is a method of drawing electrical logic schematics. It is now a very popular graphical language for programming Programmable Logic Controllers (PLCs). It was originally invented to describe logic made from relays. The name is based on the observation that programs in this language resemble ladders, with two vertical "rails" and a series of horizontal "rungs" between them   SELECT
     MUX4 IN1, IN2, IN3, IN4
     ST   Q

ST Language

Q := MUX4 (K, IN0, IN1, IN2, IN3);

See Also