Maple Systems OIT Family (ASCII) User Manual
Page 41

Note: When the OIT operator enters data into a register monitor that has the Adjustable
Decimal Point Location enabled, the OIT operator does not enter the decimal point, but
simply enters the raw number. Once the data has been entered into the OIT register, the
correct decimal position will be shown.
Linear Scaling
Linear Scaling is available on the Signed, Decimal and Long register monitor formats. Linear
Scaling is the term used to describe the process of converting one unit of measure to another, usu-
ally from a machine format to an operator-readable format, so the OIT operator has the data pre-
sented in readily understandable terms. A common application involves converting analog or
digital data into degrees, speed, voltage, or temperature. If linear scaling is used on a read/write
register monitor, the OIT operator can modify the data in the operator-readable format and it will
be converted back into the machine format before being sent to the OIT register.
The linear scaling conversion is accomplished using the simple equation Y = MX + B, where
‘X’ is the raw data read from the OIT register, ‘Y’ is the data presented to the OIT operator af-
ter the data conversion, ‘M’ is used to convert the scale of one unit of measure to another unit
of measure, and the offset variable ‘B’ is used for alignment.
For example, if an 8-bit A/D converter (255 steps) is used to measure voltage ranging from 0
to 15 volts, the raw data needs to be reduced so that a value of 255 A/D units equals 15 volts.
The OIT needs to multiply the raw data by 1/17 (255/15=17) to properly convert the data into
volts. Since the A/D value of 0 correctly represents 0 volts, the variable B is not used. The
equation for this example would be Y=(1/17)X + 0.
Let’s look at a similar example. Suppose an 8-bit A/D converter (255 steps) is used to measure
voltage ranging from 5 to 20 volts. Now we need to do two things, adjust the A/D range of
0-255 down to a range of 15 volts (20 volts-5 volts), and offset the data so that an A/D value of 0
represents 5 volts. Let’s start with the range conversion. As in the previous example, M is cal-
culated by dividing the A/D range by the voltage range (255/15=17). Since we are reducing the
raw data, M must be 1/17. Now to offset the raw data so that an A/D value of 0 represents 5
volts, set B to 5. The equation for this example would be Y = (1/17)X + 5.
The multiplier M can be entered in as a fraction which allows both range expansion and
range reduction. To expand the range of the raw data, make sure the numerator (top number)
is greater than the denominator (bottom number). To reduce the range of the raw data, make
sure the numerator is less than the denominator. In the previous examples, M would be speci-
fied as 1/17.
16-bit OIT registers using the Signed or Decimal formats and 32-bit OIT registers using the
Long format can be converted using linear scaling. Therefore, the input variable X, which rep-
resents the raw OIT register value, can be a signed integer, unsigned integer, or signed long in-
teger value. The output variable Y is determined by the linear equation. Therefore, it may be a
positive or negative number with a maximum range of -2,147,483,648 to +2,147,483,647.
When using low and high limits, the values should be entered in the unit of measure being
used by the OIT operator not the unit of measure being used by the OIT register.
The OIT always performs integer arithmetic when calculating the linear scaled values
to be displayed. Therefore, you should be aware of what kind of accuracy you wish to
have when using linear conversion. For example, if the OIT was converting degrees
Celsius to degrees Fahrenheit using the formula (Y=(9/5)X+32), 1ºC would be con-
40
OIT Family Operation Manual (ASCII)
1010-0088, REV02