Overview of the S7-300R Redundant Architecture with a Single OP
The SIMATIC S7-300R is a redundant automation configuration assembled from two identical S7-300 stations operating as a hot-standby pair. Both CPUs run the same user program in lock-step; one unit is designated as the master (active) and the other as the slave (reserve). Distributed I/O is connected through PROFIBUS DP, and the redundant pair is synchronized through a dedicated fiber-optic redundancy link or, in simpler topologies, through the MPI bus.
Introducing a single Operator Panel — in this case the OP77A — into a redundant S7-300R pair raises a fundamental HMI question: the panel cannot bind to one CPU alone, because at any moment either CPU may be carrying the active process image. The HMI must therefore be able to read from the active master, follow switchovers in real time, and display diagnostic information about which CPU is currently live.
Two implementation paths are well established with WinCC Flexible:
- Define one PLC connection per CPU and switch the active connection at runtime using the Change Connection function (typically bound to soft keys K3/K4 on the OP77A).
- Define two PLC connections and let the HMI follow a master/slave coordination bit read from the PLC, automatically switching the active connection whenever the bit changes.
This article walks through the port selection, the WinCC Flexible connection setup, both runtime switchover methods, and the commissioning checks that confirm the OP77A is in lock-step with the live CPU in an S7-300R pair. The SIMATIC S7-300 platform remains available from Siemens through 2033, so the configuration described here is current for both new installations and modernization projects: SIMATIC S7-300 - Siemens.
Prerequisites: Hardware, Software, and Topology
Before configuring the OP77A, verify that the following components and conditions are in place. Each item must be confirmed before you move to the WinCC Flexible configuration step.
| Item | Requirement | Notes |
|---|---|---|
| CPU A | SIMATIC S7-300 CPU 315-2DP | Order number 6ES7315-2AG10 or compatible variant with PROFIBUS DP master interface. |
| CPU B | SIMATIC S7-300 CPU 315-2DP | Identical firmware version to CPU A to support redundant operation. |
| HMI | SIMATIC OP77A | 4.5" monochrome panel with MPI/PROFIBUS interface, configured with WinCC Flexible. |
| Engineering | STEP 7 (for PLC project) and WinCC Flexible (for HMI project) | Both projects must reference the same PC station and use a consistent MPI address map. |
| Redundancy link | Fiber-optic pair between CPU A and CPU B, or a shared MPI segment | Verifies that one CPU is master, the other reserve, and that switchover is deterministic. |
| DP I/O | ET 200M / ET 200S distributed I/O on PROFIBUS DP | Both CPUs must see the same DP slaves; the master takes the active role. |
| Bus topology | Shared MPI bus segment accessible to both CPUs and the OP77A | Terminating resistors enabled at both ends of the segment; bus length observed. |
CPU 315-2DP Port Layout and MPI Addressing
The CPU 315-2DP exposes two physical interfaces, and the choice of which one to use for the OP77A is the first design decision you must make.
| Port | Type | Default MPI Address | Default MPI Baud Rate | Typical Use |
|---|---|---|---|---|
| X1 (MPI/DP combined) | RS-485 | 2 | 187.5 kbit/s | Programming device, HMI, and inter-CPU redundancy traffic. |
| X2 (DP master) | RS-485 | N/A (DP master) | Up to 12 Mbit/s | Distributed I/O (ET 200 stations) only. |
Two valid bus assignments exist for a redundant S7-300R with a single OP77A:
- MPI on X1 of both CPUs (recommended for an OP77A). The OP77A sits on the MPI segment along with the redundancy traffic. Each CPU keeps its own MPI address (typically 2 and 4), and the OP77A uses one of the free MPI addresses (for example, 3).
- PROFIBUS DP shared between CPUs, I/O, and OP77A. The OP77A is connected to the same DP segment as the distributed I/O. This is mechanically possible but has a major caveat: if the OP77A traffic contends with I/O on the DP bus, the constant bus cycle time of the I/O must be recalculated.
For an OP77A in a redundant S7-300R pair, the MPI option is the cleanest: it keeps HMI traffic on a separate bus from the process I/O, leaves the PROFIBUS DP port free for distributed I/O only, and matches the topology described in the source thread where the I/Os are on the DP port and the CPUs exchange synchronization data over MPI.
OP77A Interface Options: MPI vs PROFIBUS DP
The OP77A is available in two interface variants: an MPI-only version and an MPI/PROFIBUS version. The MPI-only OP77A always sits on the MPI bus; the MPI/DP variant can sit on either bus and is configured per project.
| OP77A Variant | Physical Connector | Bus Selection in WinCC Flexible | Recommended Use |
|---|---|---|---|
| OP77A MPI | RS-485, MPI | Connection type = MPI | HMI on shared MPI segment with redundant CPUs. |
| OP77A DP | RS-485, MPI/PROFIBUS | Connection type = PROFIBUS or MPI | HMI on PROFIBUS segment with redundant CPUs and ET 200 I/O. |
Configuration parameter set in WinCC Flexible under Communication > Connections:
Connection name: PLC1_CPU_A
Communication driver: SIMATIC S7 300/400
HMI station address: 3 (OP77A MPI address)
PLC station address: 2 (CPU A MPI address)
Bus type: MPI
Baud rate: 187.5 kbit/s
Connection name: PLC2_CPU_B
Communication driver: SIMATIC S7 300/400
HMI station address: 3 (OP77A MPI address — same panel)
PLC station address: 4 (CPU B MPI address)
Bus type: MPI
Baud rate: 187.5 kbit/s
Both connections share the OP77A station address because only one physical panel is present. The PLC station address is the only thing that changes between the two connection objects.
Selecting the Connection Port for the OP77A
The decision tree below captures the practical selection logic. Use it to justify the port choice in the project documentation.
- Are the I/Os on the DP port of both CPUs? → Yes (this is the source-thread topology). The DP port is occupied by distributed I/O. The OP77A must therefore go on MPI.
- Are the two CPUs already linked over MPI for redundancy traffic? → Yes. The OP77A joins the same MPI segment using a free MPI address.
- Is there a free MPI address in the 1..31 range? → Yes, address 3 (or any unused address other than 2 and 4) is reserved for the OP77A.
If all three answers are yes, MPI is the correct port. If the I/Os were not on DP — for instance, central I/O on the S7-300 rack — the OP77A could in principle be placed on PROFIBUS DP, but for a redundant S7-300R pair the MPI option is preferred because the redundancy protocol on MPI is independent of any DP bus load.
WinCC Flexible Connection Definition for Dual CPUs
Open the HMI project in WinCC Flexible and create two connection objects, one per CPU. The procedure is identical for both the Change Connection method and the master/slave bit method; only the runtime switching logic differs.
- Open the project tree, right-click Communication > Connections, and select Add Connection.
- Name the first connection
PLC1_CPU_A. Set the communication driver toSIMATIC S7 300/400. - Enter the HMI station address (3) and the PLC station address (2). Confirm Bus type = MPI and Baud rate = 187.5 kbit/s.
- Add a second connection, name it
PLC2_CPU_B. Use the same HMI station address (3) and set the PLC station address to 4. - Verify the connection table now contains two rows with identical HMI parameters and different PLC station addresses.
When tags are added to the project, every tag must be assigned to one of the two connections. In the source thread the recommended pattern is to assign every tag to PLC1_CPU_A by default and switch to PLC2_CPU_B at runtime — that way only the active connection matters when reading a value.
| Tag | Assigned Connection | Update Cycle | Trigger |
|---|---|---|---|
| ProcessValue_1 | PLC1_CPU_A (default) | 1 s | Cyclic |
| ProcessValue_2 | PLC1_CPU_A (default) | 1 s | Cyclic |
| MasterSlaveBit | PLC1_CPU_A | 500 ms | Cyclic on change |
If you intend to use the master/slave bit method (covered below), only the coordination bit and any tag you want to monitor regardless of master status need to be on PLC1_CPU_A. All other tags can be on either connection because the HMI will switch automatically.
Method A: Change Connection Function on Soft Keys
The Change Connection function in WinCC Flexible allows the operator to switch the active PLC connection at runtime. On the OP77A, this is typically wired to two soft keys: K3 for CPU A and K4 for CPU B.
- Open the screen editor in WinCC Flexible and place two buttons on the screen.
- For the first button, set the Event to Press and assign the function Change Connection with parameter
PLC1_CPU_A. - For the second button, set the Event to Press and assign the function Change Connection with parameter
PLC2_CPU_B. - Map the first button to soft key K3 and the second to K4 in the screen properties.
Runtime behavior: pressing K3 makes the OP77A read all tags from CPU A; pressing K4 switches to CPU B. The operator must be trained to look at the diagnostic screen and press the correct key after a redundancy event, or to follow a procedure that defines which key corresponds to the currently active master.
Method B: Master/Slave Bit Coordination
The master/slave bit method makes the HMI follow the active CPU automatically. The PLC program writes a coordination bit (commonly a marker in the process image, e.g., M100.0) that is set on the master and cleared on the slave. The OP77A reads this bit cyclically and switches the active connection whenever the value changes.
- Define a tag in WinCC Flexible named
MasterSlaveBitassigned to connectionPLC1_CPU_A. The data type is Bool, the address isM100.0, and the update cycle is 500 ms with On change trigger. - In the same project, define a tag
MasterSlaveBit_Bon connectionPLC2_CPU_Bat the same addressM100.0. This is the same physical bit but read through the other CPU; in a redundant pair, the bit is mirrored by the synchronization link. - Add a tag-named scheduler or a script that triggers every 500 ms. In the script, evaluate both
MasterSlaveBitandMasterSlaveBit_Band call the Change Connection function with the connection name corresponding to the CPU that currently returns TRUE.
Script example (WinCC Flexible VBScript on a scheduled task):
' Trigger: every 500 ms
Dim sActiveConn
If SmartTags("MasterSlaveBit") = True Then
sActiveConn = "PLC1_CPU_A"
ElseIf SmartTags("MasterSlaveBit_B") = True Then
sActiveConn = "PLC2_CPU_B"
Else
' Both bits are 0 — no master detected
sActiveConn = "PLC1_CPU_A" ' default to CPU A
End If
' Only call Change Connection if the connection has actually changed
If SmartTags("ActiveConnection") <> sActiveConn Then
SmartTags("ActiveConnection") = sActiveConn
HMIRuntime.Connection.ChangeConnection sActiveConn
End If
The ActiveConnection internal tag is used to suppress redundant Change Connection calls. Calling Change Connection on every cycle is unnecessary and can briefly disturb tag polling.
Key implementation rules for the master/slave bit method:
- Place the coordination bit in the non-retentive marker area (for example M100.0) so it is rewritten on every master change.
- Use a fixed address in both CPUs; the S7-300R synchronization will mirror the value to the reserve CPU automatically.
- On the OP77A, read the bit from both connections, not just one. If you read from only CPU A and CPU A is the slave, the bit will be 0 and the HMI will not detect the master on CPU B.
- Include a watchdog behavior in the script: if neither bit returns TRUE for a configurable timeout, alarm and revert to CPU A.
Step-by-Step Commissioning Procedure
Follow this sequence at first power-up. Do not skip the verification step after each stage.
- Bring up the redundant PLC pair first. Power CPU A, then CPU B. Open STEP 7 and confirm that CPU A reports master and CPU B reports reserve. Check that the redundancy link is error-free in the diagnostic buffer.
- Assign MPI addresses. Set CPU A to MPI 2, CPU B to MPI 4. Connect a programming device to MPI and confirm both CPUs are reachable at their assigned addresses.
- Power the OP77A and assign it MPI 3. In the OP77A control panel, navigate to Settings > Transfer > MPI/DP Settings and set the address to 3 with baud rate 187.5 kbit/s.
- Create the WinCC Flexible project. Add the two connections (PLC1_CPU_A and PLC2_CPU_B) and a small set of test tags. Compile the project and transfer it to the OP77A.
- Verify connection to CPU A. On the OP77A, press K3 (Change Connection to PLC1_CPU_A). Confirm the test tags return values from CPU A. Check Connection status in the OP77A diagnostics — it should show Online for PLC1_CPU_A.
- Verify connection to CPU B. Press K4 (Change Connection to PLC2_CPU_B). Confirm the same test tags return values from CPU B. If you wrote a distinguishing value in CPU B's process image, confirm it appears.
- Enable the master/slave bit method. Configure the coordination tags and the VBScript scheduler described in Method B. Transfer the updated project to the OP77A and confirm the panel is still able to read both CPUs.
- Force a master switchover. In STEP 7, on CPU A, set the CPU into STOP. CPU B should become master within the configured redundancy switchover time (typically 100 ms to 1 s). The OP77A must switch to PLC2_CPU_B automatically. Verify by reading the diagnostic screen and the master/slave bit.
- Restore CPU A. Switch CPU A back to RUN. Confirm the redundancy link restores and that the master/slave role assignment matches your project requirement (either CPU A returns to master or CPU B remains master, depending on your configuration).
Verification and Acceptance Tests
The acceptance test must demonstrate that the OP77A reads from the live CPU under all four combinations of master/slave and operator action.
| Test # | CPU A State | CPU B State | Expected OP77A Active Connection | Verification |
|---|---|---|---|---|
| 1 | Master, RUN | Reserve, RUN | PLC1_CPU_A (default) or auto-selected by master/slave bit | Process value matches CPU A image. |
| 2 | Reserve, RUN | Master, RUN | PLC2_CPU_B | Process value matches CPU B image. |
| 3 | STOP (fault) | Master, RUN | PLC2_CPU_B within switchover time | Panel does not freeze; master/slave bit transitions correctly. |
| 4 | Master, RUN | STOP (fault) | PLC1_CPU_A | Panel remains responsive; no communication loss. |
For each test, record the time between the master change and the OP77A connection update. The typical update time on MPI at 187.5 kbit/s with a 500 ms polling cycle is 500 ms to 1 s. If the measured time exceeds 2 s, the update cycle on the master/slave bit tag is too long and should be tightened.
Troubleshooting Matrix
| Symptom | Likely Cause | Diagnostic Step | Corrective Action |
|---|---|---|---|
| OP77A shows no connection to either CPU | Wrong MPI address on OP77A or wrong bus type configured in WinCC Flexible | Check OP77A control panel MPI address; verify connection bus type in WinCC Flexible project | Set OP77A to free MPI address (3); set bus type to MPI in both connection objects. |
| OP77A connects to CPU A but not CPU B | CPU B has wrong MPI address or duplicate address with another device | Use programming device to scan MPI bus and list all stations | Reassign CPU B to the correct MPI address (4) and remove any duplicate. |
| Connection drops intermittently | Mismatched firmware between CPU A and CPU B causing redundant link to flap | Read diagnostic buffer on both CPUs; compare firmware versions | Update both CPUs to identical firmware revision. |
| Change Connection function has no effect | Function assigned to wrong event or wrong connection name | Open screen in WinCC Flexible, verify event and parameter string match connection name exactly | Reassign function to Press event with exact connection name (case-sensitive). |
| Master/slave bit script never switches | Coordination bit is read from only one CPU or script cycle is too long | Watch the MasterSlaveBit and MasterSlaveBit_B values live in WinCC Flexible; check trigger cycle |
Read bit from both connections; tighten scheduler to 500 ms or less. |
| DP I/O cycle time increased after adding OP77A | OP77A added to PROFIBUS DP bus instead of MPI | Check physical cabling and bus configuration in STEP 7 HW Config | Move OP77A to MPI bus; recalculate constant bus cycle time on DP if OP77A must remain on DP. |
| OP77A reads stale data after master switchover | Tags were assigned only to the previously active connection | Inspect tag connection assignment in WinCC Flexible | Assign tags to PLC1_CPU_A and PLC2_CPU_B in parallel, or rely on Change Connection function. |
| OP77A shows connection error immediately after power-up | MPI baud rate mismatch between OP77A and CPUs | Compare baud rate in OP77A control panel and in STEP 7 MPI/DP interface properties | Set all devices to 187.5 kbit/s (or 19.2 kbit/s for legacy PG compatibility). |
Field-Proven Notes and Best Practices
- Keep a printable MPI address map next to each cabinet. The most common commissioning error in redundant S7-300R projects is duplicate MPI addresses caused by ad-hoc programming device connection.
- Do not assign the OP77A to MPI address 1 unless your engineering toolchain requires it. Address 1 is frequently used by the programming device, and a power-on race between the PG and the OP77A can cause momentary bus arbitration faults.
- If you use the master/slave bit method, place a small status indicator on every HMI screen showing the currently active connection. Operators need to see at a glance which CPU the panel is talking to, especially during commissioning.
- For long MPI bus segments, use repeaters rather than daisy-chained T-connectors. A reflection at an unterminated stub can corrupt the bus and cause the OP77A to log intermittent connection drops that look like configuration errors.
- Test the redundancy switchover with a real STOP on CPU A, not just with a soft stop from STEP 7. A hard stop exercises the watchdog timing in the reserve CPU and the OP77A end-to-end.
- Document the OP77A project revision against the STEP 7 project revision. Mismatched revisions are the second most common source of intermittent HMI read errors in the field.
Frequently Asked Questions
Which MPI address should I assign to the OP77A in an S7-300R redundant system?
Use any free MPI address other than the two CPU addresses. With CPU A at MPI 2 and CPU B at MPI 4, set the OP77A to MPI 3. Avoid address 1, which is commonly used by programming devices and can cause bus arbitration conflicts at power-up.
Can the OP77A be connected to PROFIBUS DP instead of MPI when the I/Os are on DP?
Mechanically yes, the OP77A DP variant supports PROFIBUS. However, if you place the OP77A on the same DP segment as the distributed I/O, you must recalculate the constant DP bus cycle time in STEP 7. The cleaner topology for a redundant S7-300R pair is to keep the OP77A on MPI and the I/Os on DP, as recommended in the WinCC Flexible commissioning notes.
How does the Change Connection function differ from the master/slave bit method?
Change Connection is operator-driven, typically wired to soft keys K3 and K4 on the OP77A. The master/slave bit method reads a coordination bit from the PLC and switches the active connection automatically whenever the master changes. Use Change Connection for manual override scenarios and the master/slave bit method when the process must continue reading the live CPU without operator intervention.
Why does the OP77A read from the wrong CPU after a redundancy switchover?
The most common cause is that tags were assigned to a single connection and the HMI is still bound to the previous master. Either assign tags to both connections in parallel, or use the master/slave bit method to switch the active connection automatically. Verify the coordination bit is read from both CPUs, not just one.
What baud rate should the OP77A and the redundant CPUs use on MPI?
Set all devices on the MPI segment to 187.5 kbit/s, which is the default for the CPU 315-2DP and the OP77A. Higher rates are not supported on the OP77A MPI interface; lower rates such as 19.2 kbit/s work but slow down the tag update cycle and lengthen the redundancy switchover time as seen by the HMI.