« Tools · Electrical Calculators

Analog Signal Scaling (4-20 mA, 0-10 V)

Convert a transmitter signal to an engineering value or back; see the raw count on a PLC analog channel and a ready SCL line.

Calculations run in your browser; the data you enter is never sent to any server.
Results are for preliminary design and checking only. Final design must follow the applicable standards, the manufacturer's catalogue and approval by a qualified engineer; ZDK Mühendislik accepts no liability for how results are used.

How to use

  1. Choose the signal type (e.g. 4-20 mA) and the conversion direction.
  2. Enter the measuring range (e.g. 0 – 100 bar) and the value to convert.
  3. Engineering value, signal, percentage, PLC raw value and an SCL line appear.

Method and assumptions

  • Linear scaling: percent = (signal − low) / (high − low); value = min + percent × (max − min).
  • The PLC raw value uses 0…27648 for Siemens S7-1200/1500 unipolar ranges; confirm for your channel type.
  • On 4-20 mA, below 3.6 mA and above 21 mA are flagged as wire break/fault per NAMUR NE 43.

Example: a 0-10 bar transmitter on 4-20 mA

The transmitter sends 0-10 bar as 4-20 mA. If the channel reads 12 mA, percent = (12 − 4) / (20 − 4) = 50%, which is 5 bar. The PLC raw value is 13824 in the 0…27648 range.

S7 SCL line: "Scaled" := SCALE_X(MIN := 0, VALUE := NORM_X(MIN := 0, VALUE := "RawIn", MAX := 27648), MAX := 10);

4-20 mA reference (0-10 bar)

Signal (mA)PercentRaw valuePressure (bar)
40%00
825%69122.5
1250%138245
1675%207367.5
20100%2764810

Below 4 mA (3.6 mA) and above 21 mA are flagged as a broken wire or device fault, following NAMUR NE 43.

Common mistakes

  • Wrong lower limit: in 4-20 mA, 4 mA is zero, not 0 mA. A PLC seeing 0 mA should report a fault.
  • Not setting the channel type: the PLC analog input's current/voltage setting must match the transmitter.
  • Not knowing the raw range: Siemens unipolar is 0…27648; other vendors differ, check the channel documentation.
  • Not limiting the measured value: the signal can drift slightly outside the range; add limits in the logic.

Frequently asked questions

Why is the raw value 27648?

On Siemens analog input modules the nominal range of unipolar channels maps to 0…27648, leaving headroom for overrange.

What is the difference between 0-10 V and 4-20 mA?

4-20 mA is a current signal, robust against noise on long cables, and the 4 mA live zero allows wire-break detection. 0-10 V is a voltage signal: simpler but meant for short distances.

How do I use the SCL code?

Paste the line into a TIA Portal SCL block and replace the "RawIn" and "Scaled" tags with your own variables.

Why 27648?

Siemens S7-1200/1500 analog inputs digitise the unipolar range as 0…27648; it is the normalising base in the scale calculation.

What is the benefit of starting at 4 mA?

Even at zero value 4 mA flows, so 0 mA (a broken wire) can be told apart from a real zero.

Guide: How to Scale a 4-20 mA Signal in a PLC: Formula, Raw Value and an SCL Example

More tools