LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clear array and take average of values in array continuously

I have a continuous signal that I am acquiring with hardware (sampling at 1000Hz).  I want to be able to insert the data into a 1D array for 5 seconds, and then take the average of these 5000 samples.  So basically, every 5 seconds I need to take the average of a 1D array and create a new array for the next 5000 samples.
0 Kudos
Message 1 of 2
(2,550 Views)
There is no reason to accumulate the data into an array if all you need is the average.
 
Simply add the values into a shift register. Every 5000 points devide the sum by 5000, output the average, and zero the shift register for the next series of data..
 
0 Kudos
Message 2 of 2
(2,535 Views)