I am working on code in C++ on OS X using NI-DAQmx Base. I have gotten to the point of trying out mxbaseconfig and DAQmxBaseLoadTask(). I'm using a PCI-6014 for testing.
I notice that the pre-configured example task "ai finite buffered", on the Advanced tab has DMA channel 1 selected with a DMA buffer size of 32768. So when I created my own analog input task, I did the same. In my task, I selected ai channels 0 and 1, and a 10000 scans.
When I load and run the task, DAQmxBaseReadAnalogF64() comes back with error 42 (one of the engineers read the Hitchhiker's Guide?) and DAQmxBaseGetExtendedErrorInfo() gets this message:
RLP Invoke Node
The DMA buffer overflowed because data was not read from the buffer as fast as the DMA channel wrote to the buffer.
If I increase the DMA buffer setting to 65536, it works. If I turn off DMA, it works.
So here's the question finally:
Does the DMA buffer setting have to be larger than the total number of bytes that will be acquired? How large can it be? Are there other details I should know about DMA and NI-DAQmx Base?
OK, so it's three questions...
John Weeks
WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com