PLC Analog Input Simplified: 4 Essential Steps Every Beginner Must Master First

Share:

PLC Programming · Analog Input · 4-20 mA · Siemens S7-1500 · Process Control

PLC Analog Input Simplified: 4 Essential Steps Every Beginner Must Master First

Most beginners struggle to understand how a real-world signal actually enters a PLC. A PLC analog input takes a continuous physical measurement, such as tank level or pressure, converts it to a 4-20 mA electrical signal, and reads it through an analog input module for control, monitoring and alarms. This guide breaks down the complete signal path from sensor to PLC logic, explains why 4-20 mA is the industry standard, and shows a real Siemens S7-1500 example with a live scaling calculator.

4-Step Signal Path Why 4-20 mA Explained S7-1500 Real Example Live Scaling Calculator

PLC Analog Input: The 4-Step Signal Path Every Beginner Must Master

1
🌡
Sensor Measures

A sensor (level, pressure, flow, temperature transmitter) measures the physical process variable continuously.

2
Converts to 4-20 mA

The transmitter converts the measured value into a standardised 4-20 mA analog electrical signal.

3
💻
PLC Reads via AI Module

The PLC analog input (AI) module reads the current, converts it to a digital raw value (e.g. 0-27648 for Siemens).

4
🎛
Used for Control & Alarms

The PLC scales the raw value to engineering units (m, bar, °C) and uses it for control, monitoring and safety logic.

Advertisement
Advertisement

How a PLC Analog Input Module Receives the Signal

Sensor to PLC Analog Input : Complete Signal Flow
📊
Process Variable
Level, pressure, flow, temperature
📡
Transmitter
Outputs 4-20 mA current loop
🔌
AI Module
Converts mA to digital raw value
🖥
PLC CPU
Scales value, runs control logic

A PLC analog input module contains an Analog-to-Digital Converter (ADC) that samples the incoming 4-20 mA current at a fixed resolution, typically 12, 14 or 16 bits depending on the module. The PLC scan cycle reads this digital value every scan (typically every 10-100 ms) and the user program scales it from the raw integer to engineering units using linear scaling formulas.

Why 4-20 mA Is the Standard for PLC Analog Input Signals

🟢
Live Zero : Fault Detection

4 mA represents 0% of range, not 0 mA. If the cable breaks or the sensor fails, the PLC reads 0 mA, which is clearly below the valid range, immediately flagging a fault rather than a false zero process value.

📶
Noise Immunity

Current signals are far less affected by electrical noise than voltage signals. In a plant full of VFDs, motors and switching equipment, 4-20 mA remains accurate over long cable runs without screening complications.

🔌
Loop-Powered Simplicity

Two-wire transmitters draw their own power from the same 4-20 mA loop. No separate power cable is needed to the field device, simplifying wiring and reducing the cabling cost in large plants.

📏
Cable Length Independence

Current does not drop with cable resistance the way voltage does. A 4-20 mA signal is just as accurate over 500 metres of cable as it is over 5 metres, making it ideal for field instruments far from the control room.

4-20 mA Scale Explained for PLC Analog Input Programming

4-20 mA Signal Range and Fault Zones
0 mA 4 mA 12 mA 20 mA 24 mA
FAULT
(below 4 mA)
VALID RANGE: 4 mA = 0% · 12 mA = 50% · 20 mA = 100%
FAULT
(above 20 mA)
Always configure your PLC analog input module with diagnostic alarms for signal below 3.6 mA and above 20.5 mA per NAMUR NE43. This lets the PLC distinguish a genuine zero process reading from a broken wire or sensor failure, which is the entire reason 4-20 mA was chosen over 0-20 mA in the first place. Beginner Tip : Always Enable Wire-Break Detection

Real-World PLC Analog Input Example: Tank Level to Siemens S7-1500

Tank Level Control Example : Siemens S7-1500 PLC
1
Level transmitter on the tank measures 0-5 metres and outputs 4-20 mA proportional to level (4 mA = 0 m, 20 mA = 5 m).
2
4-20 mA signal travels via a 2-wire shielded cable to the AI module terminal in the Siemens S7-1500 analog input card (e.g. SM 1231 AI 8xU/I HS).
3
PLC reads raw value: 4 mA becomes a raw integer of 0, and 20 mA becomes a raw integer of 27648 (Siemens S7 normalised range).
4
Scaled in engineering units: TIA Portal program uses the NORM_X and SCALE_X function blocks to convert the raw value into a level reading in metres (0.00 to 5.00 m).
5
Used for pump control: The scaled level value triggers a pump START at 1.0 m (low level) and pump STOP at 4.5 m (high level), with high-high alarm logic at 4.8 m for overfill protection.

Siemens S7-1500 Analog Input Wiring for 4-20 mA Transmitters

