Scale With Parameters (SCP)


Introduction to Scale With Parameters (SCP)

We use the Scale With Parameters (SCP) instruction to convert raw data into Engineering Units. Examples of engineering units are Percent, RPM, Pounds of pressure, gallons per minute, etc. The data we get from an analog input module, such as the 1746-NI8, is called “raw counts”. We need to scale these raw counts to convert them to engineering units. In this post, we will assume the analog module is already configured. If not, consult the owners manual for the analog module.

In this case, we have a pressure transmitter. The pressure transmitter is configured and calibrated to provide a signal of 4 to 20 milliamps to the controller. This 4 to 20ma represents 0 to 200 PSI.

Overview

The analog input module does not know how the transducer is calibrated, so the analog input module simply provides raw counts to the controller. The range of the raw counts depend on the way you configure the analog module. In this example, the analog input module is set up to place a value of 4000 to 20000 into the Input data table. This number represents 4 to 20ma.

The reason for these numbers are “resolution”. If the analog module only placed the value of 4 to 20 into the input table, we would only have 16 counts of resolution. By placing 4000 to 20000 into the data table, we now have 16000 counts of resolution (much smaller increments).

Being online, we will open the I1 Data table, and see the raw counts that are in the processor’s memory. After opening the Input data table, look at channel 0 of slot 3. Additionally, be sure the table is in the Decimal Radix.

SCP Instruction

Finally, we will set up the SCP command. We need to take the 4 to 20ma (4000 to 20000 raw) and convert this back to 0 to 200psi. We will place the answer into N7:0. Since we see above the value we are getting is 12000, that is exactly half way between 4000 and 20000. Therefore N7:0 should read 100 psi.

The input is the memory location that we are getting the raw data from. In this case, that is I:3.0. The raw min and max is what I:3.0 reads when the transducer is at 0 psi, and 200 psi. In this case, that would be 4000 to 20000. The Scaled Min and Max is the engineering units of the transducer. For this example, that would be 0 to 200psi. The answer is placed in N7:0.

Now, N7:0 represents the pressure the transducer is reading, and can be used in our logic for alarms, and other actions, such as starting a booster pump if the pressure gets too low.

Summary of the SLC-500 Scale With Parameters (SCP) Instruction

In Short, the SCP instruction scales analog data. You might be using this on every analog signal. The SCP instruction only needs a few parameters to scale your data. You will need to know the input minimum raw and maximum raw. Additionally, you will need to know the minimum and maximum values to which you need to scale your data. After that, just set up the input to point to your analog input channel. The output of the instruction will be where you store the scaled value from the SCP.

This makes scaling data very easy in the SLC-500 processor. Without this SCP instruction, you would need to manually calculate the scale using the slope intercept formula. You probably remember doing this in second grade: Y=MX + B!

For more information about the SLC 500, visit the SLC 500 Category Page!

— Ricky Bryce

Leave a comment

Your email address will not be published. Required fields are marked *