LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem.. get frequency from single changing value with FFT

Hello all,

 

I am trying to get the frequency of a changing value. I am trying to use the FFT function. And I cannot seem to get it right. I am including a picture. It is a changing double value. I have loaded it into an array then put it into the FFT function. I am not getting a thing. 

 

Any help would be greatly appreciated. I have spent the last few days looking for a solution. So now I am coming to you all.

 

Thank you for your time,

 

Corey

Capture3.PNG

 

 

 

 

 

Capture2.PNG

0 Kudos
Message 1 of 5
(1,306 Views)

Hi bmxc,

 

it doesn't make sense to apply a FFT on a single sample!

 

You need to collect several samples to calculate their FFT…

Best regards,
GerdW


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

Hello GerdW,

 

First off thank you for responding. How would you try to find frequency? I was thinking add it into an array then pass it through the fft function, and then finally graph it. But that doesnt seem to work either. What do you think?

 

Thank you,

 

Corey

0 Kudos
Message 3 of 5
(1,277 Views)

You can use a ptbypt function, such as FFT ptbypt. It will maintain an internal history and do the transform on the last N points seen.

0 Kudos
Message 4 of 5
(1,261 Views)

Hi bmxc,

 


@bmxc22 wrote:

I was thinking add it into an array then pass it through the fft function, and then finally graph it. But that doesnt seem to work either. What do you think?


Your code uses BuildArray to create an array of exactly one element.

Why do you think you "added" (better call it "append") that sample to an evergrowing array???

 

You need a shift register to append data to an existing array - the PtByPt function mentioned by Christian already has one inside…

Best regards,
GerdW


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