Scaling offset when > 32,767 or < -32,768, Scaling offset when > 32,767 or < -32,768 -14, Calculating the linear relationship -14 – Rockwell Automation 1746-XXXX SLC 500 4-Channel Analog I/O Modules User Manual User Manual
Page 76: Calculating the linear relationship

Publication 1746-UM005B-EN-P - June 2004
6-14 Programming Examples
Scaling Offset when
> 32,767 or < -32,768
There may be applications when the offset value put into standard
math instructions is greater than 32,767 or less than -32,768. In these
cases, it is easier to shift the linear relationship along the input value
axis and reduce the values.
This example is similar to the situation described in Example 2, except
the 4 mA to 20 mA signal is scaled to a value between 90-100%. The
NIO4I is located in slot 2 and the output device is wired to channel 0.
The following graph displays the linear relationship.
Calculating the Linear Relationship
Use the following equations to calculate the scaled units:
Scaled value = (input value x slope)+ offset
Slope = (scaled max. - scaled min.) / (input max. - input min.)
(31,208 - 6,242) / (100 - 90) = 24,966/10
Offset = scaled min. - (input min. x slope)
6242 - (90 x (24,966/10)) = -218,452
Scaled value = (input value) x (24,966/10) - 218,452
Notice the offset value is less than -32,768.
Scaled
Value
Input Value
(input min.)
100%
(input max.)
90%
20 mA = 31208
(scaled max.)
4 mA = 6242
(scaled min. )