Rockwell programmers
I've never been fond of the method that Rockwell shows in that manual.
A better way is to do the same calculation that the SCP instruction uses:
((INPUT - INPUT_MIN) / (INPUT_MAX - INPUT_MIN)) * (SCALED_MAX - SCALED_MIN).
If you are using variable addreses for the parameters, then you'll need two intermediary registers for you calcuations. If you are just using constants, then it becomes easier.
You could also just use the SCL instruction (which is available in the PLC).
And before you ask, the two values would be:
RATE = 10000 * (SCALED_MAX - SCALED_MIN) / (INPUT_MAX - INPUT_MIN) ;
OFFSET = INPUT_MIN * (RATE / 10000)