Jump to content

Running Totalizer


Rog

Recommended Posts

I am trying to make a running totalizer in unistream. Trying to figure what best way to that. I am kinda new at the unistream line, but it has been pleasant experience.  I  attached what I had. Any advice on how should go about this. Trying to calculate GPS on flow. 

 

Thanks

Total.PNG

Link to comment
Share on other sites

  • MVP 2023

So you have GPM at anything up to 1000.

Your problem is just Maths.

If you want the average flow per second you have to first set up the logic to do this, based on how many reads you do per second from your sensor.  An accurate method is to constantly add all the raw data values read over the second, then divide them by how many times the reading has been done, derived from another count monitoring the actual read.  Once you get that result, you run that through a similar Linearize and then divide that result by 60.  This logic would be set up on a self-resetting loop basis, starting again when the time period is reached.

For slightly better accuracy you could adjust the Linearise to convert things based on a per second read...ie 1000/60 = 16.666rpt.  For example you could use 16666 as your @20mA amount and divide the result by 1000.  Think about this a bit, and hopefully you will understand why this will be a slightly more accurate read.  

cheers, Aus

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.