Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Samples per Channel in Continuous Acquisition mode...

What does the "Samples per Channel" input to the DAQmx Timing vi do in Continuous acquisition mode?  Apparently it is not used to set the buffer size.  The rate is used for that.  So what am I missing?
0 Kudos
Message 1 of 2
(3,017 Views)
Actually, 2and4, the Samples per Channel input is used to set the buffer size for both finite and continuous acquisitions.  If you have the latest DAQ driver, you can learn more about this in the NI-DAQmx Help file, which is installed with the driver.  Here's an excerpt from the text (sorry about the highlights; I found the section by searching the file for a text string):


If your acquisition is finite (sample mode on the Timing function/VI set to Finite Samples), NI-
DAQmx allocates a buffer equal in size to the value of the samples per channel attribute/property. For example, if you specify
samples per channel of 1,000 samples and your application uses two channels, the buffer size would be 2,000 samples. Thus, the buffer is exactly big enough to hold all the samples you want to acquire.

If the acquisition is continuous (sample mode on the Timing function/VI set to Continuous Samples), NI-DAQmx allocates a buffer equal in size to the value of the samples per channel attribute/property, unless that value is less than the value listed in the following table. If the value of the samples per channel attribute/property is less than the value in the table, NI-DAQmx uses the value in the table.

Sample Rate Buffer Size
no rate specified 10 kS
0–100 S/s 1 kS
100–10,000 S/s 10 kS
10,000–1,000,000 S/s 100 kS
>1,000,000 S/s 1 MS

You can override the default buffer size by calling the Input Buffer Config function/VI.


You can learn all about how buffering is performed in this file.  The file is found on the Start menu under Programs >> National Instruments >> NI-DAQ >> NI-DAQmx Help.  Inside the file, browse the Contents tree to NI-DAQmx Key Concepts >> Reading and Writing Data >> Buffering.

Message Edited by David S. on 02-20-2007 01:01 PM

David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,005 Views)