Pulse to Flow Rate advice/tips?

DarrenG

Member
Join Date
Dec 2016
Location
London
Posts
74
Hi folks,

We've just sorted out getting a pulse from some flowmeters that came with our gas generators, I'm just wondering if there are any pitfalls I should avoid when setting up the flow rate. My colleague has created a block to calculate the flow rate but it's not working so I'm tempted to just write my own. Any change I make to the block will need to be done offline and be re-downloaded anyway.

I've read before that it's better to use the wall clock time instead of timers in certain situations and that if using counters past a certain value you may end up losing data. Should I use the wall clock time in this case? The reason I ask is because these rates and totals are pretty important as they will be used to charge a subsidiary for the amount used so I'm trying to avoid as much loss over time as possible. All our other flowmeters are 4-20 so this is new to us. Lesson learned... don't ever let contractors purchase instruments for you.:sick:

Thanks,

Darren
 
Each pulse represents a fixed amount of gas. To calculate the flow rate, measure the time between pulses as accurately as possible and divide the amount by that time to obtain the flow rate. Alternately you could count the number of pulses over a fixed time increment.
Regardless of the method used to get the flow rate, why do you feel you need it? Presumably you are assigning costs based on the volume consumed. Since each pulse represents an amount all you need do is count pulses.
Lesson learned... don't ever let contractors purchase instruments for you.
Personally I think the contractor did you a favor by furnishing a pulse output rather than a 4-20 mA signal representing rate.
 
If your flowmeters have indicators with totalizers, then you can match them exactly over a long period of time by accumulating pulses, so that is an advantage over analog which will always have some tiny amount of conversion error that can lead to accumulated errors.

The downside to the pulses is that the programmer has to do a little more keyboard magic to generate the rate calculation. If the pulses are slow, then the calculation will also be slow to change. If the pulses are fast, then the results can appear just as quickly as simply scaling an analog.

Slow and fast are relative terms, but for the typical human that turns on a 200 gpm pump and watches the HMI, he may not think it is right if it takes 30 seconds to see the flow rate change. That is pretty much what will happen if the flowmeter puts out one pulse per hundred gallons.

The way Steve describes the math is what I would do. I usually stick the math inside an STI routine (or fixed periodic task) so that I minimize any timer overrun that can happen with regularly scanned code. I also do some first order filtering or average a few samples to smooth the result. I will start out with no smoothing and if I don't like the results, I can adjust it until I am happy with the compromise between responsiveness and smoothness.

If the result feeds into other control logic, like PID blocks, then that has to be considered and may require a separate bit of filtering more suitable for the PLC which has a whole different perspective of the terms "slow" and "fast".
 
Here is an example that I did in AutomationDirect Productivity Suite. I am totalizing the flow as floating point, however, you could totalize the pulses as 32bit ints and then convert to totals and flows as floating point. That would add some precision.

Psuite_PulseToGPM.png
 
Here is another go at it this time totalizing the pulse count as 32bit integer. Depending on how fast and for how long the counts will be coming in, you would need to add some code to handle rollover of the 32bit number. I did not bother to do that here.

Psuite_PulseToGPM_TotalizingIntegers.png
 
Thanks for all the information lads. After reading all that and tariks post I realised I'm probably thinking too much into it.

Steve to be fair you're right about the pulse being handy for a total but it's just not ideal for a flow. There has been some difficulty seeing the pulse from the flowmeter and some confusion over whether to use sinking or sourcing modules so my frustration at the contractors has been aimed towards the time lost sorting all that out more than anything else. If we'd just used the same flowmeters we've used everywhere else it would have been easier. Then again it's been a good learning experience now that we've sorted it! As for why we need flow rates, we've got the same pulsed flowmeters on the high and low temp lines too which will feed a boiler so they want the rates for that more than the gas line I think.

Okie that's a good idea alright, I'm sure they have totalisers in them so I'll keep that in mind to check. On the meters we tested today we're getting a pulse every .1m3 which worked out about every 12 seconds or so at full whack so that's fine. Yeah we've got pretty much everything in a periodic task at the moment as per Rockwell's advice. Averaging them is also a good idea.

g.mccormick you put in quite a bit of work in a short amount of time bud, thanks for that, much appreciated. I'm going to test your second post tomorrow when we're running again.

Cheers again lads!:D
 
All of the "Flow" meters I have ever used allows you to program the pulse output to equal what even you need.

Example: if I have a flow meter on a busy oil well location that has several wells pumping into a groups of tanks, together they might produce 80,000 barrels a day of fluid(water).

I can program the "Output Pulse" to equal (1 pulse = 10 barrels) or even (1 pulse = 10 gals) just depends on how accurate you need to be.

Now all you have to do is count the pulses and then do the math.(Very Simple and can be very accurate)

Since flow rates changes, I don't think you would ever be very accurate if you are trying to incorporate "TIME" into the picture.
 

Similar Topics

Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
130
I have a pulse input module that brings period measurement and accumulated count. My question is how can I use this module to show flow rate and...
Replies
1
Views
2,477
Given the variety of opinions about the wisdom and feasability of totalizing an analog flow signal I ran a test by totalizing both the analog flow...
Replies
0
Views
3,421
Morning Guys, I am installing a turbine flow meter with a pulse output to measure flow on a compactlogix 5069 -L306ER through a 1734-VHSC24...
Replies
3
Views
1,591
Hi all, To make a long and annoying story short, a client has two flowmeters in their water plant and the flowmeter that controls the CL2 dosage...
Replies
6
Views
2,333
Back
Top Bottom