OutputRange

Specify range of analog output hardware subsystem

Description

OutputRange is a two-element vector that specifies the range of voltages that can be output by the analog output (AO) subsystem. You should configure OutputRange so that the maximum dynamic range of your hardware is utilized. For many devices, the output range is expressed in terms of the gain and polarity.

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

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

Characteristics

Usage

AO, per channel

Access

Read/write

Data type

Two-element vector of doubles

Read-only when running

Yes

Values

The default value is determined by the hardware driver.

Examples

Create the analog output object ao for a National Instruments® board and add two hardware channels to it.

ao = analogoutput('nidaq','Dev1');
addchannel(ao,0:1);

You can return the output ranges supported by the board with the OutputRanges field of the daqhwinfo function.

out = daqhwinfo(ao);
out.OutputRanges
ans =
   0.0000    10.0000
  -10.0000   10.0000

To configure both channels contained by ao to output signals between -10 volts and 10 volts:

ao.Channel.OutputRange = [-10 10];

Alternatively, you can use the setverify function to configure and return the OutputRange value.

ActualRange = setverify(ao.Channel,'OutputRange',[-10 10]);

See Also

Functions

daqhwinfo, setverify

Properties

Units, UnitsRange

Was this topic helpful?