The attached testbed application (and XCode project) writes either a flat 0 V signal or a 10 V sinusoidal signal to analog output #0, and synchronously reads a signal from analog input #0. The input and output channels are directly connected by a BNC cable, so you should expect the input and output signals to match. The program tests this by subtracting the output signal from the input signal at each sample point, then printing out the array of results.
The testbed app identifies serious systematic errors when using a PCIe-6251 digitizer, with NI-DAQmx Base on an Intel Mac Pro running OS X 10.4 (Tiger).
Glitches
========
To reproduce the 'glitch' problem, compile and run the un-edited source file "test-ni-io-glitch.cpp". It should include the #define line...
//#define sinusoidal_10V_AnalogOutput
...commented out. The program will set up an output task, but only send out a 0 V signal. The input signal is contaminated by regularly spaced glitches of approx 6 mV (see "Zero Output Graph.png"). At higher sampling rates, more glitches appear (see "Zero Output 100 kHz Graph.png").
Desynchronization
=================
To reproduce the 'desynchronization' problem, edit the source file "test-ni-io-glitch.cpp" by uncommenting the #define line...
#define sinusoidal_10V_AnalogOutput
The program will now send out a 10 V sinusoidal signal. The input signal contains serious errors, because the input clock is not accurately synchronized with the output clock. This means that samples are periodically dropped, and a phase shift develops incrementally between the output and acquired signals (see "Sinusoid Output Graph.png"). The desynchronization events occur at regular intervals, similar to the interval between glitches. At higher sampling rates, there are more dropped samples (see "Sinusoid Output 100 kHz Graph.png).
.........
I am the developer of a scientific data acquisition and analysis application, AxoGraph X (axographx.com), which already supports digitizers from several other manufacturers. I am trying to add support for NI digitizers, but the serious problems reported here mean that I will have to drop this effort for now (at least for the Mac version). No scientist would tolerate systematic measurement errors of this type.
Dr John Clements
Lead Programmer
AxoGraph Scientific