Siemens S7-300 SM 331 7KF02 Replacement: Troubleshooting SF LED

David Krause12 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

Problem Summary

On a Siemens S7-300 rack with a CPU 315-2 PN/DP (6ES7 315-2EH14-0AB0) family controller, the original 6ES7 331-7KF01-0AB0 analog input module in slot 7 was to be replaced with a 6ES7 331-7KF02-0AB0 from shop-stock. The user updated the hardware configuration in STEP 7 (or TIA Portal), saved, compiled, and downloaded the configuration to the CPU. On restart, the new module showed a steady SF (Group Fault) LED and the input value (PIW) for channel group 0 remained pegged at the maximum scaled value (27648 in Siemens S7-300 S7 normalization).

The reported application is two channels wired for 4–20 mA pressure-transmitter loops, scaled in the program via FC105 (SCALE) or equivalent. This article documents the diagnostic path, the Siemens-FAQs that confirm functional equivalence of the two module order numbers, and the bench-test procedure that ultimately resolved the issue: the failing behavior was traced to defective stock modules, not to a hardware-configuration mismatch.

Identifying the Modules: 6ES7 331-7KF01-0AB0 vs 6ES7 331-7KF02-0AB0

Both order numbers refer to the same base product: SM 331, AI 8 × 12 Bit. The eight analog inputs are organized into four channel groups of two channels each. Each group is configured by a measuring range module (range card) inserted on the left side of the module.

SM 331 (AI 8 × 12 Bit) Variant Comparison
Feature 6ES7 331-7KF01-0AB0 6ES7 331-7KF02-0AB0
Function SM 331, AI 8 × 12 Bit SM 331, AI 8 × 12 Bit
Resolution 12 bits (plus sign) 12 bits (plus sign)
Channel count 8 AI in 4 groups 8 AI in 4 groups
Measuring range setup Measuring range module (A–D) Measuring range module (A–D)
Diagnostics interrupts Configurable Configurable
Functional replacement Confirmed: direct replacement (per Siemens Entry ID 7145954)

The two order numbers differ in product revision / life-cycle status, not in the user-facing function. Siemens Entry ID 7145954 confirms the 7KF02 as a directly compatible successor module. The hardware-configuration object identifier in STEP 7 HW Config or TIA Portal device configuration may differ between 7KF01 and 7KF02; selecting the correct module order number in the catalog is mandatory.

Note: Always select the module by the printed order number (e.g. 6ES7 331-7KF02-0AB0) inside HW Config, not by family/type alone. The "MLFB" (machine-readable product code) determines the diagnostic behavior and parameter set.

Root Cause Analysis: Why the SF LED Illuminates

The S7-300 SM 331 raises a group fault (SF LED + diagnostic interrupt when enabled) for several distinct reasons. Each is identifiable in the CPU diagnostic buffer (online via STEP 7: PLC → Module Information → Diagnostic Buffer).

SM 331 SF LED Root Cause Matrix
Potential Cause Diagnostic Buffer Text (typical) Fix
Wrong module selected in HW Config Module does not match configuration / module ID mismatch Replace the catalog entry with the exact MLFB 6ES7 331-7KF02-0AB0 and reload HW Config
Measuring range module missing or wrong position Measuring range module error / channel error Verify the range card is fully seated in position A, B, C, or D matching the configured type/range
Configuration mismatch (e.g. configured for ±10 V, wired 4–20 mA) Range error / wire break depending on settings Match the "Measuring range" dropdown to the range card position and wiring
Defective module (internal ADC or input protection fault) Internal module fault / channel 0–7 short-circuit or overflow Bench-test on a known-good rack; swap with another unit
Wiring error / open input Wire break (when wire-break monitoring is enabled) Inspect terminal block seating and shield grounding
24 V sensor supply missing on 4–20 mA loops Undervoltage / no supply Check that the loop has its 24 V source (transmitter or module-supplied)

