additive values

jim767

Member
Join Date
Sep 2006
Location
ohio
Posts
84
Can I get some help on this. This is driving me bonkers and it's probably to simple to be true.

I am working in ladder logic RS5000. Want to MOV a analog value A from a input to destination tag B when a done bit is set. Also would like to take value B each time and create a tag or address say X with a cumulative value of what was in B plus the next B and so on or keep adding B to it each time. I've marked it up on paper but the MOV and ADD instructions the way i have them set don't appear to do this. I have a DN bit in front of a MOV instruction moving A to B. Next ladder I have a ADD instruction A added to B = C. Next ladder with ADD instruction A added to C = X. Can someone give me a hint. What is normally done to accumulate values. Yes I feel rather stupid at this point but I am determined to learn. Thanks
 
So, is it like this?


DONE BIT
----| |-----+-------------------- MOV
| A
| B
|
+-------------------- ADD
B
X
X




If so - make sure that 'Done Bit" is only on for 1 pass. If not then make a one-shot of the 'Done Bit' state and use it as the conditional of the run. If not you may see 'X' going up my more than one 'B's'

Also, make sure to calculate how big 'X' needs to be to hold the accumulation of all the 'B's' over the time you wish to accumulate.
 
Not sure what you're ultimately trying to achieve Jim, but you can quite easily accumulate an analogue integer value just using the ADD instruction (unless you're using the MOVE for another reason?)

I've never used 5000 but i'm assuming the principle is the same?

You need to use some sort of one shot before the add instruction or you may get spurious results with the scan etc....



Analogue_ADD.jpg



Hope this gives you a nudge....:)

(Must be quicker adding images!!!)
 
Last edited:
Thanks, when I kept looking at what I wrote it looks as if B and the destination address would in my mind change to the same value and didn't look right. I see that it is not due to the way it scans. I will use this and good point about the ONS, I will include it. Thanks again guys.
 

Similar Topics

I'm upgrading an existing machine with a Honeywell HC900 controller, and I'm trying to do some data processing in the controller. I have variables...
Replies
0
Views
39
I'm getting frustrated creating arrays of variables in Machine edition. I need to make 2 variable arrays that are 102x2 in size, with varying...
Replies
3
Views
89
How to retain Values in CCW software? I am using CCW software and I can not find the Retain function in this software. Not even local or global...
Replies
2
Views
153
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
137
I’m running a micro 820 to measure a tank level, then turning on equipment at certain levels. I have an analog input (4-20) that I’m storing and...
Replies
10
Views
272
Back
Top Bottom