04-27-2009 09:12 PM
Hi,
I'm trying to take the fourier transform of a analog voltage measurement in Labview 8.6 and I'm having a problem with the data.
The measurement is an anaolog input voltage signal taken using the USB-6211 box. I am acquiring the signal on ports 15 and 16 (differential) with the DAQ Assistant at a rate of 5KHz, 200 samples. The setup works perfect thankfully, and a very nice waveform plot is generated on the VI. I would now like to add a fourier transform of this plot to do some frequency analysis.
I found the FFT function, but when I tried to add the DAQ output to it, I got an error about dynamic data. It takes me to a screen which I don't understand about dynamic data conversion, and I'm not sure what to do from this point. My FFT graph is basically just a flat white line, which is wrong.
How can I just take the basic fourier transform of a waveform in this setup?
04-28-2009 08:15 AM
04-28-2009 08:40 AM - edited 04-28-2009 08:40 AM
Yup, attached is a screen shot. As for the FFT output, that's easy - it's just a while line at zero...
I think Labview by default added the dynamic data node, I just don't know how to use it or what signal to select. This approach will work I suppose, if somebody would be kind enough to walk me through it.
04-28-2009 08:48 AM
04-28-2009 11:33 AM
Thanks for the replies. I did that but there are a lot of options and I'm not sure which data type the FFT takes, and why it can't just take the data type I'm giving it. The graph has time on the x-axis and voltage on the y-axis - I just want to do a normal fourier transform of this, nothing exotic. I don't understand why I even need to convert anything. Which data type should I select?
04-28-2009 11:36 AM
The FFT takes a 1D DBL array as an input. The context help tells you that.
There should not be an issue with the way you have it wired. Can you post the actual vI with some data? Run the VI until you see something in your graph. Stop the VI and go to the Edit menu and select Make Current Values Default. Save the VI. Attach that.
04-29-2009 02:58 AM
Hi Dennis,
Thanks for your post - attached is the VI and a screen shot.
I've got it set to 1D scalers, floating point double, automatic right now...I think that's what you meant by 1D DBL. It was on 1D array (double by default) but the graph isn't any different.
04-29-2009 07:24 AM
04-29-2009 08:15 AM
Hi
Your thinking is not bad. You have only some scaling problems. You may toy with the vi I am sending. Change the log/linear control and see the result.
You will find all information you need here http://zone.ni.com/devzone/cda/tut/p/id/4541 and http://zone.ni.com/devzone/cda/tut/p/id/4541. The dt value is the reciprocal of the sample frequency(1/x) The unit is second, and it will give you the time interval between two samples.
Also note how I use the "Dynamic To Waveform Array.vi" to convert the dynamic data. This VI is not documented by NI, but you find it here ...vi.lib\express\express shared\transition.llb\Dynamic To Waveform Array.vi
Good luck
04-30-2009 12:23 AM
Hi Coq Rouge, thanks so much for posting your VI. I've hooked my data intake up to your program and I changed all of the inputs to read from my DAQ. There aren't any errors, but I don't see that the graph ever updates - how can I get it to give me the FFT in real time as the data comes in?
Really I'm disappointed with Labview, this is such a simple task. If I plot the output from the Labview stock FFT functions, it tries to give me a graph of data in the time domain...