Resolving S7-1200 1215C Analog Input Instability at ADC Code Edges
This technical reference addresses a recurring field complaint on the SIMATIC S7-1215C DC/DC/DC integrated analog input where the scaled process value oscillates at specific code-transition voltages (most commonly 1.00 V, 3.00 V, 5.00 V, 7.00 V, 9.00 V) while remaining stable immediately above and below. The instability is fundamental to the integrated 10-bit successive-approximation ADC and cannot be resolved with conventional software averaging, S7-1200 channel smoothing, or shunt capacitors. The article quantifies the problem, documents the diagnostic procedure, and provides a tested migration path to a SIWAREX weighing module appropriate for load-cell and force-measurement applications.
2^N discrete codes across the input span. Any input that sits within ±0.5 LSB of a code boundary is statistical noise limited; if the LSB flicker is one full code (1 LSB), the digital output alternates between two adjacent values at the sample rate. For the integrated S7-1200 1215C AI channel, one LSB = 27 counts = 9.7 mV, so the unstable window is ±4.85 mV wide around every code boundary.1. S7-1200 1215C DC/DC/DC Integrated Analog Input Specifications
The CPU 1215C DC/DC/DC ships with two integrated analog inputs (AI0, AI1) and two integrated analog outputs (AQ0, AQ1). The relevant published specifications, per the SIMATIC S7-1200 Programmable Controller System Manual, are summarised below.
| Parameter | Value | Notes |
|---|---|---|
| Catalog number (CPU 1215C DC/DC/DC) | 6ES7215-1AG40-0XB0 | Firmware 4.0+ ships with current generation integrated AI |
| Integrated analog inputs | 2 (AI0, AI1) | Single-ended; not isolated from logic |
| Voltage range | 0 to 10 V | Bipolar ±10 V is not supported on the integrated channel |
| Current range | 0 to 20 mA | Software-configured, separate channel |
| Resolution (voltage mode) | 10 bits | 1024 discrete codes |
| Resolution (current mode) | 11 bits | 2048 discrete codes |
| Input impedance (voltage) | ≥ 100 kΩ | Per S7-1200 System Manual |
| Input impedance (current) | 250 Ω nominal | |
| Conversion time | 0.625 ms (50 Hz rejection) to 4.166 ms (10 Hz rejection) | Selected via integration time / noise rejection |
| Scaled value range | 0 to 27648 | 0 = 0 V; 27648 = 10 V (Siemens scaling convention) |
| Effective LSB voltage | 9.766 mV (10 V / 1024) | Raw 10-bit value |
| Effective LSB counts | 27 counts (27648 / 1024) | Visible to the user program |
| Maximum error (25 °C) | ±1.0 % of full scale | Per published data sheet |
| Maximum error (0 to 55 °C) | ±2.0 % of full scale | Temperature drift dominates |
| Common-mode range | ±12 V to common | Do not exceed or input clamps |
The published resolution confirms the field observation: 10 bits yields 1024 codes across a 10 V span, which is insufficient for load-cell / mass-weighing applications that typically require 16 to 24 bits of useful resolution and accuracies better than 0.05 %.
Reference: SIMATIC S7-1200 Programmable Controller System Manual (Siemens Online Support, entry ID 109751826).
2. Root Cause: ADC Code-Transition Quantization
The 1215C integrated analog front-end uses a successive-approximation register (SAR) ADC. The input voltage is compared against an internal reference ladder and the closest of 2^N discrete output codes is returned. Each code is exactly FSR / 2^N wide. For a 10 V full-scale range:
LSB_voltage = 10 V / 1024 = 9.7656 mV
LSB_counts = 27648 / 1024 = 27.0 counts
When the applied voltage sits inside the ±0.5 LSB window of a code boundary, the SAR comparator flips between two adjacent output codes at every conversion. This is not a malfunction, calibration drift, or wiring problem - it is the deterministic behaviour of every N-bit quantiser. The S7-1200 1215C simply exposes 27-count jumps (≈9.8 mV) at every code boundary, and the user program is fast enough to capture the alternation.
2.1 Why 1.00 V, 3.00 V, 5.00 V, 7.00 V, 9.00 V Are the Hot Spots
Code boundaries occur at multiples of one LSB:
V_boundary(k) = (k + 0.5) * 9.7656 mV for k = 0, 1, 2, ... 1023
Nearest "round" values to a code boundary in the 0–10 V span:
0.99 V ≈ code 101 | 1.00 V ≈ code 102 boundary
2.99 V ≈ code 306 | 3.00 V ≈ code 307 boundary
4.99 V ≈ code 511 | 5.00 V ≈ code 512 boundary
6.99 V ≈ code 716 | 7.00 V ≈ code 717 boundary
8.99 V ≈ code 920 | 9.00 V ≈ code 921 boundary
A stabilised power supply set to exactly 1.000 V has a real output of (for example) 1.0001 V to 0.9999 V with sub-millivolt ripple. This voltage traverses code 101/102, 306/307, 511/512, 716/717, and 920/921 boundaries - which is precisely the unstable trace observed in the original report. Setting the supply to 0.99 V or 1.01 V places the input well inside a single code, so the digital value is rock-solid.
2.2 Why Software Filters Cannot Fix It
A moving average, exponential filter, or median filter operates on the post-quantisation digital value. If the underlying ADC alternates between 102 and 103 counts at the sample rate, an exponential filter with α = 0.1 reaches a steady state of approximately 50 % duty cycle (≈ 102.5), which the S7-1200 truncates to 102. The filter does not remove the LSB flicker; it merely attenuates the rate at which the digital value moves. The LSB still toggles ±27 counts on a 0–27648 scale, which is ±0.098 % of span - a value 10 to 100 times larger than a typical load-cell application's noise budget.
2.3 Why Shunt Capacitors Cannot Fix It
A capacitor across the input (typically 100 nF to 10 µF with a 100 kΩ source) forms a single-pole low-pass filter with a time constant of τ = R × C. With a 100 kΩ source and 100 nF, τ = 10 ms, which is slow enough to attenuate the flicker slightly but only because the average voltage moves toward a fractional value - the ADC still quantises to the nearest code, and the S7-1200 still exposes the LSB. To meaningfully integrate out the LSB, τ must be much larger than the 0.625 ms conversion time, which makes the channel response time unsuitable for dynamic mass measurement.
3. Diagnostic Procedure to Confirm Code-Edge Behaviour
Use this procedure to determine whether the observed oscillation is a code-edge quantisation artefact (correct diagnosis) versus a real source-side problem such as ground loops, thermocouples, or floating references (wrong diagnosis, see NI Knowledge Base: Troubleshooting Unexpected Analog Measurements).
- Disconnect the field wiring from the integrated AI0 and AI1 terminals of the 1215C.
- Connect a calibrated, low-noise DC reference (Fluke 5520A, Burster 1421, or equivalent) to the channel. Verify the reference output with a 6.5-digit DMM.
- Disable all software filters in the user program. In TIA Portal, navigate to Project tree → Devices → [CPU 1215C] → Properties → Analog inputs and set Smoothing to None.
- Sweep the input from 0.05 V to 9.95 V in 10 mV steps and record the raw AIW0 value (or NORM_X / SCALE_X result).
- Plot the data. Stable plateaus (27 counts wide on the 0–27648 scale) with sharp 27-count transitions are the fingerprint of ADC code-edge noise. Any single-LSB oscillation inside a plateau indicates either source noise or ground loop, not the integrated AI's quantisation.
- Repeat the sweep with the field source (load-cell amplifier). If the field source shows the same plateaus/edges, the integrated AI is the limiter. If the field source shows a different noise signature, the source is the limiter.
4. TIA Portal Software Filter Options (Interim Mitigation Only)
For non-critical applications, TIA Portal provides two filter mechanisms on the integrated AI. Neither eliminates the LSB flicker; they only damp the rate of change.
4.1 Channel-Level Smoothing
Open the CPU's device properties, expand Analog inputs, select the input channel, and set Smoothing to one of: None, Weak, Medium, Strong. Smoothing is implemented as an exponential filter in the firmware:
y[n] = α · x[n] + (1 − α) · y[n−1]
α values (TIA Portal V18 S7-1200):
None : α = 1.0 (no filter)
Weak : α ≈ 0.5
Medium : α ≈ 0.1
Strong : α ≈ 0.02
4.2 Application-Level Moving Average (Ladder Logic Example)
// 16-sample moving average, integer math, TIA Portal V18
// AIW0 = raw 0–27648 scaled value from CPU 1215C integrated AI
VAR
RingBuf : ARRAY[0..15] OF INT;
Idx : INT;
Sum : DINT;
AvgVal : INT;
END_VAR
BEGIN
// Subtract oldest sample from running sum
Sum := Sum - RingBuf[Idx];
// Insert new sample
RingBuf[Idx] := "AIW0"_I; // 0–27648
Sum := Sum + RingBuf[Idx];
// Compute average
AvgVal := DINT_TO_INT(Sum / 16);
// Advance ring index
Idx := Idx + 1;
IF Idx > 15 THEN Idx := 0; END_IF;
END_FUNCTION_BLOCK
4.3 Oversampling (Effective Resolution Enhancement)
For a stationary signal, oversampling at a factor N provides an effective resolution gain of log2(√N) ≈ 0.5 · log2(N) bits. To gain 4 extra bits (10 → 14 bits) requires 256× oversampling, i.e. 256 × 0.625 ms = 160 ms per averaged output. This technique is valid only if the input is stationary; for dynamic mass measurement it is too slow.
| Oversample factor N | Extra bits | Effective resolution | Time per output (ms) | Effective LSB (mV) |
|---|---|---|---|---|
| 1 | 0 | 10 bits | 0.625 | 9.77 |
| 4 | 1 | 11 bits | 2.5 | 4.88 |
| 16 | 2 | 12 bits | 10 | 2.44 |
| 64 | 3 | 13 bits | 40 | 1.22 |
| 256 | 4 | 14 bits | 160 | 0.61 |
| 1024 | 5 | 15 bits | 640 | 0.31 |
None of these filter paths are suitable for laboratory-grade mass measurement. The only viable fix is a higher-resolution acquisition module.
5. Hardware Filtering and Wiring Best Practices (Required but Not Sufficient)
Even after migration to a high-resolution module, the source-side signal path must be clean. Reference: NI - Troubleshooting Unexpected Analog Measurements for the general taxonomy of analog-input faults.
| Issue | Symptom | Fix |
|---|---|---|
| Floating source | Random, large excursions to 0 or full scale | Source must drive the input with a defined voltage; 0–10 V sources with output impedance ≤ 100 Ω |
| Common-mode voltage | Reads ~0 with strong scaling on the 1215C integrated AI (unisolated) | Use an isolated signal conditioner (Phoenix Contact MINI MCR, Wago 857, etc.) |
| Crosstalk from digital lines | Reads change when neighbouring digital output toggles | Route analog and digital cables in separate conduits, ≥ 200 mm spacing |
| Ground loop | 50/60 Hz ripple superimposed on signal | Single-point grounding at the panel; differential measurement |
| EMI from VFDs | Burst noise proportional to motor switching | Shielded twisted pair, shield grounded at panel end only |
| Thermocouple effect | Drift over many minutes | Avoid dissimilar metals in the signal path; use copper lugs only |
6. Migration Path: SIWAREX Weighing Modules
For load-cell, force, and mass applications Siemens provides the SIWAREX product line. The integrated AI on the 1215C is not designed for this use case; the correct replacement is a dedicated weighing module.
| Module | Catalog Number | Resolution | Sample rate | Interface | Best fit |
|---|---|---|---|---|---|
| SIWAREX CS | 7MH4910-0AA01 | 16 bits (65 535 parts) | 50 / 100 / 330 Hz selectable | RS-232 to CM 1241 (6ES7241-1AH30-0XB0) | Static / low-speed weighing, tank level |
| SIWAREX WP231 | 7MH4960-2AA01 | 24 bits | 1000 Hz (1 ms) | PROFINET, GSDML V2.3+ | Belt scales, dynamic mass flow |
| SIWAREX WP241 | 7MH4960-4AA01 | 24 bits | 1000 Hz | Ethernet (Modbus TCP), PROFINET | Force, force-displacement test stands |
| SIWAREX WP251 | 7MH4960-6AA01 | 24 bits (per channel) | 1000 Hz | PROFINET | Dual-channel platform scales |
| SIWAREX FTA | 7MH4900-2AA01 | 16 bits | 330 Hz | RS-485 / RS-232 to CM 1241 | Filling and dosing machines |
The SIWAREX WP231 is the most common direct replacement for load-cell applications requiring both high accuracy and high speed. Its 24-bit ADC corresponds to:
LSB_voltage_WP231 = 10 V / 16 777 216 = 596 nV
LSB_count_WP231 = 8 388 608 / 16 777 216 = 0.5 count (effectively 0.5 LSB)
This is a 16 384× improvement over the integrated AI in voltage resolution, which is why code-edge noise is no longer observable.
6.1 Recommended Selection Logic
- Static mass / tank weighing, simple SCADA integration: SIWAREX CS (lower cost, 50 Hz, RS-232).
- Dynamic mass flow / belt scale / checkweigher: SIWAREX WP231 (24-bit, 1 ms).
- Force-displacement / tensile testing: SIWAREX WP241 (PROFINET for tight HMI integration).
- Two independent load cells in one platform: SIWAREX WP251.
7. Step-by-Step Migration: SIWAREX CS to S7-1215C
The CS module is the lowest-cost entry point and the simplest migration from the integrated AI. The wiring and configuration steps are documented in the SIWAREX CS manual (entry ID 109751826 family).
7.1 Prerequisites
- CPU 1215C DC/DC/DC, firmware V4.2 or later (TIA Portal V16+ for current GSD).
- CM 1241 RS-232 communication module (6ES7241-1AH30-0XB0) installed in the left-of-CPU signal stack.
- SIWAREX CS (7MH4910-0AA01) with the dedicated 7MH4900-0AKxx cable (length 1.5 m, 3 m, 5 m, or 10 m).
- Load cell with 4-wire or 6-wire connection (recommend 6-wire for long cable runs).
7.2 Wiring
CM 1241 (RS-232, X11)
Pin 1 (TD) → SIWAREX CS X2.3 (RxD)
Pin 2 (RD) → SIWAREX CS X2.2 (TxD)
Pin 5 (GND) → SIWAREX CS X2.5 (GND)
Shield → CS X2.4 / earth (one side only)
SIWAREX CS X1 (load cell, 6-wire)
X1.1 EXC+ X1.2 SENSE+ X1.3 SIG+
X1.4 EXC− X1.5 SENSE− X1.6 SIG−
7.3 TIA Portal Configuration
- Open the TIA Portal project, navigate to Devices > [CPU 1215C], and add the CM 1241 to the configuration. Set the RS-232 protocol to Modbus Master (RTU) at 115 200 Bd, 8E1.
- Install the SIWAREX CS HSP or GSD and add the CS as a Modbus device. The Modbus register map is documented in the SIWAREX CS manual, key registers:
| Register | Address | Type | Meaning |
|---|---|---|---|
| 0x0001 | 0 | Input reg (RO) | Gross weight (INT, 0.1 kg / digit) |
| 0x0003 | 2 | Input reg (RO) | Net weight |
| 0x0007 | 6 | Input reg (RO) | Status word |
| 0x0020 | 31 | Holding reg (RW) | Calibration zero (DINT) |
| 0x0022 | 33 | Holding reg (RW) | Calibration span (DINT) |
- Use the MB_MASTER instruction (Siemens S7-1200 Modbus library) in the user program to poll registers 0x0001 / 0x0003 / 0x0007 at 10 Hz.
- After zero / span calibration via the SIWATOOL V7 configuration software, the integer gross weight reading is scaled to engineering units (e.g. kilograms, grams, newtons) and made available to the HMI or control logic.
8. Verification Procedure
After commissioning the SIWAREX module, run the following verification to confirm the instability has been eliminated.
- Apply a known calibration weight (typically 50 % of full scale and 100 % of full scale) and confirm the reading is within the SIWAREX accuracy class specification (SIWAREX CS Class III OIML R76: 0.01 % FS; WP231: 0.005 % FS).
- Log the gross weight at 1 Hz for 60 minutes with a stable mass on the platform. Calculate the standard deviation σ.
- Expected σ for a 50 kg / 5 000 d platform with SIWAREX CS: ≈ 0.5 d (0.5 count of 5 000). With the integrated AI in the same mechanical system: ≈ 27 counts of 27 648 = 0.098 % of span - approximately 50× worse.
- Sweep the calibration voltage from 0 % to 100 % of full scale in 5 % increments. Confirm a monotonic, linear response with no plateaus, no missing codes, and no 27-count transitions.
9. When the Integrated AI Is the Right Tool
The integrated 1215C analog input is appropriate for non-precision applications:
- Slow-changing signals (process times > 1 s).
- Tolerances of ≥ 1 % of full scale.
- Threshold / setpoint comparisons where absolute accuracy is irrelevant (e.g. "tank empty" at 0–10 V from a capacitive probe).
- Cost-sensitive applications where a SIWAREX module (≈ €350 for the CS, ≈ €600 for the WP231) cannot be justified.
For these cases, a combination of TIA Portal channel smoothing (Medium) and an application-level moving average (16 samples) provides adequate performance and avoids the migration cost.
10. Summary of Key Constraints
| Constraint | 1215C Integrated AI | SIWAREX CS | SIWAREX WP231 |
|---|---|---|---|
| Resolution | 10 bits (1 024 codes) | 16 bits (65 535 codes) | 24 bits (16 777 216 codes) |
| Effective LSB (0–10 V) | 9.77 mV | 0.15 mV | 0.6 µV |
| Sample rate | ≤ 1.6 kHz | 50–330 Hz | 1 000 Hz |
| Accuracy (25 °C) | ±1 % FS | 0.01 % FS (Class III OIML R76) | 0.005 % FS |
| Temperature drift | ±2 % / 55 °C | ±0.01 % / 10 K | ±0.01 % / 10 K |
| Suitable for load cell | No | Yes (static) | Yes (dynamic) |
| Isolation | None | 500 V (RS-232) | 500 V (PROFINET) |
11. Frequently Asked Questions
Why does the S7-1200 1215C integrated analog input flicker at exactly 1.00 V, 3.00 V, 5.00 V, 7.00 V, and 9.00 V?
The integrated AI uses a 10-bit successive-approximation ADC, so 1 LSB = 10 V / 1024 = 9.766 mV. The unstable readings occur at code-transition voltages (multiples of 1 LSB), where the input sits within ±0.5 LSB (≈ ±4.88 mV) of a code boundary. The 1.000 V setting in the field report corresponds to code 102, and sub-millivolt supply noise causes the SAR comparator to alternate between code 101 and 102 at every conversion.
Can I get better resolution from the S7-1200 1215C by adding an SM 1231 analog input module?
The SM 1231 modules (6ES7231-4HD32-0XB0 for 4 AI voltage/current and 6ES7231-5ND32-0XB0 for 4 AI thermocouple/RTD) offer 12 to 16 bits of resolution depending on variant, but are general-purpose analog modules, not weighing-grade. They improve the situation but still fall short of the noise immunity, isolation, and load-cell-specific calibration (zero, span, linearity, OIML R76) of a SIWAREX CS, WP231, or WP251.
What is the actual scaling factor for the integrated AI - 1024 codes or 27648 counts?
Both. The native ADC produces 1024 raw codes (0 to 1023), but Siemens presents the result on the engineering scale 0 to 27648 (per the S7-300/400 standard). Each native code is therefore 27648 / 1024 = 27 counts wide. The "27-count flicker" frequently seen in PLC forums corresponds to one full LSB on the 10-bit ADC, not a bug in the scaling.
Is the SIWAREX CS still in production? Which SIWAREX should I buy for a new S7-1200 project?
As of firmware 4.x and TIA Portal V18, the SIWAREX CS (7MH4910-0AA01) is in active production for static weighing. For new high-speed or high-accuracy projects the SIWAREX WP231 (7MH4960-2AA01) is recommended. For filling/dosing applications, the SIWAREX FTA (7MH4900-2AA01) remains the correct product. Always confirm current product lifecycle status (active / phase-out / successor) on the Siemens Industry Online Support portal before issuing a purchase order.
Does the integrated 1215C AI support 4-wire load cells directly?
No. The integrated 0–10 V input expects a low-impedance voltage source, not the differential millivolt-level output of a load cell (typically 2 mV/V at full scale, i.e. 20 mV at 10 V excitation). An external amplifier (e.g. HBM PAD, Mettler-Toledo ACT100, or Wago 750-495) is required to convert the cell's mV output to a 0–10 V signal. Even with such an amplifier, the 9.77 mV LSB of the integrated AI dominates the system error budget; for weighing applications, replace the amplifier with a SIWAREX module that connects directly to the load cell.
How do I confirm the integrated AI is the limiter and not the amplifier or the cell?
Connect a calibrator (Fluke 5520A or Burster 1421) directly to the integrated AI input. Sweep the calibrator output from 0 to 10 V in 10 mV steps. If the trace shows 27-count-wide plateaus separated by sharp transitions, the AI is the limiter. If the trace shows smooth noise with no plateaus, the source (cell + amplifier) is the limiter. This is the same procedure used to verify performance of NI and Beckhoff analog input channels in production test stands.
Can I use a third-party 24-bit module (e.g. Phoenix Contact Axioline F) instead of SIWAREX?
Yes - the Axioline F AI4 IOL8 (2688537) and similar PROFINET / EtherNet/IP 24-bit modules work with the 1215C and provide comparable raw resolution. However, they do not include load-cell-specific features: automatic calibration, weight-based filtering, OIML R76 compliance, weighing standard commissioning tools (SIWATOOL V7), or built-in legal-for-trade functions. For a weighing-specific application Siemens SIWAREX is the engineered solution and is strongly recommended for supportability.