05-08-2015 06:54 AM
How to acquire from various AI channels simultaneously with a different range for each one?
In LabView I have found some examples but in C there isn't seem to be any.
Solved! Go to Solution.
05-08-2015 10:35 AM
One possibility is to create virtual channel in MAX, each with the appropriate range, and then programmatically add the channels to the acquisition task with DAQmxAddGlobalChansToTask
05-08-2015 10:50 AM
Or you can add channels one by one with individual instructions: the follwing code compile and runs with no errors on a vitual daq device:
err = DAQmxCreateTask ("", &taskH); err = DAQmxCreateAIVoltageChan (taskH, "Dev1/ai0", "AI0", DAQmx_Val_Cfg_Default, -5.0, 5.0, DAQmx_Val_Volts, ""); err = DAQmxCreateAIVoltageChan (taskH, "Dev1/ai1", "AI1", DAQmx_Val_Cfg_Default, -10.0, 10.0, DAQmx_Val_Volts, ""); DAQmxStartTask (taskH); err = DAQmxReadAnalogF64 (taskH, 5, 10.0, DAQmx_Val_GroupByChannel, val, 10, &read, 0); DAQmxClearTask (taskH);