Scaling Analog Input using SCL Instruction in PLC [Scale Data]
Use with processors SLC 5/02SLC 5/03SLC 5/04SLC 5/05 All MicroLogix
Use this instruction to scale data from your analog module and bring it into the limits prescribed by the process variable or another analog module. For example, use SCL to convert a 4-20 mA input signal to a PID process variable. Or use SCL to scale an analog input to control an analog output.
When rung conditions are true, this instruction multiplies the source by a specified rate.The rounded result is added to an offset value and placed in the destination. You can use indexed or indirect addresses for the source or destination parameters.
Equations used in calculating a linear relationship:
Scaled value = (input value x rate) + offset
Rate = (scaled max. - scaled min.) / (input max. - input min.)
Offset = scaled minimum - (input minimum x rate)
Values must be between -32768 and +32767 for the following parameters.
Source must be a word address.
Rate (or slope) is the positive or negative value you enter divided by 10,000. It can be a program constant or a word address. Offset can be a program constant or a word address. Destination is the address of the result of the operation.
Note: If the result of the Source times the Rate, divided by 10,000 is greater than 32767, the SCL instruction overflows, causing error 0020 (minor error bit) and places 32767 in the Destination. This occurs regardless of the current offset. If this occurs reset bit S:5/0 with your ladder program before the end of the current scan or else a major error will be declared.
Source: Rockwell Inc