TechTalk – RSLogix 5000 : Analog Input ScalingLinear interpolation is a technique used to to fit an algebraic equation using linear polynomials. Long and short of it, it “assumes” that the rate of x-axis changes is directly proportional to the rate of change of y-axis.

What do I mean by that? See the diagram below.

Xybernetics RSLogix5000 - Analog Input Scaling

y=mx+c

Where,
c is a constant (could be zero to simply)
m is the gradient

It can also be simplified by using the following linear interpolation equation.

Xybernetics RSLogix5000 - Analog Input Scaling

Graphically, it can be drawn as this.

Xybernetics RSLogix5000 - Analog Input Scaling

Ok enough of math.

This is how we would write a RSlogix 5000 PLC logic using the linear interpolation equation above (without c constant). This technique is also known as scaling and is used to convert raw value (4 to 20 mA) to engineering unit (it could be kPa, psi, deg C, etc).

Xybernetics RSLogix5000 - Analog Input Scaling

Reference
Wiki – Linear Interpolation