Problem Overview
A SIMATIC S7-300 station is fitted with an SM 331 analog input module (Siemens order number 6ES7331-7KF02-0AB0). Four thermocouples are wired to channels 0 through 3 and read correctly throughout normal operation. A three-wire PT100 RTD is wired to channels 4 and 5. The PT100 reading starts about +5 °C above the actual process temperature and the error grows to +10 to +12 °C after two to three hours of continuous operation. The cable is shielded and one end of the shield is bonded to ground at the cabinet.
The fault signature — a small positive offset that grows with time — points to one of the following root causes:
- Range card in the channel group (4–5) set for thermocouple or voltage instead of PT100 RTD
- STEP 7 hardware configuration set for the wrong measurement type (for example, TC type K instead of RTD-3L)
- Mismatched lead resistance on the 3-wire RTD cable
- Shield grounding creating a ground loop with the 4–20 mA return or the thermocouple shield
- Self-heating of the PT100 element under continuous excitation
- Loose or corroded terminal screw on the front connector
Because the four thermocouple channels on the same module read correctly, the failure is not a global module or backplane problem. The fault is local to channels 4–5, and that is exactly the channel group on which a wrong range card, a wrong STEP 7 measurement type, or a wiring error would manifest.
Failure Mode and Influence Matrix
| # | Cause | Sign of error | Time behavior | Discriminator |
|---|---|---|---|---|
| 1 | Range card in TC or voltage position | Large positive (often full-scale) | Constant | Open module, inspect position |
| 2 | STEP 7 measurement type wrong (TC instead of RTD) | +5 to +30 °C | Constant | Read HW Config online |
| 3 | 3-wire lead compensation missing or wrong | +1 to +10 °C | Constant | Measure lead resistance |
| 4 | Ground loop in shield | +1 to +15 °C, can drift | Increases with cable heating or EMC | Disconnect shield at field end |
| 5 | Self-heating of PT100 element | +1 to +5 °C | Increases to thermal steady state (10–60 min) | Reduce integration time |
| 6 | Loose terminal on AI or sensor head | +1 to +20 °C, noisy | Can drift with vibration | Re-torque and re-read |
| 7 | Moisture in cable, low insulation resistance | +2 to +20 °C, erratic | Worsens with humidity | Megger test at 500 V |
| 8 | Wrong temperature coefficient (e.g. Pt100 climatic at 3920 ppm) | Scales error with temperature | Constant | Read STEP 7 coefficient setting |
Hardware Identification: 6ES7331-7KF02-0AB0
The 6ES7331-7KF02-0AB0 is the 8-channel, 13-bit analog input module for the SIMATIC S7-300 PLC family. The module is mounted on a standard S7-300 DIN rail terminal and is wired through a 20-pin front connector (typically 6ES7392-1AJ00-0AA0 or equivalent). Each module has the following characteristics relevant to this fault:
- 8 analog inputs in 4 channel groups (0+1, 2+3, 4+5, 6+7)
- Each channel group has its own removable rotary range card
- All four groups can be set independently for voltage, current, thermocouple, or RTD
- Galvanic isolation between the backplane (logic) side and the field side
- 13-bit basic resolution (12-bit plus sign)
- Configurable via STEP 7 (HW Config) or TIA Portal (Device View)
The range card is a small rotary switch inside the module body, accessible only when the module is removed from the rack. Positions on the switch are labeled with letters (commonly A, B, C, D on the 7KF02-0AB0). The position of the card, combined with the STEP 7 hardware configuration, determines the function of the corresponding channel group. Because each channel group is configured independently, the same module can support TC on channels 0–3 and RTD on channels 4–5, provided the range card and the STEP 7 setting both agree for each group.
For the exact range card positions and STEP 7 configuration dialog specific to your firmware release, consult the official Siemens product support page at 6ES7331-7KF02-0AB0 manuals and the SIMATIC S7-300 Module data manual.
PT100 Sensor Fundamentals and IEC 60751
PT100 is a platinum RTD (Resistance Temperature Detector) with a nominal resistance of 100 Ω at 0 °C. The sensor follows IEC 60751, which defines the relationship between temperature and resistance.
| Parameter | Value | Notes |
|---|---|---|
| Nominal resistance at 0 °C | 100.00 Ω | Class A, B, AA tolerance applies |
| Temperature coefficient (α) | 0.00385 Ω/Ω/°C | 3850 ppm/K — "standard" / "European" curve |
| Resistance at 100 °C | 138.51 Ω | Nominal value, no lead compensation |
| Resistance at –200 °C | 18.52 Ω | Low end of Class A |
| Resistance at +850 °C | 390.48 Ω | High end of IEC 60751 specification |
| Lead configuration | 2-, 3-, or 4-wire | 3-wire most common; 4-wire for highest accuracy |
| Excitation current | ≤ 5 mA typical, ≤ 1 mA recommended | Higher current causes self-heating |
| Self-heating coefficient | 0.1 to 0.4 °C/mW | Depends on element mass and immersion |
The relationship between resistance and temperature is given by the Callendar–Van Dusen equation. For temperatures above 0 °C:
R(T) = R0 · (1 + A·T + B·T2)
where A = 3.9083·10−3 °C−1 and B = −5.775·10−7 °C−2. Below 0 °C a third-order term is added. For 3-wire RTDs, the module must be configured to perform lead-resistance compensation; otherwise the lead resistance appears as a positive offset on every reading.
For the formal definition of the PT100 curve, tolerances, and the climatic-range variant, refer to IEC 60751.
Range Card Configuration
The single most common reason a 3-wire PT100 reads positive and erratic on an SM 331 module is that the range card for the channel group is in the wrong position. The 6ES7331-7KF02-0AB0 has a rotary range card with several positions. Two of them are for thermocouple and voltage, and one is for RTD Pt100/Ni100. If the range card is left in a TC or voltage position, the module interprets the voltage developed across the PT100 element as a millivolt signal rather than as a ratiometric resistance. The result is a reading that is offset by tens of degrees, scales incorrectly with the actual temperature, and may even show full-scale or wire break.
Range Card Position Reference (7KF02-0AB0)
| Position | Measurement type | Sensor example |
|---|---|---|
| A | Voltage (±5 V, 0–10 V, 1–5 V, ±10 V) | Standard analog signal |
| B | Thermocouple (types B, E, J, K, L, N, R, S, T, U) | TC type K on channels 0–3 in this case |
| C | RTD (Pt100 / Pt200 / Pt500 / Pt1000 / Ni100) and resistance | Pt100 3-wire on channels 4–5 in this case |
| D | Current (4–20 mA / 0–20 mA) on selected variants | 4–20 mA transmitters |
The above positions are the typical positions on a 6ES7331-7KF02-0AB0. The exact position letter for a given function can differ by firmware release. Always confirm against the rotary switch label and the SIMATIC S7-300 Module data manual before setting a channel group.
Steps to verify the range card on a powered-down module:
- De-energize the S7-300 station. Open the front connector from the SM 331 module.
- Remove the module from the DIN rail by pushing the release slider on the bottom of the module.
- Locate the rotary range card. It is on the side of the module body, marked with letter positions for each of the four channel groups.
- For each channel group, verify the position against the intended measurement type. For a 3-wire PT100, the position must be the one labeled "RTD Pt100" or "Pt x L" (3-wire). For a 4-wire PT100, the position is "RTD 4-wire" or "Pt x" without the "L".
- Re-seat the card firmly and reinstall the module.
Do not change the range card position with the station powered. The card is read at module power-up only, and a live change can leave the module in an inconsistent state. After re-seating the range card, restart the CPU and re-download the hardware configuration.
3-Wire RTD Wiring and Lead Compensation
The SM 331 module uses a ratiometric method for 3-wire RTD measurement. Two current sources of equal magnitude (typically about 1 mA on the 7KF02-0AB0) are switched into the circuit in alternating half-cycles. In one half-cycle, the excitation current flows through the PT100 element and through one of the two lead wires. In the other half-cycle, the current flows through the PT100 and through the other lead wire. The module measures the voltage at the same two terminals for both half-cycles and uses the difference to subtract the lead-wire resistance.
For this compensation to work correctly, three wiring rules must be followed:
- Use the module terminals labeled for 3-wire RTD. The 20-pin front connector has dedicated pins; do not wire to the TC pins by mistake. The 7KF02 module uses pins M, M-, and I+ for each channel group — the exact mapping is in the S7-300 module data manual.
- Both lead wires (the two same-color conductors that go from the sensor head to the module) must be of the same gauge and the same length, so that their DC resistances are equal to within 1 Ω. A typical Pt100 element at 0 °C is 100 Ω; an extra 0.385 Ω per conductor is 1 °C of uncompensated error, and a 5 Ω mismatch can add 13 °C of error.
- The third wire (the return from the other side of the element) is typically the same color as one of the two compensation wires but does not have to be exactly the same length. The third wire carries the same current as the other two in the opposite direction, so its resistance is cancelled by the two compensation leads.
Lead Resistance vs. Measurement Error
| Lead resistance mismatch (L1 − L2) | Uncompensated offset at 0 °C | Uncompensated offset at 100 °C |
|---|---|---|
| 0.0 Ω | 0.0 °C | 0.0 °C |
| 0.4 Ω | +1.0 °C | +0.7 °C |
| 1.0 Ω | +2.6 °C | +1.8 °C |
| 2.0 Ω | +5.2 °C | +3.6 °C |
| 5.0 Ω | +13.0 °C | +9.0 °C |
| 10.0 Ω | +26.0 °C | +18.0 °C |
To measure lead resistance, disconnect the sensor at the head end and short the three terminals. Measure the resistance from each lead to the shorted element with a 4-wire ohmmeter. The two lead resistances should be equal to within 0.1 Ω. If they differ by more than 1 Ω, replace the cable.
A common field error is to wire a 3-wire PT100 to a 4-wire terminal. The 4-wire configuration assumes that no current flows in the sense leads, so the module does not perform any lead-resistance subtraction. The result is a positive offset equal to the lead resistance.
Shield Grounding and Ground Loops
Shielded cable is required for the RTD. The shield must be bonded to ground at exactly one end — typically the cabinet end where the module is mounted — and left floating at the sensor end. The shield provides a low-impedance path for high-frequency noise (VFD common-mode noise, switch-mode harmonics, RF pick-up). It must not be used as a current-carrying conductor.
The standard practice is:
- Strip the outer jacket back far enough to expose 10–20 cm of the shield braid.
- At the cabinet end, clamp the shield to the backplate or to a dedicated shield bar (e.g. 6ES7390-5AA00-0AA0 or equivalent Phoenix Contact SAB) with a 360° low-impedance bond.
- At the sensor end, cut the shield braid short and insulate it with heat-shrink. Do not let it touch the sensor housing or the process pipe.
- Do not connect the shield to a signal-ground terminal or to M- on the front connector. M- is a signal reference, not a shield-bond terminal.
Bonding the shield at both ends creates a ground loop. Any current in the shield (driven by a small potential difference between the two ground points) will flow through the shield. That current couples capacitively into the inner conductors and adds a low-frequency offset. If the loop is large (long cable, two distant earth grounds), the offset can be tens of millivolts, which on a PT100 element appears as +5 to +30 °C of error. The error can drift with time as ground potentials change — for example, when a large motor starts and pulls the local ground potential by 5 V for a few seconds.
The most common ground-loop error on a 3-wire RTD installation is to bond the shield at both ends AND to use the shield as a return conductor for a 24 V field supply. The shield is then a current-carrying conductor, and the RTD element sees a fluctuating offset equal to the I·R drop in the shield. Keep the shield at zero current.
If the field environment forces the shield to be bonded at both ends (for example, for hazardous-area earthing requirements), use a small capacitor (10 nF, 1 kV class) in series with one end of the shield. The capacitor bonds the shield at AC for noise rejection and floats it at DC for the ground loop. The capacitor must be rated for the available fault current and must be installed without degrading the cabinet's IP rating.
STEP 7 Hardware Configuration
The range card sets the hardware. The STEP 7 (or TIA Portal) configuration sets the software. Both must agree. The most common software error is to leave the channel group configured for the original thermocouple type (for example, "TC type K") when the wiring has been changed to a 3-wire RTD. The module then digitizes the ratiometric voltage from the RTD as a thermocouple millivolt value, with no lead-resistance compensation. The reading is offset by the lead resistance and scaled by the wrong gain.
To verify the STEP 7 configuration:
- Open the S7 project in STEP 7 V5.x or TIA Portal.
- Open HW Config (STEP 7) or the Device View (TIA Portal).
- Double-click the SM 331 module to open its Properties dialog.
- Select the "Inputs" tab. For each channel group, the "Measurement type" pull-down must show "RTD" or "Resistance". For a 3-wire PT100, select "RTD-3L" (3-wire with lead compensation). For a 4-wire PT100, select "RTD-4L" or "RTD thermal resistor 4-wire connection".
- Set "Temperature coefficient" to "Pt100 standard (3850 ppm/K)" for IEC 60751 PT100 sensors. Do not select "Pt100 climatic" unless the sensor is explicitly a climatic-range sensor (3920 ppm coefficient on some legacy curves).
- Set "Temperature unit" to °C or °F as required.
- Set "Interference frequency suppression" to 50 Hz (Europe, Asia) or 60 Hz (Americas, parts of Japan). Mismatched interference frequency is one of the most common causes of high reading noise but rarely causes a steady offset.
- Set "Smoothing" to "None", "Low", "Medium", or "High". Higher smoothing reduces noise but adds step-response delay.
- Enable "Group diagnostics" and "Wire break check" so that wire-break and overrange conditions are reported as diagnostics instead of as full-scale readings.
- Compile and download the hardware configuration to the CPU.
STEP 7 Parameter Reference for Channel Group 4–5
| Parameter | Correct setting for 3-wire PT100 | Wrong setting to avoid |
|---|---|---|
| Measurement type | RTD-3L (RT thermal resistor 3-wire connection) | TC type K, voltage, RTD-4L |
| Temperature coefficient | Pt100 standard (3850 ppm/K) | Pt100 climatic, Pt1000, Ni100 |
| Temperature unit | °C (or °F) | None |
| Interference frequency | 50 Hz or 60 Hz (mains) | Wrong mains frequency → noise |
| Smoothing | None / Low | High → slow response, masks drift |
| Group diagnostics | Enabled | Disabled → wire break is full-scale |
| Wire break check | Enabled | Disabled → no burnout detection |
| Reference temperature (TC only) | "Internal" or "none" for RTD | "Internal" left on when type switched to RTD |
For the exact dialog name and option text in your STEP 7 or TIA Portal version, refer to the SIMATIC S7-300 Module data manual and the STEP 7 online help.
Field Diagnostic Measurements
Before changing any wiring or configuration, capture the following measurements to isolate the root cause. Each measurement takes a few minutes and requires only a calibrated 4-wire ohmmeter and a calibrated reference thermometer.
- Disconnect the RTD from the field. At the sensor head, short the three terminals together. Read the SM 331 input value in STEP 7 (Online → Monitor). The reading should be the temperature equivalent of the lead resistance plus the short. For a 0 Ω short, the reading should be 0 °C ± 1 °C.
- Connect a precision decade resistance box (or a 100.00 Ω ± 0.05 Ω standard resistor) to the RTD terminals at the module end, bypassing the cable. Read the SM 331 input value. The reading should be 0 °C ± 0.3 °C for a 100 Ω input.
- Connect the decade box to the far end of the cable (sensor end), leaving the cable in circuit. Set the box to 100.00 Ω. Read the SM 331 input. The reading should still be 0 °C ± 0.5 °C if the 3-wire compensation is working. A reading of +5 °C to +12 °C means the 3-wire compensation is not being applied (wrong measurement type or wrong terminal assignment) or the lead resistance is too high for the module's compensation range.
- Measure the resistance from each of the two lead wires to the third wire with a 4-wire ohmmeter. The two resistances should match to within 0.1 Ω. A difference of 5 Ω or more means the cable is damaged or the wrong cable was used.
- Measure the insulation resistance of the cable with a 500 V megohmmeter between the inner conductors and the shield. The reading should be > 100 MΩ. A lower reading means moisture ingress or insulation damage, both of which cause a positive offset and erratic behavior.
- Use a calibrated reference thermometer (Pt100 handheld with 0.01 °C accuracy, or a calibrated thermocouple with cold-junction compensation) at the same location as the process PT100. Wait 15 minutes for thermal equilibrium, then read both. The offset between the two readings is the absolute error of the installed PT100 measurement chain.
Repeat step 6 after each corrective action (re-seating the range card, changing the STEP 7 measurement type, replacing the cable, etc.). The reading should converge to within 0.5 °C of the reference thermometer once the root cause is fixed.
Correction Procedure
Apply the following steps in order, verifying after each step. Stop when the reading matches the reference thermometer within 0.5 °C.
- De-energize the station. Open the front connector of the SM 331. Remove the module. Verify the range card for channel group 4–5 is in the position labeled "RTD Pt100 3-wire" (or equivalent). Refer to the SM 331 manual for the exact position letter.
- Re-install the module, restore the front connector, and re-energize the station.
- In STEP 7, open HW Config. Double-click the SM 331 module. For channel group 4–5, set the measurement type to "RTD-3L" (3-wire with lead compensation) and the temperature coefficient to "Pt100 standard (3850 ppm/K)".
- Compile and download the hardware configuration. Read the input in STEP 7 online monitor.
- If the reading is still off, de-energize and check the wiring on the front connector. Verify the three wires from the PT100 are on the correct pins for a 3-wire RTD. Verify the shield is bonded at the cabinet end only and isolated at the sensor end.
- If the reading is still off, replace the cable. The most common field failure is a damaged RTD cable where one of the lead wires is partially broken inside the insulation, increasing its resistance.
- If the reading is still off, replace the PT100 element. The element can be open (full-scale or wire break) or shorted (0 Ω). Confirm with a 4-wire ohmmeter at the sensor head.
- After each step, read the input and compare with a calibrated reference thermometer.
Verification and Acceptance
Acceptance criteria for a fixed PT100 measurement chain on the SM 331 are:
- Reading matches the calibrated reference thermometer to within ±0.5 °C at 0 °C, 100 °C, and 200 °C (or the process operating range, whichever is wider).
- Reading is stable to within ±0.1 °C over a 1-hour observation at constant process temperature.
- Wire break detection reports a diagnostic event (not full-scale) when the RTD element is disconnected.
- STEP 7 online diagnostic buffer shows no "Channel fault" or "Wire break" events during normal operation.
Document the range card position, the STEP 7 configuration, the cable type, the cable length, and the offset measured against the reference thermometer. File the document in the loop folder for the RTD measurement point. Repeat the verification annually, or whenever the cable is disturbed.
Frequently Asked Questions
Why does my PT100 reading on the SM 331 start correct and then drift upward over a few hours?
A growing positive offset is most often a thermal effect (self-heating of the sensor element under continuous excitation) or a ground-loop effect (ground potential change driving current in the shield). Reduce the excitation current by selecting a slower integration time in STEP 7, or replace the sensor with a low-thermal-mass Pt100 element. Check that the shield is bonded at one end only and that no current flows in the shield braid.
What is the maximum cable length for a 3-wire PT100 on a 6ES7331-7KF02-0AB0?
The maximum is limited by lead resistance, not by distance. The module performs 3-wire lead compensation up to about 10 Ω per lead on older firmware and 50 Ω per lead on newer firmware. With 0.5 mm² copper cable (35 mΩ/m), 10 Ω corresponds to about 285 m of cable. For longer runs, use a 4-wire PT100 with a separate cable, or use a Pt1000 sensor for the same resistance-to-error ratio.
Can I use the same SM 331 module for thermocouples and PT100 sensors in different channel groups?
Yes. The 6ES7331-7KF02-0AB0 supports different measurement types per channel group. The four thermocouples on channels 0–3 use the TC range card position, the PT100 on channels 4–5 uses the RTD position. The STEP 7 configuration must match the range card for each group, and the wiring on the front connector must match the configured type for each channel.
What is the difference between Pt100 standard and Pt100 climatic in STEP 7?
Pt100 standard (3850 ppm/K) is the IEC 60751 nominal coefficient and covers the full range from –200 °C to +850 °C. Pt100 climatic uses the same nominal coefficient but restricts the output to a narrow band around 0 °C with higher resolution (typically 0.01 °C). Use climatic only when the process is in the climatic range (for example, HVAC or weather stations) and high resolution is required.
How do I distinguish a faulty SM 331 module from a faulty PT100 sensor?
Substitute a calibrated Pt100 simulator or a precision 100 Ω resistor at the module terminals. If the reading is correct, the module is healthy and the fault is in the field wiring or the sensor. If the reading is still wrong, swap the range card, re-check the STEP 7 configuration, and if the fault persists, replace the module.
Why does wire break show as full-scale instead of as a diagnostic on my SM 331?
Wire break detection is disabled in the STEP 7 configuration. Open HW Config, double-click the SM 331, go to the Inputs tab, and enable "Wire break check" for the affected channel group. Compile and download the configuration. With the option enabled, an open RTD will raise a diagnostic event instead of a full-scale reading.