6 PLC Program To Implement Binary To BCD Converter
6 PLC Program To Implement Binary To BCD Converter
Problem Description
Implementing Binary to BCD converter in PLC using Ladder Diagram
programming language.
Problem Solution
Writing truth table showing the relation between Binary as input and BCD as
output.
To obtain these equations, Karnaugh-Map method is again used.
For each BCD output D4, D3, D2, D1 and D0, write Karnaugh-Map.
From the K-Map, obtaining a simplified expression for each BCD output in terms of
Binary inputs.
Realize the code converter using the Logic Gates.
And from the same simplified expressions, draw a Ladder Diagram to obtain BCD
output in terms of Binary inputs.
PLC Program
Here is PLC program to Implement Binary to BCD Converter, along with
program explanation and run time test cases.
List of Inputs and Outputs
B3= I:1/0 (Input)
B2= I:1/1 (Input)
B1= I:1/2 (Input)
B0= I:1/3 (Input)
D4= O:2/0 (Output)
D3= O:2/1 (Output)
D2= O:2/2 (Output)
D1= O:2/3 (Output)
D0= O:2/4 (Output)
Ladder Diagram to obtain BCD output
Program Description
D4 is MSB bit of BCD output.
D3 is 2nd bit of BCD output and so are similarly D2, D1 and D0, 3rd, 4th and LSB
of BCD output respectively.
B3 to B0 are 4 Binary inputs which are converted into BCD numbers.
RUNG000 is used for D4 bit and so on till RUNG004 which is used for LSB D0.
As we apply any 4bit binary input, B3 to B0 are set to 1 such that D4 to D0 bits go
high according to BCD patterns of the applied Binary input.