Siemens PLC · TIA Portal · Analog Input · S7-1200 / S7-1500

PLC Analog Input Scaling in TIA Portal: Formula and Examples

Learn how to convert Siemens PLC analog input raw values into real engineering units such as bar, °C, litres, RPM and percentage. This practical guide covers the scaling formula, Siemens 0...27648 convention, NORM_X, SCALE_X, SCL examples, 4–20 mA and voltage signals, diagnostics and common scaling mistakes.

4–20 mA / 0–10 V Formula + Examples NORM_X / SCALE_X / SCL S7-1200 / S7-1500

Learning Overview

Topic: Analog input scalingSoftware: Siemens TIA PortalPLC: S7-1200 / S7-1500Methods: Formula + NORM_X + SCALE_X

What You’ll Learn

  • Why an analog module gives a raw integer instead of engineering units
  • How Siemens nominal raw ranges such as 0...27648 and -27648...+27648 are used
  • The universal linear scaling equation and how to calculate it
  • How to scale analog inputs using NORM_X and SCALE_X in TIA Portal
  • Practical 0–10 V, 4–20 mA and bipolar voltage examples
  • How to troubleshoot wrong, noisy, overrange or reversed readings
Core idea

An analog transmitter sends a physical signal, but the PLC program normally receives a digitized integer. Scaling converts that raw integer into a value the process engineer actually understands—for example, 13824 becomes 5.0 bar when it represents 50% of a 0–10 bar range.

  • Configure the channel signal type correctly before writing scaling logic.
  • Use the raw range documented for the exact module and configured measuring range.
  • Convert to REAL for calculation to avoid unwanted integer rounding.
  • Validate zero, midpoint and full-scale values before trusting the measurement in control logic.

Analog Input Scaling in Siemens TIA Portal

This guide targets practical searches for PLC analog input scaling, TIA Portal analog scaling, Siemens 0 to 27648 scaling, NORM_X SCALE_X, 4-20mA PLC scaling, S7-1200 analog input and S7-1500 analog scaling.

1. What Is PLC Analog Input Scaling?

An analog input channel converts an electrical measurement into a digital number. The PLC cannot inherently know that a particular raw value means 6.2 bar, 143 °C or 72% tank level. The program must map the digital range to the physical engineering range.

Raw value

0...27648 is a machine-friendly representation used by many Siemens current and unipolar analog applications.

Engineering value

0.0...10.0 bar, -50.0...150.0 °C or another process range is what operators, alarms and PID loops need.

Scaling is therefore a linear mapping from one range to another. If both ranges are linear, the same percentage position in the raw range must produce the same percentage position in the engineering range.

2. Signal Flow: Sensor → PLC → Engineering Units

ProcessPressure, temperature, flow, level
Transmitter4–20 mA / voltage signal
Analog InputA/D conversion
Raw PLC ValueINT such as 0...27648
Scaled ValueREAL engineering unit

For example, a 0–10 bar pressure transmitter may output 4–20 mA. The analog module digitizes the current and the PLC scales the resulting raw value to 0.0–10.0 bar. The scaled value can then be used by HMI displays, alarms, trends, recipes or PID control.

3. Understand Siemens Analog Raw Values

Siemens standardizes the nominal analog representation so the application logic is not tied directly to the hardware converter resolution. For general-purpose S7-1200/S7-1500 analog processing, the rated current range is represented by 0 to 27648, while bipolar voltage ranges use -27648 to +27648. Values beyond the nominal range can indicate overrange or underrange depending on module type and configuration.

Configured signalTypical nominal raw rangeMidpoint exampleUse
0–20 mA0...2764813824 ≈ 10 mAUnipolar current
4–20 mA0...27648 for the configured rated range13824 ≈ 12 mAIndustrial transmitters
0–10 V*Module/range dependent; many unipolar voltage modules use a positive raw spanCheck module manualPotentiometer / sensor
-10...+10 V-27648...+276480 = 0 VBipolar command / feedback

*Always verify the exact analog module and measuring-range table. Siemens families and modules differ in supported voltage/current ranges and diagnostic regions.

Current input nominal representation
01382427648
Do not confuse module resolution with the standardized nominal raw range. An analog card may use a particular A/D resolution internally while STEP 7 presents a standardized process value range for scaling.

4. Universal PLC Analog Scaling Formula

The general linear equation maps a raw input range to an engineering range:

General scaling equationEngineering = EngMin + (Raw - RawMin) × (EngMax - EngMin) / (RawMax - RawMin)

Where:

TermMeaning
RawCurrent analog input value read by the PLC
RawMinRaw value corresponding to the transmitter minimum
RawMaxRaw value corresponding to the transmitter maximum
EngMinMinimum engineering value
EngMaxMaximum engineering value

For a standard current channel where RawMin = 0 and RawMax = 27648, the equation becomes:

Siemens current-input formEngineering = EngMin + Raw × (EngMax - EngMin) / 27648

5. Example 1: 0–10 V Pressure Transmitter, 0–10 bar

Assume the configured analog range gives 0...27648 across the transmitter span and the engineering range is 0.0 to 10.0 bar. At half scale, Raw = 13824.

