Flow Meter Problems!!!!!

RPSTiger

Member
Join Date
Mar 2009
Location
Salinas, CA
Posts
4
I have a Directlogic DLO6 with a High speed counter card (CTRIO). I have three flow meters that Im trying to display related data on the HMI. Two of the meters are 1725 Pulse per gallon they are connected to the CTRIO card. I need to display both a total gallons register and a flow rate. The card DOES NOT have the ability to use raw and scaled data at the same time, so I had to pick one or the other. My total gallons accuracy is more important. I set the CTRIO to count to 172 and reset which gives me a pulse each 1/10th of a gallon that I can count with a up/down counter up to 9999999.9 Gallons. I then created a rung as follows each second:

Load counter value
Change from Hex to BCD
Subtract Previous counter value
Multiply by 60 ( to get pulses per min)
Divide by 1725 (Pulses per gallon for this meter)
Output the value to register read by HMI
Load Counter Value (Again)
Change from Hex to BCD
Output to the register refered to in line 3 above for the the next 'previous value"

The result is a value on the HMI that is not allways accurate depending on the flow rate and also if the counter resets (old-new = negative# ??)... I even tryed to do this every 100 millisec but I get worse results

???? What else could I do to get more accurate results?????


My third flow meter is 62 pulses per gallon and going into the high speed counter on X0. Im having similar troubles here.

PLEASE HELP ME FIGURE THIS OUT BEFORE I BECOME BALD FROM PULLING OUT MY OWN HAIR THANKS
 
I have a Directlogic DLO6 with a High speed counter card (CTRIO). I have three flow meters that Im trying to display related data on the HMI. Two of the meters are 1725 Pulse per gallon they are connected to the CTRIO card. I need to display both a total gallons register and a flow rate. The card DOES NOT have the ability to use raw and scaled data at the same time, so I had to pick one or the other. My total gallons accuracy is more important. I set the CTRIO to count to 172 and reset which gives me a pulse each 1/10th of a gallon that I can count with a up/down counter up to 9999999.9 Gallons. I then created a rung as follows each second:

Load counter value
Change from Hex to BCD
Subtract Previous counter value
Multiply by 60 ( to get pulses per min)
Divide by 1725 (Pulses per gallon for this meter)
Output the value to register read by HMI
Load Counter Value (Again)
Change from Hex to BCD
Output to the register refered to in line 3 above for the the next 'previous value"

The result is a value on the HMI that is not allways accurate depending on the flow rate and also if the counter resets (old-new = negative# ??)... I even tryed to do this every 100 millisec but I get worse results

???? What else could I do to get more accurate results?????


My third flow meter is 62 pulses per gallon and going into the high speed counter on X0. Im having similar troubles here.

PLEASE HELP ME FIGURE THIS OUT BEFORE I BECOME BALD FROM PULLING OUT MY OWN HAIR THANKS

When you subtract the previous counter value is it in Hex or BCD? If it's not BCD it's not going to be accurate.
 
I do not know the capabilities of the DL06, but it strikes me that instead of reseting every 1/10 gallon, you might count the pulses for 1 second, then do the math to compute the gallons in that time period.

something like:
(pulses/K)* 60 = gpm
or
(pulse*60)/K

results the same, the second would be more likely to trip a math overflow.

It just strikes me that a timed base count might be more accurate, and seems like it may be less math involved.

I realize this seems like a very small thing, but now moving your count to another counter every 1/10 gallon, you might miss 1/10 here and there, multiply that by 60, and that can be quite an error.
 
Last edited:
What typw and magnitude of error are you seeing?

Are you missing a pulse per gallon or are you off by 0.1 gallon? or whatever?

Dan
 
You just need to calculate your rate after you have accumulated more pulses or more time. Obviously if you are calculating once a second and you have 9-1/2 pulses you can be out a long way (1/2 pulse) but if you calculate after 10 seconds you will have 95 pulses. you might still be 1/2 pulse out but your error is 1/10.
 
Another thing to consider. How sure are you of the accuracy of the flow meter?

They can go out of calibration, depending on type, they can be recalibrated.

You might also consider looking into a converter to do the job, then relay that to your PLC. Depending on the flow meter, some convertors are inexpensive, some are a bit salty.

Just thought I would throw that out there. I have been told going bald can be a bit traumatic. :nodi:
 
Thank you all for your input... however I have a response for each of you.

icky812..... If you look you will see that the last three instructions update the "previous value" , the 2nd to last being change from hex to bcd so that all math is in bcd.

Sparhawk.....The high speed counter module must reset itself to be accurate... depending on the aplication it makes sense to be evey gallon or every 1/10th.... reseting every 1/10th allows a total register with a 1/10ths place. reseting every gallon would not allow it. the scan of the plc can see the reset pulses but cant see each pulse from the meter... the HSC sees everything and sends the reset pulse to the PLC Allowing a standard up/down counter to count up on each reset pulse of the HSC. My Totailizer works great... My flow RATE (GPM) does not..... As for meter accuracy... its a fixed number of pulses per gallon... Im comparing a local display to my HMI to calibrate this... I just want them to read the same.... if the local diplay says 12345.6 gallons at 34.5 gallons per min. then I need the PLC & HMI to display the same.... the tot gallons displays correctly, the GPM does not. THE LOCAL DISPLAY WILL THEN BE REMOVED AND THE HMI WILL BE THE ONLY DISPLAY ( the local display is for setup & calibration of the PLC & HMI

DanW......The bigest problem Im seeing is when it has stored a "large" previous value and then the HSC resets, the PLS then subtracts a large value from a smaller value resulting in a negative number. when this happens instead of getting a result of 0 to 1000 (0.0 to 100.0GPM) I get a number up in the 6400 range. I jump in and out of correct to incorrect randomly.

RoyMatson......The HSC counts to the Kfactor(pulses per gallon) of the flow meter divided by 10 in this case the kfactor is 1725 so the HSC counts to 172 then resets giving me 1/10th gallon resolution this pulse is counted by the totalizer and is quite accurate... but I need to also display an accurate FLOW RATE... I want to update my flow rate every second. Im looking at the raw data counter that is counting the pulses and i just realized that at higher flow rates the counter may reset more than once in the time period resulting in a displayed value of 1/2 or 1/3 the corect value at high flow rates.

The High speed counter is capable of converting to flow rate but when it does I loose the ability to control the raw data for use in a totalizer.... Im considering useing the method where we watch the rate for a given time period and then add the value to the totalizer but I need more accuracy in the totalizer than I do in the rate In reality the rate is only there for astetics but the totalizer is what we will be keeping track of.
 
Last edited:
The bigest problem Im seeing is when it has stored a "large" previous value and then the HSC resets, the PLS then subtracts a large value from a smaller value resulting in a negative number. when this happens instead of getting a result of 0 to 1000 (0.0 to 100.0GPM) I get a number up in the 6400 range. I jump in and out of correct to incorrect randomly..


I think what you are seeing is a rollover of the counter. You need to trap for that condition and do your math differently for that situation.

Also what are you using for a time base? Are you using the .01 sec counter? What kind of variation are you seeing in scan time?
 
Not familiar with the Direct Logic line, but couldn't you calculate your flow rate using the accumulator instead of the raw data? Do you have, to have 1 sec. updated on the rate, why not 2 or 3 or 5?
 
I gather your flow-rate is in the rang 0-100 gpm so that's up to 2875 pulses per second, why not just count every pulse for a second and divide by 28.75 for gpm the worst you could be out is about 0.3%
Another way is to use a rolling average i.e. sum the last 5 readings and divide by 5. Every 1 second throw out the oldest reading.
It sounds like you are on top of it.
 
ATU..... How do you trap for the counter rollover??... in this case its a required forced reset , but its a rollover either way.... I need it to reset at the fixed count = to the K factor of the meter... in my case 172 = 1/10th gallon on one meter and 62 = 1 Gallon on the other...
 
The 1725 PPG have a max rate of 10 GPM The 62 PPG max is 100 GPM

I supose I could slow down my update of the rate to 5 seconds but then I would get more roll overs.... Unless I used the totalizer as my source data instead of using my raw data...

If Directlogic was smart the would allow for the HSC to output both the raw and scaled instead of forcing me to use one or the other....

Still looking for the ultimate answer........
 
Maybe you should count time between two reset pulses (0.1 gallons) instead of comparing two different counter values from HSC.

divide 0.1 gallon with this time and you get flow rate gallons/second.

Problem with this method is that when the flow is very slow, it will take a long time for the calculation to update.

Lare
 
Why not use a separate counter for the rate calculation? At the end of your time period(1 sec) , copy the count value, reset the counter and then do the math. Keep your totalizer separate and then you don't have to worry about the rollover. 1 less step on the math too.
 

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
114
Dear All, I need a sample PLC program to count the output pulse of a mass flow meter so that a specific amount of mass (for example 100gm)can be...
Replies
2
Views
141
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,580
I need modbus communication tool for Yokogawa Rotamass Flow meter? can any one help me.
Replies
1
Views
978
Hey everyone, I was on a customer's site on friday where they have a large bioreactor that they bought secondhand from a previous user. System is...
Replies
22
Views
4,427
Back
Top Bottom