04-07-2008 05:11 AM
04-08-2008 12:20 PM
Hello Kochzg,
M series data acquisition boards, such as the USB-6251, use direct memory access (DMA) transfers to transfer data from the DAQ board to the computers RAM. Then when you call a DAQmx Read your operating system will move the data from the DAQ cards first in first out (FIFO) queue in the RAM into the LabVIEW memory space. That being said, the number of samples that you can read at a time with a DAQmx Read is dependent upon your computer and the amount of RAM you have.
While the above answer is the answer to the question you asked I think maybe your concern should be addressed in another manner. These DAQ cards use buffered data acquisition in order to sustain their maximum sampling rate indefinitely. With proper programming (acquisition rates and samples to read) you can acquire data at 125 kS/s on 8 channels indefinitely without overflowing any buffers. As long as your samples to read is approximately 10% or more of your sample rate in Hz then most computers can empty the buffer fast enough.
What I'm saying is this: Let’s say you want to acquire a large, but finite, number of samples: for instance 1 billion. If you call a single DAQmx Read for 1 billion samples you'll likely overflow a buffer. However, if you read in 20,000 samples per channel at a time with each DAQmx read you can successfully acquire all of the data in a number of smaller chuncks.
If this isn't the answer you're looking for then it would be helpful to know more about your application and why it’s necessary to know the maximum number of samples a single read can acquire. I hope this gets you started and have a great day.
Cheers,
04-10-2009 03:29 AM
Hello, Brooks
I'm wondering the data quantity.
According to your article, 'As long as your samples to read is approximately 10% or more of your sample rate in Hz then most computers can empty the buffer fast enough.'
As my understanding, number of data is Sample rate per Samples to read that means every second I can only get 10 data points per second.
is it right ?
If I need more datum per sec. For example,3k samples per sec.
How should I set the parameters?
Thank you for your take care.
04-10-2009 09:47 AM
Hello Larayeh,
In your case your 'rate' would be 3,000 samples per second. In order to follow the 10% rule of thumb you would need to set 'samples to read' to be greater than or equal to 300. In this configuration, the DAQ card will be filling the buffer with 3,000 samples per second and you'll be emptying it 300 samples at a time with the DAQmx read. This means that your program will only have to call the DAQmx VI ten times a second on average to avoid overflowing the buffer.
The idea behind this requirement is that there is a processor overhead associated with the DAQmx Read. By increasing the number of samples you read at a time then you make the read more efficient on your processor. While many modern processors can sustain much higher read rates (I've personally run code that called DAQmx Read several thousand times a second on a Windows machine), unless there is a reason to do this the 10% rule of thumb is a good coding practice.
Cheers,