Data Acquisition Toolbox | ![]() ![]() |
Linearly Scaling the Data: Engineering Units
The Data Acquisition Toolbox provides you with a way to linearly scale data as it is being queued in the engine. You can associate this scaling with specific engineering units such as volts or Newtons that you might want to apply to your data.
The properties associated with engineering units and linearly scaling output data are given below.
Property Name |
Description |
OutputRange |
Specify the range of the analog output hardware subsystem. |
Units |
Specify the engineering units label. |
UnitsRange |
Specify the range of data as engineering units. |
For many devices, the output range is expressed in terms of the gain and polarity.
Note You can set the engineering units properties on a per-channel basis. Therefore, you can configure different engineering unit conversions for each hardware channel. |
Linearly scaled output data is given by the formula
The units range is given by the UnitsRange
property, while the output range is given by the OutputRange
property. UnitsRange
controls the scaling of data when it is queued in the engine with the putdata
function. OutputRange
specifies the gain and polarity of your D/A subsystem. You should choose an output range that encompasses the output signal, and that utilizes the maximum dynamic range of your hardware.
For sound cards, you might have to adjust the volume control to obtain the full-scale output range of the device. Refer to Sound Cards to learn how to access the volume control for your sound card.
For example, suppose OutputRange
is [-10 10]
, and UnitsRange
is [-5 5]
. If a queued value is 2.5, then the scaled value is (2.5)(20/10) or 5, in the appropriate units.
![]() | Examples: Using Callback Properties and Callback Functions | Example: Performing a Linear Conversion | ![]() |