UnitsRange

Specify range of data as engineering units

Description

You use UnitsRange to scale your data to reflect particular engineering units.

For analog input objects, the data is scaled while it is extracted from the engine with the getdata function according to the formula

scaled value = (A/D value)(units range)/(sensor range)

The A/D value is constrained by the InputRange property, which reflects the gain and polarity of your analog input channels. The sensor range is given by the SensorRange property, which reflects the range of data you expect from your sensor.

For analog output objects, the data is scaled when it is queued in the engine with the putdata function according to the formula

scaled value = (original value)(output range)/(units range)

The output range is constrained by the OutputRange property, which specifies the gain and polarity of your analog output channels.

For both objects, you can also use the Units property to associate a meaningful label with your data.

Characteristics

Usage

AI, AO, per channel

Access

Read/write

Data type

Two-element vector of doubles

Read-only when running

No

Values

The default value is determined by the default value of the InputRange or the OutputRange property.

See Also

Functions

getdata, putdata

Properties

InputRange, OutputRange, SensorRange, Units

Was this topic helpful?