In the field case described, the diagnostic buffer pointed at module-level faults that survived across two different 7KF02 units. A third stock 7KF02 passed a 4–20 mA current-loop validator bench test and was successfully installed in the field. Conclusion: the original failure was caused by defective stock modules, not a configuration or wiring problem.

Hardware Configuration in STEP 7 (Classic HW Config)

Use the SIMATIC Manager (STEP 7 V5.x) for the 7KF01/7KF02 substitution path, or the TIA Portal for newer projects. The example below uses STEP 7 V5.x HW Config.

  1. Open the S7 project and double-click Hardware.
  2. Locate the SM 331 in slot 7 of the rack. Right-click → Replace Object → ... 6ES7 331-7KF02-0AB0.
  3. Open the module's Properties dialog and select the Inputs tab.
  4. For each channel group used (group 0 = channels 0 and 1 in this application):
    1. Set Measurement type = 4DMU / 4-wire transducer, current (4–20 mA).
    2. Set Measuring range = 4–20 mA corresponding to the installed measuring range module position D.
    3. Enable Diagnostics interrupt if you want wire-break and overflow events to appear in OB82.
  5. Save, compile, and download HW Config to the CPU.
  6. Perform a CPU restart (STOP → RUN) to initialize the new module.
Critical: A configuration download alone does not fully re-initialize an inserted module in RUN. If you are online and replace a module in a running CPU, a STOP → RUN transition is required, or remove and reinsert the module after the new HW Config is loaded.

Hardware Configuration in TIA Portal

  1. Open the project and navigate to Device configuration.
  2. Delete the 6ES7 331-7KF01-0AB0 entry in slot 7 and add the 6ES7 331-7KF02-0AB0 from the catalog under PLC → S7-300 → SM 331.
  3. Open the module's Properties → Inputs.
  4. Set the channel group to Current, 4-wire transducer, 4–20 mA (the same option exists in TIA Portal as in STEP 7).
  5. Compile (Hardware → Compile) and download to the device.

Measuring Range Module (Range Card) Setup

Both the 7KF01 and the 7KF02 rely on a small measuring range module inserted into a socket on the left side of the SM 331. The position must match the HW Config selection; otherwise the module reports a configuration error and the SF LED lights. Typical positions for the AI 8 × 12 Bit module:

SM 331 AI 8×12 Bit Range Card Positions (Reference)
Position Typical Use
A ±80 mV, thermocouple-type ranges
B ±500 mV, RTD (Pt100, Pt1000)
C ±10 V / 0–10 V voltage
D 4–20 mA, 0–20 mA, ±20 mA current (4-wire transducer)

For this application with 4–20 mA pressure transmitters:

  1. Power down the rack before accessing the range card.
  2. Remove the SM 331 from the rack and identify the small white card on the left side of the module housing.
  3. Pull the card out with a small flat-blade screwdriver; the slot is keyed so the card fits only one way.
  4. Set the card to position D and re-insert fully.
  5. Reinstall the module, power up, and verify the diagnostic buffer is clear.
Caution: The range card is a precision mechanical switch; do not touch the gold pads. A loose or partially seated range card is one of the most common causes of a stuck-at-maximum analog reading on S7-300 SM 331 modules.

4–20 mA Wiring and Scaling

For a 4-wire (separately powered) pressure transmitter, the wiring is:

4–20 mA 4-Wire Transmitter Wiring to SM 331 Terminal Block
SM 331 Terminal Signal
M+ (channel n) Transmitter signal +
M− (channel n) Transmitter signal − (return)
External 24 VDC Transmitter power +
External 24 VDC GND Transmitter power −

Siemens S7-300 S7 normalization yields the integer range 0 to 27648 for unipolar current inputs. The scaling formula used in the application is the standard FC105 (SCALE) mapping:

