Reading flow on a 24hr period

Ones_Zeros

Member
Join Date
Feb 2014
Location
at work
Posts
367
Hello,
I was needing some help with a task i have
i will try to explain & be detailed

I'm using Wonderware software in our SCADA system

I have a flow meter and currently I'm reading this flow in our wonderware software, but its a flow reading at that current time. It doesn't account for any down time.

So what i want to do is take this same flow value & monitor it on a 24hr period,
from 10:00 to 10:00. so at 10:00 that next day it would reset and start back at zero & monitor again from 10:00 to 10:00.


How in Wonderware could I set this up?

I appreciate any direction at all on getting this started

thanks
 
thanks but I couldn't get this to work

any other ideas?

i figured within wonderware there has to be a function that looks at the windows clock to either start a script so the flow would start the 24 hour monitoring process at 10:00 am
 
why not do it in the PLC?

but yes check the hour, when it equals 10 log the value of your meter. When i last used intouch these were conditional scripts e.g. $Hour == 10

Ash
 
Is it an instantaneous flow (i.e. litres per second) or is it already totalized, i.e . The value keeps incrementing over time?
 
To me it sounds like he has instantaneous flow and he wants totalized flow now as well. I agree the plc would be better to do it. it is easier to do with a pulse input, but i know the newer Allen bradleys have a Function block to totalize off of 4-20ma instantaneous flow rate as well.
 
Thanks guys, I agree 4-20 from meter into PLC would be better option
But we're this flow meter is at, it would take some work
Getting this done.

But if I can script this is Wonderware
I can do this, just needed some direction
On how to do this.

Yes this is an instantaneous flow, now I need to have
A 24hr total of this flow. I can take the flow divide it by 24
So I know what flow has been sent through the
Flow meter in a 24hr period. This would
Count for down time, were the other value don't.

So if I use the Wonderware function $hour == 10
How would I add to this script to monitor for
24 hours?

Thanks, hope this all makes since
 
Do you currently do any data collection to any ODBC source? Because if you do, or could, this could be done by logging your instantaneous flow to ODBC on a predefined interval(say every minute) and then having your 24hour flow value be sourced from a ODBC query that uses an aggregate function to sum all the instantaneous values for a 24 hour period.
I did this about a decade ago for reporting flow for environmental reporting.
 
If your reading the instant flow on in touch, is that not out of the PLC?

Anyway, 2 options I see:
1. Log the data & use a query (neat & tidy)
2. A bit of a messy script. If you wanted to to this you need to sample your flow meter every X seconds. As its instantaneous it changes frequently, try sampling every 1 second to start.

E.g.
Instrument reads in litres per minute. We sample every 1second

Code:
FlowIncrement = FlowRate/60
FlowTotal = FlowTotal+FlowIncrement

Now you need to do this in InTouch, messy & program intensive which is why I was suggesting the Plc.
Start off by sampling every second, data change script using $Second and use the code above.

Code:
Condition Script when $Hour ==10 AND $Mintute==0 AND $Second==0, THEN
FlowIncrement = 0
FlowTotal = 0
Also id probably move to tags so you can see previous day's total

Hope that helps,
Ash
 
AshleyParr,
I may have misspoken, the flow comes into a TDS polling program & use OPC link to read the flow into our wonderware software.


This flow i'm referencing is a gas flow & TDS polls the meter what ever time frame you choose, usually these meters are polled every 5 minutes


since i what to start the 24 hour monitor of this gas flow at 10:00 to 10:00
can i still use the code you provided?

Code:
FlowIncrement = FlowRate/60
FlowTotal = FlowTotal+FlowIncrement

and this code here, will reset the monitoring at 10:00...right?

Code:
Condition Script when $Hour ==10 AND $Mintute==0 AND $Second==0, THEN
FlowIncrement = 0
FlowTotal = 0

thanks for you time & patience
its much appreciated!!!
 
also
is the "FlowTotal" on line two of this script
the flow value from the meter (Flowrate)?
so i'd take the (FlowTotal = flowrate+flowincrement)
is this right?

Quote:
Code:
FlowIncrement = FlowRate/60
FlowTotal = FlowTotal+FlowIncrement


and the second part would start the monitor at 10:00 am
would this monitor it for 24 hours or would i have to add another line?

Code:
Condition Script when $Hour ==10 AND $Mintute==0 AND $Second==0, THEN
FlowIncrement = 0
FlowTotal = 0


thanks,
 
Last edited:
AshleyParr,
I may have misspoken, the flow comes into a TDS polling program & use OPC link to read the flow into our wonderware software.


This flow i'm referencing is a gas flow & TDS polls the meter what ever time frame you choose, usually these meters are polled every 5 minutes


since i what to start the 24 hour monitor of this gas flow at 10:00 to 10:00
can i still use the code you provided?



and this code here, will reset the monitoring at 10:00...right?



thanks for you time & patience
its much appreciated!!!

is the meter a totalflow? if so, the totlflow will already be doing this calculation for you.
 
Yes, it is a totalflow
But it does not monitor from 10:00 to 10:00
The meter is setup to go from 12:00 to 12:00

So I'm assuming it resets at 12:00 each day

I need to start monitoring the flow from 10:00 to 10:00
& reset it at 10:00 am in Wonderware each morning

Thanks
 
Yes, it is a totalflow
But it does not monitor from 10:00 to 10:00
The meter is setup to go from 12:00 to 12:00

So I'm assuming it resets at 12:00 each day

I need to start monitoring the flow from 10:00 to 10:00
& reset it at 10:00 am in Wonderware each morning

Thanks

HMMM? I guess someone should say it.

Why not change the Total Flow?
 

Similar Topics

Hello all, I am working with a variety of discrete pulse flow meters, Siemens, Flomec, and Seametrics. I am attempting to read flow via discrete...
Replies
17
Views
4,712
Hello, I have InTouch Wonderware that was reading some flow meters and currently the power has been disconnected from these flow meters. These...
Replies
7
Views
5,015
Ok guy's and gal's. Here is my question. I have a micromotion flow meter reading the flow rate (ma 4-20 at 0-200 lbs/min and 0-30840.and in my...
Replies
11
Views
2,455
I have a flow meter which gives out 0.1 litres/pulse, I'm using a digital input to read the pulse I'm not sure when to read the pulse i.e...
Replies
7
Views
2,741
Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
5
Views
166
Back
Top Bottom