08-28-2013 04:46 AM
Hi
is there an API for querying the valid range of input/output values on a given IO port?
For example:
DAQmxCreateAIVoltageChan(taskHandle,"Dev2/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL) fails on a USB-9234 device as its voltage ranges go from -5.0 to 5.0. An error message indicates that this is invalid.
DAQmx Error: Requested value is not a supported value for this property. The pro
perty value may be invalid because it conflicts with another property.
Property: DAQmx_AI_Min
Requested Value: -10.0
Valid Values Begin with: -5.0
Valid Values End with: 5.0
Is there any way to know in advance wat the valid voltage ranges are (other than hardcoding it to device names)?
08-28-2013 01:02 PM
You'll want to use:
int32 __CFUNC DAQmxGetDevAIVoltageRngs(const char device[], float64 *data, uInt32 arraySizeInElements);
Best Regards,
08-29-2013 01:36 AM
Thanks. This was unfortunatly a double post.