Configuring S7-300 Software Redundancy with WinCC over MPI

David Krause16 min read
S7-300SiemensTechnical Reference
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

System Architecture Overview

A standard redundancy requirement in a SIMATIC S7-300 environment pairs two S7-315-2DP CPUs (a master and a standby) with a single WinCC station that monitors the active controller. When a fault, stop, or communication failure is detected on the master, the standby takes over process control and WinCC automatically switches its data source to the partner PLC, preventing a loss of view for operators.

The original project request in this scenario is deceptively simple: connect two 315-2DP CPUs to one engineering PC using two physically separate MPI/Profibus networks, so that the loss of either cable or either CPU does not interrupt HMI visibility. In practice, this requirement immediately runs into two architectural constraints that determine everything that follows:

  1. The S7-300 family does not support H-system fault-tolerant S7 connections. Fault-tolerant S7 connections (redundant S7 connections terminated in both CPUs simultaneously) are a feature of the S7-400H only, and they require specific CP hardware (for example CP1613 on the PC side) and the H-CPU firmware.
  2. Only one CP 5611 can be installed per PC. The CP 5611 is a single-channel Profibus/MPI card and only one access point can be active in the PG/PC interface at a time. To bring two physically separate Profibus/MPI masters into one PC, you must use two cards (typically two CP 5613, or two CP 5623, or one of each generation).

The correct path for S7-315-2DP plus WinCC is therefore software redundancy (Siemens terminology: Software Redundancy for S7-300 / S7-400), combined with the WinCC Redundant Connection Wizard. The wizard creates two S7 connections in WinCC - one to PLC A and one to PLC B - and toggles between them based on the standby/active status reported by the redundancy logic running in the PLCs themselves.

S7-300 Redundancy Models: H-System vs. Software Redundancy

Siemens documents two distinct ways to build a redundant control system. They are not interchangeable, and selecting the wrong one is the most common reason S7-300 redundancy projects fail at the planning stage.

Attribute S7-400H (H-System) S7-300 Software Redundancy
CPU type S7-414H, S7-416H, S7-417H (paired) Any S7-300 CPU, including 315-2DP, 317-2DP, 319-3 PN/DP
Connection type Fault-tolerant S7 connection (S7-H) Standard S7 connection, configured in pairs (A/B)
Required CP on PC CP 1613 (with hardnet driver) recommended; SOFTNET not supported for S7-H CP 5611, CP 5613, CP 5623, or CP 1623 (SOFTNET acceptable for non-time-critical tags)
Switchover time Sub-100 ms, bumpless for H-CPU sync Approximately one monitoring cycle of the redundancy FB (typical: 100 ms to several seconds depending on scan)
Synchronization link Optical or electrical redundant sync cables between H-CPUs None - the standby mirrors the master's process image by application code (FBs from the SWR library)
WinCC connection wizard Fault-tolerant S7 connection via WinCC Channel "SIMATIC S7 Protocol Suite", unit "S7-H Connection" Redundant Connection wizard that creates two standard S7 connections (PLC A and PLC B)
Tag failover Handled at the channel level by the H-driver Handled at the application level by the WinCC channel driver using partner-status tags
Decision rule: If both PLCs are 315-2DP, you must use software redundancy. Fault-tolerant connections (S7-H) require H-CPUs and are not available on S7-300, regardless of CP hardware on the PC.

Hardware Requirements: CP Card Selection

Choosing the right PC communication module is the second decision point and it has direct consequences on what WinCC will let you configure.

CP card Order number (typical) Channels Driver family Suitable for S7-300 software redundancy
CP 5611 6GK1561-1AA01 1 (Profibus/MPI) DP-Base, SOFTNET-DP Only one card allowed per PC; can carry either the A or the B connection, not both
CP 5613 A2 6GK1563-1AA02 1 (Profibus/MPI/PPI), with diagnostic DP-Base, SOFTNET-DP Two cards supported; both connections can run simultaneously
CP 5614 A2 6GK1564-1AA02 2 (Profibus/MPI) DP-Base, SOFTNET-DP Yes, single card with two physical channels
CP 5623 6GK1562-3AA00 1 (Profibus/MPI/PPI) - PCIe SOFTNET-DP, DP-Base Yes, modern replacement for CP 5613; supports two cards per PC
CP 1613 6GK1161-3AA01 1 (Profibus) - PCI Hardnet-DP Yes, but typically reserved for H-systems due to higher cost

Field-proven rule for S7-315-2DP software redundancy: install two CP 5613 (or two CP 5623) in the PC, assign one to the Profibus network of PLC A and the other to the Profibus network of PLC B. Each card is configured in PG/PC Interface with a unique access point (for example S7ONLINE_A and S7ONLINE_B) so that WinCC can resolve both connections independently. Trying to share a single CP 5611 between two masters is not possible because the PG/PC interface only exposes one active access point per device.

