LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filter Express VI - How to make it work with single samples? (LabVIEW 8)

Hi there,

 

I'm trying to update some older code by implementing some sort of FFT.  Currently, my program acquires X data points, averages them, and spits out the Mean value into a graph (Signal as a function of wavelength) (Spectrofluorimeter).  This is done a number of times with the instrument moving to a different wavelength between each sample scan. I've tried to incorporate the Filter Express VI but it does not seem to be doing what I'd like it to.  I have it wired to my Signal Acquisition Express VI with the Filter set to Low-pass 100 Hz with the result being passed through the "Mean" VI and then graphed with the Build XY Graph Express VI.

 

When I graph the Power Spectrum, I am seeing that the maximum observable frequency is always 1/50th my sampling rate (regardless of my low/high/bandpass settings).  For example: my # of samples is set to 100, and my sampling rate is 8000 and I observe a maximum frequency of 160 Hz.  If my # of samples is set to 100 and my sampling rate to 6000, the maximum frequency is 120 Hz.  If I try the Filter Express VI with very basic wiring and just hook up a battery to it, I see all sorts of frequencies all the way up to my sampling rate divided by 2 (i.e. 8000 -> 4000 Hz) so this seems very strange to me.

 

I'm not sure what is causing this and perhaps its a limitation of the Filter Express VI and I'm supposed to filter using a different method?  I was thinking that perhaps I would need to store all of the dynamic data and then wire it to the Filter Express VI once the entire scan was completed and filter that way but I'm not sure how to save or buffer this dynamic data.

 

I'm hoping this is a common problem and someone would be so kind as to offer me any suggestions!

 

Thank you for your help!

0 Kudos
Message 1 of 8
(3,144 Views)

I think I should clarify that these aren't necessarily "Single Samples".  I take X number of samples at a specific wavelength, filter that, then take X number of samples at a different wavelength, filter that, and the goal is to have a frequency filtered data set at the end.

0 Kudos
Message 2 of 8
(3,142 Views)

Is the result of the acquisition Dynamic Data Type or a waveform? Sounds like "dt" is getting lost. If it's a waveform, "Get Waveform Components" can tell you what the dt is.

0 Kudos
Message 3 of 8
(3,140 Views)
Thank you for the quick response! I tried that but because the output is dynamic data I cannot look at the waveform components.
0 Kudos
Message 4 of 8
(3,136 Views)

I haven't used Dynamic Data. There's a "Convert From Dynamic Data" Express VI that will let you turn it into a waveform.

0 Kudos
Message 5 of 8
(3,122 Views)

I used the Convert from Dynamic Data express VI and I'm able to find the dt component.  Is there a specific way I am supposed to be wiring it for it to work properly?

0 Kudos
Message 6 of 8
(3,089 Views)

You can output the dt and see what it is. If it's wrong, and you know the sample rate, you can change it.

Message 7 of 8
(3,083 Views)

I wasn't able to apply your suggestion to make it work so what I did as a successful alternative was I just resorted to "post-processing" by acquiring the data for a full scan, and then passing it through the filter.

 

Thank you for your suggestions though!

0 Kudos
Message 8 of 8
(3,059 Views)