Adder

brokenladder

Member
Join Date
Mar 2007
Location
toledo
Posts
7
How can I make an adder (adds two integer numbers) by only using contacts and coils?

It needs to add a number in N7:0 with N7:1 and place it in N7:2.
This is in RSLOGIX 500.

Thanks.
 
For inspiration, find the datasheet for a 'full adder' IC. Perhaps a 74LS83 would be a good start. Don't have a heart attack though when you see the equivalent logic.
 
Here's a hint: think about your problem in binary...

For example, write out a simple test case like "3 + 2 = 5"

00000011
+ 00000010
----------
= 00000101

What is the result when BOTH your input bits are TRUE or when BOTH your input bits are FALSE?

What is the result when only one of your input bits are TRUE?

Don't forget the 16-bit overflow case..

I'm not sure you'd ever want to roll your own adder like this, but you can definitely apply the same principle for something like Gray Code to Binary conversion (for an encoder, for example).


-Trevor
 
I'm sure brokenladder is required to do the raw logic in pure contact and output format. No math blocks. I really meant it about being prepared when yoou see the equivalent logic from an 'adder' IC.
 
brokenladder said:
its just required i do it that way
I'm pretty sure this is a homework assignment.

Tip 1: it will require 16 equal networks to do the adding-up and an equal number of equal networks to carry the bits over.


Tip 2: analyse what you're doing when you add up two 16-bit binary numbers on paper.

Kind regards,
 
Calling Don Lancaster

Any ordinary programmer would simply use the ADD instruction in the SLC-500. This is assuredly a class project to learn about binary arithmetic and how controller (and microprocessor) instruction sets encapsulate math functions.

What you're looking for, brokenladder, is called a "Binary Adder".

http://en.wikipedia.org/wiki/Adder_(electronics)

Start with a half-adder, then build a full-adder, then take a shot at a full fifteen-bit carrying adder.
 
Only if you want a full 16-bit result. If you don't do all 16 bits, you won't get the right answer.

Don't forget to deal with the carry-bit.
 

Similar Topics

my ccw softwer stops working when i add and try to open a ladder program.
Replies
0
Views
72
Hello, I am going over some old code from days gone by. I would like the expert to confirm my findings to see if I got it correct. 1. B64:22/3...
Replies
7
Views
437
Hello, I´m having a problem trying to program in Ladder. An output should be trigged by two possible contacts. Take a look on the printscreen...
Replies
5
Views
166
I got my PanelView Plus 7 working with a Micrologix 1500. How would I connect my laptop to the PanelView to view the ladder logic while operating...
Replies
6
Views
201
please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
411
Back
Top Bottom