Important constraint: The PC/PCI slot count and Windows Plug-and-Play handling of duplicate Siemens CP devices are the usual commissioning blockers. Install drivers from a single SIMATIC NET DVD, set distinct interrupt and memory addresses in the BIOS if both cards are PCI, and confirm both cards appear in Device Manager → SIMATIC NET without yellow exclamation marks before installing STEP 7 or WinCC.

Network Topology Design

For a 2 x 315-2DP software redundancy cell that is also connected to ET 200M distributed I/O, the bus assignment is fixed by the physical ports on the CPU:

  • Port 1 (MPI/DP, X1) - default Profibus master, used for the ET 200M stations.
  • Port 2 (DP, X2) - second Profibus interface on the 315-2DP, also MPI-capable, used here for the HMI segment.

The PC connects to the HMI segment of each PLC through its own CP card. The two HMI segments must be electrically isolated from each other (two separate Profibus cables, two Profibus terminators, two distinct bus addresses for the two 315-2DPs and the two CP cards) so that a short or break in one cable cannot take down both connections.

Engineering PC (WinCC Server) 2 x CP 5613 / 5623, access point S7ONLINE_A / S7ONLINE_B CP card A MPI addr 0 CP card B MPI addr 1 CP card A or B (optional) PG/PC for STEP 7 PLC A - 315-2DP (MASTER) MPI addr 2 / Profibus master Port X1: ET 200M segment Port X2: HMI segment (MPI) PLC B - 315-2DP (STANDBY) MPI addr 3 / Profibus master Port X1: ET 200M segment Port X2: HMI segment (MPI)

Because the HMI segment of each 315-2DP runs as an MPI bus at 187.5 kbps (the default and the most reliable MPI baud rate; faster 1.5 Mbps MPI is supported by the 315-2DP but rarely used in mixed Profibus/MPI cells), the HMI data rate is the limiting factor on the WinCC side. Plan tag counts and update times accordingly - large tag lists with sub-100 ms updates will saturate the MPI channel before the Profibus I/O segment does.

STEP 7 Project Setup for Software Redundancy

The redundancy function in the PLCs is provided by the Software Redundancy library (commonly referred to as the SWR library). The library is installed with STEP 7 and added per project. Key function blocks from the library:

FB / FC Symbol Purpose
FB 101 SWR_START Initializes the redundancy relationship, declares the partner CPU, and starts the standby/active monitoring task. Called in OB 100 (restart).
FB 102 SWR_ZUSTAND Reads the current redundancy state of the local CPU (primary, backup, solo, stop). Called cyclically in OB 1.
FC 100 / FC 101 SWR_SEND / SWR_RCV Update the process image copy between the master and the standby. Their OB1 call rate is the most important tuning knob.

Minimum call sequence in OB 1 on both 315-2DP CPUs:

// OB 1 - software redundancy calls (both PLCs)
CALL FB 101, DB 101  // SWR_START - only on cold restart in OB 100 normally
    Partner_CPU      := 3           // MPI address of the other 315-2DP
    Partner_DB       := 101         // redundancy DB number on partner
    Local_DB         := 101         // redundancy DB number on this CPU
    Cycle_Time       := T#200ms

CALL FB 102, DB 102  // SWR_ZUSTAND - cyclic, OB 1
    Mode             := 'A'         // 'A' = primary or backup,
                                    // 'S' = solo, 'X' = unknown

// Application code: copy of process-relevant DBs
// Use FC 100 (SWR_SEND) and FC 101 (SWR_RCV) for each
// mirrored DB. The DBs must exist with identical
// numbers and identical structure on both PLCs.
CALL FC 100          // SWR_SEND for DB 200 (process image mirror)
CALL FC 101          // SWR_RCV  for DB 200
Critical preconditions for SWR: the mirrored DBs must have identical numbers and identical structure on both PLCs. OB 1 must call SWR_ZUSTAND unconditionally every cycle. The standby CPU must be in RUN (not STOP) for the SWR handshake to succeed. If either CPU is in STOP, the other goes to solo mode and continues without redundancy.

WinCC Channel Configuration

On the PC side, two SIMATIC S7 Protocol Suite channels are created - one per CP card. Each channel exposes a separate logical access point in the PG/PC interface:

  1. Open PG/PC Interface (Control Panel → Set PG/PC Interface). Configure CP card A with access point S7ONLINE_A pointing to the Profibus/MPI network that carries PLC A (address 2). Configure CP card B with access point S7ONLINE_B pointing to the network that carries PLC B (address 3).
  2. In WinCC Explorer open Tag Management → SIMATIC S7 PROTOCOL SUITE. Add two PROFIBUS (MPI) channel units, one bound to S7ONLINE_A, the other to S7ONLINE_B. Inside each unit create one S7 connection: connection A targets PLC address 2 on MPI, connection B targets PLC address 3 on MPI.
  3. Set the partner slot/rack to match the CPU. For a 315-2DP in slot 2 of rack 0 the connection parameters are rack = 0, slot = 2.