CalculationPressure = 0 + (13824 - 0) × (10 - 0) / (27648 - 0) = 5.0 bar

Zero scale

Raw = 0

Result = 0.0 bar

50% scale

Raw = 13824

Result = 5.0 bar

75% scale

Raw = 20736

Result = 7.5 bar

Full scale

Raw = 27648

Result = 10.0 bar

Hardware check: only use 0...27648 for the voltage example when that is the nominal representation of the exact configured channel. For bipolar voltage inputs the minimum is negative.

6. Example 2: 4–20 mA Temperature, 0–200 °C

When the analog module is configured for a 4–20 mA measuring range, the rated current span is represented from raw minimum to raw maximum. Therefore 4 mA represents the engineering minimum and 20 mA represents the engineering maximum.

SignalRawNormalizedTemperature
4 mA00.000 °C
8 mA69120.2550 °C
12 mA138240.50100 °C
16 mA207360.75150 °C
20 mA276481.00200 °C
At 12 mA / half scaleTemperature = 0 + 13824 × (200 - 0) / 27648 = 100.0 °C

This is different from connecting a 4–20 mA transmitter to a channel configured as 0–20 mA. In that case, 4 mA is already 20% of the electrical range, so the raw value at the transmitter’s zero point is not zero. The hardware configuration and scaling equation must agree.

7. Example 3: -10...+10 V Position, -100...+100 mm

For a bipolar voltage range with raw values -27648...+27648, let the engineering range be -100.0 to +100.0 mm.

Raw valuePosition
-27648-100 mm
-13824-50 mm
00 mm
13824+50 mm
27648+100 mm
Example at Raw = -13824Position = -100 + (-13824 + 27648) × 200 / 55296 = -50 mm

8. NORM_X and SCALE_X in TIA Portal

Siemens recommends a two-stage method for most PLC applications:

Raw INTExample: 13824
NORM_XMap raw range to 0.0...1.0
Normalized REALExample: 0.5
SCALE_XMap 0.0...1.0 to engineering range
Engineering REALExample: 5.0 bar

NORM_X

NORM_X determines where the input sits between the selected minimum and maximum. A halfway raw value produces approximately 0.5.

NormalizationNormalized = (Raw - RawMin) / (RawMax - RawMin)

SCALE_X

SCALE_X converts the normalized value into the required engineering range.

Engineering scalingScaled = EngMin + Normalized × (EngMax - EngMin)

Keeping normalization and engineering scaling separate makes the program easier to reuse: the same normalized signal can be mapped to different display, command or diagnostic ranges.

9. SCL Example: Analog Input Scaling

For a 0–10 bar pressure transmitter using a nominal raw span of 0...27648, an SCL implementation can be written as:

VAR
    AI_Raw          : INT;
    AI_Normalized   : REAL;
    Pressure_bar    : REAL;
END_VAR

AI_Normalized := NORM_X(
    MIN   := 0,
    VALUE := AI_Raw,
    MAX   := 27648
);

Pressure_bar := SCALE_X(
    MIN   := 0.0,
    VALUE := AI_Normalized,
    MAX   := 10.0
);

You can also implement the equation explicitly. Convert the raw integer to REAL before multiplication and division so the calculation keeps fractional precision.

Pressure_bar := 0.0
    + (INT_TO_REAL(AI_Raw) - 0.0)
    * (10.0 - 0.0)
    / (27648.0 - 0.0);
Reusable FC idea: create an analog-scaling FC with RawValue, RawMin, RawMax, EngMin and EngMax as parameters. Then the same block can scale pressure, flow, level, temperature and speed channels.

10. LAD / FBD Workflow with NORM_X and SCALE_X

Create the raw tag

Map the configured analog input address to an INT tag such as AI_Pressure_Raw.

Insert NORM_X

Set MIN and MAX to the nominal raw limits for the configured channel.

Create a REAL normalized tag

Store the normalized result in a tag such as Pressure_Norm.

Insert SCALE_X

Set engineering MIN and MAX, for example 0.0 and 10.0 bar.

Verify online

Check raw, normalized and scaled values together using a watch table while applying known test signals.

11. Configure the Analog Channel Before Scaling

Correct logic cannot repair an incorrectly configured analog module. In TIA Portal, open Device configuration, select the analog module/channel and verify the supported measuring type and range.

  • Voltage or current input selected correctly
  • 0–20 mA vs 4–20 mA selected correctly
  • Bipolar voltage range selected when negative values are required
  • Channel address matches the PLC tag
  • Wire type and terminal connection match the module manual
  • Diagnostics are enabled where useful
  • Transmitter supply and loop power are correct
  • Shielding and grounding follow plant standards

After downloading the hardware configuration, monitor the raw value first. Only after the raw channel behaves correctly should you troubleshoot the scaling math.

12. Overrange, Underrange and Diagnostic Values

The nominal range is not the only possible integer region. Analog modules can provide overrange/underrange information and may report substitute or diagnostic states depending on hardware and configuration. Therefore a robust program should not assume that every raw value is valid process data.

Recommended

