ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

queue as buffer?

hello,

 

i am in frequency domain application, my scan rate is 100ms and sampling  is 10kHz. sampling rate canbe varried but loop rate always 100ms.

 

my question is if i use FFT with 10KHz samples with 100ms loop rate, it will not works. rather i should change my loop rate = 1000ms, then only i will get it right spectrum.

 

while i using 100ms loop rate  with 10kHz samples i have to create a temporary buffer to put a samples of data, could you suggest any other way to hold these samples on temporary location like a buffer...

 

can able to  use queue for this...?

Regards,
Balaji DP
0 Kudos
Message 1 of 2
(2,767 Views)

It is difficult to tell from your description what the problem might be.  Please post your code with some typical data saved as default.

 

With a 10 kHz sampling rate and reading data every 100 ms you will have 1000 samples to analyze.   You should be able to do an FFT on a dataset of that size in well under 100 ms.  What else is going on in the loop?

 

Queues can be a good way to make a buffer, depending on what you are doing with the data.  A shift register can be used.  Initialize the array outside the loop and use Replace Array Subset inside.  LVOOP.  Action Engines.   Lots of ways to make buffers.

 

Lynn

0 Kudos
Message 2 of 2
(2,755 Views)