LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Averaging n number of data per x time after stripping out zeros

Hey all,

 

Very new to LabView and dropped in the deep end. I have a DAQ outputting data at 10hz. I need to be able to average that dataset every second after filtering out values I do not want and the zero values also, before saving to file. Currently I am outputting the data, instructing it to zero the values outputting below 0.6 and above 1.8. From there I need to rempove the zeros, so to average the remaining values in each 1 second/10hz interval and output one value per second. 

 

I have attached the file. 

 

Thanks

0 Kudos
Message 1 of 2
(2,001 Views)

So you want ot average only the values between 0.6 and 1.8?

 

Well, we can go about this in 2 ways: build an array of data points to keep or delete the unwanted data points.  It is probably easiest to build an array of points to keep.  So here's what you should do.  Use a FOR loop and autoindex the waveform array.  Use the In Range and Coerce function to see if your current data point is within the range.  If it is add to the array.  The building of the array should be handled with a shift register.

 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(1,996 Views)