Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

board buffer size and AI config.vi buffer setting difference

NI PCI-6052E DAQ board in Labview 6.1 in Win2000 with 512MB memory.
The board FIFO buffer is 2048 sample. What is the relationship between this parameter and the buffer size I set in the AI config.vi? Where is the buffer size in the AI config.vi set? In the DAQ board or in Computer memory? If it is in computer mem, so the setting is not limited by the FIFO buffer size? I can set as much as I want?

For example,I am doing a continous DAQ, scan rate 5000 scan/s, collecting data on 10 channels. What buffer size shall I set?

I read the NI-DAQmx help how about buffer size is dertermined, but that doesn't tell me the difference.
Thanks!
0 Kudos
Message 1 of 3
(3,293 Views)
The buffer size set with AI Config is NI-DAQ's internal software acquisition buffer, and it is not related to the device's FIFO. The internal software buffer is a "circular" buffer in the sense that in a continuous acquisition, the acquired data will be written to the buffer until it is full, then the data wraps around to overwrite the data at the beginning of the buffer. When selecting the buffer size, you need to select a size that is large enough such that you can read data out of the buffer before it is overwritten. You will get a -10846 error if data gets overwritten. If your computer is not fast enough to read data from the buffer as fast as it is being acquired, then you will eventually get an overwrite error. But a larger buffer can buy you more time, and keep you from overwriting data in case your CPU is periodically busy with other tasks.

I recommend that you experiment with different buffer sizes to see what works for you. A good starting point might be 50000 scans (10x your sample rate). The downside to selecting too large of a buffer is that the memory will be page-locked, so it cannot be swapped out for use by other applications.

Joe
Message 2 of 3
(3,289 Views)
Thanks very much for your reply.
0 Kudos
Message 3 of 3
(3,287 Views)