Flow Meter Totalizer

gamohunter

Member
Join Date
Feb 2007
Location
Iowa
Posts
1
We send wastewater to the City Treatment plant through a Flow Meter. I:15.5



I wish to total this data on a Daily and Monthly Basis.



I would like to display this data on a 30 Day Calendar in a Panelbuilder.



I built the screens and the logic is there collecting the flows, but not totalizing them.



The Term TOTALIZER has me confused a bit.



My estimation is that in theory



I can take the data of the flow meter which is variable and always changing.



Collect this data a Pre-Determined Rate. Say Every Second.



Move each reading into an Integer??? Or Float??? (I don’t know so I am asking)







Here is what



I am trying to do



0000 Is a pre-determined scaled output from a Flow Meter that goes to F8:57



Should I be doing the following set of ladder logic.





Option A



1) F8:57 data read and moved into a new data file every 1second

2) Continue this for 8 hours of seconds (to avoid going over memory problems)

3) Add all of the collected data together at the end of 28880 seconds

4) Move that total into a new Data Word

5) Clear those data areas and Repeat Steps 1-4 three times.

6) After it has completed three times which would be 24 hours Add each of the three “totaled” data words together and move into a data word that could be read into an area on the Panelview.

7)





Option B



1) F8:57 data is added to itself every 1second.

2) At the end of every 28880 seconds move that total into a Data word.

3) Use a counter that is activated by that move when the counter reaches a preset of “3” it enables

4) An ADD FUNCTION that adds the three collected data together and places them in a data word that would then be displayed on the Panelview.

Which way would you experts in flow meters do it out there? If any of you can print a piece of logic to a PDF and email it to me I would greatly appreciate it.
 
I don't profess to be an "expert" but the flow meters I have dealt with work a little differently:

flow meter measures "rate of flow" in GPM.

Measurement (GPM) is recorded every second and divided by 60.

After 10 measurements (samples) the samples are averaged.

Average is added to a "total" register as "gallons". (time or "rate" is no longer a factor)

Register holds and displays the running total until or unless reset.

The better set-ups will have a lifetime, non-resettable totalizer, AND a resettable totalizer. This would be for an operator to read, reset, and read again as required.

In your case you would just take a snapshot of the totalizer at the 24 hour mark, subtract the previous snapshot, and report the difference as "daily usage".

(That will give you something to ponder until the "experts" chime in)

Stationmaster
 
Last edited:
Gamohunter,

If your flowmeter provides only a flow rate output, and not a totalizer function as mentioned by Stationmaster, then you are on the right path.

I have successfully tracked the fuel use of a oil-fired burner. It had a flowmeter on the fuel line from the fuel tank to the burner. The flowmeter only had a 4-20 miliamp output that represented 0 to 132 gallons per hour. Actually, thinking back, it had the option of having a flow rate output or a total gallons used output. The customer wanted both. By setting the flowmeter to provide the flow rate, and making the PLC calculate the total, I was able to make them happy.

I divided the gallons per hour from the flowmeter by 3600 to get Gal/Sec and saved it in memory location F8:14. Using s 1-second timer, I added the Gal/Sec in F8:14 to a Fuel Totalizer memory location F8:140. F8:140 can store up to 1 x 10 ^38 gallons. I added a GEQ (Greater than or Equal) comparison so that if the fuel use every reaches 999,999 gallons, Fuel Totalizer F8:140 will be reset to 0. (As shown below).
Fuel_Totalizer.jpg
 
Last edited:
I'm running almost an identical program (as above) in a SLC5/05 for totalizing some tar flows, 1sec timebase and running accumulator.

I guess you can set up other registers based on calendar date to take snapshots of your total as you go and have the information available on a Panelview.

Two things I'll caution you on though--one, using the processor memory to store totals works great until someone makes some sort of changes to your program, let's a file or register is added, and then makes a download to the processor. If the program is not uploaded first, so your register values can update on your local PC, you could permanently lose some or all of your stored values.

Two, you didn't mention what kind of processor you're using--I've found that PLC5's, even using an STI routine, keep poor time and provide inaccurate totals. SLC 5/0X's are a bit better, and their analog input cards run close to real-time, but they're not as accurate as you would think.

Write some test routines--force a flow value into an F-register and let it totalize. Use a stop-watch and judge for yourself. (Also, you should totalize in a float register if your value exceeds 32767 or you could fault out your rack.)

In our case, the tar flow accuracy is acceptable, but for other utilities we totalize it is not. In those cases we use stand-alone totalizers, such as KEP Supertrols and Red Lion PAXD with Modbus comms, and then use Prosoft modbus cards to poll them for the flow and total values directly.

Good Luck!
 
What type of meter do you have? Many flow meters can output a 4-20ma rate and/or a pulse. For applications were quantity is desired, I always use pulse outputs and count the pulses, much more accurate for the totalizer function. You can then derive a flow rate for display.

Counting pulses is usually more expensive, but more accurate. Depending on the flow rates, and scan time of the PLC you usually need a high speed input module for pulse inputs.

I assume you are using a SLC processor, Spectrum an AB partner, makes a great meter/counter card 1746sc-CTR4.
http://www.spectrumcontrols.com/ab-1746.html
 
If you have a pulse output from the flowmeter use it. Unless the accuracy requirments of the totals are lax you can/will have calibration issues. The analog output from the device needs to be correct as well as the analog input of the PLC. Are there long periods of no flow? Zero may not be zero. A very slight difference between the devices will cause some error that may subtract if the "off" value goes the slightest negative. You may want to inhibit the counting below a number if there is any noise in the signal. Either trigger off a discrete signal, pump or valve maybe, or a comparator. If flows never are below "X" use that value to inhibit.

