06-28-2005 03:17 PM
06-29-2005 09:36 AM
06-29-2005 07:57 PM
@Tom W. wrote:
Hi Dan-
It sounds like you're looking for a way to set different input ranges for various channels in your analog input task to utilize the resolution of your card better.
In order to do this you can simply call the DAQmxCreateAIVoltageChan multiple times for channels of different ranges. It is useful to specify physical channels of the form "DevX/ai0:2" if you are using the same range and settings for each channel, but it is also allowed to create the channels seperately to reside in the same task. You would want to set up your channels as follows:
DAQmxCreateTask ("taskName", taskHandle);
DAQmxCreateAIVoltageChan (taskHandle, "Dev1/ai0", "", DAQmx_Val_Cfg_Default, minVal1, maxVal1, DAQmx_Val_Volts, NULL);
DAQmxCreateAIVoltageChan (taskHandle, "Dev1/ai1", "", DAQmx_Val_Cfg_Default, minVal2, maxVal2, DAQmx_Val_Volts, NULL);
[set task timing, etc]
DAQmxStartTask (taskHandle);
I hope this helps!
Thanks-