Flow measurement and totalizing SLC5/05

Christoph

Member
Join Date
Sep 2003
Location
Indiana
Posts
345
We currently have 2 system measuring a liquid similar to water. Density is around 8.3lbs/gal. We take the flow in lbs/min and calculate lbs per sec
and totalize in a timed interrupt every second. the other system is at a higher
frequency at a tenth of a second. and the flow converted to lbs/1/10 of a sec. over a long period there seems to be a discrepancy compared to a manual calculation to prove the totalizers. Are the timed interrupts executed accurately/timely enough for this application?
 
Are your measurements coming into the SLC as analog signals?

The timed interrupts are very repeatable but some latency is possible. You can even view the system tag that measures that latency and incorporate it into the math, but with analog inputs, you will always have some small potential for imprecision that can accumulate over time.

What is the magnitude of the discrepancy expressed as a percentage?
 
STI's are fine, but 32-bit floats only hold ~8 significant figures, so when adding small numbers (gal last 1/10th second) to big numbers (gals total for several hours), truncation of data can add up (or rather, not add up, which is the problem).

There are techniques to help mitigate the effect, like keeping a "small total" which gets the last scan flow added to it, but when it exceeds , say, 0.01, has that 0.01 subtracted from it and added to the "real" total. But there's only so much that one can do.
 
But both measurements use the same sensor?
what kind of sensor is it?
an orifice plate and a pressure sensor?
 
What kind of measurement device are you using?

You can get various types of Flowmeters for all types of liquids, and most can be purchased with option's that will "Totalize, give FlowRate, 4-20ma, 0-10v, pulse output, Etc". If you're wanting a very accurate figure, I would let the flowmeter do that job, and then just read that figure into your PLC for what ever you need.
 
we are using E&H Promass flow meters 4-20mA output 1 system goes into the
PLC analog input. the other system goes to a Seimens 6SE70 drive
analog input and gets back to the PLC via Profibus.
 
we are using E&H Promass flow meters 4-20mA output 1 system goes into the
PLC analog input. the other system goes to a Seimens 6SE70 drive
analog input and gets back to the PLC via Profibus.

then you do some division, to convert from lbs/min to lbs/1/10 of a sec?
integer division?
if you do the same on both systems, the one that measures every 1/10 sec will always totalize less due to division remainder.
 
Even if you are not using floats, there is going to be rounding and/or scaling imprecision built into the analog channels at both devices. The error is probably very small as a percentage of full scale, but when accumulated over a long period of time a 0.2% error could be hundreds or hundreds of thousands of pounds.

Your best bet is to use a protocol to read the flowmeter totalizer directly.
 
The Float in the cpt block F1 is added to F2 in an add block, The destination
is also F2. After math is done F1 is cleared and awaits value from cpt next scan.


So good argument for Ethernet flow meters!!
 
I have frequently had a calibrator connected to HART devices connected to analog inputs on Allen Bradley SLC without any issues.
I am about to use the new Prosoft MV146-HART module with the SLC. I may not use analog inputs at all but if I do is there some characteristic about AB's analog inputs that might cause problems?
Source: http://modbus.control.com/thread/1026174225

Edit: looks like native HART for CLX but not SLC: http://ab.rockwellautomation.com/Ne...ess/HART-Communication-Protocol#documentation
 
Last edited:
We currently have 2 system measuring a liquid similar to water. Density is around 8.3lbs/gal. We take the flow in lbs/min and calculate lbs per sec
and totalize in a timed interrupt every second. the other system is at a higher
frequency at a tenth of a second. and the flow converted to lbs/1/10 of a sec. over a long period there seems to be a discrepancy compared to a manual calculation to prove the totalizers. Are the timed interrupts executed accurately/timely enough for this application?

I would guess that the majority of the numerical discrepancy is due to rounding errors in the Floating Point math. If so, the system will be quite accurate when started from zero, and will become less accurate as the magnitude of the total increases.

I usually employ a scheme to test the value of the Floating Point primary totalizing accumulator, and when it's value is > 1000, I subtract 1000 from the primary accumulator and add 1 to an Integer word that represents the "1000's Place" accumulator. Then I use a CPT function to add the primary accumulator to (1000's place accumulator x 1000).

This method keeps the rounding errors to a minimum. Of course, it is also important to have accurate calibration of your analog input and accurate timing, but rounding errors will inevitably occur if you totalize large numbers.
 
Question:
This discrepancy in the totalization of both systems also exists in similar proportion on the direct measurement signal of each of the flow sensors ?
If the answer is yes then the problem is in the calibration of the flow sensors, otherwise the problem lies in the calculation.

If you totalize adding a small floating point number to a floating point total then that will fail when the total becomes big, for manage that it is better to use integers.

My recomendation:
When dividing the signal by a constant use integer division with integer result, add the result to a 32bit integer total and save the remainder. On next cycle add the last remainder to the signal before division.
 
Last edited:

Similar Topics

There is any add on instructions for converting level (flow head) to flow in open channel flow measurement
Replies
4
Views
2,195
Hi guys, I have written to kindly seek some advice regarding flow measurement of a viscous fluid (chocolate) in a line. I know for a fact that...
Replies
8
Views
5,223
Dear all, I got a issue with the SM331 Ai module. It happen after additional devices sensor - 2 wire (4-20mA). i measured across device with...
Replies
0
Views
1,887
We are undertaking a job consisting of replacing a gas valve motor and air damper on a burner with a control valve for the gas and variable speed...
Replies
19
Views
7,796
Hi. Our supplier of water meters have stopped the production with no prior warning ! So now we are on a scramble to find an alternative asap...
Replies
6
Views
2,168
Back
Top Bottom