PLC Program to Implement 3 to 8 Line Decoder - Sanfoundry
PLC Program to Implement 3 to 8 Line Decoder - Sanfoundry
Problem Description
Implement 3 to 8 line decoder in PLC using Ladder Diagram programming language.
Problem Solution
It has three inputs I0, I1 and I2 and 8 outputs Q0 to Q7.
These three inputs I0, I1 and I2 determines which output should be active.
If I0 and I1 are true and I2 is false, then Q6 will be activated and all others are not.
It does not need K-map and simplification so one step is eliminated to create Ladder Logic Diagram.
Realize the 3 to 8 line decoder using Logic Gates.
Inputs Outputs
I2 I1 I0 Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
http://www.sanfoundry.com/plc-program-implement-3-8-line-decoder/ 1/4
4/5/2017 PLC Program to Implement 3 to 8 Line Decoder - Sanfoundry
PLC Program
Here is PLC program to Implement 3 to 8 Line Decoder, along with program explanation and run time
test cases.
http://www.sanfoundry.com/plc-program-implement-3-8-line-decoder/ 2/4
4/5/2017 PLC Program to Implement 3 to 8 Line Decoder - Sanfoundry
Program Description
In all the rungs, I0 (I:1/0), I1 (I:1/1) and I2 (I:1/2) are used to determine which output from Q0 to Q7
should go ON..
Q0 to Q7 are outputs.
When I0 (I:1/0), I1 (I:1/1) and I2 (I:1/2) are low, output 0 O:2/0 will get activated.
When I:1/0 and I:1/1 are low and I:1/1 is high that is when I0 and I1 are low and I2 is high, output 1
O:2/1 will get activated.
Similarly remaining six different outputs are obtained.
In other words, according to bit pattern of I0 I:1/0, I1 I:1/1 and I2 I:1/2, outputs from Q0 to Q7 are
activated.
I2 I1 I0 Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
http://www.sanfoundry.com/plc-program-implement-3-8-line-decoder/ 4/4