Table of Contents

Digital demultiplexer

Block name

BD11_DIGITAL_DEMULTIPLEXER

ST call

PROGRAM BD11_TEST
VAR 
    INPUT:REAL;
   SELECTOR:LINT;  
    IN1: BOOL;
  OUT1: LIB.CORE.V1_0.MULTIIOBOOL;
    FB: LIB.CORE.V1_0.BD11_DIGITAL_DEMULTIPLEXER;
END_VAR
    FB(IN:=IN1, SEL:=SELECTOR);
 OUT1:=FB.OUT;
END_PROGRAM

Library

LIB\CORE

Version

V1.0

Description

The block is a logical values demultiplexer. If SEL=1 then the first element of the output array OUT is a copy of the input IN. If SEL=2 then the second element of the output array is a copy of IN, etc. All other outputs are set to DEFAULT.

Inputs

Input TypeDescription Default value
IN BOOLInput value False
SEL LINTOutput selector 0
DEFAULTBOOLDefault value of all outputsFalse

Outputs

OutputType Description
OUT MULTIIOBOOLOutput signal

Application example


In the example above, output 3 is selected, displaying the value of True (1) which is brought on the input. All other outputs are False (0) which is the DEFAULT value.