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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ mx: continuous mode and the buffer size

I've been working on a program in Labview which reads out voltage from my device. For that I use the the DAQmx Timing sub VI as shown in the picture.DAQmx connect.

 

I want do display the voltage in each iteration of the external while loop, therefore I use the continuous mode. However I am only able to read out as many values as the size of the buffer is (so 10 000 in for the piece of code I uploaded).

What is the correct way of working in the continuous mode?

 

I read out the values as shown in the picture DAQmx read.

Download All
0 Kudos
Message 1 of 3
(4,185 Views)
You have nothing there that reads more than once. Do NOT use the run continuous button. That is for special debug user only. With 1Samp mode, you will get a reading for each read but you've programmed it to ignore the timing.
0 Kudos
Message 2 of 3
(4,172 Views)

You can set the buffer size to whatever you like--the easiest way would be to change the hard-coded 1000 number in your "DAQmx Connect" screenshot:

 

How Is the DAQmx Buffer Size Allocated for a Finite or Continuous Acquisition?

 

 

You'll want the buffer to be larger than the number of samples that you wish to read per loop iteration so you can account for any software delays in your loop.  You'll need to use the N channels N Samples version of DAQmx Read to acquire multiple points at once.

 

 

Best Regards,

John Passiak
0 Kudos
Message 3 of 3
(4,113 Views)