Configuring Siemens Profibus Diagnostic Repeater with S7-315

David Krause12 min read
ProfibusSiemensTutorial / How-to
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

Configuring Siemens Profibus Diagnostic Repeater with S7-315 and ET200M

The Siemens PROFIBUS Diagnostic Repeater (MLFB 6ES7972-0AB01-0XA0) is an RS-485 repeater that monitors PROFIBUS-DP segments during live operation. When installed in an S7-315 / ET200M network, the repeater surfaces wire breaks, short circuits, missing terminations, reflections, and topology faults as DP slave diagnostics. Reading those diagnostics into the S7 user program requires correct GSD integration, an assigned diagnostic address, and the correct usage of the standard PROFIBUS diagnostic services (SFC13 / DP-NORM / RD_REC).

1. Functional Principle of the Diagnostic Repeater

The Diagnostic Repeater operates as a standard PROFIBUS-DP slave that appears in the DP master (here the S7-315-2 DP) exactly like any other DP node, but additionally evaluates the physical layer of the two segments to its left and right (Segment 1 / Segment 2). It detects and isolates faults such as:

  • Wire break on the shielded two-wire line
  • Short circuit between A and B cores, or A/B against shield
  • Missing or incorrect bus termination at segment ends
  • Excessive reflections caused by stubs or improper cable types
  • Topology violations (unterminated spurs, mixed cable characteristics)

Fault detection is independent of the DP cycle, so errors are reported even if the corresponding slave is not currently polled. The diagnostic repeater supports mixed copper and fiber-optic networks when paired with an OLM (Optical Link Module); in fiber segments it routes frames transparently while still evaluating the copper sections on either side.

2. Hardware Components and MLFB References

Component MLFB / Order Number Role
Diagnostic Repeater 6ES7972-0AB01-0XA0 RS-485 repeater with on-line segment diagnostics
CPU 315-2 DP 6ES7315-2AFxx / 6ES7315-2AHxx DP master that hosts the diagnostic evaluation
CPU 315-2 PN/DP 6ES7315-2EH13 (or later) Alternative DP master with PROFINET side
ET200M IM153-1 6ES7153-1AAxx DP slave interface for ET200M, status bytes supported
ET200M IM153-2 (HF) 6ES7153-2BAxx / 2BBxx DP slave interface with extended diagnostics
PROFIBUS cable 6XV1830-0EH10 (Fast Connect) Shielded twisted pair, 150 Ohm characteristic impedance
PROFIBUS connector 6ES7972-0BA12 / 6GK1500-0FC00 With PG socket and switchable termination
OLM (optional) 6GK1503-2CB00 / 6GK1503-3CB00 Fiber-optic integration, also acts as repeater in star/ring

Each diagnostic repeater has two segments (DP1 and DP2). Up to nine diagnostic repeaters can be cascaded in one PROFIBUS line, yielding up to 18 monitored segments. The repeater auto-detects baud rates from 9.6 kbps through 12 Mbps; it does not require configuration for the physical layer.

3. Topology with S7-315 and ET200M

A typical diagnostic-repeater topology uses the S7-315-2 DP as the master, the diagnostic repeater immediately downstream of the master (terminated at segment end), and a chain of ET200M stations and additional repeaters downstream:

