1. Problem Statement
An S7-300 station built around a CPU 315-2DP (6ES7 315-2AF03-0AB0 or later) and an SM 331 analog input module (6ES7 331-1KF01-0AB0) is configured for the 4-20 mA measuring range on all eight channels. The engineering team needs to see process counts for currents below 4 mA - specifically 1 mA, 2 mA, and 3 mA - even though the channel type is locked to 4-20 mA. In commissioning, the process image for those channels returns 0, regardless of whether the field transmitter sinks 1, 2, or 3 mA. No wire-break alarm fires either, because the module is configured for a current range and not for the diagnostic 0-20 mA sweep used by Fire & Gas (F&G) detectors.
This is expected behavior, not a hardware fault. The 4-20 mA range on this SM 331 maps 0 counts to 4 mA and 27648 counts to 20 mA; any current below approximately 3.5 mA is treated as underrange, and the input is no longer considered valid once the loop current falls below the module's underrange limit (1.185 mA on the 1KF01). Operators that insist on reading 1, 2, and 3 mA have three real options:
- Reconfigure the channel to 0-20 mA in HW Config (STEP 7) or Device Configuration (TIA Portal), move the front-panel range selector from 'D' (voltage) to 'C' (current 4-wire), and re-download the configuration. The PLC will then return 1382, 2765, and 4147 counts for 1, 2, and 3 mA respectively.
- Leave the channel on 4-20 mA, scale the negative underrange counts back to a millivolt or mA engineering value with FC105 in bipolar mode, and treat the sub-4 mA region as a diagnostic band - this is the technique used for F&G detectors that emit 1.5 mA / 2 mA / 2.5 mA / 3 mA for "dirty optics", "beam blocked", or "alignment drift" alarms.
- Add a 500 Ω precision shunt in parallel with the input, change the channel type to 0-10 V, and let 1/2/3 mA appear as 0.5/1.0/1.5 V on a positive-count scale. Wire-break detection is preserved on a redundant channel.
2. SM 331 6ES7 331-1KF01-0AB0 Module Specifications
The 6ES7 331-1KF01-0AB0 is the SM 331 AI 8 x 13 Bit analog input module (later superseded by 6ES7 331-1KF02-0AB0, then 6ES7 331-7KF02-0AB0 for the system-redundant variant). It provides 8 inputs grouped in 4 pairs of 2; both inputs in a pair share a common ground and must be configured to the same measuring range. Voltage / current is selected with a mechanical range module on the front of the module - the slot positions labelled A, B, C, and D each correspond to a group of two channels.
| Parameter | Value |
|---|---|
| Number of inputs | 8 AI in 4 groups of 2 channels |
| Resolution | 13 bits (12 bits data + sign) |
| Supported measuring ranges (per group) | ±5 V, 0-10 V, ±10 V, 1-5 V, 0-20 mA, 4-20 mA, ±20 mA, Pt100 / Pt1000 / Ni100, thermocouples (with TC range module) |
| Conversion time per channel | 10 / 20 / 30 ms (firmware-selectable, depends on 50 / 60 Hz interference suppression) |
| Input resistance, current | 50 Ω nominal |
| Maximum input current (destruction limit) | ±40 mA continuous |
| Galvanic isolation | Yes, between backplane bus and field terminals |
| Range module positions | A = thermocouple / mV, B = Pt100 RTD 4-wire, C = current 4-wire (0/4-20 mA), D = voltage / Pt100 2-wire (default ship position) |
| Permissible common-mode voltage | ±11 V DC / 8 V AC peak |
| Basic error limit (4-20 mA, 25 °C) | ±0.3 % of full scale |
| Operating temperature | 0 °C to 60 °C horizontal, 0 °C to 40 °C vertical |
| Required backplane current | 60 mA from 5 V, 30 mA from 24 V (encoder supply) |
| Wire-break detection (current mode) | Configurable per group; default enabled on 4-20 mA |
| Diagnostic interrupt | Configurable, OB82 on wire break / overflow / overrange / underrange |
Source: SIMATIC S7-300 Module Data manual (Siemens entry ID 8859629), section 6.2 "SM 331; AI 8 x 13 Bit (6ES7 331-1KF01-0AB0)". Cross-referenced in the SIMATIC S7-300 Automation System manual (entry ID 44240604), chapter 4 "Analog modules".
3. 4-20 mA Range Behavior, Boundary Limits, and Status Bits
The 4-20 mA range on the SM 331 is treated as a unipolar range by STEP 7. The PLC maps 0 counts to 4 mA and 27648 counts to 20 mA, with the standard overrange / underrange fields used across the S7-300 family. The nominal transfer function is:
N = (I_in − 4 mA) × 27648 / 16 mA = 1728 × (I_in − 4 mA)
where N is the integer process value delivered in the PIW (Process Input Word) and I_in is the loop current in mA. The ramp of 1728 counts per mA corresponds to 0.5787 µA (578.7 nA) per STEP 7 LSB. Some legacy documentation quotes a 723.4 nA per LSB figure for the older 6ES7 331-1KF00-0AB0; the 1KF01 hardware uses 578.7 nA per LSB. The 723.4 nA figure actually applies to the 0-20 mA range (1382.4 counts/mA) and has been misapplied in the field - do not mix the two values.
| Boundary | Input current | Counts (decimal) | Counts (hex) | Status bits 14-15 |
|---|---|---|---|---|
| Wire break (open loop) | < 0.5 mA (hardware-dependent) | -32768 | 0x8000 | 112 |
| Underrange, last valid value | 1.185 mA | -4864 | 0xD000 | 012 underrange, or 112 if wire break is asserted |
| Nominal zero (4 mA) | 4.000 mA | 0 | 0x0000 | 002 |
| Nominal full scale (20 mA) | 20.000 mA | 27648 | 0x6C00 | 002 |
| Overrange, last valid value | 22.962 mA | 32767 | 0x7FFF | 102 |
| Overflow (clip) | > 22.962 mA | 32767 | 0x7FFF | 112 |
The 1.185 mA underrange limit is set by the 50 Ω input resistor and the input amplifier rail. The module is not specified to maintain linearity below 1.185 mA; you will see the 0xD000 (-4864) value if you drive exactly 1.185 mA, but the actual reading below that point is implementation-defined and drifts with temperature. Source: S7-300 Module Data manual, section 6.2.3 "Representation of analog values for the 4-20 mA range".
On the S7-300 SM 331, the two MSBs (bits 14 and 15) of every 16-bit process input word carry diagnostic information. The PLC user program must mask these bits before applying FC105 / FC106 SCALE / UNSCALE, because the SCALE function does not strip the status bits by itself.
| Bit 15 | Bit 14 | Meaning | Recommended PLC action |
|---|---|---|---|
| 0 | 0 | OK, value is valid | Use value, FC105 SCALE normally |
| 0 | 1 | Underrange - signal below 4 mA but above 1.185 mA (within linearity range) | Use value with bipolar FC105, raise diagnostic |
| 1 | 0 | Overrange - signal above 20 mA but below 22.96 mA | Use value, raise high-high alarm |
| 1 | 1 | Wire break or overflow | Substitute safe value, raise fault alarm |
4. Calculated Raw Counts for 1 mA, 2 mA, and 3 mA on 4-20 mA
Using the linear transfer function N = 1728 × (I - 4) on the 4-20 mA range, the raw PIW values for the requested test currents are:
| Input current | Calculated counts (decimal) | Hex (16-bit 2's complement) | Bit 14 (UR) | Bit 15 (OR/WB) | PIW pattern |
|---|---|---|---|---|---|
| 1.000 mA | -5184 | 0xEBE0 | 0 | 1 | 0xEBE0 (overrange / UR-flagged) |
| 1.185 mA | -4864 | 0xD000 | 0 | 1 | 0xD000 (overrange / UR-flagged) |
| 2.000 mA | -3456 | 0xF280 | 0 | 1 | 0xF280 (overrange / UR-flagged) |
| 3.000 mA | -1728 | 0xF940 | 0 | 1 | 0xF940 (overrange / UR-flagged) |
| 3.500 mA | -864 | 0xFCA0 | 0 | 1 | 0xFCA0 (overrange / UR-flagged) |
| 4.000 mA | 0 | 0x0000 | 0 | 0 | 0x0000 (OK) |
In practice the SM 331 1KF01 hardware drives bit 14 = 0 and bit 15 = 1 whenever the input current is below the 4 mA nominal range, which trips the FC105 RET_VAL with the bipolar / unipolar flag combination. The negative integer -5184, -3456, and -1728 is mathematically correct, but most SCADA / HMI graphics only show a clipped 0 or a "bad" badge because the status bits are not masked. This is the root cause of the "always 0" report from the field engineer: the raw PIW is not 0, but the user logic or HMI tag is dropping negative values and bad status, so the operator sees 0.
5. Fire & Gas Detector Diagnostics: Why Sub-4 mA Currents Matter
The most common industrial reason to read 1 mA, 2 mA, and 3 mA on a "4-20 mA" loop is a Fire & Gas detector. Open-path gas detectors (e.g. infrared beam detectors from MSA, Drager, Simtronics, General Monitors / MSA Bacharach) and most point infrared / catalytic-bead detectors follow the NAMUR NE 43 convention, which is a 4-20 mA signal with diagnostic currents outside the measurement range:
| Loop current | Meaning | Required PLC action |
|---|---|---|
| ≤ 1.0 mA | Wire break / open loop / loss of power | Hard fault, drive detector trouble alarm |
| 1.0 mA - 2.0 mA | Dirty optics / beam blocked / require maintenance | Maintenance warning, schedule cleaning |
| 2.0 mA - 3.0 mA | Optical alignment drift / pre-fail | Pre-fail warning, schedule alignment |
| 3.0 mA - 3.5 mA | Detector in calibration mode / out of service | Inhibit gas alarm, raise "in cal" tag |
| 3.5 mA - 4.0 mA | Live zero, normal operation, zero gas | OK |
| 4.0 mA - 20.0 mA | Gas measurement, 0-100 % LEL | Standard 4-20 mA read |
| > 21.0 mA | Over-range / gas above 100 % LEL | High gas alarm, evacuate area |
This is why the customer's "configure the alarms for these given current signals" requirement cannot be satisfied with a 4-20 mA channel type and a default 0-100 % scale. The PLC must either (a) reconfigure the SM 331 channel to 0-20 mA so that 1, 2, and 3 mA all map to measurable positive counts, or (b) keep the 4-20 mA type, mask the status bits, and use the negative raw counts to drive a separate F&G diagnostic block. Reference: NAMUR Recommendation NE 43 "Standardization of the signal level for the failure information of digital transmitters".
6. Solution A: Reconfigure the Channel to 0-20 mA
The cleanest fix is to switch the channel to 0-20 mA. The 0-20 mA range on the SM 331 maps 0 counts to 0 mA and 27648 counts to 20 mA, with the same 578.7 nA / LSB resolution. The transfer function becomes:
N = 27648 / 20 × I = 1382.4 × I
| Input current | Calculated counts (decimal) | Hex (16-bit) | Status bits 14-15 |
|---|---|---|---|
| 0.000 mA | 0 | 0x0000 | 00 |
| 1.000 mA | 1382 | 0x0566 | 00 |
| 2.000 mA | 2765 | 0x0ACD | 00 |
| 3.000 mA | 4147 | 0x1033 | 00 |
| 3.500 mA | 4838 | 0x12E6 | 00 |
| 4.000 mA | 5530 | 0x159A | 00 |
| 20.000 mA | 27648 | 0x6C00 | 00 |
The trade-off: 0-20 mA cannot distinguish "true 0 mA" from "wire break" (both read 0 counts). If the application needs to detect a broken loop, use a 4-20 mA channel and the 1/2/3 mA mapping covered in Section 8, or fit an external end-of-line resistor and read back the diagnostic current on a redundant 0-10 V channel.
7. STEP 7 / TIA Portal Configuration and Programming
7.1 Hardware configuration change (STEP 7 V5.5)
- Open SIMATIC Manager with the S7 project. Open the S7-300 station.
- Double-click "Hardware" to open HW Config. Find the SM 331 (typically slot 4).
- Double-click the SM 331 to open "Properties - Analog Input".
- Select the "Inputs" tab. For each channel group that needs to read sub-4 mA, change "Measurement type" from "4DMU (current, 4-wire sensor, 4 to 20 mA)" to "Current (0 to 20 mA)". The dropdown shows the available measuring ranges for the selected channel.
- Click "OK" and save the station (Station > Save and Compile).
- Power down the S7-300 rack. Open the front door of the SM 331. The channel range modules are the small white inserts labelled A, B, C, D behind the door.
- Move the range module for the affected group from position 'D' (default = voltage / 4-wire RTD) to position 'C' (current, 2-wire / 4-wire). The 'C' position is the only one that connects the internal 50 Ω current-sense resistor to the input terminals.
- Close the door, restore rack power, and download the new HW Config to the CPU (PLC > Download to Target).
- Cold-restart the CPU (STOP → MRES → RUN) so the SM 331 re-initializes with the new range. A warm restart leaves the old range active.
7.2 Hardware configuration change (TIA Portal V13 and later)
- Open TIA Portal, navigate to the S7-300 device, and open the Device View.
- Select the SM 331 in the rack. The Properties pane opens below the rack view.
- Expand "Analog inputs" and select the channel group (0-1, 2-3, 4-5, or 6-7).
- Change "Measurement type" from "Current (4-wire transducer, 4 to 20 mA)" to "Current (0 to 20 mA)".
- Compile the project (Project > Compile > Hardware configuration) and download to the target device.
- Power down the rack, flip the range module from 'D' to 'C' on the front of the SM 331, power back up, and perform a STOP → MRES → RUN restart.
7.3 STEP 7 STL / SCL program: FC105 SCALE with 0-20 mA range
Use FC105 from the STEP 7 Standard Library (TI-S7 Converting Blocks / FC105 "SCALE") to convert 0-27648 to 0.0-20.0 mA engineering units. The function strips the status bits and applies the linear scaling automatically. The function block is documented in the STEP 7 V5.5 Standard and System Functions reference manual (entry ID 45524722), chapter 4 "Converting functions".
// S7-300 STL, FC105 SCALE call (0-20 mA, channel 0, IW 512)
// Mask status bits first to be safe
L IW 512
L W#16#3FFF // clear status bits 14 and 15
AW
T MW 200 // MW 200 = clean 0-27648 raw value
CALL "SCALE"
IN := MW200
HI_LIM := 2.000e+001 // 20.0 mA full scale
LO_LIM := 0.000e+000 // 0.0 mA zero
BIPOLAR := FALSE // unipolar
RET_VAL := MW210 // 0 = no error, <> 0 = error
OUT := MD220 // REAL scaled value, e.g. 3.5 = 3.5 mA
NOP 0
To generate discrete flags for the F&G diagnostic currents, branch on the REAL result:
// F&G diagnostic flags, all REAL comparison on MD 220
L MD 220 // scaled mA
L 0.001
<R
= M 100.0 // wire break, current < 1 mA
L MD 220
L 0.001
>=R
L MD 220
L 0.002
<R
= M 100.1 // 1 mA ≤ I < 2 mA, dirty optics
L MD 220
L 0.002
>=R
L MD 220
L 0.003
<R
= M 100.2 // 2 mA ≤ I < 3 mA, alignment drift
L MD 220
L 0.003
>=R
L MD 220
L 0.004
<R
= M 100.3 // 3 mA ≤ I < 4 mA, in calibration
L MD 220
L 0.004
>=R
L MD 220
L 2.000e+001
<R
= M 100.4 // 4 mA ≤ I < 20 mA, valid gas measurement
7.4 SCL variant for TIA Portal
// SCL, TIA Portal V16+, FC105 SCALE on 0-20 mA
// Tag declaration:
// rawInput : WORD // PIW 512
// mA : REAL // scaled value
// wireBreak : BOOL
// dirtyOptics : BOOL
// alignDrift : BOOL
// inCal : BOOL
// gasValid : BOOL
// fcError : WORD
#rawInput := "PIW_512" AND W#16#3FFF;
"SCALE_DB".IN := #rawInput;
"SCALE_DB".HI_LIM := 20.0;
"SCALE_DB".LO_LIM := 0.0;
"SCALE_DB".BIPOLAR := FALSE;
"SCALE_DB"(EN := TRUE);
#mA := "SCALE_DB".OUT;
#fcError := "SCALE_DB".RET_VAL;
#wireBreak := #mA < 1.0;
#dirtyOptics := (#mA >= 1.0) AND (#mA < 2.0);
#alignDrift := (#mA >= 2.0) AND (#mA < 3.0);
#inCal := (#mA >= 3.0) AND (#mA < 4.0);
#gasValid := (#mA >= 4.0) AND (#mA <= 20.0);
8. Solution B: Keep 4-20 mA and Map Sub-4 mA Diagnostics to Alarms
If the F&G detector is a NAMUR NE 43 device that actively uses 1, 2, 3 mA as fault bands, do not reconfigure to 0-20 mA: you will lose the wire-break detection on the open loop. Instead, leave the channel on 4-20 mA, read the negative raw counts, and remap them with FC105 in bipolar mode (BIPOLAR = TRUE, LO_LIM = -4, HI_LIM = 20).
// FC105 with bipolar scaling, 4-20 mA channel, sub-4 mA diagnostics
L IW 512
L W#16#3FFF // mask status bits
AW
T MW 200
CALL "SCALE"
IN := MW200
HI_LIM := 2.000e+001
LO_LIM := -4.000e+000 // -4 mA at 0 counts
BIPOLAR := TRUE // bipolar -27648 to +27648
RET_VAL := MW210
OUT := MD220 // REAL mA, +4.0 to +20.0 nominal, < 0 for diagnostics
NOP 0
Then check the status byte of the PIW directly to distinguish underrange, overrange, and wire break. The 4-20 mA range with sub-4 mA diagnostics requires the application code to use the status bits, not the scaled value, to trigger the F&G maintenance / trouble alarms.
| Scaled mA (FC105, bipolar) | Bit 15 | Bit 14 | Alarm tag |
|---|---|---|---|
| +4.0 to +20.0 | 0 | 0 | None (normal measurement) |
| +3.5 to +3.999 | 0 | 1 | In calibration / zero gas |
| +2.0 to +3.499 | 0 | 1 | Pre-fail / optical alignment drift |
| +1.0 to +1.999 | 0 | 1 | Dirty optics / beam blocked |
| < +1.0 | 1 | 1 | Wire break / loss of power |
| > +21.0 | 1 | 0 | High gas / over-range |
9. Alternative: 0-10 V Range with 500 Ω Precision Shunt
If the field device must remain on 4-20 mA for wire-break detection but the customer insists on a positive-count reading for 1, 2, 3 mA, fit a 500 Ω precision shunt (Vishay VPR221Z or equivalent, 0.1 % tolerance, 5 ppm/°C) in parallel with the SM 331 input and configure the channel for 0-10 V. The voltage drop across the shunt is:
V_shunt = I × 500 Ω = 0.5 V / mA
| Loop current | Voltage at SM 331 input | Counts on 0-10 V range |
|---|---|---|
| 1 mA | 0.5 V | 1382 (0x0566) |
| 2 mA | 1.0 V | 2765 (0x0ACD) |
| 3 mA | 1.5 V | 4147 (0x1033) |
| 4 mA | 2.0 V | 5530 (0x159A) |
| 20 mA | 10.0 V (input clamp) | 27648 (0x6C00) |
This configuration keeps the wire-break information (the transmitter drives 0 mA in fault, the SM 331 input reads 0 V, the F&G logic raises a wire-break alarm on the 0-10 V channel status byte) while exposing 1, 2, 3 mA as positive counts. The trade-off is the loss of the built-in input resistor - the user must wire the shunt externally and document it on the loop drawing - plus the additional compliance voltage required from the transmitter to drive 500 Ω × 20 mA = 10 V of burden.
10. Wiring Reference and Range Module Positions
For 0-20 mA and 4-20 mA operation, the field device is a 4-wire current source (active transmitter). The channel range module on the front of the SM 331 must be in the 'C' position to connect the internal 50 Ω current-sense resistor to the input. The four module positions and their corresponding channel groups are:
| Range module slot | Channel group | Channel numbers | Position 'A' | Position 'B' | Position 'C' | Position 'D' (default) |
|---|---|---|---|---|---|---|
| A | Group 0 | CH0, CH1 | Thermocouple / mV | Pt100 4-wire | Current 0/4-20 mA | Voltage ±5/10 V, Pt100 2-wire |
| B | Group 1 | CH2, CH3 | Thermocouple / mV | Pt100 4-wire | Current 0/4-20 mA | Voltage ±5/10 V, Pt100 2-wire |
| C | Group 2 | CH4, CH5 | Thermocouple / mV | Pt100 4-wire | Current 0/4-20 mA | Voltage ±5/10 V, Pt100 2-wire |
| D | Group 3 | CH6, CH7 | Thermocouple / mV | Pt100 4-wire | Current 0/4-20 mA | Voltage ±5/10 V, Pt100 2-wire |
Connect the positive terminal of the 4-wire transmitter to the channel positive terminal (2, 5, 8, or 11 depending on the group) and the negative terminal to the corresponding M- terminal (3, 6, 9, or 12). The shield should be grounded at the cabinet entry gland, not at the transmitter end, to avoid ground loops. The front-panel door of the SM 331 must remain closed for the range modules to maintain contact.
11. Verification, Commissioning, and Quality Flags
- With the PLC in STOP, use a precision mA source (Beamex MC6, WIKA CEP6000, or any calibrator with 0.025 % accuracy) to inject 4.000 mA, 12.000 mA, and 20.000 mA into the loop.
- Open a VAT (Variable Table) in STEP 7 or a watch table in TIA Portal. Monitor IW 512 (or the relevant input word) and the FC105 output MD 220. Confirm the scaled value matches the injected current within ±0.05 mA (full-scale error of the SM 331 plus calibrator error).
- Reduce the calibrator to 1.000 mA, 2.000 mA, 3.000 mA and confirm the FC105 output reads 1.000, 2.000, 3.000 (on 0-20 mA) or -3.000, -2.000, -1.000 (on 4-20 mA bipolar).
- Open the loop (simulate wire break). Confirm the PIW status bits flip to 112 and the FC105 RET_VAL reports a non-zero error code (W#16#0007 = HI_LIM less than LO_LIM, W#16#0008 = LO_LIM greater than HI_LIM, W#16#0001 to W#16#0006 = overflow variants).
- Force the HMI / SCADA tag to read the new scaled value and confirm the operator page displays the diagnostic bands correctly. If the HMI tag is unsigned, change to signed INT or DINT.
- Re-energize the actual field transmitter and validate the reading against a hand-held calibrator (Fluke 789, Beamex MC5) at the transmitter terminals, including a loop resistance check (typical 250 Ω at the input is normal for HART).
12. Troubleshooting Matrix
| Symptom | Likely cause | Diagnostic step | Fix |
|---|---|---|---|
| PIW reads 0 for all currents, even 20 mA | Range module still in 'D' position, current-sense resistor disconnected | Open SM 331 door, verify range module A/B/C/D position | Move range module to 'C' for current, 'D' for voltage |
| PIW reads 0 for 1, 2, 3 mA but 27648 for 20 mA | Channel still configured 4-20 mA, status bits stripped by HMI | Open online watch table on PIW, check raw 16-bit pattern in hex | Switch HW Config to 0-20 mA OR use bipolar FC105 scaling |
| PIW reads -5184, -3456, -1728 for 1/2/3 mA but HMI shows 0 | HMI tag uses unsigned INT, negative value clipped at 0 | Inspect HMI tag data type (must be signed INT / DINT) | Change tag data type to signed, or add +27648 offset before display |
| PIW reads 0x8000 (-32768) for 1 mA | Wire break detection enabled, loop current below 0.5 mA threshold | Verify current with hand-held mA meter, check loop resistance < 600 Ω | Fix open loop, or disable wire-break detection in HW Config (group properties) |
| PIW reads 0x7FFF (32767) for 1 mA | Overflow flagged, status bits 112, FC105 RET_VAL <> 0 | Check status byte in PIW bits 14-15 in VAT | Re-read the channel with proper status masking, or repair the loop |
| FC105 RET_VAL reports W#16#0007 | HI_LIM less than LO_LIM or invalid bipolar combination | Inspect FC105 input parameters in the call instance | Set LO_LIM = 0, HI_LIM = 20 for 0-20 mA; LO_LIM = -4, HI_LIM = 20 for 4-20 mA bipolar |
| All 8 channels read 0 after range change | Range module moved to wrong position, or HW Config not downloaded | Compare HW Config setting to physical range module, check online > accessible nodes | Re-download HW Config, cold-restart CPU, verify range module position |
| Channels read 27648 even at 4 mA | FC105 wired with wrong HI_LIM / LO_LIM, inverted scaling | Inspect FC105 input block instance DB | For 0-20 mA, HI_LIM = 20.0, LO_LIM = 0.0, BIPOLAR = FALSE |
| Reading fluctuates ± 5-20 counts at steady 4 mA | EMI on the loop, integration time set too fast | Check 50/60 Hz noise, increase conversion time to 30 ms | Set interference frequency suppression to 50 Hz, add 24 V loop filter |
| Channel reads 0xD000 (-4864) for 1.185 mA but goes to 0x8000 below | Wire break detection threshold reached, module flags WB | Check for actual wire break with multimeter in current mode | Repair loop; this is correct module behavior, not a fault |
FAQ
Why does my SM 331 6ES7 331-1KF01-0AB0 return 0 counts when I inject 1 mA on a 4-20 mA channel?
The 4-20 mA range on this module is unipolar: 0 counts = 4 mA, 27648 counts = 20 mA. Currents below 4 mA are returned as negative integers (-5184, -3456, -1728 counts for 1, 2, 3 mA respectively), and bit 15 of the PIW is set to 1 to flag underrange. If your HMI or FC105 logic drops the value because of the underrange status bit, the operator sees a flat 0. To see positive counts, switch the channel to 0-20 mA in HW Config and move the front-panel range module from position 'D' to 'C'.
What is the exact counts-per-mA ramp for the 4-20 mA range on the SM 331 1KF01?
1728 counts per mA, equivalent to 0.5787 µA (578.7 nA) per STEP 7 LSB. The 723.4 nA figure quoted in some legacy documents is the 0-20 mA range ramp (1382.4 counts/mA), not the 4-20 mA range ramp. Do not mix the two values; the field engineer will see a 25 % error in any current calculation done with the wrong ramp.
Can the SM 331 1KF01 measure 0 mA and still detect a wire break on the same channel?
No. The 0-20 mA range cannot distinguish "0 mA = true zero" from "0 mA = broken loop". For combined sub-4 mA reading and wire-break detection, use the 4-20 mA range with bipolar FC105 scaling (LO_LIM = -4, HI_LIM = 20, BIPOLAR = TRUE) and check the PIW status bits 14 and 15 to raise the wire-break alarm in OB82 / OB1.
Does the 0-20 mA reconfiguration require a CPU cold restart?
Yes. The SM 331 only re-initializes the analog input hardware on a cold restart (STOP → MRES → RUN). A warm restart or just downloading the new HW Config will leave the old range active. After the CPU is back in RUN, the FC105 / FC106 logic must be re-loaded and the input PIWs re-mapped in the process image if any addresses changed.
Where can I find the SM 331 1KF01 measuring-range and FC105 reference documentation?
In the SIMATIC S7-300 Module Data manual (Siemens entry ID 8859629), the S7-300 Automation System manual (entry ID 44240604), and the STEP 7 V5.5 Standard and System Functions reference manual (entry ID 45524722), all available on the Siemens Industry Online Support portal. The S7-300 Module Data manual has the per-channel electrical specs, the range module positions, and the diagnostic bit definitions; the Automation System manual has the FC105 / FC106 SCALE / UNSCALE function call examples and the status-byte description.