LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT of 20 waveforms

Hi,

 

I used the following VI (attached to the mail) in the past that acquires data from the specified channel, scales the data to engineering units, windows the signal, and performs the requested averaged frequency measurement. Power Spectrum, Power Spectral Density, and FFT are available frequency measurements. The resulting spectrum is displayed on a waveform graph.

 

You can find the VI on this link :

http://www.ni.com/example/30505/en/

 

 

However, I have now 20 waveforms graphs of 'voltages v/s time' that are the results of a FOR loop (see attachment: Capture.PNG).

I wish to perform the FFT of these waveform graphs together using the same VI.

However, I don't really know what to remove from this existing VI and where I need to connect the output of my waveform graphs to perform the FFT.

 

Thank you for your help.

Regards,

 

Download All
0 Kudos
Message 1 of 7
(3,064 Views)

I don't have the SV toolkit so I am missing some subVIs. Your image in your original thread showed you using the Scale Voltage to EU. Do you still need to run that? I'm not sure but a logical place to start would be to place any extra code you have right after this function. Or you replace it with whatever. In any case, the code inside the case state statement appears to work for an array of waveforms.

Message 2 of 7
(3,031 Views)

Thank you for your answer Dennis_Knutson.

 

I don't think that I still need the Scale Voltage to EU bloc because I converted them in the beginning of my code.

 

Do you have any idea about the code that will make the bridge between the output of my 20 waveforms and the input to do the FFT, PSD and Power spectrum ?

May be, the code must be a conversion of my wvaforms to an array...

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

I gave a try, but still some errors.

(see attachment)

0 Kudos
Message 4 of 7
(3,015 Views)

The only error you have is that you didn't connect the error lines, and thus are broken now.

When you try to run it will give the reason why it isn't able to run.

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 5 of 7
(3,011 Views)

Thank you Koen

 

1 - I think that I have some errors in the code : the structure from the waveforms to the while loop doing the FFT, PSD and power spectrum is not convincing me.

2 - Where can I connect the 'error in' of the PSD ?

3 - the 'task in' of the 'clear' function is also not connected.

 

Please check the original VI in my first message.

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

This is extremely basic stuff. You connect the last error out you have to the broken error in. Same with the task. You don't show the DAQmx Read but I'm guessing that is the function providing the task out.

 

I wish you had shown the entire VI. I suspect you have still have some major problems. The original VI for doing the fft had the DAQmx read inside the while loop so each capture was analyzed. With yours, it would seem you do a single capture and repeatedly perform the fft on the same waveform. You seem to be modifying code randomly.

0 Kudos
Message 7 of 7
(2,993 Views)