In this article, we will discuss the PLC analog Input scaling and its importance. The analog input card of an Allen-Bradley SLC500 programmable logic controller (PLC) uses a 16-bit analog-to-digital converter ( in its model 1746-NI4 ). The analog input card converts a 4-20 mA signal into a digital number whose range is from 3277 (corresponding to 4 mA) to 16384 (corresponding to 20 mA).

Programmable Logic Controller (PLC) has 4 types of Input and Output. Analog Input & Output as well as Digital Input & Output. Digital Input, as well as digital Output, have only 2 values defined in the PLC; either a low value or a high value. Hence, digital signals do not need scaling.

But in the case of Analog Input as well as analog Output, the value needs to be scaled because of infinite values in between the lower and upper range values. Analog input is very important because field devices like Pressure Transmitters, Flow transmitters, Level transmitters, and Temperature transmitters all transfer analog values to the PLC’s analog input card. The analog values are in form of mA whose range is 4 mA to 20 mA.

Let us consider one case in which our actual parameter of interest is temperature whose range is from 0 degree Centigrade to 1000 degree Centigrade.

**PLC Analog Input Scaling**

The field instrument (temperature transmitter in our case) receives input from Resistance Temperature Detector(RTD) or thermocouple or other primary temperature sensing element. The value of the temperature is in the range of 0 degrees Centigrade to 1000 degrees Centigrade. The temperature value is converted to a scale of 4 mA to 20 mA using the transmitter’s electronics or microprocessor and sent to the PLC. PLC’s Analog to Digital Converter (ADC) converts this 4 mA to 20 mA value into suitable values for further processing.

The below table shows various corresponding values for 0 degree Centigrade to 1000 degree Centigrade temperature value of field converted to 4 mA to 20 mA scale. There is also a column that shows the analog scaled values from 3277 to 16384 counts.

Temperature Value | mA Value | Analog Scaling |

0 | 4 | 3277 |

250 | 8 | 6553.75 |

500 | 12 | 9830.5 |

750 | 16 | 13107.25 |

1000 | 20 | 16384 |

Here we can calculate the slope of the line using the standard formula:

**y = mx + b**

where

x = lower range value of analog scaling

m= slope of the line

b is the intersection of the line on Y–axis or simply the y-intercept of the line

Let us solve this example

Solving for y-intercept

Hence, the equation for the line is;

Scaling is very common in all types of PLC. In Allen Bradley PLC, a special block for scaling is provided. The block for scaling is SCL. The block asks for rate and offsets for doing scaling instead of slope (m) and intercept (b) which we calculated in the above example. Hence the programmer should have the value of the rate and the offset.

One important thing to note is that the rate in the SCL block multiplied by 10000 as clearly mentioned in the block. This is done to make the number in fractions into an integer. The internal program of the SCL block makes the value normal by dividing the value by 10000 and then using it in the calculations.

For calculating the value of the rate for our example, we need slope i.e. ( 1000 / 13107 ) Then, we need to multiply the value by 10000 for using the value directly into the scaling block SCL.

We also need to put the value of offset which is “-250 ” in our case i.e. b from our earlier calculations. The SCL block also has a Source and Destination field. The source is the analog input channel number or any other address from where we need the value. At the destination address, the value will be stored.

Different PLC analog input cards have different analog scaling values or raw counts. Calculation of the rate as well as the offset plays a very important role. Any minor mistake can also lead to big problems.

One important point to consider while changing the value of the scaling block is that never change the value of the scaling block when the program is online. If the value is changed when the program is online, the changes will affect the functioning of the plant.