Data Acquisition Toolbox | ![]() ![]() |
Specify the range of the 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, 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.
Example
Create the analog output object ao
for a National Instruments board and add two hardware channels to it.
You can return the output ranges supported by the board with the OutputRanges
field of the daqhwinfo
function.
To configure both channels contained by ao
to output signals between -10 volts and 10 volts:
Alternatively, you can use the setverify
function to configure and return the OutputRange
value.
Functions
Properties
![]() | NativeScaling | Parent | ![]() |