Data Acquisition Toolbox    

Linearly Scaling the Data: Engineering Units

The Data Acquisition Toolbox provides you with a way to linearly scale analog input signals from your sensor. You can associate this scaling with specific engineering units such as volts or Newtons that you might want to apply to your data. When specifying engineering units, there are three important considerations:

The properties associated with engineering units and linearly scaling acquired data are given below.

Table 5-13: Analog Input Engineering Units Properties
Property Name
Description
SensorRange
Specify the range of data you expect from your sensor.
InputRange
Specify the range of the analog input subsystem.
Units
Specify the engineering units label.
UnitsRange
Specify the range of data as engineering units.

Linearly scaled acquired data is given by the formula

The A/D value is constrained by the InputRange property, which reflects the gain and polarity of your hardware channels, and is usually returned as a voltage value. You should choose an input range that utilizes the maximum dynamic range of your A/D subsystem. The best input range is the one that most closely encompasses the expected sensor range. If the sensor signal is larger than the input range, then the hardware will usually clip (saturate) the signal.

The units range is given by the UnitsRange property, while the sensor range is given by the SensorRange property. SensorRange is specified as a voltage value, while UnitsRange is specified as an engineering unit such as Newtons or g's (1 g = 9.80 m/s/s). These property values control the scaling of data when it is extracted from the engine with the getdata function. You can find the appropriate units range and sensor range from your sensor's specification sheet.

For example, suppose SensorRange is [-1 1] and UnitsRange is [-10 10]. If an A/D value is 2.5, then the scaled value is (2.5)(20/2) or 25, in the appropriate units.


  Examples: Using Callback Properties and Functions Example: Performing a Linear Conversion