Resolving Siemens STEP 7 PROFIBUS Error 0x031B Synchronization

David Krause15 min read
ProfibusSiemensTroubleshooting
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

Resolving Siemens STEP 7 PROFIBUS Error 0x031B Synchronization on SIMATIC Stations

Engineers maintaining mixed SIMATIC S7-300 / S7-400 cells with a WinCC 2008 SP3 (WinCC V7.0 SP3) HMI and STEP 7 V5.5 engineering station frequently encounter a 0x031B synchronization error during the "Diagnose Hardware" sequence. The PG/PC reports that the bus is reachable, the LED test passes, the connector termination switch toggles through both states, and the cable is intact — yet the diagnostic interrupt still fires. This guide reconstructs the fault tree, validates the physical and logical layer assumptions, and walks through the corrective sequence that gets the bus back into cyclic DP operation without rewriting the project.

Scope: SIMATIC S7-300/S7-400 with PROFIBUS-DP master (integrated MPI/DP or CP 342-5 / CP 443-5), STEP 7 V5.5 + SPx, WinCC V7.0 SP3, CP 5611 / CP 5621 / CP 5613 / PC Adapter USB A2 on the engineering side. PROFIBUS-PA segments are not covered; if a PA coupler is present, see the Siemens SIMATIC NET manual set.

1. Problem Summary and Observable Symptoms

The fault presents as follows when the engineer runs the PG/PC online diagnostic against a PROFIBUS station:

  • STEP 7 » "Diagnose Hardware" reports Error 0x031B: Synchronization error (problems with the PROFIBUS network).
  • The same screen indicates the Hardware Test passed and the bus status LED on the CP flashes in the standard pattern.
  • The PLC SF (group fault) LED may blink or be steady, with diagnostic buffer entries for PROFIBUS master system events.
  • Communication with the affected station is intermittent: HMI tags time out, DP slaves go in and out of data exchange.
  • The bus worked prior to a recent PC rebuild and reinstallation of WinCC 2008 SP3 and STEP 7 V5.5.

The pattern — a single station or the whole master system reporting 0x031B after a clean reinstall — is a textbook signature of logical layer desynchronization: the PG/PC and the DP master are no longer negotiating the same PROFIBUS parameters even though the wire is functional.

2. Decoding Error 0x031B

Siemens documents the 0x031B code within the PROFIBUS DP master diagnostic buffer (Event ID 0x031B). It belongs to the family of "synchronization" events that indicate the DP master has lost token/token-passing alignment with at least one DP slave, or that the parameter set sent to the slave was rejected. Per the SIMATIC NET PROFIBUS-DP Diagnostic Manual and the S7-300/S7-400 "System and Standard Functions" reference, the relevant diagnostic sources are:

Code Meaning Triggered by
0x031B Synchronization error on PROFIBUS DP DP master lost frame alignment; configuration check failure; bus parameter mismatch
0x031C DP slave not found / station failure Slave powered down, bus break, address conflict
0x031D / 0x031E Configuration / parameter error GSD mismatch, slot mismatch, length mismatch
0x031F Diagnostic interrupt (OB 82) lost OB 82 not loaded in CPU

0x031B is the lead event when a master cannot reach a defined cyclic state. The PLC records the event with a timestamp and (where the slave is identifiable) the affected DP slave's PROFIBUS address. The same code surfaces on the PG/PC side when the online view's "Diagnose Hardware" tool cannot establish a stable DP cycle.

A passing "Hardware Test" LED check only proves that the CP is alive and the RS-485 transceiver can drive the bus. It does not validate PROFIBUS timing, token rotation, or GSD consistency. Treat the LED test as necessary but never sufficient.

3. Affected System Components

The 0x031B event typically involves one or more of the following components:

  • Engineering PC — STEP 7 V5.5 + SPx, WinCC V7.0 SP3 (2008 SP3), SIMATIC NET PC software, CP 5611 / CP 5613 / CP 5621 / PC Adapter USB A2.
  • PLC CPU — S7-300 CPU 31x-2 DP, CPU 31x-2 PN/DP, or S7-400 CPU 41x-3 DP with integrated PROFIBUS interface, or a dedicated CP 342-5 / CP 443-5.
  • DP Slaves — ET 200M, ET 200S, ET 200pro, third-party DP devices, drives on PROFIBUS (e.g., Sinamics / Micromaster via PROFIdrive).
  • Physical layer — PROFIBUS cable, 9-pin D-sub connectors, terminators (220 Ω between A and B at both bus ends), repeaters, OLM, OBT.

