Jump to content

Running Totalizer


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. 




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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...