LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tone measurements question

Lynn,
 
Thanks for the advice, the index method does a good job of finding the frequency. The problem I'm having now is the STFT.vi is running extremely slowly when computing data that is being continously acquired (see attached vi). A sampling rate of ~12k Hz, and a buffer size and number of samples/ch of about half the rate seems to produce the best results graphing voltage input from the fiber optic. I've tried playing around with the  frequency bins, window length, and time steps of the STFT, all with no success.
 
Is the STFT.vi inherently slow at computing the frequency time domain/not meant for a continuous acqure application or are there wiring tricks to make it run up to speed? The extract multiple tone information vi was able to run at the same speed that data was being acquired.
 
Thanks for all your help thus far.
 
-Ben
0 Kudos
Message 11 of 12
(428 Views)
Ben,

The STFT takes some time because it calculates multiple FFTs. You would need to run benchmarks with your settings to see how fast it is.

I don't understand how you are acquiring continuously. You set up the task for continuous sampling but only call the DAQmx Read once. The continuous run button (looped arrows) is not intended as the way to run programs continuously. Put the DAQmx Read inside a loop to read continuously.

Since the analysis may be slower than the acquisition, put the analysis in a parallel loop. Transfer the data between the two loops via a queue or Action Engine. Also, the Build tables may be slow. Why don't you just display the data in numeric arrays?

Lynn
0 Kudos
Message 12 of 12
(421 Views)