LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

filtering waveform data

Hi, I am fairly new at LabVIEW and have the following question:

 

I have an 8 channel waveform data  that I would like to filter out all of the times the channel 8 is below a user specified value.  When I use a Build Table VI, it bogs the program down.  When I do a simple conversion to an array, I lose my time values for the waveform.  Is there any way I can sort the data without losing the time value for each sample set or having the program bog down?

0 Kudos
Message 1 of 5
(4,225 Views)

How about something like this

 

Filter Waveform.PNG

 

Get the components of your old waveform. Use in range and coerce to check if it is in the range you want.

If it is, add it to the new array. If not, ignore it.

Lastly, build a new waveform, with only the points that were in the range.

 

I attached this VI if you would like to use this code.

Cory K
0 Kudos
Message 2 of 5
(4,210 Views)

Cory K wrote:

How about something like this

 

Filter Waveform.PNG

 

Get the components of your old waveform. Use in range and coerce to check if it is in the range you want.

If it is, add it to the new array. If not, ignore it.

Lastly, build a new waveform, with only the points that were in the range.

 

I attached this VI if you would like to use this code.


 

Please note that the approach posted by Cory will remove the values that are out of range

 

AND

 

subsequent values will be shifted (left) into the time-slot where the out- of range value WAS located. If the shifting is un desirable, use a vairation of Cory's code that replaces the out of range value with a "NaN". This will maintain the timing AND will give you a gap in plot where the deleted element was.

 

Just trying to hlep,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 5
(4,195 Views)
One more problem.  Since it is eight waveforms, it is a dynamic data type.  How do you convert the VI?
0 Kudos
Message 4 of 5
(4,193 Views)
I do need to maintain timing and I will have potentially a million values to filter out between reads.  How do I completely throw out the unnecessary rows?
0 Kudos
Message 5 of 5
(4,191 Views)