From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Waveform FFT

Hello,

 

Anybody, please help with data. I want to do FFT for data, but it seems that I don't understand how to get FTT, because if I connect like as shown in figure I see only one line, it doesnt look like FFT spectra. How to do FFT from Waveform? I dont know how to do sampling. 

 

Thank you

0 Kudos
Message 1 of 45
(4,666 Views)
First, you should spend some time going through the tutorials for LabVIEW.

Second, you should spend some time reading up on FFTs so you know what they are and how they work. There are FFT examples that ship with LabVIEW, they can be helpful here.

Third, you should post some actual code -- the picture you posted is clearly one piece of something larger.

Fourth, you should show some pictures of you inputs and the output you are getting.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 45
(4,641 Views)

Yes, I checked all samples, but you see it is easy to get FFT spectrum from generating signal, but how to get FFT spectrum when you read file? How to do sampling? Thank you

0 Kudos
Message 3 of 45
(4,636 Views)
See my first point. You need to learn LabVIEW.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 45
(4,632 Views)
When reading from a file, there is no sampling to be done.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 45
(4,627 Views)

No sampling? Frequency? I dont get it. I am writting, but it does not work

0 Kudos
Message 6 of 45
(4,621 Views)

You are reading a waveform so it has a dT as part of its data.

 

Attach your VI and your data file.

0 Kudos
Message 7 of 45
(4,615 Views)

OK, please look at code, it is something wrong. How to get FFT? I want to add data, but the size is ~ 700mb. Please look at code and send it back. Thank you

0 Kudos
Message 8 of 45
(4,610 Views)

I know how to get deltaT, but how to connect that get a correct spectrum? 

0 Kudos
Message 9 of 45
(4,590 Views)

You are reading a file (raw_02.dat) using Read Waveform from File.  Do you understand this function?  [I suspect not, as you use the "All Waveforms" output, then use Index Array to get the first one, when the function has explicitly a First Waveform in Record output].  Do you know what a Waveform is?  Have you looked at the Waveform?  Do you know how many points it has?  Do you know the frequency at which its data were acquired?  [Hint -- the answers to the last two questions are contained in the Waveform, itself].

 

Rather than flailing around, why not write a small VI where you do the following:  Open a single file, save the first record in a named Indicator, write a little code to get N (number of points) and dt (sampling time interval), plot the waveform on one graph, do a single FFT (you choose which you want to do), and plot those results.

 

Now, if you look at your Front Panel, you should have indicators showing (among other things) the plot of your waveform and the value(s) in the Waveform, itself.  Go to the Edit menu and click "Make Current Values Default".  Post this little VI, which will send us (in your named Indicator) a sample of your data.  We can then change it to a Control and test your code, modifying it if necessary to get it to work, or explaining to you why you might not have the kind of data that you need to do an FFT.

 

Bob Schor

0 Kudos
Message 10 of 45
(4,587 Views)