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 Quote Link to comment Share on other sites More sharing options...
MVP 2021 Joe Tauser Posted April 1, 2019 MVP 2021 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. Quote 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 Quote Link to comment Share on other sites More sharing options...
MVP 2021 Ausman Posted April 1, 2019 MVP 2021 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.