6ES7 331-7KF02-0AB0 7FFF Error: 4-20mA Transducer Wiring Fix

David Krause19 min read
S7-300SiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

1. Problem Overview

The SIMATIC S7-300 SM 331 analog input module, order number 6ES7 331-7KF02-0AB0, is reporting the value 7FFFh (32767 decimal) on every configured channel when a 4-wire linear transducer (LVDT) with 4–20 mA current output is connected. The diagnostic buffer of the CPU also flags External Error, Channel Parameterization Error, and Faulty Module entries. The SF (group fault) LED on the module is OFF at startup but turns ON when the CPU enters RUN, while an analog output module installed in the same station shows the opposite pattern. This combination of symptoms points to multiple, overlapping root causes that must be eliminated one at a time.

The 7FFF overrange code in STEP 7 / SIMATIC Manager is the standard overflow indicator. It appears in the process image (PII) when the measured input value exceeds the upper bound of the configured measuring range, when the input is open-circuited while a current range with a live zero (4–20 mA) is selected, or when the module is damaged. Because the module is responding to every channel — including the unused ones — and the diagnostic buffer reports parameterization errors, the issue is most often a configuration/wiring mismatch, occasionally compounded by a hardware fault caused by a previous incorrect supply connection.

Critical: The original installation applied +24 V to module pins 1 and 11, and 0 V to pins 10 and 20. On the 6ES7 331-7KF02-0AB0 these pins are part of the channel 0/1 group (Ch0+, Ch0-, Ch1+, Ch1-). Applying supply voltage to a current input destroys the input protection network. The module must be considered suspect until proven otherwise.

2. Module Identification and Specifications

The 6ES7 331-7KF02-0AB0 is the standard 8-channel, 12-bit SM 331 AI module for the SIMATIC S7-300 family. The official Siemens product master data is published as entry ID 8859629 in the Siemens Industry Online Support. Key specifications relevant to this fault:

Property Value
Order number (MLFB) 6ES7 331-7KF02-0AB0
Function SM 331, Analog Input
Number of inputs 8
Channel grouping 4 groups of 2 channels (each group shares a common ground reference and a measurement type)
Resolution 12-bit + sign (with oversampling to 15-bit effective resolution in unipolar modes)
Galvanic isolation Yes, between channel groups and backplane
Programmable per group Measurement type, range, smoothing, diagnostics enable
Cycle time (all channels) 85 ms typical at 50 Hz rejection
Front connector 40-pin screw-type or spring-type
Permissible common-mode voltage ±12 V (across groups)

Because the 7KF02 variant has only eight inputs grouped in pairs, the configuration of one channel dictates the wiring topology of the second channel in the same group. Selecting a current type (range C or D) on a group forces the entire pair into current mode; the spare input cannot be repurposed for voltage on the same group without re-allocating the hardware configuration in HW Config.

3. Channel Group Architecture and Pin Assignment

The 40-pin front connector on the 6ES7 331-7KF02-0AB0 is split into four identical channel groups. The pin-out for a current-mode group is as follows:

Group Channels M+ (signal +) M- (signal -) COMP+ COMP- Unused in 4-wire current
0 Ch0 / Ch1 2 / 4 3 / 5 1 6 10, 11, 20
1 Ch2 / Ch3 7 / 9 8 / 10 11, 12
2 Ch4 / Ch5 14 / 16 15 / 17 13 18 20, 21, 30
3 Ch6 / Ch7 22 / 24 23 / 25 26, 27
Pin numbering is for the 40-pin front connector as viewed from the wiring side. Always cross-check with the wiring diagram printed on the inside of the hinged front door of the module and with the manual: SM 331 Analog Input Module manual (entry 8859629).

For a 4-wire transducer the rule is simple: the transducer powers itself from an external supply, and only the two current-loop wires (M+ and M-) land on the module. The COMP+ and COMP- pins are for 4-wire resistance / RTD measurement and must be left open (or wired only when measuring resistance) for current. They are not power-supply inputs and must never see 24 V DC.

4. STEP 7 Measuring Range Module and Type Codes

The 6ES7 331-7KF02-0AB0 has no mechanical measuring range modules (DIP switches) — the range is set entirely in software via HW Config. The valid types for 4–20 mA inputs are:

Type code Measurement Nominal range Overflow value (hex) Underflow value (hex)
C Current (4-wire transducer) 4–20 mA 7FFF 0000
D Current (2-wire transducer) 4–20 mA 7FFF 0000
T Thermocouple / voltage ±80 mV, etc. 7FFF 8001

