An ET200M station built around an IM 153-4 PN (PROFINET interface module) reports module and channel faults correctly inside the STEP 7 / TIA Portal "Online > IO Device Diagnostics" view, but the same information never reaches the user program. Engineers typically call SFC 51 (RDSYSST) with SSL_ID = W#16#0C91 and get a partial rack/slot state, then try SFC 13 (DPNRM_DG) — which comes back with RET_VAL = W#16#8093 on every call. The fix is not a wiring change or a different LADDR; it is replacing DPNRM_DG with the PROFINET record read service exposed as SFB 52 (RDREC) and reading the standardized IEC 61784-2 diagnostic records (0x8000, 0x800A, 0x8028) the IM 153-4 already publishes on the PROFINET stack.
1. Problem Definition: SFC 13 8093 on PROFINET
Two symptoms occur together on an ET200M with IM 153-4 PN, DI32 and DO32 modules and a fiber laser coupler:
- SFC 51 (RDSYSST) with SSL_ID W#16#0C91 returns a 4-byte slot record per module (rack / slot / status / channel count). It is correct, but it does not contain the channel-level fault bytes that STEP 7 displays in the IO Device Diagnostics tab — "Module missing in slot 0.2", "Wire break on DO32 channel 5", "Short circuit on DI32 channel 1". Those bytes live in a different layer of the PROFINET IO model.
-
SFC 13 (DPNRM_DG) returns
RET_VAL = W#16#8093(LADDR specifies a module that does not support this SFC, or the LADDR is not a DP slave address). The block will never succeed for that LADDR no matter how the parameters are set.
The IO Device Diagnostics tab in STEP 7 / TIA reads the same records that the user program can read with SFB 52 (RDREC). RDREC exists on every S7-300/400 CPU as a system function block (SFB 52) and on every S7-1500/1200 CPU as an instruction with the same semantics. With the right record numbers and the right slot address, RDREC exposes everything the IO Device Diagnostics tab shows: missing module, wrong module, channel fault, maintenance event, and port/interface diagnostics.
2. ET200M IM 153-4 PN Variants and Required Firmware
Several IM 153-4 variants exist. Confirm the part number, hardware release and firmware before reading diagnostics, because record support was added incrementally.
| Article number | Description | FW required | Notes |
|---|---|---|---|
| 6ES7153-4BA00-0XB0 | IM 153-4 PN (PROFINET IO, copper) | V4.0+ | Standard PROFINET IO device, supports records 0x8000/0x800A/0x8028 |
| 6ES7153-4AA00-0XB0 | IM 153-4 PN IO (PROFINET IO, copper) | V5.0+ | Same diagnostic record set, supports isochronous mode |
| 6ES7153-4DA00-0XB0 | IM 153-4 PN IO (PROFINET IO, fiber SC) | V5.0+ | Fiber variant; PROFINET diagnostics include port 0x8029 entries for the FO ports |
| 6ES7153-4BA00-0XB0 with FW < V3.0 | Pre-PROFINET-V2 firmware | Update required | Some channel diagnostic records return 0x80D5 (Index not available); update the IM via SIMATIC Micro Memory Card (MMC) before commissioning |
For deeper details on the diagnostics chain inside the ET200M, see the official operating instructions: IM 153-2 / IM 153-4 ET 200M Operating Instructions (Siemens) and the SIMATIC ET 200M product finder (PI / Profibus & PROFINET International).
3. SFC 51 SSL_ID W#16#0C91 Output Structure
SFC 51 (RDSYSST) reads a System State List (SZL / SSL) sub-list. For PROFINET IO devices, the relevant sub-list is W#16#0C91. Each call to SFC 51 returns the partial list starting at the supplied INDEX. The output block is a 4-word / 8-byte record per slot:
| Word offset | Field | Meaning |
|---|---|---|
| 0 | HW_ID (rack 0 / station) | Logical address of the IO device (= PROFINET IO device diagnostic address) |
| 1 | SLOT_NO | Slot number 0..255; slot 0 is the IM, slots 1..n are I/O modules |
| 2 | STATUS (WORD) | Bit-coded status (see below) |
| 3 | CHAN_COUNT | Number of channels of the module in this slot (DI32 = 32, DO32 = 32) |
STATUS word bit assignments (subset of W#16#0C91):
| Bit | Symbol | Meaning |
|---|---|---|
| 0 | MOD_OK | Module OK, no fault |
| 1 | MOD_FAULT | Module fault (e.g. channel fault, parameterization error) |
| 2 | MOD_MISS | Module missing or pulled |
| 3 | MOD_SUBST | Substitute / wrong module plugged |
| 4 | MOD_DISABLED | Module disabled in HW Config |
| 5 | MOD_MAINT | Maintenance required / demanded |
| 6 | MOD_NOT_READY | Module not ready (e.g. start-up) |
| 7..15 | reserved | 0 |
That is the limit of W#16#0C91. It does not tell you which channel is in fault, which channel has a wire break, or why the DO32 reports a short circuit. For that, move to SFB 52.
4. Why SFC 13 (DPNRM_DG) Returns 8093 on PROFINET
DPNRM_DG reads the PROFIBUS DP slave diagnostic buffer using the "Read Slave Diagnosis" service (SDN). The call sequence is:
- SFC 13 issues a PROFIBUS DP layer-2 read on the LADDR.
- The PROFIBUS DP master cycles the slave, retrieves the 6-byte standard diagnosis header, and returns it to the caller's RECORD buffer.
- The PROFINET IO stack on the same CPU has no such read service; it has a record-read (RDBREC).
When the LADDR is a PROFINET IO device address (which is the case for the IM 153-4 PN in HW Config — "PROFINET interface" slot 0 with a diagnostic address in the 0..1023 PROFINET range, e.g. 1536 or whatever is configured), the call cannot be routed to a PROFIBUS DP master. SFC 13 therefore returns:
| RET_VAL | Meaning | Remedy |
|---|---|---|
| W#16#7000 / 7001 / 7002 | Job state (idle / first / subsequent) | None; informational |
| W#16#8090 | LADDR invalid (e.g. zero or not present in SDB) | Verify LADDR against HW Config — the diagnostic address of the IO device, not a slot address |
| W#16#8093 | LADDR belongs to a module that does not support DPNRM_DG (e.g. a PROFINET IO device) | Replace DPNRM_DG with SFB 52 (RDREC) on the same LADDR |
| W#16#80B0 | Slave / device not available | Check cabling, IM power, PROFINET name and IP |
| W#16#80B1 | Data length error | RECORD length mismatch; MLEN > 32 byte minimum |
| W#16#80C0..80C3 | Resource / timing error | Retry or extend wait time |
| W#16#80D0..80D2 | Not in S7 data set / slot not configured / data set being processed | Re-check slot; the LADDR may be a slot, not a device |
5. PROFINET IO Diagnostic Record Map
PROFINET IO defines a fixed set of record numbers that any IO device must (or may) support. The IM 153-4 PN implements the records in the table below. Calling SFB 52 with RECNUM set to one of these values gives the data STEP 7 displays in the IO Device Diagnostics tab.
| Record | Name | Returned length | What it contains |
|---|---|---|---|
| 0x0000 | Index 0 (header) | 4 byte min. | First 4 bytes of the module record — the block type / length. Must be read first on some IM revisions |
| 0x8000 | Diagnosis Data (header) | 4..64 byte | Block type, block length, block version, alarm state, slot, channel, channel properties, manufacturer-specific data |
| 0x800A | Channel diagnostics (single) | 6..30 byte | One channel fault: slot, channel, channel error type, direction, manufacturer data |
| 0x800B | Channel diagnostics (multiple) | variable | Multiple channel faults chained together; length derived from header |
| 0x8010 | Multi-channel encoder / actuator data | variable | For SM modules that publish per-channel quality info |
| 0x8028 | Expected / Actual configuration | 4..n*4 byte | One 4-byte record per slot: expected module ID, actual module ID, mismatch flag — the source of the "Module missing in slot 0.2" line in TIA |
| 0x8029 | PD Port Data (interface / port) | variable | Per-port link state, speed, MAU type — for the IM 153-4 PN fiber variant the two fiber ports are reported here |
| 0x802A | PD Interface Data | variable | Line, ring, MRP/MRPD state, multiple interface selection |
| 0xC00A | Maintenance (PROFINET V2) | variable | Maintenance required / demanded events; channels, priority, cause |
| 0xF841 | I&M0 / I&M1..4 | 64 byte per record | Identification & maintenance data — serial, order, hardware base/version, profile ID |
| 0xAFF0..0xAFFF | Manufacturer-specific | variable | Siemens-specific records, e.g. for fiber coupler status |
The two records that answer the original "Module missing in slot 0.2" and "channel fault on DI32 / DO32" questions are 0x8028 (configuration mismatch) and 0x800A / 0x800B (channel diagnostics). Read them in this order:
- 0x8000 — header; tells you how many channel diagnostic blocks are pending.
- 0x8028 — expected vs. actual; tells you which slots differ from configuration.
- 0x800A — single channel fault; repeat as long as the device returns data, then 0x800B for chained faults.
6. SFB 52 RDREC Implementation Flow
SFB 52 is the read-data-record function block. Signature (S7-300 / S7-400 / WinAC):
| Input / output | Type | Meaning |
|---|---|---|
| REQ | BOOL | Edge-triggered job start; do not hold TRUE |
| IOID | BYTE | B#16#00 = header / device record; B#16#54 = input slot; B#16#55 = output slot |
| LADDR | WORD | Logical address of the IO device (header) or the slot (channel record) |
| RECNUM | BYTE | Record number 0..255 (PROFINET 0x8000 etc.) |
| MLEN | INT | Max byte count of RECORD buffer |
| RET_VAL | INT | Function return value (0 = OK, see error table below) |
| BUSY | BOOL | TRUE while the job is active |
| RECORD | VARIANT (ANY) | Target buffer for the record payload |
The SFB must be called twice per record read: once with REQ = TRUE to start, then again with REQ = FALSE to poll BUSY / RET_VAL until the job completes. This is mandatory on S7-300 / S7-400 because the SFB does not run asynchronously in the same cycle.
LADDR choice is the most common error. For:
-
Header / device records (0x8000, 0x8028, 0xF841, 0xC00A): use the IO device diagnostic address (e.g. 1536) and
IOID = B#16#00. -
Channel records (0x800A, 0x800B) that target a specific slot: use the slot's input or output address (e.g. 0 for slot 1 DI32 if that module starts at IW 0) and
IOID = B#16#54(input) orIOID = B#16#55(output).
7. Reading Channel Diagnostics (0x800A) and Module Status (0x8028)
The 0x800A channel diagnostic record is the one engineers want when the IO Device Diagnostics tab says "Wire break" or "Short circuit" for a single channel. Layout:
| Byte | Name | Meaning |
|---|---|---|
| 0 | BlockType | 0x0010 (manufacturer-specific); this identifies the block as PROFINET diagnostics |
| 1 | BlockType (cont.) | -- |
| 2 | BlockLength | Length of the block from byte 6 onward |
| 3 | BlockLength (cont.) | -- |
| 4 | BlockVersion | 0x0100 for V1, 0x0101 for V2 |
| 5 | reserved | 0 |
| 6..7 | Slot / Submodule | Slot number 0..255, plus submodule if any |
| 8..9 | ChannelNumber | Channel 0..n (DI32 channel 0..31) |
| 10..11 | ChannelErrorType | Manufacturer-specific / PROFINET error type (see table below) |
| 12..13 | Direction | 0x0000 = unspecified, 0x0001 = input, 0x0002 = output |
| 14..15 | reserved | 0 |
| 16..31 | Manufacturer-specific data | Module vendor extension, e.g. 0x3001 wire break on DI, 0x3002 short circuit on DO |
Common ChannelErrorType values for DI32 (6ES7321-1BL00-0AA0) and DO32 (6ES7322-1BL00-0AA0):
| ChannelErrorType | Meaning | Typical module |
|---|---|---|
| 0x0000 | No error / no fault | All |
| 0x0001 | Short circuit | DI32, DO32 |
| 0x0002 | Undervoltage (sensor supply) | DI32 |
| 0x0003 | Overvoltage | DO32 |
| 0x0004 | Overload | DO32 |
| 0x0005 | Overtemperature | DO32 |
| 0x0006 | Wire break | DI32 (with diagnostic enable), DO32 |
| 0x0007 | Upper limit exceeded | AI modules |
| 0x0008 | Lower limit exceeded | AI modules |
| 0x0009 | Configuration error | All (module / channel parameter wrong) |
| 0x000A | Communication error to sensor / actuator | All |
| 0x3001 | Siemens-specific: wire break (DO) | DO32 |
| 0x3002 | Siemens-specific: short circuit (DO) | DO32 |
| 0x3003 | Siemens-specific: thermal overload | DO32 |
Record 0x8028 (Expected/Actual) layout: a 4-byte header followed by n 4-byte slot records (where n = number of slots in the configuration). Each slot record contains:
| Byte (per slot record) | Meaning |
|---|---|
| 0 | Slot number 0..255 |
| 1 | Module ID expected (1 = no module expected, 0xFF = reserved) |
| 2 | Module ID actual (0xFF = slot empty / module pulled) |
| 3 | Flags: bit 0 mismatch, bit 1 wrong module, bit 2 missing module, bit 3 wrong submodule |
Decoding "Module missing in slot 0,0,0,2" from the user's original report: the path is 0.0.0.2 — PROFINET IO device 0, slot 0, submodule 0, channel 2. After reading 0x8028, locate the slot record with slot = 0, flags bit 2 set (= missing). That is the "missing in slot 0,0,0,2" entry shown in TIA / STEP 7.
8. SCL Code: FB_ET200M_PROFINET_DIAG
The following SCL block reads all three primary diagnostic records for a single ET200M station with one IO device diagnostic address. It is designed to run in a low-priority OB (OB 1 / OB 35) on an S7-300/400 with the IM 153-4 PN configured in HW Config.
FUNCTION_BLOCK FB_ET200M_PROFINET_DIAG
TITLE = 'ET200M PROFINET Diagnostic Reader (IM 153-4 PN)'
VAR
// --- inputs ---
i_LADDR_DEVICE : INT := 1536; // IO device diagnostic address
i_LADDR_DI32 : INT := 0; // DI32 start address (input slot)
i_LADDR_DO32 : INT := 4; // DO32 start address (output slot)
i_CYCLE_TRIGGER : BOOL; // edge-triggered start from OB1
// --- RDREC instances (one per record) ---
sfb52_hdr : SFB52; // reads 0x8000 header
sfb52_cfg : SFB52; // reads 0x8028 expected/actual
sfb52_chan : SFB52; // reads 0x800A channel diag
// --- state machine ---
s_state : INT := 0;
s_done : BOOL;
s_err : BOOL;
s_status : WORD;
s_len : INT;
// --- target buffers ---
b_hdr : ARRAY[0..63] OF BYTE;
b_cfg : ARRAY[0..127] OF BYTE;
b_chan : ARRAY[0..63] OF BYTE;
// --- decoded ---
i_pending_chan : INT; // pending channel events from 0x8000
w_channel_err : WORD; // last channel error type
b_slot_missing : BOOL; // one of the slots is missing
END_VAR
BEGIN
IF i_CYCLE_TRIGGER THEN
s_done := FALSE;
s_err := FALSE;
CASE s_state OF
// ---------------------------------------------------------------
// 0: read 0x8000 (header) - tells us if events are pending
// ---------------------------------------------------------------
0:
sfb52_hdr(REQ := TRUE,
IOID := B#16#00, // header / device
LADDR := INT_TO_WORD(i_LADDR_DEVICE),
RECNUM := B#16#80, // 0x8000 low byte (high byte via MLEN/proc)
// Note: some tools expose RECNUM as DWORD; pass DW#16#8000 if so
MLEN := 32,
RET_VAL := s_status,
BUSY := s_done,
RECORD := b_hdr);
s_state := 1;
1:
sfb52_hdr(REQ := FALSE,
IOID := B#16#00,
LADDR := INT_TO_WORD(i_LADDR_DEVICE),
RECNUM := DW#16#8000,
MLEN := 32,
RET_VAL := s_status,
BUSY := s_done,
RECORD := b_hdr);
IF NOT s_done THEN
IF s_status = 0 THEN
// Byte 8-9 of header: number of pending channel diagnostics
i_pending_chan := WORD_TO_INT(BYTE_TO_WORD(b_hdr[8]));
s_state := 10;
ELSE
s_err := TRUE;
s_state := 99; // jump to error handler
END_IF;
END_IF;
// ---------------------------------------------------------------
// 10: read 0x8028 (expected/actual)
// ---------------------------------------------------------------
10:
sfb52_cfg(REQ := TRUE,
IOID := B#16#00,
LADDR := INT_TO_WORD(i_LADDR_DEVICE),
RECNUM := DW#16#8028,
MLEN := 128,
RET_VAL := s_status,
BUSY := s_done,
RECORD := b_cfg);
s_state := 11;
11:
sfb52_cfg(REQ := FALSE,
IOID := B#16#00,
LADDR := INT_TO_WORD(i_LADDR_DEVICE),
RECNUM := DW#16#8028,
MLEN := 128,
RET_VAL := s_status,
BUSY := s_done,
RECORD := b_cfg);
IF NOT s_done THEN
IF s_status = 0 THEN
// Decode slot records from b_cfg starting at offset 4
s_len := WORD_TO_INT(BYTE_TO_WORD(b_cfg[2]));
b_slot_missing := FALSE;
// Loop over slot records; simplify to 1..32 slots here
FOR n := 1 TO 32 DO
IF (b_cfg[4 + (n-1)*4 + 3] AND B#16#04) <> 0 THEN
b_slot_missing := TRUE; // bit 2 = missing
END_IF;
END_FOR;
s_state := 20;
ELSE
s_err := TRUE;
s_state := 99;
END_IF;
END_IF;
// ---------------------------------------------------------------
// 20: read 0x800A (channel diagnostics) - single channel
// ---------------------------------------------------------------
20:
sfb52_chan(REQ := TRUE,
IOID := B#16#54, // input slot (DI32)
LADDR := INT_TO_WORD(i_LADDR_DI32),
RECNUM := DW#16#800A,
MLEN := 32,
RET_VAL := s_status,
BUSY := s_done,
RECORD := b_chan);
s_state := 21;
21:
sfb52_chan(REQ := FALSE,
IOID := B#16#54,
LADDR := INT_TO_WORD(i_LADDR_DI32),
RECNUM := DW#16#800A,
MLEN := 32,
RET_VAL := s_status,
BUSY := s_done,
RECORD := b_chan);
IF NOT s_done THEN
IF s_status = 0 THEN
// Channel error type at bytes 10..11
w_channel_err := SHL(IN := BYTE_TO_WORD(b_chan[10]), N := 8)
OR BYTE_TO_WORD(b_chan[11]);
s_state := 30; // continue with DO32 (separate block / re-trigger)
ELSIF s_status = DW#16#80D5 THEN
// No diagnostic data on this slot - normal if DI32 is healthy
s_state := 30;
ELSE
s_err := TRUE;
s_state := 99;
END_IF;
END_IF;
30:
s_state := 0; // cycle complete, wait for next trigger
99: // error handler - re-arm
s_state := 0;
END_CASE;
END_IF;
END_FUNCTION_BLOCK
DW#16#8000 with implicit conversion — for S7-300/400 use the standard RDREC variant that exposes a BYTE; some toolchains require the high byte to be supplied separately or to call RDREC twice (once for low byte header, once for high byte). Verify against the local library version of SFB 52 in the offline block container.9. STL Code: Direct RDREC Call in OB 1
For engineers who prefer STL, the same record read in OB 1 with call-by-value REQ and the cycle-synchronous pattern looks like this. The pattern is identical to the SCL block above but expressed in AWL/STL for S7-300/400.
// OB 1 - cyclic, run once per PLC cycle
CALL SFB 52, DB_DIAG
REQ :=M 100.0 // start flag from edge detection
IOID :=B#16#0 // header / device
LADDR :=W#16#600 // 1536 (example IO device diagnostic address)
RECNUM:=B#16#0 // 0x00 header index (see note below)
MLEN :=32
RET_VAL:=MW 110 // status
BUSY :=M 110.0
RECORD:=P#DB_BUF.DBX 0.0 BYTE 64
// continuation: poll BUSY until FALSE, then check RET_VAL
U M 110.0
SPB END1 // BUSY = TRUE, exit and re-enter next cycle
L MW 110 // RET_VAL
L W#16#0
<>I // RET_VAL <> 0
SPB ERR1
// success - parse record at DB_BUF
// RECORD 0x8000 starts at DBX 0
// header block type = DBW 0
// header block length = DBW 2
// header block version = DBW 4
// pending channel count = DBB 8
END1: BE
ERR1: // error handling - log RET_VAL and clear BUSY
...
For PROFINET records above 0x00FF, the RECNUM byte of SFB 52 is too small. The correct approach on S7-300/400 is to call SFB 52 twice — once for the low byte and once for the high byte — or, on newer CPUs, use the extended SFB 52 with a DWORD interface. S7-1500 and S7-1200 expose RDREC as an instruction with DWORD record numbers and accept 0x8000..0xFFFF directly.
10. SFC 51 SSL_ID W#16#0C92 - Per-Slot Status Extension
W#16#0C91 is the device-level PROFINET status list. W#16#0C92 is the slot-level extension. Calling SFC 51 with SSL_ID = W#16#0C92 returns one 16-byte record per slot, structured as:
| Word | Field | Meaning |
|---|---|---|
| 0 | HW_ID | IO device diagnostic address |
| 1 | SLOT_NO | Slot 0..255 |
| 2 | SUB | Submodule 0..n |
| 3 | CHAN_COUNT | Number of channels |
| 4 | STATUS | Bit-coded (same bit set as 0x0C91) |
| 5..7 | reserved | 0 |
0x0C92 gives you everything 0x0C91 gives you, plus the submodule number. It is the right SZL to read first if your goal is to find a "Module missing in slot 0.0.0.2" entry: locate the slot record with STATUS bit 2 = MOD_MISS set, then read the module's HW_ID, SLOT and SUB to build the diagnostic path the user program reports.
For slot-level data that is not channel-level (e.g. module type, manufacturer ID), the I&M (Identification & Maintenance) records are the right tool: read record 0xF841 + offset 0..3 for I&M0..3, which contain order number, serial number, hardware base, hardware version, firmware version, and the installation date.
11. WinCC OA / HMI Integration
The original requirement is to surface the ET200M diagnostics inside WinCC OA (or any HMI that polls the PLC over S7 / OPC). The pattern is straightforward:
- Define a DB (e.g. DB 100) with a UDT of fixed length: 64 bytes for 0x8000, 128 bytes for 0x8028, 32 bytes per channel record for 0x800A, plus a header word (status, pending count, last RDREC status).
- Trigger the FB_ET200M_PROFINET_DIAG block every N seconds from OB 35 (or a self-triggering cyclic interrupt OB).
- Read the decoded fields from the DB at known offsets:
DB100.DBW0= status,DB100.DBB2= pending channel count,DB100.DBX4= slot-missing flag,DB100.DBW6= last channel error type, etc. - On the WinCC OA side, map each field to a datapoint. For raw payload, expose the byte buffer as a binary tag and let the HMI parse the record structure.
For a 1-Hz scan rate, the block cycles through 0x8000, 0x8028, 0x800A, and DO32 0x800A in 4 seconds. The decoded w_channel_err is a 16-bit PROFINET error code; WinCC OA can translate it with a standard picklist (0x0001 = short circuit, 0x0006 = wire break, 0x0009 = configuration error, etc.).
12. Verification and Field-Proven Caveats
Checklist before going to production:
- Confirm the diagnostic address. In HW Config, the IM 153-4 PN slot 0 has a "PROFINET interface" entry. The diagnostic address is the LADDR for header records (0x8000, 0x8028). For channel records, the LADDR is the slot's input/output start address.
- Confirm the IM firmware. Versions below V3.0 do not support 0xC00A maintenance. Update via SIMATIC MMC before commissioning if maintenance events must be reported.
- Confirm record 0x8028 is enabled. In HW Config, the slot properties for each module must have "Diagnosis: Module status" enabled; otherwise 0x8028 returns 0x80D5 (Index not available).
- Confirm channel diagnostics are enabled per channel. For DI32 channel 7 wire break to appear in 0x800A, the channel properties must have "Diagnosis: Wire break" enabled. For DO32, "Diagnosis: Short circuit" must be enabled. Default STEP 7 settings do not enable these; the engineer must set them per channel in HW Config.
- Poll BUSY, do not hold REQ. SFB 52 requires two calls per record: one to start, one to poll. Holding REQ = TRUE will not return until completion but will queue multiple jobs in the same call depth and return non-deterministic results.
- Do not call SFC 13 on a PROFINET LADDR. It will return 8093 every time, regardless of LADDR value. Use SFB 52 instead.
- Watch RET_VAL 80D5 and 80D2. 80D5 means the record index is not supported on this slot/module. 80D2 means the slot is not configured (wrong LADDR). Both are common during ramp-up when modules have not yet completed parameterization.
- For fiber-coupled stations, port diagnostics (0x8029) are critical. A fiber break on port 1 or 2 of the IM 153-4 PN fiber variant is reported here, not in 0x800A. Read 0x8029 to catch FO link losses.
For deeper detail on the diagnostic stack inside the IM 153-4 and the active backplane, the official operating instructions are at IM 153-2 / IM 153-4 ET 200M operating instructions (Siemens). The PROFINET IO record layout and channel error type tables are derived from IEC 61784-2 and PI's PROFINET IO specification, mirrored in the Siemens function block help for SFB 52 / 53 / 81 / 82.
RDREC instruction (DWORD record number, no high-byte workaround). The OPC UA "ChannelDiag" and "ModuleDiag" nodes map 1:1 to records 0x800A and 0x8028 and require no STEP 7 code to expose.Why does SFC 13 (DPNRM_DG) return RET_VAL 8093 on a PROFINET IM 153-4?
DPNRM_DG implements the PROFIBUS DP "Read Slave Diagnosis" service. The IM 153-4 PN is a PROFINET IO device, not a DP slave, so the LADDR cannot be routed to a PROFIBUS layer-2 read. Replace DPNRM_DG with SFB 52 (RDREC) on the same LADDR and use PROFINET record numbers such as 0x8000, 0x800A and 0x8028.
Can SFC 51 SSL_ID W#16#0C91 give me channel-level diagnostics?
No. W#16#0C91 returns 8 bytes per slot (rack, slot, status word, channel count) and identifies that a module is faulted, missing or in maintenance, but it does not contain the channel number or error type. For channel-level data, call SFB 52 with RECNUM = 0x800A on the slot's input or output address, and IOID = B#16#54 (input) or B#16#55 (output).
What record number returns the "Module missing in slot 0,0,0,2" line shown in TIA?
Record 0x8028 (Expected/Actual configuration). Read it on the IO device diagnostic address (e.g. LADDR 1536) with IOID = B#16#00. The returned 4-byte slot records contain slot number, expected module ID, actual module ID, and flags — bit 2 of the flags byte = missing module. Locate the slot record with that flag set to build the same path TIA displays.
What does SFB 52 RET_VAL 0x80D5 mean on the IM 153-4 PN?
Index not available. The record is not supported on this slot / module / IM firmware version. For example, reading 0xC00A on an IM 153-4 with firmware < V3.0 returns 0x80D5. Channel-diagnostic records (0x800A) also return 0x80D5 if "Diagnosis: Wire break" / "Diagnosis: Short circuit" is not enabled for the channel in HW Config. Update the IM firmware and/or enable the per-channel diagnostic option, then retry.
Can SFB 52 be called cyclically in OB 1, or does it need an OB 82 / OB 83 / OB 86 alarm?
Do I need to enable channel diagnostics per channel in HW Config for DI32 and DO32?
Yes. By default, STEP 7 / TIA Portal leaves channel diagnostics disabled on DI32 and DO32 modules. To see wire break on DI32 and short circuit on DO32 in record 0x800A, open the module in HW Config, go to the "Inputs" / "Outputs" tab, expand "Channel 0" and enable "Diagnosis: Wire break" (DI) or "Diagnosis: Short circuit" (DO). Repeat for every channel you want to monitor, otherwise the channel record will be empty.