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

Most pressure, level and temperature transmitters send their measurement as a 4-20 mA current signal. The PLC converts it to an integer (the raw value), and the program must turn that number back into an engineering unit such as bar, metres or °C. This is called scaling.

Why 4-20 mA?

  • A current signal is less affected by noise on long cables than a voltage signal.
  • 4 mA is a "live zero": if the signal falls to 0 mA, the wire is broken or the device has failed.

Scaling formula

Scaling is linear:

Value = Min + (Signal − 4) / (20 − 4) × (Max − Min)

Example: a 0–10 bar pressure transmitter sends 12 mA:

(12 − 4) / 16 = 0.5 → 0 + 0.5 × 10 = 5 bar

In reverse, the expected signal for 2.5 bar is 4 + (2.5 / 10) × 16 = 8 mA, which you can check in the field with a multimeter.

PLC raw value

On Siemens S7-1200 and S7-1500 analog inputs the nominal range maps to 0…27648. On a 4-20 mA channel 4 mA = 0 and 20 mA = 27648. In the example above, 12 mA reads as 13824.

Scaling in TIA Portal with SCL

"Pressure" := SCALE_X(MIN := 0.0,
                      VALUE := NORM_X(MIN := 0, VALUE := "RawValue", MAX := 27648),
                      MAX := 10.0);

NORM_X reduces the raw value to 0–1, and SCALE_X maps that ratio to the engineering range.

Fault detection

Following NAMUR NE 43, values below 3.6 mA and above 21 mA are treated as faults. Monitoring these limits lets you raise alarms for wire break and sensor failure.

Ready-made calculator

Our Analog Signal Scaling tool converts 4-20 mA, 0-20 mA and 0-10 V signals both ways and gives the PLC raw value and an SCL line for your own range.

Free tools related to this article

Projeye Destek Olun!

Bu ücretsiz içeriği faydalı buluyorsanız ve sitenin gelişimine, yeni içerikler eklenmesine katkıda bulunmak isterseniz, küçük bir kahve ısmarlayarak destek olabilirsiniz. Desteğiniz benim için çok değerli!

Bir Kahve Ismarla

« Tüm Yazılara Geri Dön