Skip to main content

DEMUX

DEMUX is a demultiplexer block. It decomposes one 16-bit word into 16 BOOL output variables.

Ladder Representation

DEMUX block representation

Variable Table

Variable TypeNameData TypeDescription
VAR_INPUTENBOOLEnables block execution.
VAR_INPUTWordWORD UINT INT16-bit input variable.
VAR_OUTPUTENOBOOLIndicates the end of the operation.
VAR_OUTPUTBit0–Bit15BOOLBit value from the corresponding position of Word.

Operation

When EN is TRUE, DEMUX decomposes Word into 16 Boolean values and stores them in Bit0 through Bit15.

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

When EN is FALSE, the output variables remain unchanged.

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

Execution Flowchart

DEMUX execution flowchart

Examples

DEMUX Ladder example decomposing MYWORD into Boolean outputs

The example decomposes MYWORD into Boolean values and stores them in BIT0 through BIT15. The block finishes successfully and activates ENO.