Type C is the correct selection for a self-powered 4-wire LVDT. Type D is reserved for a 2-wire transmitter that draws loop power from the module's M+ terminal. The two are not interchangeable: selecting D for a 4-wire device that already has its own 24 V will cause the module to source ~24 V onto the M+ pin, fight the transducer's own supply, and the reading will sit at 7FFF or at 0 mA equivalent.

If the wrong type is selected, the diagnostic buffer reports "Channel parameterization error" on the affected channel, exactly as observed in the field report.

5. Root Cause Analysis

Five mutually overlapping causes need to be ruled out, in this order:

5.1 Cause A — Hardware damage from the original mis-wire

Applying +24 V to pins 1 and 11 (Channel 0 and Channel 1 group M+ lines) and 0 V to pins 10 and 20 (M- of groups 0 and 2) is a textbook over-voltage event. The SM 331 input protection network is designed to clamp transients up to ±30 V / 0.5 A for short periods. Continuous 24 V applied to an unused current input path forward-biases the protection diodes to the internal 5 V rail and to the field-side ground, which can weld the protection clamp or rupture the input resistor. The fact that all four channels of groups 0 and 1 are reading 7FFF, and that the SF LED is OFF at startup and ON only in RUN, is consistent with an input that is no longer able to sink the transducer current — the input stage is open or shorted to VCC internally. The fact that the analog output module in the same rack shows the SF behaviour inverted (red at startup, off in RUN) is normal for an SM 332 output and is unrelated.

5.2 Cause B — Wrong STEP 7 measuring type

If HW Config still has the module set to a voltage range (V) or to type D (2-wire current), the module either expects a high-impedance input (voltage) that the current source cannot drive, or it tries to source loop power that the transducer is also sourcing. Both result in 7FFF.

5.3 Cause C — Incorrect M+ / M- polarity on the front connector

The 4–20 mA loop is polarity-sensitive. Reversing M+ and M- on the module reads as a negative overrange in bipolar modes and as 7FFF in unipolar 4–20 mA modes. Because the loop is current, the LED behaviour is the same as for a disconnected input.

5.4 Cause D — Open or floating common return

Wiring "M- of all channels in series" is acceptable in principle for current loops but each junction adds a millivolt-level drop. If the daisy-chain daisy runs through a faulty terminal or a single loose screw, the return path is open and the module sees infinite resistance, which decodes as 7FFF.

5.5 Cause E — SIMATIC Manager project-version mismatch (V5.4 vs V5.5)

HW Config objects are forward-compatible between V5.4 and V5.5 of STEP 7, but the project file is not guaranteed to re-compile cleanly if the same hardware catalog is not installed on the newer tool. If the V5.4 project was opened in V5.5 and saved without re-running "Station -> Save and Compile", a stale GSD or device description can cause the module to come up with default placeholder parameters, which always read 7FFF until the configuration is recompiled and downloaded to the CPU.

6. Diagnostic Buffer Interpretation

Open the online diagnostics in STEP 7: PLC > Module Information > Diagnostic Buffer. The three classes of entries that are relevant here are:

Diagnostic text Meaning Likely cause Action
External error Wiring or transducer fault on the field side Open input, short, over-voltage, transducer dead Verify loop with mA source
Channel parameterization error CPU is sending configuration that the module cannot accept Wrong measuring type, wrong diagnostic enable, wrong interrupt setting Re-check HW Config
Faulty module Module self-test failed (RAM, ADC, calibration) Electrical overstress, ESD, firmware mismatch Replace module
Wire break (channel-specific) Current fell below 4 mA in 4–20 mA mode Open loop, transducer unpowered, wrong polarity Inject 12 mA from calibrator
Overflow (channel-specific) Input > 22 mA or > range end Wrong range, transducer short, voltage on current input Verify scale and type

When the buffer shows External error AND Faulty module AND Channel parameterization error in the same event chain, the most common interpretation is: the original +24 V on the input pins damaged the input stage; the damaged input no longer draws the loop current, so the ADC reports overflow; the module's internal diagnostics then flags both the channel and the module as faulty; the parameterization error is the CPU's reaction to the module's own error frame. In other words, fixing the wiring alone will not clear 7FFF on a damaged module — the unit must be replaced or the affected channels must be re-routed to a known-good group.

7. Step-by-Step Resolution