4. Root Cause Analysis

The 0x031B synchronization error has four root-cause families, ordered by frequency on rebuilt WinCC / STEP 7 stations:

4.1 PC-side configuration drift after reinstall

A fresh install of STEP 7 V5.5 and WinCC 2008 SP3 commonly leaves the PC interface (PG/PC interface) defaulted to PC internal, PLCSIM, or the wrong COM port. When the engineer starts "Diagnose Hardware" the PG sends a request at one baud rate and PROFIBUS profile while the bus is configured for another.

4.2 Bus parameter / profile mismatch

STEP 7 stores bus profiles (DP, Universal (DP/FMS), Standard, User-defined) for each PROFIBUS subnet. If the PG is set to Universal and the PLC's DP master to DP only, the master rejects the request, which manifests as a sync error. The same symptom appears when the highest station address (HSA) on the master is lower than the slave's PROFIBUS address — the master simply does not poll past HSA.

4.3 Termination and topology

PROFIBUS RS-485 requires active termination at both physical ends. The integrated terminator inside a Siemens 6ES7 972-0BA12 / 6ES7 972-0BB12 connector must be switched ON at the two end nodes and OFF at every node in between. After a PC swap, the engineer often reseats the bus cable but leaves a node's switch in the wrong position. With long cable runs (> 100 m at 1.5 Mbps, > 200 m at 500 kbps) reflections corrupt the token frame, and the master logs 0x031B.

4.4 CP firmware and driver mismatch

CP 5611 (6GK1561-1AA01), CP 5621 (6GK1562-1AA00), and CP 5613 (6GK1561-3AA01) each require a specific SIMATIC NET device driver version. A WinCC 2008 SP3 install may pull in an older S7DOS / S7Epan driver. Mismatched driver/firmware pairs cause the CP to come up, pass self-test, but fail parameter negotiation — again logged as 0x031B.

5. Pre-Diagnostic Checklist

Before opening STEP 7, capture the following baseline. The data is invaluable for comparing against the working state prior to the rebuild.

Item Value How to read
PG/PC interface assignment e.g., CP 5611 (PROFIBUS) Start » SIMATIC » PG/PC Interface » Set PG/PC Interface
Bus profile DP / Universal / Standard Properties » PROFIBUS » Profile
Baud rate e.g., 1.5 Mbps Properties » PROFIBUS » Transmission Rate
Highest station address (HSA) Default 126 Properties » PROFIBUS » HSA
CP firmware version e.g., CP 5611 V8.x Device Manager » SIMATIC NET » CP » Properties » Firmware
SIMATIC NET version e.g., V8.2 SP1 Control Panel » Add/Remove Programs
PLC DP master profile Must match PG HW Config » DP master properties » PROFIBUS interface

6. Diagnostic Procedure

Execute the following steps in order. Each step produces an unambiguous go/no-go result. Do not skip steps; 0x031B is multi-causal and a partial fix will look like a clean fix for a few hours before the bus drops again.

  1. Open the PG/PC interface applet (Start » SIMATIC » PG/PC Interface). Confirm the assigned access point is S7ONLINE and the interface parameter is the physical PROFIBUS CP, not PLCSIM or Softnet.
  2. Run "Diagnostics" on the CP. From the applet, click "Diagnostics" on the CP. A clean CP reports "No diagnostic events" and lists the bus topology. Any error here is a CP/driver/firmware issue, not a PLC issue.
  3. Verify bus profile and baud rate against the PLC's PROFIBUS subnet (HW Config » DP master » Properties » PROFIBUS » Profile / Transmission Rate). Mismatch = guaranteed 0x031B.
  4. Confirm HSA. STEP 7 defaults HSA to 126. If the project specifies a lower HSA, ensure the PG's HSA is the same or higher.
  5. Open the PLC's diagnostic buffer (STEP 7 » PLC » Diagnostic Buffer). Look for paired entries: a 0x031B Synchronization error followed by a 0x031C Station failure for the affected PROFIBUS address. The second entry tells you which slave.
  6. Physically inspect the bus. Walk the segment, confirm terminator switches at both end nodes, count total nodes against the max of 32 per segment (127 with repeaters).
  7. Measure the bus with a PROFIBUS tester (e.g., Softing BC-700-PB, Procentec ProfiHub, or Siemens BT 200). Acceptable signal quality: ≥ 3 V peak-to-peak, ≤ 1.5 V asymmetry, reflection margin > 20%.

