8 PLC Program To Implement Excess
8 PLC Program To Implement Excess
8 PLC Program To Implement Excess
Conversion
This is a PLC program to implement Excess-3 to BCD converter.
Problem Description
Implementing Excess-3 to BCD conversion in PLC using Ladder Diagram
programming language
Problem Solution
BCD can be derived from Excess-3 code by reversing the process used in
conversion of BCD to Excess-3 code which is to subtract 0011 or 0011 0011 from
given BCD number.
For example, Decimal number 12 is represented as 0100 0101 in Excess-3 code. If
we subtract 3 (0011 0011) from given Excess-3 code, then the corresponding BCD
is 0001 0010.
Write the truth table relating Excess-3 and BCD.
Write Karnaugh-Map for each output and obtain simplified expression.
Implement Excess-3 code to BCD converter using Logic Gates.
Implement Logic Gates’ circuit in PLC using Ladder Diagram programming
language.
PLC Program
Here is PLC program to implement Excess-3 to BCD converter, along with
program explanation and run time test cases.
List of Inputs and Outputs
E3= I:1/0 (Input)
E3= I:1/1 (Input)
E1= I:1/2 (Input)
E0= I:1/3 (Input)
B3= O:2/0 (Output)
B2= O:2/1 (Output)
B1= O:2/2 (Output)
B0= O:2/3 (Output)
Ladder Diagram to obtain Excess-3 code output
Program Description
By simply reversing the process of BCD to Excess-3 Code conversion, BCD can be
derived from given Excess-3 code.
RUNG000 to RUNG003 are for BCD bits B3 to B0 respectively.
Simplified expression is converted into Logic Circuit and the circuit is implemented
in Ladder Diagram as shown in fig above.
RUNG000 is for B3 in which two AND gates and output of these gates are ORed
together to form bit B3. I:1/0, I:1/2, I:1/3 are connected in series as an AND gate
and I:1/0, I:1/1 are connected similarly in series.
Output of these AND gates (E3E2E1 and E3E2) are connected in parallel to each
other contributing as OR function.
Similarly all other inputs in Rungs are connected.