How to totalize the values in Excel ?

fabian24

Member
Join Date
Jul 2007
Location
Sharjah
Posts
16
I have downloaded the instantaneous flow (l/sec) every minute from the historical log file of Wonderware HMI.

I now want to see if it is possible to totalize the values, so I can get the average flow per day or flow per hour.


Could some please throw some light on this.

Would very much appreciate you intervention.

I have attached the txt file for review.


Thank you.
 
Well, this isn't exactly a PLC question. I assume you want to know how to Total and average the values in Excel. It would be better to Post your Excel Spreadsheet so we could try out a few things.

What have you tried to do yourself?

Stu....
 
Took a quick look at your raw data.

I am only going to talk about the data in rows 1 thru 101. Column A is date B is time of day and C is the flow rate ie lpm.

ASSUMING we are looking at just 1 thru 101 and in Excel
Stick a few extra rows at the top of sheet to put your calcs in.
At A1 enter word TOTAL At B1 enter the "command" =SUM(C1..C101)
Now copy that and change SUM to COUNT and correct C2 and C102 to 1 and 101.

Divide total by count and you have average.

Sign up for an Excel class - if you are handling large sets of data similar to this you NEED this capability - will save you hours.

Dan Bentler
 
Totalized Flow....

Guys, Thank you for the response.

Just for your information, I know to use excel well and really don't need much of classes.

The case that I have put forward is not about just doing average, sum and count.

It about how to integrate the data that I have given.
If you just do sum and averages that is not the totalized flow.

To get the exact flow, in a day or hour, you need to INTEGRATE the data.


I don't know how to do that exactly and that's the reason I posted the question. It's a complex equation.

Anyway, thank you for trying to help out.
 
To get the exact flow, in a day or hour, you need to INTEGRATE the data.
Only a Math professor would say that. No type of integration is going to be more accurate than using the actual data.

For the rest of us, finding an integral is simply a mathematical way to find the area underneath a curved line. You have the line, you have a series of data points. To get an average flow as you requested, say for one hour (60 minutes), for the 60 minute period that you are interested in, simply multiply each 1-minute (L/Second) flow data by 60 to get the Liters per minute for that 1-minute period, then add up the 60 data points, then call it "XX Liters per hour".

You should understand that the above method is going to be as accurate as any other mehtod, simply because your data points are only for every 60 seconds, so you must assume that the rate did not change during the other 59 seconds. The real rate probably did change, and you don't have data for that, so all you can get is an "average". No fancy math integration is going to change that fact.
 
Last edited:
Here is the calculated Liters per Hour and Liter per Day. The ZIP file is an Excel *.XLS file.

There is a large gap in the data starting on 10/15/2011, Time 23:31 (2-day weekend non-running days). Because of that, a true mathematical integration over the complete data period will give a false impression that the average flow rate per hour is much less. Using the Excel function "COUNTIF" filters out the zero data points, giving the averages for the time the process was actually running. The Average Calculated Liters per Day is skewed because the beginning and ending days are not complete 24-hour periods.

Average Liters/ Hour for the time actually running = 2012271.32
 
Last edited:
You will need to set up some calculations in the PLC
add values for an Hour store that in an 'hourlog'
Calculate the avg for that hour - do the same for the day.
Thes send that data inconjunction with your existing log function.
 

Similar Topics

HOW DO YOU GO ABOUT TOTALIZING GPM FROM A 4-20ma SIGNAL I AM USING DIRECTSOFT32. I ALREADY HAVE THE SIGNAL CONVERTED TO GPM.
Replies
2
Views
3,041
To get values from an Allen-Bradley 1734-VHSC24 module, which is a high-speed counter module for CompactLogix PLCs, you typically use software...
Replies
0
Views
45
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
73
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
138
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
207
Back
Top Bottom