7. Step-by-Step Resolution

The corrective sequence is structured to fail fast. Each step is verified before moving on.

7.1 Step 1 — Reset the PG/PC interface to the physical CP

  1. Close all STEP 7 / WinCC instances.
  2. Open Set PG/PC Interface.
  3. Select the access point S7ONLINECP 5611 (PROFIBUS) (or CP 5621 / CP 5613 / PC Adapter, as installed).
  4. Click Properties » confirm Transmission rate and Profile match the PLC's DP master.
  5. Click OK » close the applet. Restart STEP 7.

7.2 Step 2 — Reconcile the PROFIBUS profile in HW Config

  1. Open the STEP 7 project, double-click the DP master (CPU 31x-2 DP or CP).
  2. Properties » PROFIBUS interface DP » Properties button.
  3. Set Profile to DP unless the segment contains FMS devices, in which case use Universal.
  4. Set the Transmission Rate consistent with cable length:
    Baud rate Max segment length
    9.6 kbps 1200 m
    19.2 kbps 1200 m
    45.45 kbps 1200 m
    93.75 kbps 1200 m
    187.5 kbps 1000 m
    500 kbps 400 m
    1.5 Mbps 200 m
    3 Mbps 100 m
    6 Mbps 100 m
    12 Mbps 100 m
  5. Click OK, save and recompile (Station » Save and Compile).

7.3 Step 3 — Re-seat and re-terminate the bus

  1. Power the entire PROFIBUS segment to a known state.
  2. Identify the two physical end nodes. Set their connector terminator switches to ON (a Siemens 6ES7 972-0BA12 connector has a slide switch visible from the top; ON connects a 220 Ω resistor + 390 Ω pull-up/pull-down between A, B, and 5 V).
  3. Set every other node's switch to OFF.
  4. For long runs, attach a repeater (e.g., Siemens 6GK1 500-0AB10) at segment boundaries. Each repeater creates a new segment that must be terminated independently.

7.4 Step 4 — Verify the CP firmware and SIMATIC NET driver

  1. Open Device Manager » SIMATIC NET » your CP » Properties » Firmware. Note the version.
  2. Cross-reference with the compatibility matrix in the SIMATIC NET PROFIBUS Diagnostic Manual and the CP's firmware readme. CP 5611 firmware 8.x or higher is recommended for STEP 7 V5.5 SP3 and later.
  3. If the firmware is outdated, flash it from the SIMATIC NET » Commissioning tool using the latest approved firmware image (order number on the Siemens support portal).
  4. Confirm the SIMATIC NET software version matches the WinCC / STEP 7 release. WinCC V7.0 SP3 is qualified for SIMATIC NET V8.1 / V8.2.

7.5 Step 5 — Clear the diagnostic buffer and re-test

  1. Connect online to the PLC.
  2. PLC » Diagnostic Buffer » right-click » Clear buffer. (Note: this only clears display; the events remain in flash, but it lets you observe fresh entries.)
  3. PLC » CPU Messages » set Update to Automatic.
  4. Run STEP 7 » Diagnose Hardware again.
  5. Confirm the "Error 0x031B" message no longer appears and that the diagnostic window shows "No error" for the master and each slave.

8. Bus Termination and Physical Layer Verification

