LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT

Hi everybody,

 

I'm writing this post because I would like to know if there was a way to save the results obtained by a FFT. 

 

I'm acquiring a signal with a DAQ and performing a FFT to see its frequency components.

I have no problem to save the data coming out from the DAQ a file  with the function "write delimited spreadsheet", but when it comes to the FFT it does not work with the same method (obviously).

FFT.PNG

 

Is there a way to do it ? Thank you so much 

 

Best regards,

Marco 

 

 

0 Kudos
Message 1 of 4
(1,924 Views)

Hi Marco,

 

the pink wire is a cluster: you can get the elements using the Unbundle function.

Then it becomes easy to save the FFT result...

Best regards,
GerdW


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

Hi, 

 

I used the Unbundle function, then I created an array with the "build array" function and plotted it to see if everything worked.

It does work in Labview, even when I modify the input parameters of the sines components, the FFT is accurate. 

 

FFT1.PNG

 

The problem is when I want to upload the data and plot them in Matlab. Basically is like if the file saves only a part of the results but not all of them. If I modify the inputs after the Labview routine has started, it does not show them. 

The Matlab code is the following 

matlab fft.PNG

 

Could you help me out? Thank you so much .

 

Best,

Marco

0 Kudos
Message 3 of 4
(1,888 Views)

Hi Marco,

 

The problem is when I want to upload the data and plot them in Matlab.

I'm not an expert in Matlab - you are asking in a LabVIEW forum…

 

I used the Unbundle function, then I created an array with the "build array" function

You build an array of those f0, df and Y[] data in LabVIEW: when you load that data in Matlab you should also use the first and second value (f0, df) differently then the Y[] data after them…

 

Two notes:

  1. It doesn't make sense to create a plot with prepended f0 and df values!
  2. Use UnbundleByName as it creates much better selfdocumenting code!
Best regards,
GerdW


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