Flowmeter reading

arocon

Member
Join Date
Oct 2006
Location
Dubai
Posts
171
I am getting flow rate reading meter cubic per hour in the PLC. PLC cycle time is 20 ms. I need to find out average flow reading in an hour. Could anyone suggest how to do that.

I have 2 plan :
1) integrate the flowmeter reading but i am sure the reading will be overflowed.
2) Taking only one reading in a minute and then sum it up and that reading average it with 1 hour.
 
The approach you take depends on the PLC you are using.

Some PLCs (like ControlLogix ) have a totalizer function built in. Others would require you to perform the math using other math functions.
 
What data types do you have available?
What is your accuracy requirement?
What is the max flow you are expecting?
How quickly can the flow fluctuate?
Do you need a moving window average, or only 'average flow 12:00 - 13:00, average flow 13:00 - 14:00'?

Note for moving window, you will need to store as many results as update periods you have. eg to update every minute, you will need 60 data points stored; every 20ms, you will need 180,000 data points stored.

Option 1, integration, will only work if you want to show 'average flow 12:00 - 13:00' as you will have to reset the integrator every hour, plus depending on the data type, will give you precision errors.

If fluctuation is an issue, you could integrate over the 1 minute, and then take the average over the last 60 minutes.
 
No it is not RSlogix. In this PLC no totalizer,need to write program. flow rate reading come as 0 ~ 32768 max. No only average flow 12:00-13:00....
 
If you have 32 bit registers, you can sum every 60ms without overflow problems.
Alternatively you can sample at 20ms for 20minutes. To get the full hour, do this three times and divide by three before summing.
If you don't have 32 bit registers, you will have to roll your own.

If accuracy isn't an issue and you only have 16 bit registers, then you can go ahead with your option 2. AVG = SUM(t = 0 to 59, F(t) / 60). Make sure you divide before you add.
 
count the pulses
take the time, subtract the pulses from counter
now you will have no missing pulse, and you can calc the flow.
add the pulses to a counter.
when overflow counter read the time it is needed for this overflow.
when time overflows calc the flow again.
avg needs total pulses and total time.
it is available alwyas when you make this calc in time
 

Similar Topics

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,400
Hardware, SIEMENS S7-224XP cpu and a Flow meter (analog) I am trying to understand if using a DIGITAL flowmeter would be easier (and economical)...
Replies
1
Views
3,308
Is it good idea to use ultrasonic clamp type of flowmeter for water dosing? I already using the flowmeter pulse output by setting to 10L per...
Replies
14
Views
1,281
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
Having an issue with network timing out when trying to use CIP generic on a Micrologix 1100 B. I’m trying to read flow and totalizer information...
Replies
19
Views
4,996
Back
Top Bottom