LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement moving (linear) averaging in a subVI with dynamic data?

Solved!
Go to solution

I was wondering how to implement a moving or rolling linear averaging using a subVI on a set of dynamic data coming from the DAQ Assistant or a counter input channel that will be written using the Write to Measurement File VI?  Below is an example of what I mean.

 

Moving Average Example.JPG

0 Kudos
Message 1 of 2
(2,922 Views)
Solution
Accepted by topic author vlee
You could use the MeanPtbyPt vi to give the running average.  Assuming your code snippet is inside a loop, wire an =0? comparison of the iteration number to the initialize input to reset the value and put 25 (or whatever you want) as the sample length.
0 Kudos
Message 2 of 2
(2,916 Views)