SCP [Scale with Parameters]
Description
This output instruction consists of six parameters. Parameters may be integer, floating point, or immediate data values or addresses containing values. The Input value is scaled to a range determined by creating a linear relationship between input min and max values and scaled min and max values. The scaled result is returned to the address indicated by the output parameter.
You can use indexed addressing (with SLC only) or indirect addressing.
Data filetypes MG (message) and PID are available to indirectly address parameters when using the MicroLogix 1200 or 1500 controller.
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.
Rockwell Software