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

please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
287
Hello, I am trying to replicate a piece of logic on the PLC5 onto an SEL RTAC. I am using ladder on SEL and FBD. I am having issue on the ladder...
Replies
13
Views
211
Hi all. Is this the simplest way to debounce inputs in Ladder (there are 2 points being debounced here)? The TOF drives the tag. I'm expecting...
Replies
15
Views
493
I have a machine which is undergoing upgradation. As part of the process two SEW drives are being replaced., existing Gen B with new Gen C. The...
Replies
3
Views
197
Does anyone have RSLogix 5000 ladder diagram program of tank leveling (factory IO). Fill valve, discharge valve, set point, level, etc? I looked...
Replies
2
Views
156
Back
Top Bottom