Physical layer faults are the most common hidden cause of synchronization errors that survive a clean software install. Use this checklist before re-engineering the logical layer:

  • Topology: Pure bus. Spurs are limited to ≤ 1.5 m total per branch and may not exceed 6 Mbaud · m of accumulated stub length at higher speeds.
  • Cable: PROFIBUS cable type A (Siemens 6XV1 830-0EH10, 6XV1 830-3EH10) — characteristic impedance 135 Ω to 165 Ω, 30 pF/m loop capacitance. Avoid Type B (PVC) for new installs.
  • Shield: Clamp 360° at each connector backshell and at cabinet entries. Lift shield at one end only when using surge protection; otherwise bond at both ends.
  • Termination resistors: 220 Ω between A and B, 390 Ω from B to VP (5 V), 390 Ω from A to DGND, in each end-node connector.
  • Shielding of VFD cables: keep PROFIBUS ≥ 200 mm from VFD power cables; cross at 90°.

A quick oscilloscope verification on the A/B pair should show a roughly square wave of 5 V nominal at 1.5 Mbps with 2.5 V common mode on A and 0.5 V on B (idle). Any rounded edges, ringing, or DC offset drift indicates termination or cable damage.

9. Baud Rate and Profile Configuration Reference

The following table is the de-facto decision matrix when the PG and the PLC disagree on PROFIBUS parameters. Use it as a field-tested shortlist before invoking the full SET PG/PC interface tool.

Plant device mix Profile Recommended baud Why
Pure DP-V0 / DP-V1 slaves (ET 200, drives) DP 1.5 Mbps Maximum throughput, standard ET 200 support
Mixed DP / FMS legacy Universal (DP/FMS) 500 kbps FMS nodes are slow; align to the weakest
Long cable runs (> 500 m) DP 187.5 kbps Covers up to 1 km
Field hazardous area with PA coupler DP 45.45 kbps Mandatory for PROFIBUS-PA behind a coupler
Drives with isochronous mode DP 1.5 Mbps Deterministic cycle for equidistant application

10. CP Firmware, Driver, and PC Interface Verification

The engineering PC stack must be in lockstep with the installed SIMATIC NET version. The following compatibility table is taken from the Siemens Industry Online Support release notes for STEP 7 V5.5 SP3 and WinCC V7.0 SP3. Verify the installed versions match the matrix:

CP Order number Min firmware SIMATIC NET release
CP 5611 6GK1 561-1AA01 V8.0 V8.1 / V8.2
CP 5613 A2 6GK1 561-3AA01 V8.0 V8.1 / V8.2
CP 5621 6GK1 562-1AA00 V8.1 V8.2
PC Adapter USB A2 6GK1 571-2BA00 FW 2.6 V8.1 / V8.2
CP 5512 (PCMCIA) 6GK1 551-2AA00 V8.0 V8.1

If a downgrade or partial uninstall has left an older S7DOS or S7Epan driver in place, the CP will enumerate and pass self-test, but the user-mode bus driver will return a sync error on the first parameter handshake. Reinstall SIMATIC NET from the latest approved version. The official install is documented in the SIMATIC NET Installation Guide on the Siemens support portal.

11. Verification and Commissioning

Once the corrective sequence is complete, validate the fix with a deterministic procedure that an independent engineer can repeat at acceptance:

  1. Power cycle the segment.
  2. Open STEP 7 » PLC » Monitor/Modify. Confirm a DP slave is reachable from the master by reading a known process value (e.g., a digital input at I0.0 of an ET 200S).
  3. Open WinCC Explorer » Tag Management » force a tag update and confirm the quality code is "Good" (0xC0), not "Uncertain" or "Bad".
  4. From the diagnostic buffer, run the project for ≥ 30 minutes and verify no new 0x031B events are appended.
  5. Re-run the Diagnose Hardware tool. The result must read "No error" on both the master and each slave.
  6. Disconnect and reconnect the bus connector at the master to simulate a hot-attach. The bus must re-acquire within ≤ 5 s and the diagnostic buffer must not log 0x031B.
Acceptance criteria: Zero 0x031B events in the diagnostic buffer for 24 h of normal operation, all HMI tags in quality "Good," and the bus test from a PROFIBUS tester reporting a reflection margin ≥ 20% and a signal voltage ≥ 3 V pp.

