08-15-2013 05:38 PM
I am trying to find a good way to get a good average of a constantly increasing amount of data. I have tried the Point by Point vi which seems like it should do the job, but whenever I initialize it, the value drops down to about half of what it should be. Any suggestions?
08-15-2013 06:28 PM
Your description of what you want to do is not completely clear.
Let me try a little example. When you have acquired the first 5 points, you want the average of those 5 points. Later, when you have acquired 100 points you want the average to include all 100 points. If this is what you want, one easy way to do it is to use two shift registers. One keeps the previous average and the other keeps the total number of points. When you get new data you calculate the new average =[ (old average)*(old point count) + new point(s) ]/[old point count + number of new points].
If you want something else, please specify the algorithm to calculate wht you want.
Lynn
08-15-2013 09:52 PM
Take a look at the "VP U Input Filter.vi" posted here:
http://forums.ni.com/t5/LabVIEW/How-do-I-create-an-n-point-running-average-VI/td-p/317159/page/2
08-21-2013 04:10 PM
Is there any way you could save that vi so that i could open it in Labview 8.6?
08-21-2013 04:55 PM
This should do it.