Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT of a signal

Hi,
 I am using NI GPIB to interface Tektronix TDS 3012B to PC.
 
I can communicate between the scope and the PC.  I used Channel 1 of the scope to display the sinusoidal signals from the function generator GFG-8250A. What ever signal I adjust   [amplitude and frequnecy] from the generator is displayed on the scope.  i.e. there is no problem regarding the time domain signals. 
 
Then I used I tried, FFT power spectrum VI and, spectral measurement VI and FF spectral (Mag-Phase) VI and the corresponding example VIs,  in order to perform the spectral analysis of the applied signals. But I couldnt get the right frequency in the spectral analysis, also  the frequncy in the x-axis seems to be not correct (always ranging from 0 to 0.5 Hz  even if I adjust the frequency to M Hz range).
 
I tried several times to change the configuration of the VIs used but no response. May be the problem due the selection of the sampling frequency which I do not Know how to do it. 
 
 Note: I tried exercise 6.1 Fast Fourier Transform in the Data acquisition and signal processing course manual [using NI DAQ module] both  ONE-side FFT and TWO-side FFT] can be seen and it work nicely.
 
Would you please give some hints to solve this problem. 
 
 Thanks a lot
0 Kudos
Message 1 of 11
(4,703 Views)
What are you inputing to the functions? Is it a waveform data type or just a 1D array? You need to provide a a waveform data type since a 1D array has no timing information. Without timing information, the dt is going to default to 1. It's simple to create a waveform data type with the Build Waveform function. Wire in the 1D array from the scope and also from the scope, you should be able to get the same interval which is also wired into the Build Array function.
0 Kudos
Message 2 of 11
(4,687 Views)
Hi, thanks a lot for the reply
 
Actually I am connecting  [the waveform array] and [x increment] of tkt3k Read waveform VI to [y] and[dt] input of the Built Waveform VI. The output waveform of the built waveform VI is wired to the time signal input of the FFTpower spectrum VI.     But the problem still persist.
Regards
 
0 Kudos
Message 3 of 11
(4,667 Views)
Why don't you just post your code? If you could, create indicators for the y array and dt, run the VI, and then once data is present, go to the Edit menu and select Make Current Values Default. Save the VI and then post that. This way, an instrument will not be required to experiment with.
0 Kudos
Message 4 of 11
(4,665 Views)
0 Kudos
Message 5 of 11
(4,662 Views)
pls check the atached VI

Thanks
0 Kudos
Message 6 of 11
(4,661 Views)
What exactly can I check? You didn't save the VI with actual data like I asked. I don't have the scope to acquire a signal. Following the procedure I gave, would allow anyone to help troubleshoot.
0 Kudos
Message 7 of 11
(4,656 Views)
I Created indicators for y array and dt, ran the VI and made the current value default as required. Then I ran the VI again but still the problem not solved.

Your advice is highly appreciated
0 Kudos
Message 8 of 11
(4,654 Views)
Ok,  pls check the attached file which comprises the code required
0 Kudos
Message 9 of 11
(4,652 Views)
If I just zoom in on your Waveform spectrum I see the top at 100 kHz (as expected).

It would probably best to set the formatting to SI notation.

Ton



Message Edited by TonP on 02-21-2008 10:36 AM
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 10 of 11
(4,642 Views)