Data Acquisition Toolbox    
InputRange

Specify the range of the analog input subsystem

Description

InputRange is a two-element vector that specifies the range of voltages that can be accepted by the analog input (AI) subsystem. You should configure InputRange so that the maximum dynamic range of your hardware is utilized.

If an input signal exceeds the InputRange value, then an overrange condition occurs. Overrange detection is enabled only if the analog input object is running and a value is specified for the InputOverRangeFcn property. For many devices, the input range is expressed in terms of the gain and polarity.

AI subsystems have a finite number of InputRange values that you can set. If an input range is specified but does not match a valid range, then the next highest supported range is automatically selected by the engine. If InputRange exceeds the range of valid values, then an error is returned. Use the daqhwinfo function to return the input ranges supported by your board.

Because the engine can set the input range to a value that differs from the value you specify, you should return the actual input range for each channel using the get function or the device object display summary. Alternatively, you can use the setverify function, which sets the InputRange value and then returns the actual value that is set.

You should use InputRange in conjunction with the SensorRange property. These two properties should be configured such that the maximum precision is obtained and the full dynamic range of the sensor signal is covered.

Characteristics

Usage
AI, Channel
Access
Read/write
Data type
Two-element vector of doubles
Read-only when running
Yes

Values

The default value is supplied by the hardware driver.

Example

Create the analog input object ai for a National Instruments board, and add two hardware channels to it.

You can return the input ranges supported by the board with the InputRanges field of the daqhwinfo function.

To configure both channels contained by ai to accept input signals between -10 volts and 10 volts:

Alternatively, you can use the setverify function.

See Also

Functions

daqhwinfo, setverify

Properties

InputOverRangeFcn, SensorRange, Units, UnitsRange


  InputOverRangeFcn InputType