12. Preventive Maintenance

  • Lock the PROFIBUS terminator switches with a dab of hot glue or use locking connectors (e.g., 6ES7 972-0BA52) in vibration-prone cabinets.
  • Stamp the CP and the PLC DP master with the firmware version once commissioned, so a future field engineer has a known-good baseline.
  • Maintain a backup of the SIMATIC NET configuration via Start » SIMATIC » SIMATIC NET » Commissioning » Save Configuration.
  • Schedule a yearly PROFIBUS cable and termination inspection; record signal quality trends for predictive maintenance.
  • Keep the PG/PC interface assignment constant in S7ONLINE; disable auto-detect of CP for the engineering PC.

13. Field Troubleshooting Matrix

Symptom Likely cause First check Fix
0x031B after PC rebuild only PG/PC interface wrong Set PG/PC Interface applet Reassign S7ONLINE to physical CP
0x031B with single slave only Slave termination / cable Inspect connector switches, A/B voltage Re-terminate, replace cable
0x031B across whole segment HSA / profile mismatch HW Config DP master properties Match profile and HSA with PG
0x031B after driver reinstall Outdated CP firmware Device Manager » Firmware Flash to latest approved version
0x031B intermittent under load EMC, VFD noise Oscilloscope on A/B Re-route cable, add shielding, isolate drives

14. Related Diagnostic Codes to Expect in the Same Buffer

After clearing 0x031B you may see complementary events. Knowing their meaning helps you avoid chasing phantom faults:

Event Code Resolution path
Station failure (DP) 0x031C Re-identify slave, check power and bus cable
Station return (DP) 0x031D Informational; expected after 0x031C is fixed
Diagnostic interrupt (OB82) Channel-related Evaluate diagnostic data block in OB82
Module rack failure (OB86) 0x0380.. Triggered by station failure; auto-clears on return
I/O access error (OB122) 0x0xxx User code reads faulty slot; remove or guard

15. Frequently Asked Questions

What does Siemens error 0x031B mean on a PROFIBUS-DP master?

0x031B is a PROFIBUS synchronization error recorded in the diagnostic buffer when the DP master loses frame alignment with a slave. It is a logical-layer fault typically caused by profile/baud-rate mismatch, HSA limits, termination problems, or an out-of-date SIMATIC NET driver. The PLC continues running; OB82 (Diagnostic Interrupt) and OB86 (Rack Failure) may also be triggered.

Why does "Diagnose Hardware" show error 0x031B but the hardware test passes?

The hardware test only verifies the CP's RS-485 transceiver and the bus cable connectivity. 0x031B is reported by the DP protocol layer above the physical layer. A passing hardware test combined with a 0x031B event means the wire is intact but the protocol handshake is failing — almost always a PG/PC interface or profile configuration issue on the engineering side after a fresh install.

How do I fix PROFIBUS error 0x031B after reinstalling WinCC 2008 SP3 and STEP 7 V5.5?

Open Set PG/PC Interface, set the access point S7ONLINE to the physical PROFIBUS CP (CP 5611 / CP 5621 / CP 5613 / PC Adapter USB A2), and match the Profile and Transmission Rate to the PLC's DP master in HW Config. Then inspect PROFIBUS termination switches on every node — ON at the two physical ends, OFF elsewhere — and verify the CP firmware matches the SIMATIC NET release (V8.1 / V8.2 for WinCC V7.0 SP3).

What baud rate should I select for a 250 m PROFIBUS segment with ET 200S slaves?

1.5 Mbps is supported up to 200 m and is the most common production default. For 250 m, drop to 500 kbps (max 400 m) for headroom. For installations approaching 1 km, use 187.5 kbps and add a repeater at 1 km boundaries. Always set the same baud on every node and on the PG/PC interface.

Do I need to update the CP 5611 firmware to clear 0x031B on a rebuilt WinCC / STEP 7 PC?

Usually not; first validate the PG/PC interface assignment and the bus profile. If 0x031B persists after those checks, update the CP firmware to ≥ V8.0 and confirm SIMATIC NET V8.1 or V8.2 is installed. Mismatched CP firmware / SIMATIC NET versions are a known cause of 0x031B on rebuilt engineering stations.

Back to blog