Total Volume from a flow rate

AshleyParr

Member
Join Date
Dec 2008
Location
Midlands, UK
Posts
184
OK then....

I've just been told the project going in has changed (no surprise, easily solved) but I've had a request to totalize the water going through the heat exchanger which has stumped me.

We only have a flow meter giving a 4-20mA reading (scaled at 0-20 l/min) and apparently no pulses. As far as i am aware trying to create a running total from an instantaneous flow will be near impossible?

Can anyone help me either way?

Cheers,
Ash
 
Actually it's easy. It depends on how accurate you want it to be. and how steady your rate is.
Ex.
Because your rate is in l/min
Every 5 sec div the flow rate by 12 and add this value to your total. This gives you how much flowed in the last 5 sec.. Repeat every 5 sec, keep adding it the the total. At some point you are going to have to reset it. And maybe store the running total to another register.

If you want it to be more accurate then take samples more often or use interrupts for more accurate timing.

Depending on your PLC it may have a build-in totalizer instruction.
 
As Mickey said, this is easy and fairly common.

You just have to sample the flowrate measurement on some time interval, this will provide you the instantaneous flow rate. Simply accumulate this value. The trick is aligning the time units of your flowrate with the time units you are sampling.

Say you want to sample every 1 minute. If the flowrate is 300 gal/min, then after 1 minute your totalized flow is 300 gallons. After 2 minutes it is now 600 gallons, after 5 minutes it is 1500 gallons. Of course sampling every minute will be very erroneous especially if it is not a steady state, however it makes the totalization obvious w/o having to adjust for the time unit.

To adjust for the time unit, you just need to do some math prior to accumulating the instantaneous flowrate. If you wish to sample every 1/4 of a second (250ms) you need to convert the flowrate measurement from gal/min to gal/250ms. Then accumulate the result.

Depending on the PLC platform you may have to be aware of how you will trigger the time sample. For me, using a ControlLogix I would put the logic into a periodic task and set it to run at 250ms.

As Mickey mentioned, additional code will be required to reset, enable, hold the totalizer, depending on the requirements of the process. For example, if you have a recirculation loop with a flowmeter you may only need to totalize when certain valves are open which divert flow from the recirculation loop to the destination routes. So you have enable conditions, perhaps you don't reset it until the next delivery occurs, maybe you reset it right away. If you have an alarm occur during the process, and the valves close, the flowmeter will still be reading the recirculation flow and you need to 'hold' the current total until the delivery is resumed or the deliver is aborted.

With that said, I've been very accurate with batching applications and using 4-20mA with this method.
 
Last edited:
One other issue to consider if you decide to use a short duration for sampling and accumulate over a long period. If your PLC uses 32-bit floating point numbers, they are accurate to seven significant digits. If each sample turns out to be 0.01 liters, once your accumulated total reaches 99999.99 you won't be able to accumulate any higher. If your sample size is 0.1 liter, you won't be able to accumulate beyond 999999.9 liters.
You might do better to do your calculations using integers. Assuming your PLC can handle 32-bit integers, the range limit for that data type is +/- 2 billion.
 
I usually solve the overflow issue Steve mentions by using a counter or series of counters. When the totalized flow exceeds a convenient value, say 1000 liters, then I trip a counter which holds the number of thousand liters accumulated. I subtract 1000 from the accumulated total, and then wait to accumulate another 1000 liters. If you need more, the first counter can trip a million liter counter etc.
 
OK thanktoy guys, i initially thought that taking a snapshot of the reading every 1 second and adding that to the total but wasnt sure how accurate that would be?!

Ill give it a shot,

Cheers
Ash
 
OK thanktoy guys, i initially thought that taking a snapshot of the reading every 1 second and adding that to the total but wasnt sure how accurate that would be?!

Ill give it a shot,

Cheers
Ash


If you take a snap shot of a ?? l/min you will have to divide by 60 before adding it to your total.
 
If it's a Control Logix the Totalizator instruction works very well with a flow signal. I have used it several times and it's quite accurate.
 

Similar Topics

I need to measure the volume of water used in during water intake phase of a CIP (washing program) in order to insure that there is a specific...
Replies
3
Views
4,350
I'm being tasked with supporting / upgrading these panels but no software, cable, documentation. I have an old laptop running XP and would like...
Replies
4
Views
2,009
Hi everyone, I'm trying to perform a serial download with a Total Control Quickpanel jr (QPK-2xxxx) using an old computer running QuickDesigner...
Replies
3
Views
1,719
Does anyone know where I might get a copy of development software for a TCP HMI?
Replies
4
Views
2,297
Is there a way to count the number of tags (including dot fields) in RSLogix 5000 automatically? When I export the tag database and open it in...
Replies
4
Views
3,066
Back
Top Bottom