Back to tutorials

PLC Programming Advanced Mathematical Instructions – SCP | Scale With Parameters

Vladimir Romanov
March 5, 2019
Table of Contents


The SCP, also known as the scale with parameters, is an instruction which is commonly used for working with analog signals. It’s an instruction which can be utilized in ladder logic as well as function blocks. The instruction will take input, use input minimum & maximums parameters as well as outputs min/max parameters and convert the output scaling based on them.

The primary reason as to why you’d want to utilize this instruction is the fact that analog data will typically be meaningless as it comes into the Programmable Logic Controller or Input Card. The reason being is that the 4-20mA or 0 to 10 VDC signal is generally scaled to the largest scale. On an RSLogix 500 based PLC, this is typically 16

The CPT, also known as the compute, is an instruction which has extensive capabilities when it comes to mathematical and logic functions in ladder logic. This instruction allows the user to input a complex string of instructions composed of computational, operational and comparison functions and computes the result which is stored in the specified register. The instruction will work with operands used in the based instructions as well as many others.

The CPT instruction has many advantages as well as drawbacks. Based on personal experience, you should only use this instruction if absolutely necessary and the same could not be achieved with several basic instructions. In other words, you can compute an ADD instruction through the CPT, but you shouldn’t.

The drawbacks come from the fact that it’s not easy to see what’s going on with the logic within this particular instruction. Multiple operands interact with each other which leads to a confusing execution and inability to troubleshoot or tweak when needed.

Example & Usage of SCP

An SCP is composed of the following registers:

  • Input
  • Input Min
  • Input Max
  • Output
  • Output Min
  • Output Max

Each one of the registers is either an INT or a REAL value.

The input is the value which will be processed by the instruction. The limits will dictate the lowest and the highest values which can be seen through the input register. Do note that the instruction will allow negative values and will scale them accordingly.

The next two values specified within the instruction are the scaled parameters on the outputs side. These values will dictate the transformation applied to the input & imply the upper and lower limits of the output signal produced by the SCP.

The outputs of the instruction is a single integer or floating point value which is the transformation of the input. It can be used within the PLC logic just like any other register.

PLC SCP Instruction - Scale With Parameters RSLogix 500 Example for Analog Inputs Programming RSLogix 500

Data Types Allowed for SCL

The SCL take an input, output as well as four parameters. It’s highly recommended to use integers for the parameters for easier conversions, but they can be specified as floats as well.

  • Integer – You may specify each operand to be of “Integer” type.
  • Float – You may specify each operand to be of “Float” type.

Video Tutorial

Back to tutorials

Related Tutorials


PLC Programming Example Project - Batching Tank Ladder Logic PLC and HMI Tutorial

Generally speaking, there are two types of processes in manufacturing: discrete and analog. A discrete process is a manufacturing methodology that will produce separate widgets. In other words, a production line may output one item, two items, three items, etc. An analog production process is where the plant will create a quantity of product that is quantifiable by weight. Examples include the production of beverages, sauces, raw ingredients, etc. Although it is possible to design a flow that will continuously output the product, such production is often managed in batches. It is important to note that although batches are considered to be analog or continuous flow, most of them end up being packaged for consumption which converts them into a discrete manufacturing process.

September 14, 2020
Vladimir Romanov
PLC Programming Career

PLC Programming Certification - Complete Guide

You may choose to pursue a traditional college degree, learn through online tutorials, or take a course that will issue a plc programming certification upon completion. However, what is the best option, and what are the best PLC programming certifications?

August 6, 2020
Vladimir Romanov

Opto 22 groov RIO Getting Started

The groov RIO module from Opto 22 has been released only a few months ago. The groov RIO is a feature packed piece of hardware that is easy to install, configure and deploy for many different field applications. The module comes pre-loaded with an array of software tools used across the industry and is ready to hit the floor running out of the box. Furthermore, the module is equipped with user configurable input and output nodes that have the capability unlike anything else on the market.

August 2, 2020
Vladimir Romanov