Some flowmeters can be set for a pulse per quantity, x10, x100, x1000, this can make the registers a little easier to work with. When you are working with large values, millions, you may not need daily accuracy in the 1's.
We monitor waste water discharge to a river for EPA regulations. The analog signal is intergrated in a digital chart recorder. When the system is shut down there is a slight difference in signal for no flow. At times it can read negative during the days of no flow. When you are dealing with 1200 GPM max flow a few hundreths of a milliamp below 4, the zero point, can cause the negative values. The recorder doesn't have a feature to only totalize positive. The values are small and the EPA can work with it.
Just some things to think about.
 
How can I put my attachment like this?

How can I put my attachment like this?


Lancie1 said:
Gamohunter,

If your flowmeter provides only a flow rate output, and not a totalizer function as mentioned by Stationmaster, then you are on the right path.

I have successfully tracked the fuel use of a oil-fired burner. It had a flowmeter on the fuel line from the fuel tank to the burner. The flowmeter only had a 4-20 miliamp output that represented 0 to 132 gallons per hour. Actually, thinking back, it had the option of having a flow rate output or a total gallons used output. The customer wanted both. By setting the flowmeter to provide the flow rate, and making the PLC calculate the total, I was able to make them happy.

I divided the gallons per hour from the flowmeter by 3600 to get Gal/Sec and saved it in memory location F8:14. Using s 1-second timer, I added the Gal/Sec in F8:14 to a Fuel Totalizer memory location F8:140. F8:140 can store up to 1 x 10 ^38 gallons. I added a GEQ (Greater than or Equal) comparison so that if the fuel use every reaches 999,999 gallons, Fuel Totalizer F8:140 will be reset to 0. (As shown below).
Fuel_Totalizer.jpg
 
I guess I have it easy. I just read the number off the totalizer wheel on my Foxboro square root totalizer . . .

Foxboro_square_root_totalizer.JPG


Dan
 
How can I put my attachment like this?
Pullareddy,


I do it like this:

(1) Take a screen snapshot of the monitor screen. I use ScreenRip32, available from this site:

http://www.progency.com/

(2) Save the screen as a picture file, jpg or jpeg work best for me). You may need to edit it or crop it to make it fit these PLCS.net rules:

Max filesize: 300 KB
- Allowed extension(s): .gif, .jpg, .jpeg, .png
- Max width x height: 1024 x 768
- No whitespace in filename.


(3) Enter your PLCS.net message, then at the bottom on the screen, select "Display Pictures", then under Picture to Upload, select "Browse" and select to the pictue on your computer, then click "Upload Picture".

(4) Once the message comes back "Picture Uploaded Successfully", then copy the given link of the picture, then paste it into your message.
 
thanks for info lance
i had been searching this site trying to figure out the best way to show the total lbs of steam used on a system that I posted about in another post that I inherited that is in mexico, and the original integrator is now no longer in business.
The original enineer had used a panelview 1000 to show the total lbs of steam used per hour.
It was figured as follows
Analog input 1.14 is the 4-20ma input signal – This moved into N12:24

Max steam flow rate is 39,000 lbs per hour

39,000 / 16383(20ma) = 2.380516 lb/hr per ma

Analog input N12:24 * 2.380516 = steam flow rate (lb/hr)


There is a total of about 13000 lbs used per hour, and wanting to show on the screen the total lbs of steam used, and at 13000 lbs per hour, would reach the limit of the 32767 very quickly.
hopefully your technique will work. will try it tomorrow on the bench.
any other sample code would be helpful as well.

Apologize for posting info in two seperate post, but after searching the site, this was the best sample I found.
thanks
 
Why not just use an STI, then get your number in a unit/second form, and add it to a float totalizer.

Another way I have seen is Flow in unit/second, and multiple by scantime, then add to a totalizer. Works really well if your not doing custody transfer
 
I use the STI function and add to a float like ghettofreeryder. If the number is expected to get very large I increment an integer every 10K and reset the float value to zero. The full value is displayed by multiplying the integer by 10K and adding the float value.
 
thanks
was talking to a friend of mine in Arkansas who works for a integrator that makes brick pallet machines.
He was telling me that if you use a floating point as a totalizer, then you only get 7 bits resolution.
I am not aware of that, will do some searching on this site and try to find more info, he said there was a way to do 32 bit math in the slc500 plc, he sent me a copy of some code.
He then said the sent up the display to show a DINT
Not had a chance to review it yet, will review it this weekend, but thought I would post it and see what the experts that use this site thought.
I have found that there are folks on this site that I wish I knew half what they knew.
Will attempt to post it.
 

Similar Topics

Hello I was needing some guidance on communicating and setting up a totalizer from a flow meter in the PLC. The PLC is a AB 1769 Compact Logic...
Replies
1
Views
1,773
Hello I need some assistance in building the code to take a 4-20mA reading from a flow meter and having it read out on a HMI screen showing both...
Replies
11
Views
4,930
Now I am using ABB plc.4-20 mA signal is coming from flow meter(E+H).I have already set 3000 kh/h rang in flow Meter for 20mA.Actual value of...
Replies
3
Views
3,926
Hello I have ML 1400 with Signet 2551 flow meter. I am totalizing flow every day, however there is significant discrepancy about 2 thousand...
Replies
41
Views
27,338
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
84
Back
Top Bottom