06-11-2008 01:04 PM
06-12-2008 07:41 PM
Hi John,
No problem, that’s what I’m here for. To answer your question, it is definitely possible to acquire from two channels.
DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0:1","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
As you can see, it is as simple as adding a colon followed by the next channel. So, the callback function retrieves two values each time it’s called. Make sure to change the Array Size in Samples parameter (in DAQmxReadAnalogF64) to 2 for 2 channels.