WinCC Redundant Connection Wizard Procedure

The wizard replaces manual A/B connection management and is the documented path for S7-300 software redundancy with WinCC.

  1. In WinCC Explorer, right-click the S7 Protocol Suite channel and select Redundant Connection (or run the wizard from Options → Redundancy → Create Redundant Connection). WinCC launches the connection pair wizard.
  2. Step 1 of the wizard: select the PLC A connection you just created. This is the connection that will carry tags while PLC A is in MASTER state.
  3. Step 2: select the PLC B connection. WinCC pairs the two connections internally as a redundancy group.
  4. Step 3: define the status tags that WinCC reads from each PLC to determine the active partner. Typical choices are the SWR_ZUSTAND output word (one bit set when CPU is primary, another when backup) or user-defined flags updated in OB 1.
  5. Step 4: define the switchover condition. WinCC switches to the backup connection when (a) the active connection is in error state, OR (b) the status tag on the master indicates it is no longer primary.
  6. Step 5: assign the redundancy group name and complete the wizard. WinCC generates a redundancy tag set and a connection-pair internal variable used by the channel driver.

After the wizard finishes, every tag in the WinCC project can be configured to use the redundancy group instead of a specific connection. The tag will be read from PLC A while PLC A reports primary, and seamlessly from PLC B on failover.

Data Tag Synchronization and Partner PLC Selection

Software redundancy on S7-300 does not duplicate I/O - the standby CPU has no field wiring. It mirrors the master's process image (the relevant DBs) via the FC 100 / FC 101 calls in OB 1. Three consequences are important when sizing the system:

  • Standby must run the same STEP 7 program as the master. Mirrored DBs, FB call structure, and SWR block instance DBs must be identical.
  • Outputs on the standby are disabled - SWR forces the standby to suppress DO writes to the Profibus I/O. The master is the only writer to the field. If you need bumpless handover of analog outputs, the receiving device (drive, valve positioner) must support last-value-hold on signal loss, or the application code must ramp outputs on switchover.
  • Tag selection in WinCC is by area, not by signal type. If PLC A is the master for the first 500 tags and PLC B is the master for the next 500, the wizard still reads all tags from the active connection. Mirror the full process image on both sides to avoid undefined tag values during the few hundred milliseconds of failover.

Communication Performance and Timing

Parameter Typical value (this topology) Notes
MPI baud rate 187.5 kbps Highest reliable rate when CP 5613/5623 is on the same segment as a Profibus master
Profibus I/O segment baud rate 1.5 Mbps (typical) or 12 Mbps Set in HW Config → DP interface properties → Network settings
WinCC tag update rate (acquisition cycle) 500 ms to 1 s default; min 250 ms Lower values are possible but increase MPI bus load
SWR_ZUSTAND scan 100 ms - 500 ms Cycle_Time parameter on SWR_START; shorter = faster failover but more MPI load
Detected failover time (STOP of master to standby taking over HMI tags) 1 - 3 s typical Comprised of one SWR cycle to detect, one channel cycle to flag the connection, one WinCC cycle to switch tag source
Number of tags per channel 1,500 - 2,000 at 1 s update Depends on data type and whether tags are bit-packed in DBs
Bus-loading rule of thumb: keep MPI bus utilization below 40% under steady state. With 187.5 kbps this translates to roughly 60% of the byte budget left for non-redundancy traffic (operator requests, recipe downloads, diagnostics). Use the Profibus bus monitor tool from SIMATIC NET to verify before commissioning.

Verification and Commissioning Checklist

  1. Both 315-2DPs are in RUN; SWR_START reports status word = 0x0003 (both primary and backup recognized).
  2. STEP 7 online → PLC → Operating Mode shows PLC A as Master, PLC B as Standby. Swap master manually via the SWR control tag to confirm the partner correctly takes over outputs.
  3. WinCC channel diagnostics (Tools → Channel Diagnosis) shows both S7 connections as Connected.
  4. Force a STOP on the master CPU. WinCC values should freeze for the duration of one SWR cycle and then resume from PLC B. Operator should see a redundancy active alarm, not a connection failure alarm.
  5. Pull the Profibus cable between the PC and PLC A. WinCC should report connection A failed and continue reading from PLC B.
  6. Reconnect the cable. WinCC should automatically restore connection A and mark both as healthy without operator intervention.
  7. Verify the standby CPU's output modules (ET 200M DO cards) are not writing. Probe a representative DO with a meter - it should read 0 V while the standby is in backup state, even though the application code on the standby is still updating the output process image.

