Rog Posted March 31, 2019 Report Share Posted March 31, 2019 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 Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted April 1, 2019 MVP 2023 Report Share Posted April 1, 2019 So is your flow sensor a pulse or an analog input? Your logic indicates both types. Either way, tell us the scaling for more clarity. Joe T. Link to comment Share on other sites More sharing options...
Rog Posted April 1, 2019 Author Report Share Posted April 1, 2019 It is 4 to 20mA reading . Thanks for the reply Rog Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted April 1, 2019 MVP 2023 Report Share Posted April 1, 2019 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now