Chapter 9
148
Logic programming – Function blocks
9.7.15 Binary decoder
Function block diagram
General description
The Binary decoder function block decodes dependent on the current configuration a
binary code to a one-out-of-N (one-hot) or to a priority code. Up to 5 inputs can be
configured. The number of outputs depends on the number of inputs. Evaluating
inputs A, B and C allows to encode binary codes with decimal values from 0 to 7 with
a single Binary decoder function block (input A = 2
0
, input B = 2
1
, input C = 2
2
). By
using the optional inputs D and E it is possible to combine up to four Binary decoder
function blocks in order to encode binary codes with decimal values from 0 to 31.
Parameters of the function block
Parameter Possible values
Encoder mode One out of N
Priority
Inputs Not inverted
Inverted
Number of inputs 1 to 5
Value range 0-7
8-15 (only available if more than 4 inputs are used)
16-23 (only available if 5 inputs are used)
24-31 (only available if 5 inputs are used)
One out of N
In One out of N mode, only the output with the number that corresponds to the
current input values will be High.
Priority
In Priority mode, the output with the number that corresponds to the current input
values and all outputs with lower numbers will be High.
Inputs inverted/not inverted
Using this parameter it is possible to invert all input values.
Figure 123:
Function block diagram for
the Binary decoder function
block
Table 51:
Parameters of the Binary
decoder function block