Analogue demultiplexer

B10_ANALOGUE_DEMULTIPLEXER

PROGRAM B10_TEST
VAR 
    INPUT:REAL;
    SELECTOR:INT;   
    O1,O2: REAL;
    FB: LIB.CORE.V1_0.B10_ANALOGUE_DEMULTIPLEXER;
END_VAR
    FB(IN:=INPUT, SEL:=SELECTOR);
   O1:=FB.OUT[1];
  O2:=FB.OUT[2];
END_PROGRAM

LIB\CORE

V1.0

The block implements a demultiplexer for REAL variables.

Input TypeDescription Default value
IN REALInput value 0
SEL INT Output selector 0
DEFAULTREALDefault value of all outputs0
OutputTypeDescription
OUT REALOutput signal.

The block implements a demultiplexer for REAL variables. Setting of SEL=1 means that IN is copied to the OUT[1] output, SEL=2 means that IN is copied to OUT[2], etc. All other outputs are set to the DEFAULT value. If SEL does not match any of the available outputs (SEL<1 or sel>16), all outputs are in the DEFAULT value.

  • © Energocentrum Plus, s.r.o. 2017 - 2024