Follow this sequence. Do not skip ahead.

  1. Isolate power. Open the 24 V breaker feeding the S7-300 backplane and the field. Lock-out / tag-out the cabinet.
  2. Remove the front connector of the SM 331. Open the hinged cover, undo the two locking screws, and pull the connector straight out. This separates the suspect wiring from the module without disturbing the backplane.
  3. Inspect with a DMM. Measure between M+ and M- on the front connector for each group with no field wiring connected. A healthy current-mode input shows open circuit (OL on most meters, > 1 MΩ). A reading of 0 Ω, < 50 Ω, or a diode drop (0.4–0.7 V on diode-test range) on the input pins indicates damaged input protection and the module must be replaced.
  4. Inject a known current. With the front connector still off, connect a portable 4–20 mA calibrator (Beamex MC6, Fluke 754, or any loop calibrator) directly to the M+ and M- terminals of one channel. Set the calibrator to 12.000 mA. Power the CPU. If the input reads 12.000 mA scaled in the PII, the module is healthy. If it still reads 7FFF, the input stage is dead.
  5. Confirm in HW Config. Open the V5.5 SIMATIC Manager project, navigate to the SM 331 slot, double-click to open the object properties. On the Inputs tab, set the measuring type to 4-wire current, 4–20 mA for the group you are testing. Enable "Diagnostic interrupt" and "Wire break check".
  6. Save, compile, and download the hardware configuration. Right-click the station > Save and Compile, then PLC > Download. A STOP-to-RUN transition is required to activate the new configuration.
  7. Verify the reading. Watch the PII in Monitor/Modify. The 12.000 mA calibrator input should appear as the scaled value (e.g. 13824 for 0–27648 scaling in 4–20 mA mode). Anything other than the expected scaled value, or 7FFF, points to a remaining fault.
  8. Reconnect the field wiring one channel at a time. Re-attach the LVDT signal pair (M+ and M- only) to the chosen group. Verify in the PII that the value tracks the mechanical position of the LVDT. If a 7FFF reappears when the LVDT is connected but a 12.000 mA calibrator on the same pins reads correctly, the LVDT or its cable is the source.
  9. Add a signal isolator if the LVDT cannot be made to behave. A loop-powered or aux-powered 4–20 mA isolator (Phoenix Contact MINI MCR, WAGO 857, or Pepperl+Fuchs KFD2) sits between the LVDT and the module. The isolator's input sees the LVDT's ground-referenced current; its output presents a clean, isolated 4–20 mA to the SM 331. This is the standard solution when a transducer is known-good but produces output voltages or impedances outside the SM 331's common-mode envelope (typically ±12 V).
  10. Verify grounding. Bond the panel ground rail to the plant ground at one point only. Run a dedicated shield drain wire from the cable shield at the LVDT end, terminated at the panel ground, not at the SM 331 M- terminal.

8. Replacing a Damaged Module

If the input-stage checks in step 3 show a low-impedance path on the SM 331 input, the unit must be replaced. The drop-in replacement for the 6ES7 331-7KF02-0AB0 is the successor 6ES7 331-7KF02-0AB0 itself (the variant -0AB0 is the current production code; older -0AB0 with firmware < V2.0.0 are still supported). The order numbers, pin-outs, and HW Config object are identical to the failed unit — no project rework is required other than a fresh Save and Compile.

Procedurally:

  1. Note the MLFB, firmware version, and serial number from the front of the failed module.
  2. Open STEP 7 HW Config, right-click the module, choose Object Properties > Diagnostic and confirm the firmware.
  3. Pull the failed unit from the DIN rail, slide the new one in, and lock the coding key to the same position so the 40-pin front connector seats without rewiring.
  4. Power up, download the hardware configuration, verify the SF LED stays off and the calibrator reading tracks.
If the plant has standardized on a different MLFB (e.g. 6ES7 331-1KF02-0AB0 with 8 AI / 16-bit), the HW Config object must be replaced and all symbolic I/O references must be remapped. The 1KF02 is not a true drop-in substitute even though it occupies the same slot.

9. Configuration Walk-through in STEP 7 V5.5

To eliminate configuration as a variable, set the affected module to a known-good state:

  1. In SIMATIC Manager, open the S7 project, expand the S7-300 Station, and double-click Hardware.
  2. Locate the SM 331 in slot 4 (typical). Double-click the module to open its object properties.
  3. On the Basic Parameters tab, confirm Enable diagnostic interrupt is checked.
  4. On the Inputs tab, for each channel group select:
    Measurement type: 4-wire current (C)
    Measuring range: 4–20 mA
  5. Set Smoothing to "None" for the first round of troubleshooting — smoothing averages over 4 / 16 / 32 cycles and can mask a flaky reading.
  6. Click OK, then Station > Save and Compile.
  7. Select the CPU in HW Config and choose PLC > Download to Target System.
  8. Switch the CPU to RUN and observe the PII.

