Our lab recently purchased a new Dell Optiplex GX620 model to run our custom built data acquisition software. It's running Windows XP SP2 and NI-DAQmx 8.1. We use a DAQPad-6016. Our application, which is written in Visual C++ 6.0, relies on DAQmxRegisterSignalEvent to alert us as to what sample the card is currently acquiring at specific times during our experiment. Our callback function was simply incrementing a tick integer variable, as shown in code snippets below below:
ec = DAQmxRegisterSignalEvent(DAQcs.taskHandle,
DAQmx_Val_SampleClock,
0,
DAQClock,
&DAQcs);
_______________________________________________
long CVICALLBACK DAQClock(TaskHandle taskHandle,
int32 signalID,
void *callbackData) {
((struct daq_control_s *)
callbackData)->tick++;
return 0;
}
where ec is an integer error code and daq_control_s is a control structure containing the integer variable tick.
This worked fantastically on our previous machine, which was an AMD Athlon 32-bit 1.9 GHz also running Windows XP SP2. However, on the new Dell, the callback fails consistently. We take 915 samples at 200 hz, and the callback faithfully reports what sample it's taking up until approximately halfway through the 915 total. After a few days of sleuthing, trying updated USB drivers, using multiple versions of NI-DAQmx, and poking around at our code, I've determined that the processor on this new Dell, which is an Intel Pentium 4 emulated 64-bit 3.4 GHz processor, seems to cap how fast the callback is processed. At around 4-5 msec intervals between callbacks, we run into trouble. Running the sample clock on the card at 100 hz or less is no issue, while anything above 125 hz begins to cause this problem, and the faster the clock, the more devastating the callback degredation becomes. This is not the case on our older (and slower!) machine, which reports the 5 msec period between the processing of the callback at 200 hz in our tests and performs well at faster time resolutions. It seems as though the callback processing lags significantly until some piece in the puzzle (either the operating system or the DAQ card) just gives up. I have tried this on an AMD 64-bit processor also running Windows XP SP2, and it works as it should.
Has anybody else experienced problems with this setup (the Dell Optiplex with a 64-bit EMT Intel Pentium 4 Processor and an Intel 945G Express Chipset) and the DAQPad-6016/NI-DAQmx? As far as I can tell, the card is collecting the right amount of data at the right times, so this problem appears to be limited to the callback, and how the card is talking to the computer during its processing.
Any insight would be greatly appreciated.
Regards,
Maggie Gardner
____________________
Margaret Gardner
Information Processing Laboratory
Brain and Cognitives Sciences
University of Rochester
mgardner@bcs.rochester.edu