PLC's and flowmeter totalizer. needed help for 5 years now.

ryahrmarkt

Guest
R
I'm using a rosemount flowmeter sending an analog signal back to the PLC (of flow). How can i use this in the PLC to make a totalizer of how many GPM i have been running for the day/week/month? Also i have 3rd party wonderware. Help please it's been screwed up for five years---of sometimes by 16,000 gal
 
The flow meter is set up to correspond to a flow range. Ie 4mA represents 2units/min and 20ma represents say 20units/min. This should be either on the meter or programmable generally through a Hart Transmitter if i remember corectly.

The rosemont flow meter, does it put out a linearised signal ?

If not then most likely u will have to do a Square Root Calculation on the input signal in the PLC, this will linearise the result in the PLC.

The input signal in the PLC depending on the Resolution of the input card will give u 0 to 4095 (for 12bit resolution).

Scale this value to give you something meaningful. ie 2.00 units/min to 20.00 units/min
Sample the Scaled Result say every 5 seconds.
Divide by 12 this will give you the actual flow for the five second interval. Add this result to the totalise total. ie
Total Flow = Total Flow + Calc'd Flow


BTW for your request in the PLC setup 3 variables as stated, DayTotal, WeekTotal, MonthTotal.

Work out a suitable time to initialise the Totalisers.
DayTotal = 0 at 00:00 Hrs
WeekTotal = 0 at 00:00 Hrs & Sunday
MonthTotal = 0 at 00:00 Hrs 1st Month

As above DayTotal = DayTotal + Calc'd Flow
do the same for WeekTotal and MonthTotal.

I think that this should give you what u want.

The above is just a rough suggestion. I'm sure you can work out the PLC code.
 
Resolution

Could you post the ladder of how the calculation is being performed?

There are several methods that are used, but they all work on the principle of TOTAL = TOTAL + (RATE*TIME).

Usually these are calculated and stored in floating point registers. This is all well and good.

But even floating point registers, being 32-bit, only are good for about 8 to 10 significant figures. If your update TIME interval is small, then the RATE*TIME portion is also small. This is usually desirable, since the more frequent the data sampling (smaller time interval), the more accurate your calculation will be.

For normal batching applications, TOTAL starts at zero and never gets to more than a few orders of magnitude greater than RATE*TIME.

But as you keep totalizing without resetting TOTAL, the difference in the exponents between the two portions become greater and greater, and you get rounding errors.

If RATE*TIME = 0.012345 gal and TOTAL = 987,654.0 then the new TOTAL will be 987,654.012345. Except that this is too many digits to store in 21 bits (?) of the decimal part of a floating point register. So the REAL new TOTAL may be only 987,654.012. Losing that 0.000345 may not seem like much, but you are going to lose it every TIME interval.

It adds up.

The solution may be to have the running totalizer only go up to 10,000 gal. If it ever exceeds that, the "running totalizer" gets 10,000 subtracted from it, and a "tare" register gets 10,000 added. Your "day total" would then be the sum of the "running totalizer" plus the "tare". This way, you don't get the rounding error in your "running totalizer", but still maintain an accurate count.



Another way that you could be going wrong is if you use a self-resetting timer to do your TIME sampling.

TIME TIME
-----|/|-----------------( TON)
1 sec


This code has an interesting little quirk that for one whole PLC scan, the timer isn't timing. That may only be 5 msec every second, but again, it adds up. Better to use a more accurate timing method, like a program interrupt or the PLC's scan time (if available).
 
Resolution

32 bit floating points only have a 23 bit mantissa but the MSB is an implied 1. This provides for + or - 24 bits or + or - 16777216. That isn't much. Just a little more than 7 digits. If the total is at 4 digits and the fraction of the increment is 3 digits then you are at the max resolution already.
 
hi,

Here's another suggestion, as you probably know (asuming that you are using a micromotion)with a flowmeter of Rosemount you can choose between 4 measurements,
flow
density
temperature
and Totalizer.

Why don't you use the analog output for the totalizer function and use the digital output for measuring your flow. Connect the digital puls output to a digital input of your PC.
Another thing you could do is make use of a analog input with Hart protocol and all your problems are solved.

Rudi
 
Hi,

I've made a small syntax error

Why don't you use the analog output for the totalizer function and use the digital output for measuring your flow. Connect the digital puls output to a digital input of your PC

should be

Why don't you use the analog output for the totalizer function and use the digital output for measuring your flow. Connect the digital puls output to a digital input of your PLC
 

Similar Topics

E+H Promag P500 5069 Compact Logix implicit Ethernet IP using endress device description 30ish flowmeters, every time I download, some (but not...
Replies
2
Views
1,253
This particular problem is doing my head in... In our system we have a minisonic flowmeter. One of these. It outputs 4-20mA and is an input into...
Replies
4
Views
1,395
Hello, I have a flowmeter in a underground mine with hart data, i need to read it from a micrologix 1400 that is located in surface...I would...
Replies
2
Views
1,320
Hello, We are a mechanical engineering senior deign team from the University of Houston building an automated beer brewing system known as HERMS...
Replies
12
Views
4,601
We currently use Watermeter controller here with paddleswitch type of flowmeter to keep the tracking of the water quantity we use in our batch...
Replies
8
Views
2,016
Back
Top Bottom