The 4–20 mA range yields the following digital range at 15-bit resolution:

Input current Decimal PII Hex PII Status
0 mA (line fault, open) 0 0 Wire break, if enabled
3.999 mA (below 4 mA) -1 FFFF Underflow
4.000 mA 0 0 Live zero
12.000 mA (mid scale) 13824 3600 Normal
20.000 mA 27648 6C00 Nominal full scale
22.000 mA 29376 72C0 Overrange
> 22.8 mA or open loop 32767 7FFF Overflow / fault

The presence of 7FFF on the PII therefore tells you only that the input is either electrically open, above range, or that the module's ADC is non-functional. It does not, by itself, distinguish between a wiring fault and a hardware fault — that distinction is the job of the loop calibrator test in section 7 step 4.

10. LVDT and 4–20 mA Transducer Compatibility Checklist

Not every 4-wire position transducer is a 4–20 mA current source. The most common variants in industrial use are:

Transducer type Output Compatible with SM 331 type C? Notes
Potentiometric LVDT with 4–20 mA conditioner Current, sinking or sourcing Yes, sourcing preferred Check polarity: most are sourcing (M+ is current out)
DC-DC LVDT with 0–10 V output Voltage No — needs a V-input type Use a V/I converter (250 Ω precision resistor) or a different SM 331 type (e.g. 6ES7 331-7PF01)
Magnetostrictive position sensor, 4-wire, 4–20 mA Current, sourcing Yes Verify common-mode voltage to GND is < 12 V
Strain-gauge LVDT with built-in amplifier Current, sourcing Yes, only if amplifier is 4–20 mA not 0–10 V Many "4-wire" LVDTs are 0–10 V; read the data sheet
Hydraulic LVDT with 24 V excitation and ratiometric output Voltage, ratiometric No Need a dedicated signal conditioner to 4–20 mA

One field-proven failure mode worth flagging: an LVDT specified as "4–20 mA, 4-wire" that is actually a 0–10 V device with a 4-wire connector. With 0–10 V output the SM 331 (in current type) will read 7FFF because the input stage is high impedance and the voltage never develops into the current-loop range. The cure is either to change the LVDT to a true current-output model, or to fit a 250 Ω precision shunt across M+/M- and reconfigure the SM 331 to ±10 V voltage type. The 0.25 mA per 0.25 V conversion yields 4 mA at 1 V and 20 mA at 5 V, which is too low for a 0–10 V LVDT. A full 0–10 V mapping needs 0–10 V to 4–20 mA signal conditioner.

11. Signal Isolator Sizing and Selection

When the loop calibrator test confirms the SM 331 is healthy but the LVDT cannot be brought to within the module's common-mode window, install an isolator. The minimum specification is:

Parameter Minimum Recommended
Input range 4–20 mA 0/4–20 mA selectable
Output range 4–20 mA 0/4–20 mA selectable
Galvanic isolation 1.5 kV AC 3-way isolation, 2.5 kV AC
Loop voltage drop at 20 mA < 4 V < 2.5 V (loop-powered units)
Accuracy at 23 °C 0.2 % of full scale 0.1 % of full scale
Supply Loop-powered (≤ 3.5 V drop) Aux 24 V DC for maximum accuracy
Operating temperature 0 to 55 °C -25 to +70 °C for outdoor cabinets

Common catalog numbers in widespread industrial use: Phoenix Contact MINI MCR-2-UI-I-I (2901998), WAGO 857-402, Pepperl+Fuchs KFD2-STC4-1 (european style) and KCD2-STC (US style). All are DIN-rail mounted, 6 mm wide, and accept 24 V DC aux power.

12. Verification Procedure

After the corrective steps, run a five-point verification before handing the line back to production:

  1. Open-loop test. Disconnect the LVDT from the isolator (or from the module if no isolator). The PII must read 0 and the diagnostic buffer must log a wire break — confirming the diagnostics are enabled.
  2. Calibrator 4 mA. Inject 4.000 mA. PII must be 0. Tolerance ±2 LSB.
  3. Calibrator 12 mA. Inject 12.000 mA. PII must be 13824 ±2 LSB.
  4. Calibrator 20 mA. Inject 20.000 mA. PII must be 27648 ±2 LSB.
  5. LVDT physical sweep. Reconnect the LVDT. Drive the mechanism through its full stroke. The PII must sweep from 0 to 27648 monotonically, with no skipped codes, no 7FFF excursions, and no diagnostic entries in the buffer.

