Skip to content

4-20 mA Scaling Calculator

Convert current and voltage signals to measured values, find the PLC raw value and copy the ready-to-use SCL code.

Sensor measuring range
What do you want to enter?

Measured value

5

Signal

12 mA

PLC raw value

13,824

Share of measuring range

50 %

The value is within the valid measuring range.

Scaling in SCL (Siemens S7-1200 / S7-1500)

// raw 0 ... 27648  ->  0.0 ... 10.0
#value := SCALE_X(MIN := 0.0,
                  VALUE := NORM_X(MIN := 0, VALUE := #raw, MAX := 27648),
                  MAX := 10.0);

This is a purely mathematical calculation. Always rely on the datasheets of your sensor and analog module and on your controller configuration. No warranty.

How 4-20 mA scaling works

A sensor with a 4-20 mA output maps its measuring range linearly to the current: 4 mA is the start of the range and 20 mA is the end. The formula is: value = range start + (I − 4 mA) ÷ 16 mA × (range end − range start).

Example: a 0 … 10 bar pressure sensor at 12 mA gives (12 − 4) ÷ 16 × 10 = 5 bar.

Common values at a glance

SignalShare of measuring rangeRaw value
Siemens S70 … 27648INT160 … 32767UINT160 … 6553512 bit0 … 4095
4 mA0 %0000
8 mA25 %69128192163841024
12 mA50 %1382416384327682048
16 mA75 %2073624575491513071
20 mA100 %2764832767655354095

Frequently asked questions

Why does the signal start at 4 mA instead of 0 mA?

This "live zero" lets you tell a wire break or sensor failure (0 mA) apart from a valid start of range (4 mA). It also allows two-wire sensors to draw their power from the same current loop.

What does the raw value 27648 mean?

Siemens S7-1200, S7-1500 and ET 200 analog inputs deliver values from 0 to 27648 in the nominal range. Above that, depending on the module, there is an overrange area up to a maximum of 32511. The exact behaviour is described in the manual of your analog module.

Which raw value range should I choose?

It depends on your analog module. Siemens S7-1200, S7-1500 and ET 200 use 0 … 27648. Other controllers and modules often deliver the full positive range of a 16-bit value (INT16: 0 … 32767, UINT16: 0 … 65535), and simple 12-bit converters deliver 0 … 4095. Pick the matching range or enter your own raw values. The datasheet of your module is authoritative.

How do I detect a wire break?

If the current falls below 3.6 mA, NAMUR NE 43 treats it as a failure. Many analog modules report this as a "wire break" diagnostic. Evaluate that diagnostic in your program instead of relying on the scaled value alone.

Trouble with analog signals or sensor integration?

We find the cause on your machine quickly and directly. No call center, no ticket system.

Get in Touch