in the SLC 500 instruction set lookup the command SCP and SCL it provides several formulas for linear scaling
y=mx+b
where Y=scaled output
m=slope=(scaled max-scaled min)/input max-input min)
x=input value
b=offset(y intercept)=scaled min-(input min x m)
scaled value=(input value*rate)+offset
rate=(scaled max-scaled min)/(input max-input min)
offset=scaled min-(input min*rate
now you also have to check what range is used for your analog
for 0-10 volt range is 0-32767
for 4-20 ma range is 6242 to31208
attached is an article by Ron Beaufort on scaling