Resolving Analog Value Mismatch: SM 331 (6ES7331-7KF02) vs SM 336F (6ES7336-1HE00) in PCS7 WinCC
When two analog channels measure the identical physical current from the same pressure transmitter but the PCS7 WinCC faceplate reports two different engineering values (for example 30 mbar vs 300 mbar for the same 4.02 mA signal), the failure is almost always rooted in the interaction between the AI module's terminal assignment (positions A, B, C, D), the configured measurement range in HW Config, and the CFC signal-conditioning block scaling. This reference documents the diagnostic logic, parameter maps, and corrective procedure for engineers who encounter this class of disagreement between a SIMATIC SM 331 standard AI module and a SIMATIC SM 336F fail-safe AI module inside a PCS7 V8/V9 plant.
6ES7 331-7KF02-0AB0 and SM 336F 6ES7 336-1HE00-0AB0.1. Problem Description
The reported symptom in the field is reproducible and easy to misdiagnose at first glance:
- Two identical 2-wire passive pressure transmitters are wired to two different analog input modules.
- Both transmitters are energised and produce
4.02 mAat the input screw terminal (verified by clamp-on current meter at the connector block). - The standard SM 331 channel returns an engineering value of
30 mbaron the WinCC faceplate. - The fail-safe SM 336F channel returns
300 mbaron the same faceplate group — a 10:1 disagreement. - Engineering range programmed into both CFC blocks:
-1000 mbar to +70000 mbar.
Because the same sensor current is present at both channels, any disagreement downstream must be explained by one of four mechanisms:
- Module-side wiring-mode selection (transmitter supply path / passive vs active interpretation).
- Module-side measurement-range selection in HW Config (0..20 mA vs 4..20 mA vs other).
- CFC signal-conditioning block parameter mismatch (CH_AI / F_CH_AI scaling).
- WinCC tag scaling, linear-scaling attributes, or faceplate output formatting.
2. Affected Hardware Specifications
| Attribute | SM 331 (6ES7 331-7KF02-0AB0) | SM 336F (6ES7 336-1HE00-0AB0) |
|---|---|---|
| Module class | Standard analog input | Fail-safe analog input (F-AI) |
| Channel count | 8 AI | 6 AI (4..20 mA) in standard group |
| Resolution | 13 bit plus sign (12 bit + sign @ ±10 V) | 15 bit |
| Isolation | Yes (optocoupler to backplane) | Yes (to backplane and channel-to-channel) |
| Supported ranges | ±10 V, 0..10 V, ±20 mA, 0..20 mA, 4..20 mA, RTD, TC | 4..20 mA (current), 0..10 V on selected channels |
| Terminal connector type | 20-pin front connector with assignment switch A/B/C/D per channel pair | 40-pin front connector with assignment per channel pair |
| Fail-safe / SIL | No | SIL 2 / SIL 3 (cat. 3 / cat. 4) with F-CPU |
| CFC block pair | CH_AI |
F_CH_AI (fail-aware driver block) |
3. SM 331 Terminal Assignment Switches (Positions A, B, C, D)
The SM 331 6ES7 331-7KF02 uses a 4-position rotary slide switch (one per channel pair) accessible when the front connector is removed. The switch position selects the electrical conversion on the front connector module:
| Switch position | Measurement mode | Transmitter type | Module supplies 24 V? | Typical terminal mapping (channel 0) |
|---|---|---|---|---|
| A | Voltage measurement | Passive voltage source | No | U+ = pin 2, U- = pin 3, M = pin 4 |
| B | Current, 4-wire transducer | Active (self-powered) 4-wire | No | I+ = pin 2, I- = pin 4 |
| C | Current, 2-wire transducer | Passive 2-wire | Yes (24 V across pin 23 + pin 4) | I+ = pin 2, I- = pin 4 (sensor powered via pin 23) |
| D | Current, 4-wire transducer (voltage mode routing) | Active 4-wire | No | I+ = pin 2, I- = pin 4 |
Switch position C is the only mode in which the module delivers 24 V across the transmitter loop. Switch position D treats the input as an externally powered 4-wire device. If a passive 2-wire transmitter is wired to a channel where the switch sits in position D, the loop is unpowered and the module reads near 0 mA — but if a 24 V source is back-fed from another channel, a small leakage current can appear that does not equal the loop current. This is the first place to look when two cards display different values from identical transmitters.
4. SM 336F (6ES7 336-1HE00-0AB0) Wiring Modes
The SM 336F uses a similar but not identical scheme. The 40-pin front connector exposes dedicated supply terminals. For 4..20 mA channels, the module can be configured for either:
- Active current (sensor powered by module) — typical for passive 2-wire transmitters. Supply path: pin 23 (24 V out) → sensor + → sensor - → channel input.
- Passive current (sensor externally powered) — for active 4-wire transmitters. Supply comes from a separate 24 V field distribution; the AI only reads the loop.
The selection is made by both the HW Config "Measuring range" parameter and the physical wiring of pin 23. The HW Config setting "Measuring range = 4..20 mA" combined with terminal configuration "2-wire sensor" enables the internal 24 V supply on pin 23. If the same channel is then physically wired with pin 23 unused (the case described in the source where the operator noted "the fail-safe card is active"), the channel behaves correctly as a current input but the engineering value may differ because the loop impedance seen by the transmitter is different on the two cards.
5. Root Cause Analysis: Where the 10:1 Disagreement Originates
The reported disagreement of exactly 10:1 (30 mbar vs 300 mbar for the same 4.02 mA) is a strong signature of a measurement-range / scaling mismatch rather than a wiring defect. A wiring defect usually produces 0 mA (open loop), 4 mA (live zero OK), or a fault value; it does not produce a clean, scaled, off-by-10 reading. The most probable causes, ranked by likelihood:
5.1 HW Config Range Mismatch (Most Likely)
One card is configured for 0..20 mA while the other is configured for 4..20 mA. With identical 4.02 mA:
- 0..20 mA interpretation: 4.02 / 20 = 0.201 of span → 0.201 × 71000 mbar = 14 271 mbar.
- 4..20 mA interpretation: (4.02 - 4) / 16 = 0.00125 of span → 0.00125 × 71000 mbar = 89 mbar.
Neither equals 30 or 300, but if both cards are configured with the same upper/lower limits but in different units (mbar vs bar) or with one channel off by one decimal in the high/low range pair, a 10:1 ratio emerges exactly as observed.
5.2 CH_AI / F_CH_AI High/Low Scale Mismatch
The PCS7 driver blocks CH_AI and F_CH_AI carry independent HI/LO scale parameters (typically HI_LIM, LO_LIM, PV_FAC, PV_OFFS). If PV_FAC on one block is 1.0 and on the other is 10.0, the discrepancy will be exactly 10:1.
5.3 WinCC Tag Scaling Override
If a WinCC tag has the "Linear scaling" attribute enabled with non-default Tag/100%/0% values, the value displayed in the faceplate is tag_value × scale_factor + offset — independent of the PLC value. WinCC scaling must be disabled when the CFC block already performs engineering-unit conversion. See the WinCC Unified documentation for the underlying alarm and scaling architecture: Configuring analog alarms (WinCC Unified).
5.4 Terminal Assignment Switch Disagreement
If the SM 331 switch is on D (4-wire externally powered) while the transmitter is a 2-wire passive device, the input circuit will read a small leakage current rather than the true loop current. This often produces values that are non-zero but do not track the process. Always verify the switch position before measuring current at the screw terminal.
6. Inline State Diagram — Diagnosis Flow
7. Step-by-Step Diagnostic Procedure
- Verify the physical current with a calibrated mA clamp or break the loop and insert a multimeter in series. Confirm both modules see the same loop current (within sensor tolerance). If they differ, the fault is at the wiring layer.
- Inspect the SM 331 switch position by removing the front connector and reading the slide-switch position for the affected channel pair. It must be position C for a passive 2-wire transmitter. For SM 336F, inspect the wiring of pin 23 (24 V supply) versus pin 24 (signal return).
- Read raw counts in STEP 7 HW Config → Monitor/Modify. Both modules should report the same raw integer count for the same input current. If counts agree, the disagreement is downstream in the CFC or WinCC layers.
-
Open CFC online and watch the
CH_AIandF_CH_AIblock outputs. Both should produce the same engineering value before any downstream block. If they differ with identical raw counts, the cause is the block parameters. -
Inspect the WinCC tag properties in the tag management. Disable any linear scaling on the tag, or verify
Tag/100%/0%values match the engineering range. Confirm the faceplate output field is bound to the engineering tag, not a raw integer tag. - Cross-check with WinCC Unified diagnostics if the project has been migrated. In WinCC Unified the analog alarm configuration may apply additional thresholds or filtering; see Configuring analog alarms (RT Unified).
8. CH_AI and F_CH_AI Block Parameter Map
The PCS7 driver blocks share a common interface. Misalignment in the following fields causes the symptom pattern discussed here:
| Parameter | Description | Correct value for the example | Symptom if wrong |
|---|---|---|---|
MODE |
Signal-processing mode (4..20 mA with monitoring, 0..20 mA, etc.) | 4..20 mA with wire-break |
Raw counts scaled incorrectly → off-range engineering value |
HI_LIM |
Upper engineering limit |
+70000 (mbar) |
Displayed value capped or rescaled |
LO_LIM |
Lower engineering limit |
-1000 (mbar) |
Off-by-constant display |
PV_FAC |
Process-value factor (gain) | 1.0 |
Off-by-N ratio (e.g. 10:1) |
PV_OFFS |
Process-value offset | 0.0 |
Constant offset between two channels |
SUBS / REPL
|
Substitute value strategy | 0 = keep last value |
No effect on steady-state values |
QC_OK / QC_BAD
|
Quality codes from the AI driver | Should be QC_OK
|
If QC_BAD, WinCC may display a substitute |
F_CH_AI the safety block additionally exposes ACK, QA, and the F-discrepancy window. Differences in F_DIS_T (discrepancy time) do not affect steady-state values; they only delay the F-trip on a true disagreement.9. HW Config Parameter Verification Matrix
| Check | How to verify in STEP 7 | Acceptable result |
|---|---|---|
| Measuring range | Right-click module → Object Properties → Inputs → Measuring Range |
4..20 mA for both, identical |
| Integration time / noise rejection | Same dialog |
60 Hz or 50 Hz; identical for the two channels if both are in the same electrical environment |
| Wire-break monitoring | Same dialog → Diagnostic Interrupt | Enabled for 4..20 mA range; disabled for 0..20 mA |
| Channel used / unused | Same dialog → Channel selection | Channel must be marked "used" |
| F-destination address (SM 336F only) | F-AI properties → F-Parameters | Same F-CPU assigned; F-monitoring time ≥ 1000 ms |
10. Resolution Steps
-
Standardise the measuring range. In HW Config, set both modules to
4..20 mA, integration time60 Hz, wire-break monitoring enabled, and the channel marked "used". Recompile HW Config and download to the AS. - Align the SM 331 switch position. Power down the AS, remove the front connector from the SM 331, set the channel pair switch to position C, reinsert the connector.
- Align the SM 336F wiring. If the transmitter is passive 2-wire, ensure pin 23 (24 V supply) is wired to the transmitter positive terminal. If the transmitter is active 4-wire, leave pin 23 unconnected and supply 24 V externally.
-
Match CH_AI and F_CH_AI parameters. In CFC, open both blocks and verify
HI_LIM = 70000,LO_LIM = -1000,PV_FAC = 1.0,PV_OFFS = 0.0,MODE = 4..20 mA. Compile and download the CFC program. - Disable WinCC tag scaling if the CFC block already produces the engineering value. WinCC tag → Properties → Linear Scaling → untick "Linear scaling".
- Reboot WinCC Runtime (or the OS server) to clear the in-memory tag cache. On WinCC Unified, restart the runtime project from the administration console.
11. Verification Tests
-
Test 1 — Cold start with reference input. Apply a calibrated
12.000 mAfrom a process calibrator to both channels. Both faceplates must read exactly+34 250 mbar(mid-range of -1000..+70000). -
Test 2 — Live-zero verification. With the sensor disconnected, both channels must enter wire-break /
QC_BADsimultaneously and the faceplate must show the configured substitute value (or "#" placeholder). - Test 3 — Step response. Apply a step change of 4 mA from the calibrator. The two channels must settle within ±1 LSB of each other within 3 × the integration window (i.e. ~180 ms for 60 Hz).
-
Test 4 — Long-term drift. Maintain
12.000 mAfor 1 hour. Both readings must remain within ±2 mbar of nominal. -
Test 5 — F-discrepancy test (SM 336F). Inject a deliberate mismatch larger than
F_DIS_T. The F-CPU must report the F-discrepancy and passivate the safety-relevant output within the configured F-monitoring time.
12. Preventive Measures for Future Projects
- Establish a project template where every pressure transmitter CFC block is generated with
PV_FAC = 1.0and the engineering range locked to the P&ID instrument datasheet. - Disable "Linear scaling" by default on every WinCC tag generated for an AI. Document any tag that overrides this default.
- Use a single faceplate template per signal class (PRESS_AI, TEMP_AI, FLOW_AI) to prevent per-instance scaling drift.
- Add a HW Config consistency check to the project's automated CI pipeline: read every
MEAS_TYPEattribute on every AI channel and reject any configuration that differs from a project-standard whitelist. - For SM 331 modules, print a label on the front connector cover indicating the switch position (A, B, C, D) for each channel pair; this prevents the rotary switch being knocked during maintenance.
- For new plants, prefer ET 200SP AI modules with channel-level diagnostics and digital measuring-range adjustment (no physical switch required) over the legacy SM 331 mechanical switch.
13. Common Fault-Code Mapping
| WinCC / CFC symptom | Likely cause | First verification step |
|---|---|---|
| Reading equals -1000 mbar (lower limit) | Live zero lost; sensor below 4 mA or open loop | Measure loop current; check wire-break diagnostic bit |
| Reading equals +70000 mbar (upper limit) | Sensor saturated above 20 mA; possible short to 24 V | Measure loop current; check for miswired supply |
| Reading of 0 mbar | Switch position D on passive 2-wire sensor; module not powering loop | Verify SM 331 switch position C and pin 23 wiring |
| Reading of "#" | Substitute value active; QC_BAD set |
Check diagnostic buffer for OB82 / OB83 / OB122 events |
| Reading off by exactly factor N |
PV_FAC or WinCC linear-scaling factor wrong |
Compare PV_FAC between CH_AI and F_CH_AI |
| Reading flickers by ±5 LSB | Noise pickup; integration time too short; missing shielding | Increase integration time to 60 Hz; verify shield bonding |
14. References to Official Documentation
- Siemens Industry Online Support — manuals, FAQs, firmware
- Configuring analog alarms (RT Unified) — WinCC Unified documentation
- SIMATIC PCS 7 product overview
Why do two AI cards show different engineering values for the same 4.02 mA current in PCS7 WinCC?
When the loop current is verified equal at both screw terminals, the disagreement comes from one of four layers: the SM 331 mechanical switch position (A, B, C, D), the HW Config measuring range (0..20 mA vs 4..20 mA), the CFC CH_AI / F_CH_AI parameters PV_FAC, PV_OFFS, HI_LIM, LO_LIM, or a WinCC tag linear-scaling override. Standardise the measuring range to 4..20 mA on both modules, set PV_FAC = 1.0, and disable WinCC linear scaling to resolve.
What is the correct SM 331 switch position for a passive 2-wire 4-20 mA pressure transmitter?
Position C. Position C routes the module's internal 24 V supply to pin 23 of the front connector, energising the passive 2-wire loop. Position B or D treats the input as an externally powered 4-wire device and will read near 0 mA. Position A is for voltage measurement and must not be used with a current-output transmitter.
How can I confirm the disagreement is in CFC and not in WinCC?
Open CFC online, locate the CH_AI (and F_CH_AI for the SM 336F), and read the engineering output pin (typically PV_OUT or V). If the two CFC values already disagree, the fault is in HW Config or the AI block parameters. If the CFC values agree, the fault is in WinCC — check the tag's "Linear scaling" property and the faceplate's "Output" field data source.
Does the SM 336F (6ES7 336-1HE00-0AB0) require a separate fail-safe CFC block?
Yes. PCS7 ships F_CH_AI as the safety-aware driver for the SM 336F; using the standard CH_AI on an F-channel removes the F-discrepancy check and will be rejected by the F-CPU's safety program checksum. The F_CH_AI block must be parameterised with F_DIS_T (discrepancy time) and F_TOL (tolerance) appropriate for the loop's expected dynamic range.
What measuring range and integration time should I select for 4-20 mA pressure transmitters in an industrial cabinet?
Measuring range 4..20 mA with wire-break monitoring enabled, integration time 60 Hz (rejecting 60 Hz mains pickup; in 50 Hz regions use the 50 Hz preset). For RTD or thermocouple channels on the same module, integration time must match the channel-by-channel noise environment but the resolution and step-response requirements of the pressure loop are met by the default 13-bit / 15-bit conversion of the SM 331 and SM 336F respectively.