Siemens analog scaling (0–27648)
The analog modules of Siemens S7-1200 and S7-1500 PLCs do not deliver bar or degrees: they deliver an integer. Within the rated range of the signal, that number goes from 0 to 27648 (for unipolar signals such as 4–20 mA or 0–10 V). This calculator converts that raw value into real units and back, so that during commissioning you can check that the PLC reads the same as the instrument shows.
How it is calculated
real value = start + raw / 27648 × (end − start)
And for an analog output, the other way round: raw = (value − start) / (end − start) × 27648.
Example
A 0 to 4 metre level transmitter connected to a 4–20 mA input gives a raw value of 20736: 20736 / 27648 × 4 = 3 metres. In current, that is 4 + 0.75 × 16 = 16 mA, which is what you should measure in the loop with the multimeter.
In TIA Portal: NORM_X and SCALE_X
You do not need to write the formula by hand in the program. The usual approach is to chain two instructions:
- NORM_X turns the raw value into a number between 0.0 and 1.0, using 0 as minimum and 27648 as maximum.
- SCALE_X turns that number between 0 and 1 into real units, using the start and end of the range.
For an analog output it is the other way round: NORM_X with the range in real units and SCALE_X with 0 and 27648.
Out-of-range values
- Between 27649 and 32511: overshoot range. The signal is above its rated range, but the module still measures it.
- 32767: overflow. Depending on the module and whether diagnostics are enabled, it also indicates a wire break on 4–20 mA signals.
To understand the topic in depth: Ladder logic (LAD) in TIA Portal, with theory and a practice test.