04-19-2007 03:15 PM
status = DAQmxBaseCreateTask ("", &taskHandle);
status = DAQmxBaseCreateAIVoltageChan (taskHandle, chan, "", DAQmx_Val_Diff, min, max, DAQmx_Val_Volts, NULL);
status = DAQmxBaseCfgSampClkTiming (taskHandle, source, sampleRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, navg);
while( !finished )
{
/* Wait until signaled to start reading */
pthread_cond_wait(&ad_start_signal, &ad_start_mutex);
status = DAQmxBaseStartTask (taskHandle);
status = DAQmxBaseReadAnalogF64 (taskHandle, pointsToRead, timeout, 0, data, pointsToRead*NAD, &pointsRead, NULL);
status = DAQmxBaseStopTask (taskHandle);
}
status = DAQmxBaseClearTask(taskHandle);
...
04-19-2007 04:37 PM
04-20-2007 12:01 PM
04-25-2007 04:04 PM
I just wanted to follow up with the problem/solution. It appears that the NI-6009 can be programmed with two different firmware versions. The correct version for my use is the NIDAQmx Base firmware. This version performs flawlessly with the application above and takes less than 400ms to complete. The same NI-6009 with the NIDAQmx firmware version functions slowly but correctly with the application. It does however fail to load the device the second time the application is started and the device needs to be reseated before it will work again.
So... if you have slow functionality using DAQmx Base or the device doesn't seem to disconnect properly, then you probably have the wrong firmware version.
TheWoost, I will try your solution with a properly configured Ni-6009 and see if it also improves performance. I tried it earlier with the incorrect firmware and the device stopped reading after two attempts.
Thanks to NI support for help on this issue.
Eric
04-26-2007 09:13 AM
04-26-2007 12:41 PM