Integer demultiplexer
Block name
B12_INTEGER_DEMULTIPLEXER
ST call
PROGRAM B12_TEST VAR INPUT:INT; SELECTOR:INT; O1,O2: INT; FB: LIB.CORE.V1_1.B12_INTEGER_DEMULTIPLEXER; END_VAR FB(IN:=INPUT, SEL:=SELECTOR); O1:=FB.OUT[1]; O2:=FB.OUT[2]; END_PROGRAM
Library
LIB\CORE
Version
V1.1
Description
The block is a demultiplexer for INT variables.
Inputs
Input | Type | Description | Default value |
IN | INT | Input value | 0 |
SEL | INT | Output selector | 0 |
DEFAULT | INT | Default value of all outputs | 0 |
Outputs
Output | Type | Description |
OUT | INT | Output signal. |
Function
The block implements a demultiplexer for INTEGER 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.