LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Taking FFT of real time data from TCP.

I am receiving data from TCP read. My data is unsigned integer which I do type casting to covert it back to integer 32 (1D) Which is showing at WAVEFORM GRAPH correctly. But if i take its FFT I am not getting correct FFT. what should I do to get Correct FFTCapture.PNG

0 Kudos
Message 1 of 2
(1,798 Views)

Hi Hamza,

 

But if i take its FFT I am not getting correct FFT.

In which way is that FFT result "not correct"?

 

what should I do to get Correct FFT

Don't use ExpressVIs to convert your integer array into a waveform.

There is a BuildWaveform function…

(To get proper FFT results you need to provide a correct dt for your waveform!)

 

Edit:

Another problem is that InsertIntoArray function: why do you insert an 1D array into another 1D array using an incrementing index? Wouldn't it make more sense to append new data to old data?

(InsertIntoArray is the wrong function most of the times, BuildArray should be used instead…)

 

Cleaning up code also helps to improve its readability:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(1,796 Views)