0% found this document useful (0 votes)
341 views5 pages

7 PLC Program To Implement BCD To Excess-3 Code Conversion

The document describes a PLC program to convert BCD to excess-3 code. It explains that in excess-3 code, 3 is added to each decimal number in BCD. For example, 12 in BCD is 0001 0010, and in excess-3 is 0100 0101. The program uses ladder logic to implement the logic gate circuits for the conversion according to the truth table and Karnaugh maps provided. It lists the inputs and outputs and provides the ladder logic diagram and programming explanation. Runtime test cases confirm the program's functionality.

Uploaded by

Maria Guerrero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
341 views5 pages

7 PLC Program To Implement BCD To Excess-3 Code Conversion

The document describes a PLC program to convert BCD to excess-3 code. It explains that in excess-3 code, 3 is added to each decimal number in BCD. For example, 12 in BCD is 0001 0010, and in excess-3 is 0100 0101. The program uses ladder logic to implement the logic gate circuits for the conversion according to the truth table and Karnaugh maps provided. It lists the inputs and outputs and provides the ladder logic diagram and programming explanation. Runtime test cases confirm the program's functionality.

Uploaded by

Maria Guerrero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

PLC Program to Implement BCD to Excess-3 Code

Conversion
This is a PLC Program to Implement BCD to Excess-3 Code Conversion.

Problem Description
Implementing BCD to Excess-3 code conversion in PLC using Ladder Diagram
programming language.

Problem Solution
 Excess-3 code can be derived from BCD code by adding 3 to each number.
 For example, Decimal number 12 is represented as 0001 0010 in BCD. If we add 3
that is to add 0011 0011 then the corresponding Excess-3 code is 0100 0101.
 Write the truth table relating BCD and Excess-3.
 Write Karnaugh-Map for each output and obtain simplified expression.
 Implement BCD to Excess-3 code conversion circuit using Logic Gates.
 Implement Logic Gates’ circuit in PLC using Ladder Diagram programming
language.

Truth Table relating BCD and Excess-3 codes


Decimal BCD inputs Excess-3 Code outputs
B3 B2 B1 B0 E3 E2 E1 E0
0 0 0 0 0 0 0 1 1
1 0 0 0 1 0 1 0 0
2 0 0 1 0 0 1 0 1
3 0 0 1 1 0 1 1 0
4 0 1 0 0 0 1 1 1
5 0 1 0 1 1 0 0 0
6 0 1 1 0 1 0 0 1
7 0 1 1 1 1 0 1 0
8 1 0 0 0 1 0 1 1
9 1 0 0 1 1 1 0 0

Boolean expression for each Excess-3 code bits


E3= m(5, 6, 7, 8, 9)
E2= m(1, 2, 3, 4, 9)
E1= m(0, 3, 4, 6, 7, 8)
E0= m(0, 2, 4, 6, 8)
Karnaugh-Map solution for each output
Realizing code conversion using Logic Gates

PLC Program
Here is PLC program to Implement BCD to Excess-3 Code Conversion, 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)
E3= O:2/0 (Output)
E2= O:2/1 (Output)
E1= O:2/2 (Output)
E0= O:2/3 (Output)
Ladder Diagram to obtain Excess-3 code output

Program Description
 In RUNG000 as we can see, to perform B0+B1, both inputs are connected in
parallel to each other and this parallel connection is in series with B2 (I:1/1) to
obtain B2(B0 + B1) as in simplified expression. To finally obtain output E3 (O:0/0),
B3 (I:1/0) is connected in parallel to entire term B2(B0 + B1) that is I:1/1 (I:1/3 +
I:1/2).
 Similarly in all rungs, XIO and XIC are connected according to simplified
expression.
 RUNG002 and RUNG003, it can be noted in the Circuit Diagram that XIO
connections of B0 and B1 are made in order to set E0 and E1 to 1 which makes
E3E2E1E0 = 0011 (03).
Runtime test Cases
Decimal BCD inputs Excess-3 Outputs
B3 B2 B1 B0 E3 E2 E1 E0
0 0 0 0 0 0 0 1 1
1 0 0 0 1 0 1 0 0
2 0 0 1 0 0 1 0 1
3 0 0 1 1 0 1 1 0
4 0 1 0 0 0 1 1 1
5 0 1 0 1 1 0 0 0
6 0 1 1 0 1 0 0 1
7 0 1 1 1 1 0 1 0
8 1 0 0 0 1 0 1 1
9 1 0 0 1 1 1 0 0

You might also like