LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PlotWaveForm and AutoPowerSpectrum

I have an input signal (sine wave) of a couple hundred MHz, and I want to get the frequency components using AutoPowerSpectrum. My issue is that when plotting the result of AutoPowerSpectrum, I cannot get the correct frequency using the default parameters. So I use df as xincrement and I get closer to the correct value but still off by a factor of 1000 (and some change). So I guess my question is how can I use xInitial and xIncrement to get the correct frequency values when using AutoPowerSpectrum function.

 

Thanks.

0 Kudos
Message 1 of 2
(3,988 Views)

Why do you use the default parameters? Of which function, PlotWaveform or AutoPowerSpectrum? Did you try dt = 1.0 / sampling_rate?

Could you just show the relevant lines of code?

You may also want to have a look at the example programs, e.g., thd.cws (samples/analysis)

0 Kudos
Message 2 of 2
(3,976 Views)