Field-Proven Caveats and Common Pitfalls

Symptom Most likely cause Corrective action
Only one CP 5611 visible in PG/PC interface after installing two Driver conflict or shared interrupt Reinstall SIMATIC NET, assign unique PCI interrupts, verify in Device Manager
WinCC connection to PLC B always fails Both CP cards set to the same Profibus address or both bound to the same access point Set CP card A MPI address = 0, CP card B = 1; bind to S7ONLINE_A and S7ONLINE_B respectively
Wizard refuses to pair connections Connections not of the same channel type (one TCP, one MPI) Both connections must be of the same driver type; use two MPI/PROFIBUS units, not TCP + MPI
Standby PLC remains in STOP SF LED on because the partner's SWR DB number is missing or mismatched Confirm DB 101 (or whatever number is used) exists with identical structure on both CPUs
WinCC tags stay frozen after master failure Status tag used by the wizard not updated by SWR_ZUSTAND Verify SWR_ZUSTAND is called every OB 1 cycle, with a non-zero mode parameter
Outputs toggle on failover Application forces outputs from the standby code path Wrap output writes in SWR status check: only write outputs if SWR status = primary
Fault-tolerant S7 connection option greyed out in NetPro Trying to use S7-H connection on a non-H CPU Confirm S7-400H is being used; for S7-300 the fault-tolerant S7 connection is not available - use the Redundant Connection wizard
Common confusion to avoid: NetPro does allow you to define two S7 connections between the PC and the two PLCs, and it does allow some redundancy-style templates, but for S7-300 the wizard-based path is the only one that wires the A/B status tags and the channel-level failover logic. Trying to build software redundancy by manually toggling connections in a Global Script is possible but unsupported and notoriously fragile.

Cross-Reference: When to Upgrade from S7-300 to S7-400H

If the project later demands sub-100 ms failover, bumpless analogue handover without ramp logic, or synchronized hot-standby execution of motion blocks, the S7-300 software redundancy path is no longer the right answer. The upgrade decision criteria:

  • Switchover time required < 200 ms: requires S7-400H.
  • Process must not see an output glitch on switchover: requires S7-400H with bumpless DO modules, or external hold-last-value on the field device.
  • PC side must use the H-driver channel unit (S7-H Connection in WinCC): requires S7-400H plus CP 1613 or CP 1623.

For the original 2 x 315-2DP use case, the software-redundancy-plus-wizard approach described above is the only configuration that the firmware and the WinCC channel driver both support, and is the configuration that has been deployed successfully in many discrete-manufacturing cells where 1 - 3 s of HMI re-sync is acceptable.

FAQ

Can I install two CP 5611 cards in one PC for S7-300 redundancy?

No. The CP 5611 is a single-channel card and the PG/PC interface only exposes one active access point per CP 5611. To connect two Profibus/MPI masters from a single PC, use two CP 5613, two CP 5623, or a single CP 5614 A2 (which has two physical channels on one card). Two CP 5611 in the same chassis will be detected but Windows will not let you bind two distinct S7ONLINE access points to them reliably.

Why can't I just use a fault-tolerant S7 connection like on S7-400H?

Fault-tolerant S7 connections (S7-H) are a feature of the S7-400H CPU firmware and require the H-CPU to terminate both ends. The 315-2DP does not support fault-tolerant connections regardless of the CP card on the PC. Use the WinCC Redundant Connection wizard instead, which creates two standard S7 connections and switches between them based on the SWR status reported by the PLCs.

What baud rate should the MPI/Profibus HMI segment run at?

187.5 kbps is the standard rate for a 315-2DP HMI segment shared with a CP 5613/5623. Higher rates (1.5 Mbps) are supported by the 315-2DP but increase cable-length and termination sensitivity. For a redundancy cell that also carries FC 100/FC 101 mirror traffic between the two CPUs, 187.5 kbps is the most reliable compromise.

How long does a failover take with software redundancy on S7-300?

Typical end-to-end failover - from master CPU entering STOP to WinCC resuming reads from the standby - is 1 to 3 seconds: one SWR_ZUSTAND cycle (200 ms typical) to detect the state change, one WinCC channel cycle (500 ms - 1 s) to flag the connection as failed, and one acquisition cycle to start reading from the partner. For sub-second failover you must use S7-400H.

Do I need to mirror every DB on the standby CPU?

Yes - at minimum every DB that WinCC reads as a tag, plus every DB whose values influence outputs the standby will resume on switchover. The SWR library (FB 101 SWR_START, FC 100 SWR_SEND, FC 101 SWR_RCV) handles the mirror; the mirrored DBs must have identical numbers and identical structure on both CPUs, otherwise the standby will enter STOP with an SF LED on a DB-load error.

Back to blog