Popular plc programmingladder logicPLC tutorial for beginnersIEC 61131-3industrial automationPLC timers
Lesson 11 of 12

Analog signals: 4–20 mA, 0–10 V and scaling

In this lesson
  • Why 4–20 mA beats 0–10 V over long cables
  • How raw counts and resolution work
  • The scaling formula, with a calculator to check it
  • How to detect a broken wire and raise alarms

Not everything is ON or OFF. Tank level, pressure, flow, temperature and speed vary continuously. PLCs read and write these with analog signals.

Common analog signals

SignalRangeStrengthsWatch out for
Current4–20 mAImmune to cable resistance, long runs, detects broken wiresNeeds a loop supply
Voltage0–10 VSimple, common on drivesVoltage drop and noise on long cables
TemperatureRTD (Pt100), thermocoupleDirect sensor connectionNeeds a matching input module

Why 4 and not 0?

The “live zero” at 4 mA is clever. A transmitter at the bottom of its range still sends 4 mA, so 0 mA means a fault: a broken wire, a dead supply or a failed transmitter. With 0–20 mA or 0–10 V, a broken wire looks exactly like “empty tank”, which is dangerous. The 4 mA also gives a two-wire transmitter enough current to power its own electronics from the loop.

Because it is a current, the signal is the same at the PLC as at the transmitter, even through hundreds of metres of cable. That is why 4–20 mA has been the process industry’s standard for decades.

Wiring a two-wire transmitter

Most pressure and level transmitters are two-wire, loop-powered: the same two wires carry the power and the signal. Current flows from +24 V, through the transmitter, into the PLC’s analog input and back to 0 V. The transmitter regulates that current between 4 and 20 mA according to what it measures. Check whether your analog card supplies loop power itself or expects an external 24 V supply.

Raw counts and resolution

The analog input module converts the signal into a number, called raw counts. The range depends on the PLC:

  • Siemens S7-1200/1500: 0 to 27,648 for the nominal range.
  • Many others: 0 to 4,000, 0 to 32,000 or 0 to 65,535, depending on the module and settings.

A 12-bit module divides the range into 4,096 steps. On a 0–10 bar transmitter that is about 0.0025 bar per step: plenty for most jobs.

Scaling to engineering units

Nobody wants to read “13824” on a screen. Scaling converts raw counts into real units with a straight line:

value = LOW + (raw − RAW_MIN) × (HIGH − LOW) / (RAW_MAX − RAW_MIN)



Example: 0–10 bar transmitter, Siemens raw 0–27648, raw = 13824
value = 0 + (13824 − 0) × (10 − 0) / (27648 − 0) = 5.0 bar

Most PLCs have a ready-made scaling instruction (SCALE, SCP, NORM_X with SCALE_X, or a function block in the library). Do the maths in REAL (floating point) to keep the decimals. Check your numbers with the calculator:

4–20 mA scaling

Signal to engineering units and back

Formula and notes

EU = LO + (mA − 4) / 16 × (HI − LO) mA = 4 + 16 × (EU − LO) / (HI − LO)

Example: a 0–10 bar transmitter reading 12 mA is at 5 bar. Below 3.8 mA usually means a broken wire (NAMUR NE43).

Alarms and sanity checks

  • Wire break / under-range: below about 3.8 mA (NAMUR NE 43 recommends treating ≤ 3.6 mA as a failure). Raise a fault and put the process in a safe state.
  • Over-range: above about 20.5 mA means the measurement is beyond the transmitter’s span, or the transmitter has failed high.
  • Process alarms: high, high-high, low and low-low levels with a small hysteresis or delay so they do not chatter.
  • Filtering: a short average or the module’s built-in filter smooths a noisy signal, at the cost of slower response.

Analog outputs

Analog outputs work in reverse: the program writes a raw value and the module produces 4–20 mA or 0–10 V. A typical use is the speed reference to a variable frequency drive (VFD): 0 V = 0 Hz, 10 V = 50 Hz.

Frequently asked questions

Why is 4–20 mA preferred over 0–10 V?

Current signals are not affected by cable resistance, are less sensitive to noise, and the 4 mA live zero lets the PLC detect a broken wire.

What raw value does Siemens give for 20 mA?

On S7-1200 and S7-1500 analog inputs, the nominal range maps to 0–27648, so 20 mA reads 27648 and 4 mA reads 0 for a 4–20 mA input.

Knowledge check

Check your understanding

3 questions. Your best score is saved on this device.

1A 4–20 mA level transmitter reads 0 mA. What is the most likely cause?
2A 0–10 bar transmitter sends 12 mA. What is the pressure?
3Why should scaling be done with REAL numbers?