LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB 6009 + LabView

 

Hello everybody.

 

I am making a student project by using NI USB 6009 and LabView.

 

I want to get sample rate at least 2 kHz but I can't reach it.

 

I upload VI File which I am using. 

 

I hope anybody can help me.

 

 

Sebastian from Colombia.

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

Why is your DAQ assistant set to only read one sample at a time?  There is no way that loop can iteration 2000 times per second (this is called software timing) especially when you have the file writing occurring in the same loop.

 

Set a sample rate of 2000 Hz, and continuous samples.  Collect 2000 samples at a time, then pass that data to a separate loop with a queue.  The other loop will handle the file writing.

 

Even if your VI could run fast enough and write data to the file fast enough, the fastest that loop can possibly run is 500 Hz when you factor in you have a 2 msec wait function inside the loop!

0 Kudos
Message 2 of 5
(3,191 Views)

You are taking data and writing a single sample to a file with each iteration of the while loop.  Also, the loop has a 2 ms dwell.  One of these two things will take longer than the other and will drive the loop rate.  The loop will iterate only when everything inside it has executed.  Having a 2ms dwell in the loop guarantees it will never iterate faster than 500Hz and it may be slower than that if the DAQQmx/file write lake longer than 2ms.  

 

Before we suggest a different approach, can you  tell us if you need a single fintie duration 200Hz sample or do you need it to be continuous?  Is there any issue if there are small gaps in the signal (e.g. it is not continuously streaming but is interrupted momentarily and periodically)? 

0 Kudos
Message 3 of 5
(3,188 Views)

yes, I need continuous sampling at least 2 kHz. How can I configura DAQ or even the block diagram for that?

 

0 Kudos
Message 4 of 5
(3,153 Views)

I don't have LabVIEW open at the moment but open DAQ assistant, and choose Continuous instead of Single Point.  You'll need to setup how many samples to read at a time, and how fast.

0 Kudos
Message 5 of 5
(3,143 Views)