Totalising flow from mA

First you need to sample the signal at a known interval... so in your program you create a bit of logic that runs once each second (or faster). The faster it runs (but still on a known interval) the less source of error it'll be.

Then you can either make assumptions and multiply the reading by the time between samples, in your cause this is 1 second, so in hours it will be 1/3600 and add that to a totaliser variable.

Or to be more precise you'll need a bit more maths... nothing crazy though. Imagine you have a trend of that value in t/h over time. The value you are looking for is literally the area of the graph.

So, in this case you'll need to calculate the area between samples, this will be in the hardest case, the area of a square-ish figure and the area of a triangle. It is important to know which direction the signal is going though.
 
If you take samples relatively often and do some averaging then it should not be a concern.

If you need high accuracy you should probably look for a dedicated flowmeter instrument.
 
There are always tradeoffs. Chopin is correct that more frequent sampling will minimize the impact of fluctuations in the rate signal. However, if you will need to totalize over a long time span you need to be aware of the limitations your PLC when it comes to handling large numbers with many places to the right of the decimal point.
32-bit floating point numbers are good for only seven significant digits. That means if your total could run as high as 9,999,999 million gallons, the smallest sample you can detect will be one gallon. That imposes a limit on how frequently you can sample.
 
The concern over accuracy is legitimate but often exaggerated.

Th basic method of multiplying flow rate at a sample point by the time interval is sound - it is essentially a simplification of the Trapezoidal Rule: https://www.intmath.com/integration/5-trapezoidal-rule.php

You could use this Trapezoidal Rule method in your PLC instead of the simplification. However, the error induced by using rectangles is generally insignificant over time as long as you always use the flow rate at the end of the period. That's because the errors from missing "triangles" on a falling flow rate are offset by the "extra" triangles on a rising flow rate.

Note: if your total involves custody transfer (ownership and $$) then you should probably spring for a meter that has a certifiable totalizer in it.
 
We using a flowmeter 4-20mA (t/h) signal and determining its totalised mass (kg). It has a pulse output for more accurate totalised value after the transfer, but it isn't used. Once we have fluctuations, our totalised value on plc isn't close to the flowmeters totalised value.
 
Some people use pulsed totatlizers to calculate flow, som use flow outputs to calculate totals. Why not do it "the right way" instead, if better accuracy is desired?
 
So many factors can influence:
- wrong calculations in the plc
- poorly installed flow meter, for example without respecting pipe straight length before and after the meter.
- broken flow meter

Before adding another measurement system someone would have to evaluate where the failure is.
 
We run two different components of oil through the meter. First component is very accurate, +-50kg error between meter and plc.
Second component fluctuates and is +-2500kg error.
 
You need to look at what type of meter you have and if its calibration is affected by the difference in physical properties of the two products. Such as density.
 

Similar Topics

Hi All, Rockwell Compact Logix processor. I'm using an Add function that I trigger by a using an XIC instruction followed by a ONS. The add...
Replies
6
Views
2,079
Hi All, I am programming a Siemens S7-400 with Step 7 in STL. I am trying to totalise a counter that wraps-around. In other words, I want to...
Replies
1
Views
1,936
Hi All, I am programming a Siemens S7-400 with Step 7 in STL. I am trying to totalise a counter that wraps-around. In other words, I want to...
Replies
0
Views
1,552
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
82
Has anyone installed Hp laserjet pro 4203 to OMNI 3000 or 6000 via ethernet..Is there a specific Config? I have a problem..Please advise
Replies
0
Views
43
Back
Top Bottom