Validate channel diagnostics and raw-value plausibility before using the scaled signal for alarms, interlocks or closed-loop control.

Avoid

Blindly clamping every abnormal raw value to the engineering minimum or maximum, because this can hide a broken wire or failed transmitter.

Use module-specific diagnostics for wire break, overflow, underflow and configuration faults where supported. The exact thresholds differ by module, so use the device manual rather than hard-coding one universal diagnostic number.

13. Analog Noise, Smoothing and Filtering

Scaling changes units; it does not remove electrical noise. If the raw value fluctuates, first check the physical installation: transmitter stability, cable routing, shield termination, grounding, power supply and channel integration/filter settings.

Software filtering can be added after the measurement chain is healthy. Common approaches include a moving average, first-order low-pass filter or deadband. The filter time constant must suit the process: a fast pressure-control loop needs a different response than a slowly changing tank level.

Control-system rule: do not hide a wiring or grounding problem with a very slow software filter. Fix signal integrity first, then filter only the remaining acceptable process noise.

14. Common PLC Analog Scaling Problems

SymptomLikely causeCheck / fix
Scaled value always zeroNo loop current, wrong address, disabled channelMeasure signal and monitor raw tag online
Scaled value is 20% at transmitter zero4–20 mA transmitter connected to channel/scaling treated as 0–20 mAAlign channel range and raw limits with transmitter configuration
Full-scale value is too low/highWrong raw maximum or engineering maximumApply a known full-scale simulator value
Negative voltage reads incorrectlyUsed unipolar scaling for bipolar channelUse the documented negative raw minimum
Value jumps or flickersNoise, grounding, unstable loop, insufficient filteringCheck wiring and hardware filter settings first
Result has no decimal placesInteger arithmeticConvert to REAL before division
Value exceeds engineering maximumInput in overrange or scaling limits wrongCheck diagnostics and raw value before clamping
Reading is reversedEngineering min/max or signal mapping reversedVerify transmitter calibration and scaling endpoints

15. Best Practices for Siemens Analog Scaling

  • Document signal type beside every analog tag
  • Keep raw value and scaled value as separate tags
  • Use descriptive engineering units in tag comments
  • Use REAL for normalized and engineering calculations
  • Build one reusable scaling FC/FB instead of repeating arithmetic
  • Validate zero, 25%, 50%, 75% and 100% where practical
  • Handle module diagnostics separately from process scaling
  • Do not silently mask sensor faults with clipping
  • Use a simulator/calibrator for commissioning
  • Trend both raw and scaled values during troubleshooting

Recommended Tag Pattern

TagData typePurpose
AI_Pressure_RawINTDirect module process value
AI_Pressure_NormREALNormalized 0.0...1.0 signal
Pressure_barREALEngineering value
Pressure_ValidBOOLDiagnostic/plausibility status
Pressure_HighAlarmBOOLProcess alarm after validation

Frequently Asked Questions

Why does Siemens use 27648 for analog values?

Siemens uses standardized integer representations for the nominal analog span. General current ranges use 0 to 27648 and bipolar voltage ranges use -27648 to +27648. This lets application scaling remain consistent across modules with different internal converter resolutions.

What is the PLC analog scaling formula?

Engineering = EngMin + (Raw - RawMin) × (EngMax - EngMin) / (RawMax - RawMin). Use REAL arithmetic so fractional engineering values are preserved.

What is the difference between NORM_X and SCALE_X?

NORM_X maps the raw input range to a normalized floating-point position, normally 0.0 to 1.0. SCALE_X maps that normalized position to the desired engineering range.

How do I scale a 4–20 mA signal in TIA Portal?

Configure the channel for 4–20 mA, use the documented nominal raw span for that configured current range, normalize it, then scale 0.0–1.0 to the transmitter range such as 0–10 bar or 0–200 °C.

Can I scale analog values in SCL?

Yes. Call NORM_X and SCALE_X in SCL or implement the general linear equation directly using REAL arithmetic.

Why is my scaled analog value above the engineering maximum?

The channel may be in an overrange region, the measuring range may be configured incorrectly, or the scaling limits may not match the transmitter. Check diagnostics and the raw value before deciding whether to clamp the result.

Siemens Technical References

Siemens S7-1200 and S7-1200 G2 system documentation describes the nominal analog ranges and recommends normalizing an input to 0.0...1.0 before scaling it to engineering units with NORM_X and SCALE_X.

Get Siemens PLC & TIA Portal Training Details

Share your details and a Softwell advisor will contact you with practical Siemens PLC, analog I/O, TIA Portal, SCL, HMI/SCADA and project-development training options.

Master analog I/O in Siemens TIA Portal

Learn practical S7-1200/S7-1500 analog configuration, scaling, SCL, HMI/SCADA and process-control project development.

Request Course Details
Verified learning pathway

Discuss Siemens PLC Analog I/O & TIA Portal Training

Explore practical Siemens S7-1200/S7-1500 PLC programming, analog input scaling, SCL, HMI/SCADA and industrial automation training options.

Content reviewed: 7 August 2026

☎ Call WhatsApp ✉ Email Enquire Now