Scale With Parameters


Introduction to Scale With Parameters (SCP)

The Scale With Parameters (SCP) instruction is used to convert raw data into Engineering Units. When we get data from an analog input module, such as the 1746-Ni8, we are getting raw counts. These raw counts are scaled linearly according to the input signal. 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.

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).

If we are online, we can open the I1 Data table, and see the raw counts that are coming into the processor. 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.

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 *

53 − = 50