Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

query valid input voltage range

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)?

0 Kudos
Message 1 of 3
(3,163 Views)

You'll want to use:

 

int32 __CFUNC DAQmxGetDevAIVoltageRngs(const char device[], float64 *data, uInt32 arraySizeInElements);

 

 

Best Regards,

John Passiak
Message 2 of 3
(3,148 Views)

Thanks. This was unfortunatly a double post.

0 Kudos
Message 3 of 3
(3,138 Views)