// FC105 SCALE block
// IN  = PIW (e.g. PIW 304 for slot 7, channel 0)
// HI_LIM = engineering value at 20 mA (e.g. 150.0 PSI)
// LO_LIM = engineering value at  4 mA (e.g.   0.0 PSI)
// BIPOLAR = FALSE for 4-20 mA
// OUT = real engineering value

     CALL  "SCALE"
      IN     := "DB_Pressure".PIW_Raw      // INT 0..27648
      HI_LIM := 1.500000e+02                 // 150.0 PSI
      LO_LIM := 0.000000e+00                 //   0.0 PSI
      BIPOLAR:= FALSE
      RET_VAL:= "DB_Pressure".ScaleRetVal   // WORD (status)
      OUT    := "DB_Pressure".Pressure_PSI  // REAL

If the raw PIW reads 27648 (overflow) and stays there, the most likely causes are:

  • Hardware fault (open input with wire-break monitoring disabled but ADC reference is lost).
  • Configuration of channel as voltage (with current input, the value clamps to positive full scale).
  • Defective input stage on the module (this is the case that was ultimately diagnosed as the failure mode of the stock 7KF02 units).

Stock Module Pre-Installation Bench Test Procedure

Whenever a replacement S7-300 module is pulled from shop-stock, especially one that has not been in a sealed factory box, bench-test it before installing it in a running machine. The bench test catches the exact failure mode encountered in this case.

Test Rack Setup

  1. Build a small test rack with a working S7-300 CPU (e.g. CPU 312 or CPU 315-2 PN/DP) and the candidate SM 331 in any free slot.
  2. Wire a current loop calibrator / validator (4–20 mA source) to channel 0 of the module.
  3. Connect the validator leads to M+ and M− of channel 0 (4-wire mode).
  4. Set the validator to output 4.000 mA, then 12.000 mA, then 20.000 mA.

Test Program and Acceptance Criteria

Create a small test DB and a watch table that displays the PIW for channel 0 in three different conditions:

Bench Test Acceptance Limits (4–20 mA, 12-Bit Range)
Current Source Expected PIW (raw) Acceptable Range
4.000 mA 0 0 ± 50
12.000 mA 13824 13824 ± 100
20.000 mA 27648 27648 ± 50

A module that pegs at 27648 with the input shorted to 0 mA, or that lights the SF LED on a freshly configured and downloaded rack, is defective and must be returned to stock as rejected. The two failed 7KF02 units in this field case both showed this exact behavior and were subsequently removed from inventory.

Documented Test Result

  • Unit 1 (6ES7 331-7KF02-0AB0, stock no. A): SF LED on, PIW 27648 at 0 mA → FAIL
  • Unit 2 (6ES7 331-7KF02-0AB0, stock no. B): SF LED on, PIW 27648 at 0 mA → FAIL
  • Unit 3 (6ES7 331-7KF02-0AB0, stock no. C): SF LED off, PIW within range → PASS → installed in the field → confirmed working on the machine

Field Verification Procedure

After the field installation, perform the following verification checks before placing the machine back in production:

  1. Confirm the SF LED on the SM 331 is off.
  2. Open PLC → Module Information for slot 7 and confirm Module OK with no entry-level fault.
  3. In the diagnostic buffer, confirm no recent Module fault or Channel fault entries.
  4. Open a watch table and monitor the PIW for the two pressure channels under normal operating conditions. Confirm a stable integer between 0 and 27648.
  5. Force a known pressure on the transmitter with a hand pump and confirm the engineering value in the HMI matches.
  6. Disconnect one wire of a 4–20 mA loop with diagnostics interrupt enabled and confirm OB82 fires; reconnect and confirm OB82 clear.
  7. Cycle the CPU to STOP and back to RUN and confirm the module initializes without an SF event.

Diagnostic Troubleshooting Matrix

