The 4–20 mA current loop is the dominant analogue signal standard in industrial process control. A transmitter (pressure, temperature, flow, level) converts a physical measurement to a proportional current: 4 mA represents the minimum of the measurement range, 20 mA represents the maximum. The 4 mA “live zero” is the feature that makes the standard so robust — a broken wire reads 0 mA, which is unambiguously different from a genuine minimum measurement.
Inside the PLC, the analogue input module converts the 4–20 mA signal to a raw integer via an analogue-to-digital converter (ADC). A 12-bit card produces values from 0 to 4095; a 16-bit card produces 0 to 65535. Your ladder logic or structured text program then scales that integer to an engineering unit (bar, °C, m³/h) using the linear interpolation formula the calculator above implements in real time.
Getting the scaling right matters in three ways: incorrect engineering-unit display misleads operators; incorrect PID setpoint comparison causes process upsets; incorrect alarm limits trigger nuisance trips or, worse, miss real faults. The formula is straightforward but there are two gotchas that catch beginners — using the raw ADC span instead of the mA span, and forgetting to handle the live-zero offset (subtracting 4 before dividing by 16, not dividing by 20).
The general formula
For mA to engineering units: EU = EU_min + (mA − 4) / 16 × (EU_max − EU_min).
For raw ADC counts to engineering units: EU = EU_min + (raw − raw_min) / (raw_max − raw_min) × (EU_max − EU_min).
In IEC 61131-3 Structured Text: EU := EU_min + (REAL(raw) - raw_min) / (raw_max - raw_min) * (EU_max - EU_min);
Fault detection with the live zero
Because 4 mA is the minimum valid signal, most PLCs support configuring analogue input alarms at 3.6 mA (wire break / sensor loss) and 21 mA (over-range / transmitter saturation). When you configure these limits, the PLC sets a status bit you can use in your ladder program to inhibit PID control or trigger an operator alarm before a scaling error propagates into the process.
Where to practice
The simulator’s analogue scenarios — including the 4-20 mA Process Control and Pump Pressure scenarios — require you to write the scaling ladder rung as part of the program. The auto-grader tests both the scaled output value and the fault-detection coil. If the formula above makes sense on paper but breaks down when you implement it, the grader will tell you exactly which test case failed and what it expected.