Data Acquisition Toolbox
  Function/Property:
    Search    Help Desk 

Engineering Unit Conversion

The Data Acquisition Toolbox provides you with a method for converting analog input signals into values which represent specific engineering units (Newtons, degrees Celsius, etc.). When specifying engineering units (EU), there are three aspects to consider:

You can set engineering unit conversions for each channel of data. Therefore, the properties related to EU conversions can be set on a per-channel basis. These properties are given below.

Table 4-10: Engineering Units Properties
Property
Description
SensorRange

Expected range of data from sensor

InputRange

Range of A/D converter

Units

Engineering units name

UnitsRange

Range of data in MATLAB workspace

Note:
Only linear engineering unit conversions are supported. You can perform nonlinear conversions by creating the appropriate M-file function.

The InputRange property is often expressed in terms of a device's gain and polarity. If you set InputRange to a particular value, then gain and/or polarity will change accordingly. For example, if an analog input subsystem has a built-in voltage range of 10 volts, and if InputRange is set to [0 10], then polarity is automatically set to unipolar, but gain is unchanged.

Example: Performing a Linear Conversion

Suppose your task is to measure acceleration with an accelerometer. The sensor can measure acceleration up to +-10g (1 g = 9.80 m/s/s) and this range produces an output voltage from -3 to 3 volts. In addition, assume that you will use the full range of the accelerometer and the gain and polarity of your data acquisition hardware can be configured to match the sensor's output range. Furthermore, you want to display the acquired data in units of g's. This application is illustrated in the figure below.


This configuration is summarized below.

Table 4-11: Engineering Units Configuration
Name
Property
Property Value
Sensor range

SensorRange

[-3 3]

A/D range

InputRange

[-5 5]

Units range

UnitsRange

[-10 10]

The figure below shows the conversion between the input range of the A/D converter and the units range.


The code snippet below illustrates how you might configure the engineering units properties for a National Instruments board.



[ Previous | Help Desk | Next ]