Two-Wire 4-20 mA Transmitter to PLC Analog Input Module
LEVEL TRANSMITTER
24V loop powered
2-wire, 4-20 mA
S7-1500 AI MODULE
Terminal: I+ / I-
Internal 250 ohm shunt
PLC CPU
Reads raw value
Scales every scan cycle

The AI module's internal 250 ohm shunt resistor converts the 4-20 mA current into a 1-5 V signal that the ADC digitises. The PLC programmer never sees this voltage stage : TIA Portal presents it directly as a scaled raw integer.

Advertisement
Advertisement

PLC Analog Input Scaling Reference Table (Siemens S7 Normalised Values)

Input Current % of Range Raw Value (S7) Engineering Value (0-5m)
4.0 mA 0% 0 0.00 m
8.0 mA 25% 6912 1.25 m
12.0 mA 50% 13824 2.50 m
16.0 mA 75% 20736 3.75 m
20.0 mA 100% 27648 5.00 m

PLC Analog Input Scaling Formula Used in Ladder Logic and TIA Portal

Linear scaling formula for PLC analog input (mA to engineering units): EU = LRV + [(mA - 4) / 16] x (URV - LRV)

Where:
EU = engineering value (m, bar, °C etc.)
LRV = Lower Range Value (process value at 4 mA)
URV = Upper Range Value (process value at 20 mA)
mA = measured current

Siemens S7 raw value scaling (0-20mA card, normalised 0-27648): Raw value = (mA - 4) / 16 x 27648
EU = LRV + (Raw value / 27648) x (URV - LRV)

Example: mA = 16, LRV = 0 m, URV = 5 m EU = 0 + [(16-4)/16] x (5-0) = 0.75 x 5 = 3.75 m In TIA Portal, this scaling is built into the NORM_X (normalise 0.0-1.0) and SCALE_X (scale to engineering range) function blocks. The programmer configures LRV and URV once and the PLC performs this calculation automatically on every scan cycle, typically every 10-100 milliseconds.

PLC Analog Input Scaling Calculator

Enter your transmitter range and measured current to calculate the engineering value and the Siemens S7 raw value, exactly as the PLC would compute it internally.

🔢
PLC Analog Input Scaling Calculator
mA to engineering units · mA to Siemens S7 raw value
mA
mA
✔ Result
Advertisement
Advertisement

Quick FAQs: PLC Analog Input

What is a PLC analog input and how does it work?
A PLC analog input reads a continuous electrical signal, typically 4-20 mA, from a field sensor and converts it to a digital value the processor can use. The AI module's internal ADC samples the current and scales it to engineering units like metres or bar for use in control logic.
Why is 4-20 mA used instead of 0-20 mA for PLC analog inputs?
The 4 mA live zero lets the PLC distinguish a genuine zero reading from a fault. If the current drops to 0 mA, the PLC knows the wire is broken or the sensor failed, rather than incorrectly assuming the process value is actually zero.
What is the Siemens S7 raw value range for an analog input?
Siemens S7 PLCs normalise the analog input to a raw integer range of 0 to 27648 for the full input span (4-20 mA or 0-20 mA depending on configuration). The TIA Portal NORM_X and SCALE_X function blocks convert this raw value into engineering units automatically.
How does a PLC use analog input for pump control?
The PLC scales the analog input from the level transmitter into engineering units (metres), then compares this value against programmed setpoints to start or stop pumps. For example, START pump at 1.0 m and STOP at 4.5 m, with a separate high-high alarm for overfill protection.

External References

What we learn today

  • A PLC analog input follows 4 steps: sensor measures the process variable, transmitter converts it to 4-20 mA, the AI module reads the current and digitises it, and the PLC scales this to engineering units for control and alarm logic. The scaling formula is EU = LRV + [(mA-4)/16] x (URV-LRV), implemented in Siemens TIA Portal using NORM_X and SCALE_X function blocks.
  • 4-20 mA is the standard because of the live zero (4 mA = 0%, enabling fault detection below 4 mA), noise immunity from using current instead of voltage, loop-powered simplicity (no separate power cable needed), and accuracy independent of cable length. Siemens S7 PLCs normalise the signal to a raw integer range of 0-27648.
  • Real example: a tank level transmitter ranged 0-5 m outputs 4-20 mA to a Siemens S7-1500 AI module. The PLC scales the raw value (0-27648) into a level reading in metres, then uses this scaled value for pump start/stop control and high-high level alarm logic : exactly the kind of application every beginner should master before moving to more advanced PLC topics.
PLC Analog Input 4-20 mA Siemens S7-1500 TIA Portal Analog Input Module PLC Scaling NORM_X SCALE_X Live Zero PLC Programming Process Control Pump Control Logic Industrial Automation

Leave a Reply

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