## software scaling Equation Generator(ACECATECH APP. 1.6)

This online app. generates software scaling equation for PLC controller analog programming. this app may be invaluable for engineers and technicians who may wish to write their own math routines for scaling analog signals as well as having the leeway to control the process flags. it may be particularly important for those who wish to program a PLC that do not have inbuilt routines for scaling analog signal. The app also generate equation for PLC that do not have integer math capabilities.

Here our first result is suitable for float math where our underlying equation is base on the scaling equation:

Xo={(Xo(max)-Xo(min))/(Xi(max)-Xi(min))}(Xi-Xi(min))+Xo(min)
which expands to:
Xo={(Xo(max)-Xo(min))/(Xi(max)-Xi(min))}(Xi)+Xo(min)-{(Xo(max)-Xo(min))/(Xi(max)-Xi(min))}(Xi(min))

where:
Xi is the input/raw data,
Xi(min) is the lower range of the raw data
Xi(max) is the upper range of the raw data
Xo is the process variable or engineering unit,
Xo(min) is the lower range of the process variable or engineering unit
Xo(max) is the upper range of the process variable or engineering unit

The above equation simplifies to equation of a straight line given as:

Xo=mXi+C

where m is the slope/rate of the line and is given as:

m=(Xo(max)-Xo(min))/(Xi(max)-Xi(min)),

C is the intercept given as:

C=Xo(min)-{(Xo(max)-Xo(min))/(Xi(max)-Xi(min))}(Xi(min))

The second result is specially designed for controllers with only integer math capability. the underlying scaling equation is based on:

Xo={(Xo(max)-Xo(min))/(Xi(max)-Xi(min))}(Xi-Xi(min))+Xo(min)