AD DL06 question......

XtremeIN

Member
Join Date
Jun 2005
Location
Indiana
Posts
217
Hello all,
I have a rather simple problem. I would like to move a given number, V401, to an incrementing location, V4000, then v4001, and so on, every minute. Then after 20-25 minutes add all the numbers, divide by the total number and then move to a final location. What I am trying to do is calculate GPM then find an average over the length of the process. Hope this makes sense. Feel free to ask questions and post suggestions.

Thanks,
Micheal
 
Is it important to keep track of the individual readings in a table? You could, at the beginning of the accumulation, zero a total.

LD K0
OUTD V3000 - accumulation of minute views of GPM - we're using a double to allow for a large accumulation

and also a count

LD K0
OUT V3002 - count of views

Now each minute, add your reading to the total

LD V401
ADDD V3000
OUTD V3000

and also increment your count

INC V3002

At the end of your accumulation

V3000 (read as a double) is the total gallons

Average by

LDD V3000
DIV V3002
OUT V3003 - average gallons
 
Just an added note - and I'm sure you realise this - you don't have to wait until the end of the accumulation to do the averaging. You can do it at each step for a running average and just note it at the end of the total accumulation.
 

Similar Topics

Hello, I am working with a dl06 for a Fuel station project, I need to receive a few values over tcp/ip, log them and than based on those values...
Replies
5
Views
2,163
Hi, Mostly AB guy here with a little Koyo experience, but all of its digital. I get handed three analog I/O cards and asked to prove that they...
Replies
6
Views
499
Hi all, I am making a test rig to be able to wire in any DL06 (or DL05) And create a HMI in red lions crimson 3.1 to test all the inputs and...
Replies
4
Views
931
I have a Cmore screen which is communicating to the DL06 in BCD and need to create a timer that works in real numbers for a test, I simply need to...
Replies
3
Views
2,137
I have a client that has many Automation Direct DL06 PLCs for a municipal water/wastewater system. When there is a power outage, one of the sites...
Replies
4
Views
2,441
Back
Top Bottom