LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you average data being sent to a waveform graph?

I am reading a 2D .lvm file with the ReadFromMeasurementFile.vi. I would like to average each signal before passing it to the waveform graph in order to tamp down some of the background noise. Please tell me the best way to approach this.
0 Kudos
Message 1 of 7
(3,560 Views)
Use the Mean function or the Statistics Express VI
0 Kudos
Message 2 of 7
(3,549 Views)
I do not want to average the data as a whole. I need a running average.
0 Kudos
Message 3 of 7
(3,545 Views)
So you are not using the Read From Measurement File to read the entire file? You want to average one segment with the next? If so, you will use a shift register. I would not use dynamic data - just a 2D dbl array.
Message Edited by Dennis Knutson on 02-16-2010 02:01 PM
0 Kudos
Message 4 of 7
(3,537 Views)
Here is the code. How would you adust this so that the resulting wave forms are averages based on the previous 10 data points?
0 Kudos
Message 5 of 7
(3,529 Views)

There's no code there to modify. You have a single file read and a graph. It runs once and stops. You have nothing to average against.

 

I would suggest you first spend some time with the basic tutorials then do a search for 'running average'.

0 Kudos
Message 6 of 7
(3,517 Views)

Consider using a Median Filter instead of a running average:

 

median filter.png

0 Kudos
Message 7 of 7
(3,493 Views)