Back to tutorials
Intermediate

PLC Programming Advanced Mathematical Instructions – SCP | Scale With Parameters

By
Vladimir Romanov
|
March 5, 2019
Table of Contents

Introduction

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

Got a question or comment?

Related Tutorials

Beginner

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
|
By
Vladimir Romanov
Beginner

Micro800 PLC Programming Getting Started

The Micro800 Control Systems by Rockwell Automation provide a cost effective solution for small to medium automation systems. The controllers within this family are typically used on stand alone machines or small process applications. The family offers five distinct controller types that are further customizable through add-on modules: Micro810, Micro820, Micro830, Micro850 and Micro870.Micro800 Programmable Logic Controllers Getting StartedUnlike the other Rockwell Automation controllers, this line of PLCs is programmed through a dedicated software: Connected Components Workbench. From within this tool, the programmer can flash the firmware, load the program and monitor the state of the controller. Furthermore, Connected Components Workbench (CCW) is often used to program other non-PLC Rockwell Automation devices such as Variable Frequency Drives (VFDs) and certain Safety Relays.

July 26, 2020
|
By
Vladimir Romanov
Beginner

An Introduction to DeviceNet Industrial Networks

In this tutorial you will learn about the DeviceNet industrial network, go over a basic offline configuration, and explore some advanced features.

July 24, 2020
|
By
Jacques Venter