Skip to main content

MUX

MUX is a multiplexer block. It concatenates 16 BOOL input variables into one WORD output value.

Ladder Representation

MUX block representation

Variable Table

Variable TypeNameData TypeDescription
VAR_INPUTENBOOLEnables block execution.
VAR_INPUTBit0–Bit15BOOLBit value for the corresponding position in the new word.
VAR_OUTPUTENOBOOLIndicates the end of the operation.
VAR_OUTPUTWordWORD UINT INTNew word formed from the input bits.

Operation

When EN is TRUE, MUX concatenates the Boolean input values and stores the result in Word.

Bit0 corresponds to the least significant bit (LSB). Bit15 corresponds to the most significant bit (MSB).

When EN is FALSE, Word remains unchanged.

ENO passes the EN value to the next Ladder block after the operation finishes.

Execution Flowchart

MUX execution flowchart

Examples

MUX Ladder example combining Boolean inputs into MYWORD

The example concatenates the Boolean input bits into the output word stored in MYWORD. The block finishes successfully and activates ENO.