The SCALE function accepts an integer value (IN) and converts it to a real value in engineering units between the lower and upper limits (LO_LIM and HI_LIM). Write the result to OUT. The SCALE function uses the following equation:
OUT = [ ((FLOAT (IN) -K1)/(K2-K1)) * (HI_LIM-O_LIM)] + LO_LIM
Constant K1 and K2 are set according to whether the input value is BIPOLAR or UNIPOLAR. BIPOLAR: The input integer value is assumed to be between ?7648 and 27648, so K1 = -27648.0, K2 = +27648.0 UNIPOLAR: The input integer value is assumed to be between 0 and 27648, so K1 = 0.0, K2 = +27648.0
If the input integer value is greater than K2, the output (OUT) will be clamped at HI_LIM and an error will be returned. If the input integer value is less than K1, the output will be clamped at LO_LIM and an error will be returned.
Reverse calibration can be obtained by setting LO_LIM > HI_LIM. When using inverse transformation, the output value will decrease as the input value increases.