I'm away from any real hw atm and writing some sw. Currently using NI's 7.4 driver with the virtual device to simulate.
Now regarding the daqmxwritefunctions... I've noticed they seem to return immediately... at least in the virtual device. So does this mean they do not block? The DAQmxReadAnalog functions seem to block... I check the written parameter immediately after the routines return and they always say the number of samples I've given. Earlier I was using some real hw (6229pci m series) and it was returning immedately as well when given 25000 samples with 4 outpus each configured for a 1000hz sample rate. Here's my code:
...
long status;
DAQmxCreateTask(taskName.c_str(), &task);
for(size_t i(0);i sstr<<"/ao"< std::string devuri(sstr.str());
status=DAQmxCreateAOVoltageChan(task,devuri.c_str(),
"",min_volt,max_volt,DAQmx_Val_Volts,NULL);
...
}
status=DAQmxCfgSampClkTiming(task,"OnboardClock",sampleRate,
DAQmx_Val_Rising,DAQmx_Val_ContSamps,samples);
long written;
long status(DAQmxWriteAnalogF64(task,samples,true,DAQmx_Val_WaitInfinitely,DAQmx_Val_GroupByChannel,currBuffer->ptr(),&written,NULL));