[S7-315-2 DP]---(Terminated)---[Diag Repeater #1]---[ET200M IM153]---[ET200M IM153]
                                   |
                                   +---Segment 2---[Diag Repeater #2]---[ET200M] ...
Each repeater separates two physical segments. Termination must remain ON at the physical end of each segment and OFF at the diagnostic repeater itself when it is mid-line. Termination is built into the repeater (two slide switches at the front) and must be set to OFF if other devices are connected downstream on that segment.

For a star or ring with optical media, place an OLM at each fiber segment boundary; the diagnostic repeater then guards the copper spur leading to the next OLM. OLMs do not provide diagnostic frames themselves, so all PROFIBUS diagnostics are still sourced from the diagnostic repeater and from the IM153 modules.

4. Prerequisites

  1. STEP 7 V5.5 + SPx (or TIA Portal V13 SP1 / V14 / V15 / V16 / V17 / V18 / V19 / V20) installed.
  2. GSD file SIEM804D.GSD for the diagnostic repeater (shipped on the SIMATIC Diagnostic Repeater CD, current revision also downloadable from the Siemens support pages).
  3. Hardware catalog containing the diagnostic repeater under PROFIBUS DP > Network Components > Diagnostic Repeater.
  4. Diagnostic repeater physically installed, powered with 24 V DC, with termination switches set correctly.
  5. DP master (S7-315-2 DP) configured for the relevant baud rate; identical baud rate on every segment.

5. Installing the GSD File in STEP 7 V5.5

  1. Close all running STEP 7 components.
  2. Copy SIEM804D.GSD and the associated bitmap SIEM804D.BMP into the directory ...\Siemens\Automation\SIMATIC\GSD.
  3. Open HW Config and choose Options > Install GSD File. The diagnostic repeater appears under PROFIBUS DP > Network Components > Diagnostic Repeater.
  4. Restart HW Config if the device is not visible immediately.

In TIA Portal, choose Options > Manage general station description files (GSD), navigate to the .GSD file, install it, and search the hardware catalog for Diagnostic Repeater.

6. Hardware Configuration in HW Config

  1. Open the S7 station in HW Config.
  2. Drag the diagnostic repeater from the catalog onto the PROFIBUS subnet assigned to the CPU 315-2 DP.
  3. Assign a unique PROFIBUS address; addresses 1-126 are valid. The address must not collide with any ET200M or other slave on the same subnet.
  4. Open the Properties > Diagnostic Repeater dialog. Configure:
    - Diagnostic address: a free byte address in the process image or peripheral area (e.g., PIB 256 for input byte, PQB 256 for output byte if required by the DP slave header). The address determines where the standard diagnostic data is mapped.
    - Slot assignment: the diagnostic repeater is treated as a multi-slot DP slave; the standard diagnostic slot is slot 0.
  5. Compile and download the hardware configuration to the CPU 315-2 DP.
If the diagnostic repeater is flagged as Faulted after download, the GSD is usually missing or the baud rate on this segment does not match the DP master configuration. Verify with PLC > PROFIBUS > Diagnostics in STEP 7.

7. Reading Diagnostics in the S7 Program

The standard PROFIBUS diagnostic frame is delivered automatically by the DP master into the input area pointed to by the diagnostic address. Two paths exist for reading the full diagnostic data:

7.1 Standard Diagnostics (Slot 0)

The CPU 315 places the 6 standard diagnostic bytes at the configured input address every DP cycle. The first six bytes are defined by IEC 61158 / EN 50170:

Byte Field Meaning
0 Station_Status_1 Bit 0 = 1: Slave not ready; Bit 2 = 1: Configuration mismatch; Bit 3 = 1: Extended diagnostics present
1 Station_Status_2 Bit 0 = 1: Slave needs new parameters; Bit 4 = 1: Watchdog expired
2 Station_Status_3 Reserved for diagnostic repeater; indicates diagnostic overflow
3 Master_Add PROFIBUS address of the master that issued the diagnostic request
4 Ident_Number_High Ident number of the diagnostic repeater (high byte)
5 Ident_Number_Low Ident number of the diagnostic repeater (low byte)

7.2 Extended Diagnostics via SFC13 / RD_REC

To retrieve ID-related diagnostics (segment fault details), call SFC 13 "DPNRM_DG" (STEP 7 classic) or RDREC (TIA Portal / S7-300/400 with PN/DP). The function reads the slave's diagnostic buffer in record 0:

// STL example for S7-315 (CPU firmware V2.x or V3.x)
CALL SFC 13
   REQ     := TRUE             // request to read
   LADDR   := W#16#100         // diagnostic address of repeater (PIB 256 = 0x100)
   RET_VAL := MW 100           // return value (0 = OK)
   RECORD  := P#DB20.DBX 0.0   // destination buffer, minimum 26 bytes
   BUSY    := M 110.0

The destination buffer RECORD must be at least 26 bytes long. The first 6 bytes replicate the standard diagnostic frame; bytes 6 through 25 carry the ID-related diagnostic payload.

8. Structure of the ID-Related Diagnostic Frame

Byte Field Meaning
6 Header byte Length of ID-related diagnostic data including this byte
7 Status type 0x10 = segment status, 0x11 = location of error
8 Slot number Slot 0 for segment status; 1-32 for slot-related diagnostics
9 Specifier Bit field: 0x00 = status appears, 0x01 = status disappears
10-13 Error type / location Per Siemens Diagnose_Repeater manual: 0x01 wire break, 0x02 short circuit, 0x03 missing termination, 0x04 reflection, etc.
14-25 Reserved / additional status Topology and segment qualifiers

Decode the segment-status record in your S7 program and translate it into operator-visible messages:

// Pseudo-code for evaluating ID-related diagnostics
IF record[7] = B#16#10 AND record[9] = B#16#00 THEN
   // Segment status event appeared
   CASE record[10] OF
      B#16#01: error_text := 'Wire break on segment';
      B#16#02: error_text := 'Short circuit on segment';
      B#16#03: error_text := 'Missing or wrong termination';
      B#16#04: error_text := 'Reflection / topology error';
      ELSE     error_text := 'Unknown segment fault';
   END_CASE;
   segment_id := record[8];   // 1 or 2 (DP1 / DP2)
   // raise HMI alarm or log to DB
END_IF;

9. OLM Routing and Fiber Integration

When the PROFIBUS network extends over fiber-optic cable via OLMs, the diagnostic repeater still operates on copper and reports faults only on the copper portion it monitors. The OLM acts as a transparent physical bridge, so the DP master address space and the diagnostic address of the repeater remain unchanged. To read diagnostics on a remote site behind an OLM, ensure:

  • The OLM is set to OLM routing if a different DP master on the remote segment needs to be reached (this is independent of diagnostic repeater diagnostics).
  • The DP master CPU 315-2 DP owns both the near and the remote segment, or a dedicated DP master on each segment is used. In the latter case, both masters read their respective diagnostic repeaters.
  • The optical budget is within the OLM datasheet limit; otherwise the optical segment reports as broken at the OLM level, which the diagnostic repeater cannot see.
OLMs do not generate PROFIBUS diagnostic frames for cable faults. If you require optical-segment monitoring, choose a fiber-optic diagnostic repeater or use a PROFIBUS OLM with monitoring version plus a separate evaluation strategy.

10. Commissioning Procedure

  1. Wire all segments, set termination switches on the diagnostic repeater(s) correctly, verify shield grounding at every cabinet entry.
  2. Power the repeater; the green BF LED must be off, the green READY LED must be on.
  3. Bring up the S7-315-2 DP; verify in HW Config that the diagnostic repeater is online and not faulted.
  4. Insert an intentional fault (e.g., remove termination on the far end) and confirm that the diagnostic repeater generates an ID-related diagnostic record with Specifier = 0x00 (status appears).
  5. Restore the fault; the next record must show Specifier = 0x01 (status disappears).
  6. From the S7 program, route the decoded event into the HMI alarm log and verify operator visibility.

11. Diagnostic Code Matrix and Field Interpretation

LED on Repeater Diagnostic Frame Indicator Likely Cause Recommended Action
BF off, READY on No event record Healthy segment None
Segment LED red (DP1 or DP2) Status type 0x10, error type 0x01 Wire break Measure loop resistance; inspect connector pin assignment
Segment LED red Status type 0x10, error type 0x02 Short circuit A-B or A/B-shield Inspect cable run, especially where cables enter cabinets
Segment LED yellow Status type 0x10, error type 0x03 Missing / wrong termination Verify 220 Ohm termination ON only at segment ends
Segment LED yellow, intermittent Status type 0x10, error type 0x04 Reflection / spur Remove stubs; verify cable type matches 150 Ohm spec
All segments yellow, no DP traffic Station status 1 bit 0 set Repeater not yet parameterised by master Check DP master configuration, address, baud rate
BF red steady No diagnostic record, slave not in poll list Wrong PROFIBUS address or duplicate address Use PLC > PROFIBUS > Bus Nodes to confirm

12. Field-Proven Caveats and Common Pitfalls

  • GSD version mismatch: STEP 7 V5.4 and earlier require SIEM804D.GSD; TIA Portal V14 and later may require SIEM804E.GSD or later. Importing the wrong revision causes the repeater to be flagged as unknown device after download.
  • Slot count: The diagnostic repeater is always slot 0 only. Do not insert I/O modules in the HW Config slots; if you do, parameterisation fails immediately.
  • Diagnostic address collision: Each DP slave requires a unique diagnostic address. Sharing a diagnostic address with another slave yields interleaved or unreadable data.
  • Polling rate: The CPU 315-2 DP polls the diagnostic repeater like any other slave. If you place nine repeaters in cascade, each adds one DP cycle latency; verify that the application cycle time stays within tolerance.
  • Shield grounding: The diagnostic repeater is sensitive to shield discontinuities. Use EMC cable glands and bond shields at every cabinet entry.
  • Bus termination conflict: Onboard termination switches on the repeater are independent from the connector at the downstream device. If the connector termination is also ON at the same physical node, the segment becomes overloaded and the repeater reports spurious reflections.
  • STEP 7 online view: In PLC > Monitor/Modify the diagnostic buffer appears only after a fault event. A green, idle repeater does not produce a record; trigger an intentional fault during commissioning.
  • Firmware of the CPU: CPU 315-2 DP firmware V2.0 supports SFC 13; V3.x is recommended because it adds multi-master routing and larger diagnostic buffer.

13. Verification Checklist

  • [ ] SFC 13 / RDREC returns RET_VAL = 0 on each call.
  • [ ] RECORD[4..5] equals the repeater's Ident number 0x0804.
  • [ ] Station_Status_1 bit 3 toggles when a fault is injected (extended diagnostics present).
  • [ ] Specifier alternates 0x00 (appears) and 0x01 (disappears) when the fault is removed.
  • [ ] HMI / WinCC displays decoded segment ID and error type within one DP cycle.
  • [ ] No spurious fault records appear during a cold restart of the CPU 315-2 DP (filtered out by Specifier).

Which GSD file does the Siemens PROFIBUS Diagnostic Repeater need?

Use the GSD shipped with the device CD or downloaded from the official Siemens Diagnostic Repeater delivery release page. The classic file is SIEM804D.GSD; TIA Portal V14+ may require SIEM804E.GSD or newer. Place it in ...\Siemens\Automation\SIMATIC\GSD and reinstall from Options > Install GSD File.

How do I read the diagnostic buffer of the diagnostic repeater from a CPU 315-2 DP?

Assign a diagnostic address (for example PIB 256) to the repeater in HW Config and call SFC 13 "DPNRM_DG" with LADDR = W#16#100 pointing to that address. Provide a destination buffer of at least 26 bytes. RET_VAL = 0 indicates success; the first 6 bytes are the standard PROFIBUS diagnostics, bytes 7+ are ID-related segment status records.

Why is the diagnostic repeater flagged as "faulted" after download from HW Config?

Typical causes: GSD file missing or wrong revision, PROFIBUS address collision with another slave, baud-rate mismatch on that segment, or onboard termination switch left ON while other devices are still connected downstream. Verify with PLC > PROFIBUS > Diagnostics and re-import the correct GSD before recompiling.

Does the diagnostic repeater monitor fiber-optic segments when used with an OLM?

No. The diagnostic repeater only evaluates the copper RS-485 segments directly attached to it. OLMs are transparent repeaters that do not produce PROFIBUS diagnostic frames. If optical monitoring is required, deploy a fiber-optic diagnostic repeater or use the OLM vendor's own diagnostics; the copper repeater still reports the segments upstream and downstream of each OLM.

How many diagnostic repeaters can I cascade in one PROFIBUS line?

Up to nine diagnostic repeaters can be cascaded, producing up to 18 monitored segments. Each repeater adds one slot in the DP poll list and roughly one DP cycle of latency on the CPU 315-2 DP. With nine repeaters and a 1.5 Mbps baud rate, verify that application cycle time stays within the requirements; otherwise raise baud rate to 12 Mbps or split the line into multiple masters.

Back to blog