Automation & Instrumentation
PLC Analog Scaling Calculator
Map raw analog values from a PLC module into pressure, temperature, flow or another engineering quantity. Reverse the mapping to find a mathematical raw value for a desired engineering output, using your actual hardware’s configured endpoints.
Your estimate
Within configured span (0–100%). This does not verify sensor accuracy or hardware health.
- Engineering value
- 50 bar
- Raw PLC value
- 13,824
- Percentage of span
- 50 %
- Normalized value
- 0.5
Raw ranges depend on module hardware, signal type and configuration. The Siemens-style preset is an example, not a universal range. Raw results are unrounded mathematical counts; apply the rounding and diagnostics required by your module.
Within configured span (0–100%). This does not verify sensor accuracy or hardware health.. Engineering value: 50 bar. Raw PLC value: 13,824 . Percentage of span: 50 %. Normalized value: 0.5
Generic PLC analog scaling
Normalize the raw value with n = (Raw − RawMin) / (RawMax − RawMin). Engineering = EUmin + n × (EUmax − EUmin). Percentage of span is 100 × n. Both raw and engineering endpoint pairs must differ.
For the reverse direction, n = (EU − EUmin) / (EUmax − EUmin) and Raw = RawMin + n × (RawMax − RawMin). Intermediate values use floating-point arithmetic, and the displayed raw result is not silently rounded to an integer.
Raw counts and hardware configuration
Raw counts are the numeric representation supplied by the analog module. They are not automatically milliamps, volts or engineering units. Use the documented counts for the configured lower and upper signal endpoints.
Generic presets 0–10000 and 0–32767 are convenient examples. The 0–27648 Siemens-style preset is common in some configurations but is not universal across Siemens modules. Hardware, configuration and signal type determine the real range. Do not assume that a 4–20 mA input and a 0–20 mA input use the same raw endpoint for 4 mA.
Resolution, accuracy and rounding
A displayed raw span does not establish the ADC’s effective resolution. For an ideal one-count change, the mapped engineering increment is (EUmax − EUmin) / (RawMax − RawMin). Noise, converter resolution, filtering and module accuracy can limit meaningful precision.
If a control output requires integer counts, use the module’s required rounding, range checks and data type after the calculation. A fractional raw result is a mathematical target, not a claim that the hardware can output a fractional count.
Relationship with 4–20 mA
The current loop maps a process range to a 4–20 mA signal. The analog module then maps the measured current to raw counts. These are two linear mappings only when the configured input and transmitter are linear. The related 4–20 mA scaling calculator helps check the signal side separately.
For an example module configured so that 4 mA is 0 counts and 20 mA is 27648 counts, 13824 is 12 mA and 50% span. Check those endpoint assumptions against your module before applying them.
Common scaling mistakes
Using 32767 solely because storage is a signed 16-bit integer can give the wrong span. Other mistakes include forgetting a nonzero raw offset, dividing with integer arithmetic, mixing transmitter ranges or applying scaling twice.
Negative and reversed engineering ranges are accepted. Out-of-range values remain visible and are marked as extrapolated. Module-specific diagnostic codes must be handled separately; a number beyond the raw endpoints may describe a fault rather than a valid measurement.
Examples
Pressure midpoint
- Input
- Raw 13824, raw range 0–27648, engineering range 0–100 bar
- Result
- 50 bar; 50% span.
Temperature with a negative lower endpoint
- Input
- Raw 13824, raw range 0–27648, engineering range −50 to 150 °C
- Result
- 50 °C; 50% span.
Reverse pressure mapping
- Input
- 75 bar, engineering range 0–100 bar, raw range 0–27648
- Result
- 20736 raw counts; 75% span.
Unclamped over-range
- Input
- Raw 30412.8, raw range 0–27648, engineering range 0–100 bar
- Result
- 110 bar; 110% span; above-range indication.
Frequently asked questions
What is PLC analog scaling?
It converts the numerical output of an analog module into a meaningful process quantity using the configured raw and engineering endpoints.
Does every Siemens module use 0–27648?
No. This is an example range. Consult the specific module manual and signal configuration, including bipolar modes and diagnostics.
Can I use another PLC manufacturer?
Yes. Enter its documented raw endpoints manually. Generic arithmetic works independently of vendor; no Allen-Bradley or Schneider raw range is assumed.
Why does 13824 equal 50 bar?
For raw 0–27648 and engineering 0–100 bar, 13824 is exactly halfway through the raw span, so it maps to 50% of the engineering span.
Can I scale a negative or reversed range?
Yes. The start endpoint maps to 0% and the end endpoint to 100%, even when values decrease. Endpoints may not be equal.
Should I clamp an out-of-range value?
That depends on the control design. This calculator deliberately shows extrapolated results so the condition remains visible; evaluate hardware diagnostics before deciding how the PLC should respond.
Last reviewed: