From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-07-2005 04:03 PM
09-08-2005 11:07 AM
09-08-2005 11:25 AM
Hello ElectricNathan,
You can set the min and max values therefore setting the range by using the AICreateVoltageChannel function. Then, you can call DAQmxGetAIMax or Min to verify what the values have been set to. When I use the Create Channel function and then get the values I have just set, they are what I expect.
To do this, I just modified an existing example that installed with the NI-DAQmx driver, you can find examples at: C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In
The configuration function calls I used are:
DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-2.5,2.5,DAQmx_Val_Volts,"");
DAQmxGetAIMax(taskHandle,"Dev1/ai0",&max);
Notice from the NI-DAQmx C Reference Help File that "max" is a float64.
Please let me know if this does not clear up the problem for you.
Thanks!
Laura
09-08-2005 01:07 PM
09-08-2005 03:56 PM
09-09-2005 11:03 AM - edited 09-09-2005 11:03 AM
Message Edited by ElectricNathan on 09-09-2005 11:06 AM
09-09-2005 11:15 AM - edited 09-09-2005 11:15 AM
Message Edited by ElectricNathan on 09-09-2005 11:17 AM
09-09-2005 11:35 AM