12-18-2016 09:32 PM
perhult,
That is correct most flow meters I have come in three flavors pulse, voltage and 4-20ma current output. (Turbine wheel, gear, piston type) None of them contain internal signal conditioning. The signal conditioning was done in the external hardware/displays. I was trying to replace the hardware/displays with Labview. But I will need to become more proficient at Labview, before I can achieve the same level of performance as the external hardware/displays.
Ryan
12-23-2016 07:44 AM
One form of "smoothing" you could do is a "moving N-point Average", a form of low-pass filter (with a little Signal Theory, you can easily work out the filter characteristics ...). What you do is have a circular buffer (do you know what this is? an N-point Array where you add new elements in "circularly", replacing the oldest) and report the average of the N points.
Here's an illustration of how it works. Suppose you had a switch that turned a light on and off (so your measured values were 0 or 1). You make measurements once a second and want to know the average illumination. Well, any single measurement will be 0 or 1, and you can say "to the nearest second" whether the light is on or off. Now, suppose I turn it on and off at random intervals, roughly once/second. I'll still measure 0 or 1, but now if I create a 1-minute circular buffer, after a minute, I'll have 60 measurements, and probably about half will be 0, half will be 1, so the average illumination will be 0.5. The next second, a new measurement replaces the oldest (either keeping the average the same or changing it by 1/60) so my "estimate" of the illumination will change slowly (and will represent the illumination for the past minute -- low-pass filters look "backwards" in time). In particular, if the bulb burns out, the reading won't go to zero until about a minute later.
This form of moving average is simple to implement. There may even be VIs supplied by NI that do it for you (I tend to "roll my own"). Just remember there is a trade-off between "smoothness" and "responsiveness".
Bob Schor
12-23-2016 08:38 AM
Hi Bob,
Thanks for the info I'll look at some example VIs and read up on the topic. If this was simply a read only application I wouldn't mind some latency. Unfortunately I'm using this information to control motors/pumps so I'll need to balance the responsiveness with smoothness.
Thanks again,
Ryan
12-23-2016 04:45 PM
@ry78 wrote:
I'll need to balance the responsiveness with smoothness.
Absolutely! That's one of the tradeoffs in dealing with signals -- we have good technology for looking backward in time (= sampling), but have yet to perfect the ability to see "forward" (a.k.a. prediction, see Crystal Ball, currently under develop... oops, non-disclosure ...).
Bob Schor