02-23-2013 01:53 PM
I am writing a data acquisition program in c# .NET using the NI-DAQmx DLL (i.e. not specifically measurement studio) and a NI-6353 DAQ board. We're getting this strange signal offset which turned out to be more of a drift. When we run a series of N-sample acquisitions using BeginReadMultiSample(Nsamples, analogCallback, myTask) we are getting systematically lower value than we expect. When we run the acquisition with the input to the DAQ at about 0V we read about -10.5V, the minimum of the DAQ board. When we hold the input around 5V we read about -5V to -7V. This is consistent over 300-5000 samples. Moreover, a small labview VI, oscilloscope, reads the correct value. So to make sure it wasn't just my program I ran one of the .NET example programs, ContAcqVoltageSamples_IntClk_ToFile, which does a very similar acquisition (actually I modeled my program off of it) and it was having the same issue over many samples. Then I checked one more example program, AcqOneVoltageSample, which just grabs one sample from the DAQ at a time. At first this has the same offset, -5V to - 6V reading on an approx. 5V input, but if I repeatedly click the acquire sample button it approaches and levels-off at the correct value. Then if I wait to grab another sample it drifts back to about -5V over time.
Other pertinent information: uses (AITerminalConfiguration)(-1), the default terminal configuration but there was no difference when we select differential. The DAQ measures the signal from signal high to DAQ ground.
Does anyone have an idea as to why we are getting this measurement offset and/ or why this offset drifts in and out in the case of single sampling but is fairly consistent in the case of an N-sample read?
Thanks
02-24-2013 09:12 PM
It's hard to say but it seems like you have incorrectly connected your signal to the DAQ board. Or you are sampling the wrong channel.
03-01-2013 03:55 PM
Thanks for the responses everybody. It turns out that I simply had selected the wrong terminal configuration in my .NET code. Sorry for the silly question