Analog Scaling Calculator
Convert raw PLC analog counts to engineering units using linear scaling. Supports 4-20 mA, 0-10 V and custom ranges.
analog
PLC
scaling
4-20mA
0-10V
AI
counts
engineering units
Input values
⚙
Enter values and click Calculate to see results here.
Formula
Eng = ((Raw - RawMin) / (RawMax - RawMin)) × (EngMax - EngMin) + EngMin
Worked Example
Given: A 4-20 mA pressure transmitter reads 12.5 mA. The PLC raw range is 0-32767. The engineering range is 0-10 bar.
Step 1: Normalize: (12.5 - 4) / (20 - 4) = 8.5 / 16 = 0.53125
Step 2: Scale: 0.53125 × (10 - 0) + 0 = 5.31 bar
Set your PLC AI module scaling: RawMin=0, RawMax=32767, EngMin=0, EngMax=10.
Engineering Notes
- 4-20 mA standard: 4 mA = zero, 20 mA = full scale. The live zero (4 mA) allows open-wire detection — if the PLC reads 0 mA, the wire is broken.
- PLC raw counts: Typical values: 0-32767 (15-bit), 0-4095 (12-bit), 0-27648 (Siemens S7). Check your module manual.
- Calibration drift: If readings drift over time, re-calibrate with a known reference. Most PLCs have a calibration offset parameter.
- PLC implementation: Use a SCALE or NORM instruction, or manually implement the formula in a function block.
References
- IEC 61131-3 — Programming languages
- Allen-Bradley SLC 500 / MicroLogix analog scaling
- Siemens S7 analog scaling