PLC Analog Input Scaling – Formula, Methods, and Complete Guide

Published on July 16, 2024 | Category: introduction

Share this Page:

PLC analog input scaling is the process of converting raw analog signal values, such as those from sensors or transmitters, into meaningful engineering units that can be used in control logic. For example, a 4–20 mA current signal from a temperature transmitter may correspond to 0–100°C. Scaling ensures accurate process measurement and control, avoiding misinterpretation of sensor data.

This guide explains how PLCs handle analog scaling, the different methods available, step-by-step programming examples, and best practices for reliable industrial automation. Whether you are working with Allen Bradley, Siemens, or any other PLC platform, the principles remain the same.

PLC analog input scaling converts raw analog values from sensors or transmitters into engineering units for process control. The standard scaling formula is:
Scaled Value = ((Raw Value – Raw Min) × (EU Max – EU Min) ÷ (Raw Max – Raw Min)) + EU Min. This ensures the PLC interprets the signal correctly, avoiding inaccurate readings.

In this guide, you’ll learn scaling concepts, formula applications, step-by-step programming examples, and best practices for Allen Bradley, Siemens, and other PLC systems. Scaling is essential for accurate measurements in temperature, pressure, flow, and other industrial processes.

Types of Analog Input and Output in PLCs

Analog signals in PLC systems can be categorized by the type of measurement and the signal standard they use. These signals represent continuous values, such as temperature, pressure, or flow, and are crucial for process control.

Understanding the type of analog signal is the first step before applying scaling, as the raw input range directly affects the conversion to engineering units.

img/analog-scaling/what-is-analog-scaling.webp

What is Analog Scaling?

Analog scaling is the process of converting analog input and output to meaningful real engineering units for display and control. This conversion is based on the straight-line equation Y = M × X + b, where:

The scalar defines how many engineering units each raw input count represents. Offsets are applied when the engineering units start at a value other than zero, such as with a 4–20 mA current loop.

PLC Analog Scaling Formula

The PLC analog scaling formula is used to convert the raw digital value from an analog input module into meaningful engineering units (°C, PSI, liters, etc.). It is calculated as:

img/analog-scaling/what-is-analog-scaling-formula.webp img/analog-scaling/raw-value-diagram.webp

What is Raw Value and How to Calculate It

The Raw Value is the direct digital count that a PLC’s analog input module produces after converting a sensor’s electrical signal (e.g., 4–20 mA or 0–10 V) using its internal ADC (Analog-to-Digital Converter). It is not in engineering units like °C, meters, or PSI — it’s simply the “raw” number from the hardware.

Key Points:

How to Calculate Raw Value:

  1. Identify the input signal type and range (e.g., 4–20 mA or 0–10 V).
  2. Check the module specifications for its raw count range:
    • Example: 4–20 mA on a 16-bit card → Raw Min = 6553, Raw Max = 32767
    • Example: 0–10 V on a 15-bit card → Raw Min = 0, Raw Max = 32767
  3. Apply the ADC conversion formula if needed:
    Raw Value = (Signal Value ÷ Signal Full Scale) × Max Raw Count
  4. Or simply read it directly from the PLC tag (most practical method).

Example:

Sensor output: 12 mA
Module: 16-bit, range = 4–20 mA → Raw Min = 6553, Raw Max = 32767

Step 1: Signal span = 20 mA − 4 mA = 16 mA
Step 2: Raw span = 32767 − 6553 = 26214
Step 3: Position in span = 12 mA − 4 mA = 8 mA
Step 4: Fraction of span = 8 ÷ 16 = 0.5
Step 5: Raw Value = (0.5 × 26214) + 6553
Raw Value = 13107 + 6553 = 19660

So when the sensor outputs 12 mA, the PLC analog input tag will show approximately 19660.

Raw Value is the digital output (ADC count) produced by the PLC analog input module after it converts the sensor's analog signal (e.g. 4–20 mA or 0–10 V). It is not yet in engineering units — it is the raw count that you later map to °C, PSI, meters, etc.

Raw Value (estimation) formula

Raw Value = ((Signal - Signal Min) ÷ (Signal Max - Signal Min)) × (Raw Max - Raw Min) + Raw Min

Where:

PLC Analog Scaling Example

Scaling converts a PLC’s raw input counts into real-world engineering units. The general formula is:

Scaled Value = ((Raw − RawMin) ÷ (RawMax − RawMin)) × (EngMax − EngMin) + EngMin

Example 1 — 4–20 mA Sensor: A sensor outputs 12.0 mA, with 4 mA = 3277 and 20 mA = 16384 on the PLC card.

Example 2 — Temperature Transmitter: Range: 0–200°C, Raw range: 0–65536. Scalar = 200 ÷ 65536 ≈ 0.0030518°C/count. If Raw = 25000 → Temperature ≈ 76.3°C.

Tip: Always confirm RawMin and RawMax by sending actual min/max signals to the PLC card.

Example Of Scaling in PLC

This example uses an RLT series level sensor (4–20 mA output) connected to a PLC analog input module. We will show how to determine raw min/max values, apply the universal scaling formula, and compute a live engineering-unit level reading.

Wiring / connection overview

img/analog-scaling/analog-scaling-connection.webp

Universal scaling formula

Scaled Value = ((Raw Value - Raw Min) × (EU Max - EU Min)) ÷ (Raw Max - Raw Min) + EU Min

How to determine Raw Min and Raw Max (practical)

  1. Consult the PLC analog module datasheet for expected resolution and factory full-scale counts (e.g., 16-bit = 0–65535 or signed ranges). This gives a starting point.
  2. Physically force the input to the sensor's low signal (4 mA) and read the PLC tag — record that reading as Raw Min.
  3. Physically force the input to the high signal (20 mA) and read the PLC tag — record that reading as Raw Max.
  4. If you cannot force current, use the documented mapping in the module manual or use a calibrated transmitter and read the tag at known process points (e.g., empty/full tank).

Example (worked numeric)

Assumptions / system specifics:

Apply the formula:

Level_m = ((RawValue - RawMin) × (EUmax - EUmin)) ÷ (RawMax - RawMin) + EUmin

Level_m = ((27,000 - 5,000) × (5.0 - 0.0)) ÷ (60,000 - 5,000) + 0.0
        = (22,000 × 5.0) ÷ 55,000
        = 110,000 ÷ 55,000
        = 2.0 m

So a raw reading of 27,000 maps to 2.0 m level.

Notes & best practices