Look at the SCP instruction. I copied the following from the RS500 instruction help
Entering Parameters:
Input - Enter a value to be scaled. This can be a word address or an address of floating point data elements.
Input Min - Enter a minimum value for the input (low end of range). This value can be a word address, a long (double-word) address, an integer constant, floating point data element, or a floating point constant.
Input Max - Enter a maximum value for the input (high end of range). This value can be a word address, a long (double-word) address, an integer constant, floating point data element, or a floating point constant.
Scaled Min - Enter a minimum scaling value representing the low end of the range to which you want to scale the input. The scaling relationship is linear. The value can be a word address, a long (double-word) address, an integer constant, floating point data element, or a floating point constant.
Scaled Max - Enter a maximum scaling value representing the high end of the range to which you want to scale the input. The scaling relationship is linear. The value can be a word address, a long (double-word) address, an integer constant, floating point data element, or a floating point constant.
Output - Enter an address for the scaled value that is returned after the instruction is executed. This value can be a word address, a long (double-word) address or an address of floating point data elements. If any floating-point file types or floating-point constants are encountered in the above parameters, then the entire instruction is treated as floating point, and all immediate integer data values are converted to immediate floating-point data values.
Note: The input minimum, input maximum, scaled minimum, and scaled maximum are used to determine the slope and offset values. The input value can go outside of the specified input limits and no ordering is required. For example, the scaled output value will not necessarily be clamped between the scaled minimum and scaled maximum values.