Symptom → Cause → Action for SM 331 7KF01 / 7KF02
Symptom Likely Cause Action
SF LED on, PIW 0 on all channels Range card missing, wrong position, or module defective Power down, re-seat range card in correct position; replace module if still faulted
SF LED on, PIW 27648 on configured channels Configuration mismatch or defective ADC input stage Re-verify HW Config measuring range matches range card; bench-test the module
SF LED off, PIW 0 on a single channel Open wire on a 4–20 mA loop Check terminal block torque, shield termination, and transmitter output
SF LED off, PIW 27648 on a single channel Wire break with diagnostics disabled, or out-of-range high pressure Confirm transmitter output with a milliamp meter; enable wire-break diagnostics if needed
SF LED off, PIW noisy or drifting Shield not grounded, EMI, or loop not isolated Re-terminate shield at cabinet ground only; separate analog and power wiring
SF LED on after STEP 7 HW Config download, no change in field wiring Module order number in HW Config not updated Replace the catalog object with the correct MLFB and reload HW Config

Lessons Learned and Best Practices

  • Test every stock module before field installation. Modules that have been sitting in shop drawers for months are at higher risk of being defective than factory-sealed replacements.
  • Inspect the range card before insertion. A loose or improperly seated range card is the most common configuration-error source on the AI 8 × 12 Bit module.
  • Always re-verify HW Config when changing MLFB. Even when Siemens lists two order numbers as functional replacements, the catalog object in HW Config / TIA Portal must be updated to the new MLFB.
  • Document the failed unit and the asset tag. Failed stock items should be physically segregated and marked for RMA, not returned to general inventory.
  • Use the diagnostic buffer first. Reading OB82 / module information before swapping modules saves time on complex multi-channel installations.

Alternate Platform Notes

Spare-parts validation challenges of this kind are not unique to Siemens S7-300. The general principle of pre-installation bench-testing applies across platforms:

  • For Allen-Bradley / Rockwell Automation ControlLogix and PLC-5 systems, equivalent analog input modules such as the 1771-IFE / 1771-NIV (covered in user manual 1771-UM665) have similar input-stage failure modes when stored for long periods.
  • For AutomationDirect Productivity2000 systems, multi-channel current analog input modules such as the P2-08AD-1 / P2-16AD-1 families follow the same bench-test principle: short the input, confirm 0 raw counts, and apply 4 / 12 / 20 mA to verify the full scale before installation.

FAQ

Is the 6ES7 331-7KF02-0AB0 a direct replacement for the 6ES7 331-7KF01-0AB0?

Yes. Both are SM 331 AI 8 × 12 Bit modules with the same channel count, resolution, and measuring range module concept. Siemens Entry ID 7145954 confirms the 7KF02 as a directly compatible successor. You must update the catalog object in STEP 7 HW Config (or TIA Portal device configuration) to the new MLFB before downloading.

Why is the SF LED on after I swap the module and the PIW reads 27648?

Common causes are: (1) the catalog object in HW Config still points at 7KF01, (2) the measuring range module on the side of the module is missing or in the wrong position (position D is required for 4–20 mA), (3) the channel group is configured for voltage instead of current, or (4) the replacement module itself is defective. Read the CPU diagnostic buffer (PLC → Module Information → Diagnostic Buffer) to isolate the cause.

What is the correct measuring range module position for 4–20 mA on the AI 8 × 12 Bit?

Position D. The four positions are A (±80 mV / thermocouple), B (±500 mV / RTD), C (voltage ±10 V), and D (current 4–20 mA / 0–20 mA / ±20 mA, 4-wire transducer). The position in HW Config must match the physical range card.

How do I bench-test a stock SM 331 before installing it in the field?

Place the module in a test rack with a working CPU, wire a 4–20 mA current calibrator to channel 0, and verify the raw PIW reads 0 ± 50 at 4 mA, 13824 ± 100 at 12 mA, and 27648 ± 50 at 20 mA. The SF LED must remain off. A module that pegs at 27648 with the input shorted is defective and must be rejected.

Do I need a CPU STOP → RUN transition when I swap SM 331 modules?

Yes, in almost all cases. STEP 7 and TIA Portal do not fully re-initialize a hot-swapped analog module on a running CPU. After downloading the new HW Config, cycle the CPU or physically remove and reinsert the module to force re-initialization. Always power down before re-seating the measuring range module itself.

Back to blog