From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make time series

Solved!
Go to solution

Hello,

 

I have an array of data sampled by known (500Hz) frequency. If I plot that, I get x-axis in samples. I am able to rescale it by using a scale settings. But the problem is, when I want to do FFT. The axis is in samples or in time, but I need frequency there.

 

So, the question is how to add to that array another column, which has same length and values corresponding to each sampling step and how to plot everything in right units. I am new to LabVIEW. Thanks

 

Jindrich 

0 Kudos
Message 1 of 5
(2,652 Views)

Hi Jindrich,

 

when you connect output of a FFT vi to a waveform indicator, what you see on X-scale is nothing but frequency range. Make sure you have enabled the autoscale X asis to get the FFT peak on the  right frequency on the scale. 

0 Kudos
Message 2 of 5
(2,644 Views)

Thanks for your answer.

 

 

 Well, the length of my data is 4000 and if I perform FFT I get spectrum range from 0 to 4000 (it corresponds to number of samples). Is there way how to "tell" Labview "my fs is xxx Hz" ?

0 Kudos
Message 3 of 5
(2,639 Views)
Solution
Accepted by henryx
I have solved it using "scale" in axis formatting. Half of spectra corresponds to fs/2 so I calculated a multiplier.
0 Kudos
Message 4 of 5
(2,616 Views)

What you just had to do is enable autoscale X axis, and connect the output of the FFT to your waveform graph. Definitely you will see half of the spectrum (real) and imaginary part is not visible.

 

More, Your frame lenght will always be half of your Scanning Frequency. Simply by Δf=fs/N. where Δf is the frequency resolution, T is the acquisition time, fs is the sampling frequency, and N is the block size of the FFT.

 

  

0 Kudos
Message 5 of 5
(2,604 Views)