Sign the verification sheet, clear the diagnostic buffer, and archive the project to the version control system.

13. Best Practices and Common Pitfalls

  • Always fit an external fuse (0.5 A fast-blow) on the +24 V feeding the LVDT loop. It is cheaper than a SM 331.
  • Never apply 24 V to the M+ or M- pins of a SM 331 in current mode. The protection network is for transients, not for continuous supply.
  • When migrating a STEP 7 project from V5.4 to V5.5, always run Station > Save and Compile before downloading to the CPU. The hardware catalog must match the installed SIMATIC software version.
  • Use the module's diagnostic interrupt OB82 to catch faults in the user program. An unhandled OB82 will cause the CPU to STOP on the first diagnostic event.
  • Bond the panel ground to plant ground at one point only. Multi-point grounding of a 4–20 mA loop introduces ground loops that read as 50/60 Hz ripple or as a saturated input.
  • Keep the 4–20 mA cable shield bonded at the panel end only. Floating the shield at both ends invites common-mode noise that can push the input above the SM 331's ±12 V common-mode window.
  • For installations with multiple LVDTs, use a single ground bus bar and run a dedicated M- return to the module's M- terminal of each group. Do not daisy-chain the returns through terminal blocks — every junction is a potential open circuit.

14. Cross-Reference: 7KF02 vs Other SM 331 Variants

The 6ES7 331 family includes several closely related MLFBs. Quick disambiguation:

MLFB Channels Resolution Measuring range module Use case
6ES7 331-7KF02-0AB0 8 (4 groups) 12-bit Software (HW Config) General purpose AI
6ES7 331-7PF01-0AB0 8 16-bit Software High-resolution AI
6ES7 331-7PF11-0AB0 8 16-bit Software High-res, with diagnostic interrupt
6ES7 331-1KF02-0AB0 8 12-bit Software Similar to 7KF02, slightly different pinout
6ES7 331-7KB02-0AB0 2 12-bit Software Low-channel-count applications

The 7KF02 remains the most widely deployed 8-channel SM 331 in S7-300 cabinets and is still orderable from Siemens. Always confirm the exact MLFB in Module Information > Identification before ordering a replacement — the variant code (-0AB0 vs -0AB1) is meaningful in STEP 7 hardware catalogs older than V5.5.

15. Document References

FAQ

What does the 7FFF value mean on a Siemens SM 331 analog input?

7FFF (decimal 32767) is the overflow / overrange code. The ADC input is either above the configured full-scale range, electrically open on a 4–20 mA current input, or the input stage of the module is damaged. A loop calibrator test is required to distinguish between a wiring fault and a hardware fault.

Which STEP 7 measuring type should I select for a 4-wire, 4–20 mA transducer?

Select type C (4-wire current, 4–20 mA) in HW Config for the affected channel group. Type D is for 2-wire transmitters that draw loop power from the module; using D on a self-powered 4-wire transducer produces 7FFF and a channel parameterization error.

Can a wrong supply connection permanently damage the 6ES7 331-7KF02-0AB0?

Yes. Applying +24 V to the M+ or M- pins of a current-mode group (for example pins 1, 2, 3, 4, 5, 6, 10, 11, 20 on the 7KF02) can over-stress the input protection network. The diagnostic buffer will report "External error", "Channel parameterization error", and "Faulty module" on every group that saw the over-voltage. The module must be bench-tested with a 4–20 mA calibrator to confirm; replace it if the input stage is open or shorted.

Do I need to recompile a STEP 7 V5.4 project after opening it in V5.5?

Yes, run Station > Save and Compile in HW Config, then download to the CPU. Project files are not always bit-compatible across major SIMATIC Manager versions and a stale configuration can leave the SM 331 in default-parameter mode, which reads 7FFF on every channel.

What is the difference between type C and type D on the SM 331 7KF02?

Type C is for 4-wire transducers (the transducer provides its own 24 V excitation and the module only reads the current loop). Type D is for 2-wire transmitters (the module sources the loop current through the transducer). Selecting D for a 4-wire device causes the module to source 24 V onto M+ and fight the transducer's own supply; the input reads 7FFF.

Why does the SF LED come on only in RUN mode on the SM 331?

The SM 331 performs its input conversion and channel diagnostics once the CPU is in RUN and the configured cycle is started. During startup the module is held in reset and SF is held OFF. When RUN begins, the channel diagnostics run, detect the over-voltage or parameterization error, and assert SF. An analog output module (SM 332) shows the inverse pattern because its diagnostics fire during the output-update cycle at the end of OB1.

Back to blog