Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Input corrupted by glitches, and desynchronized with output: NI-DAQmx Base

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
0 Kudos
Message 1 of 5
(3,222 Views)
In the previous message, I forgot to mention the following point. If you do not create an output task, but simply acquire data from analog input #0, then the regular glitches do not appear. It seems that the glitches are something to do with NI-DAQmx Base generating a synchronous output signal - even if that signal is a constant 0 V.
Dr John Clements
Lead Programmer
AxoGraph Scientific
0 Kudos
Message 2 of 5
(3,221 Views)
Hello Dr. Clements,
 
This is a peculiar issue indeed. I am running the test program that you have provided to verify the behavior in both cases. I will post back to this forum with my results.
 
Regards,
Chris Behnke
Sr. RF Engineer
High Frequency Measurements
0 Kudos
Message 3 of 5
(3,185 Views)
Thanks for investigating this problem for me.

My commercial application, AxoGraph X, is used for data acquisition and analysis in neuroscience laboratories around the world. Obviously, scientists expect high standards from their data acquisition products, and the problems I have encountered are a 'show stopper' for my attempt to add support for National Instruments digitizers (at least to the Mac OS X version of my application).

I have just ported the testbed app to Windows and NI-DAQmx (full) - basically just did a global find and replace of "Base". For the Windows test I use the same computer and PCIe-6251 digitizer. The computer is an Intel Mac Pro, which dual boots Mac OS X 10.4 and Windows XP.

Result: the testbed application runs flawlessly under Windows. After all the problems I've been experiencing under OS X, I am surprised and very impressed with the accurate, low noise results!

This clearly indicates that the nasty glitches and desynchronization that I am seeing are due to a bug or bugs in NI-DAQmx Base under Mac OS X.

I hope this information helps you track down the problem.
Dr John Clements
Lead Programmer
AxoGraph Scientific
0 Kudos
Message 4 of 5
(3,179 Views)
Hi

This asks for a better daqmx base, or even better a DAQMX version on more than just windows. Maybe only on intel based machines?

just an idea of a LabVIEW Champion
greetings from the Netherlands
0 Kudos
Message 5 of 5
(3,175 Views)