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: 

increase read rate(DAQmx)

im trying to get readings every ms.  i can get large amount of samples, but i have a sensor that activates and deactivates quickly, being used to keep track of counting.  Before i used the DAQ assistant and input a high level of samples at a 800hz.  i'm now using a DAQmx read function but the rate seems limited in a timed loop/while loop to 1000ms.  how do i get a quicker read rate?

and am i limited to the number of DAQmx modules?  can i have a DAQ assist to take inputs while DAQmx to write output?

0 Kudos
Message 1 of 2
(1,914 Views)

First of all, you want to move your task initialization code outside of the loop.  You only need to initialize once before the loop.  You should also clear the task after the loop.

 

Secondly, you stated that you wanted to sample every ms.  That means you should set your sample rate to 1000, not 800.  I would also recommend using the Continuous Samples acquisition and don't wire the number of samples in the DAQmx Timing VI.

 

Thirdly, I don't know why you changed the array into a cluster to get a single waveform.  All you needed was the Index Array.

 

Attached is a quickly modified version of your program.  See if this does what you need.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(1,911 Views)