LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT for multiple channels

I am trying to run data from multiple channels through an FFT vi. However, I can not get this to happen. I am using DAQmx Read to read three input channels. I have tried using index array to separate my data but in doing so, I would have to run a separate FFT for each one. I want to run all the data through one FFT and then display all the data sets on the same XY plot. Any ideas or sugeestions?

0 Kudos
Message 1 of 19
(4,650 Views)

Do a palette search for FFT Spectrum, there is an FFT spectrum analyzer for multiple waveforms, however this is not part of the 'base' package of LabVIEW.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 19
(4,646 Views)

I don't think I have the FFT spectrum analyzer for multiple waveforms. I have tried a few other techniques, but none of them have worked. Any other suggestions or am I just going to have to run each waveform through an FFT seperately?

0 Kudos
Message 3 of 19
(4,617 Views)

If you have any FFT functions you have FFT Power Spectrum and that can be selected for multiple channels. Even if you choose not to use that function, you can simple wire the waveform array through a for loop with your FFT function inside. Also, no matter what, each waveform will get run through the FFT separately. Whether you have one FFT function on the block diagram or three, it's all the same.

0 Kudos
Message 4 of 19
(4,610 Views)

When I try to plot the outputs (of the FFT), the signals get mashed together. How do I keep them seperate? Right now I am using simulated data to test my VI, but eventually I will have signals from 4 accelerometers, 8 prox probes and one speed sensor, I would like to display the accels on a plot together, the prox probes together and the speed sensor on it's own.

0 Kudos
Message 5 of 19
(4,593 Views)

Please post what you have tried so far.  It is much easier to see what you might be doing to "mash" your signals together.

 

If you used the array method Dennis suggested you should get an array of spectra.  Use Index Array to get the signals you wish to display.

 

Lynn

0 Kudos
Message 6 of 19
(4,586 Views)

This is what I have tried (among other similar techniques). I have also tried using an indexed array after the FFT, but still no luck. I'll work on the array method some more.

0 Kudos
Message 7 of 19
(4,581 Views)

MikeFJ,

 

We need your subVI "FFT FFT v2.vi" also.

 

Lynn

0 Kudos
Message 8 of 19
(4,573 Views)
0 Kudos
Message 9 of 19
(4,566 Views)

MikeFJ,

 

Do you see the coercion dot at the input to the FFT FFT subVI?  Coercion dots are your friends.  They tell you that LV is forcing a  change in datatypes.  It is always a good idea to verify whether the change is doing what you expect.

 

In this case it is changing an array of waveforms to an array of Doubles.  Who knows what values it is putting into the array going into the FFT?  Also you are not telling the FFT what the sampling rate is so it cannot get the frequencies right.

 

Insert the Index Waveform Array.vi and a get Waveform Components primitive between the Analog read and the FFT FFT VI.  The index input to the Index Waveform array will select which data channel you transform and display.

 

Lynn

0 Kudos
Message 10 of 19
(4,558 Views)