1. System Overview
An S7-400H redundant automation system consists of two CPU 41x-5H processors running in parallel, each backed by its own synchronisation module pair and linked through redundant PROFINET or PROFIBUS networks. Both CPUs execute the same user program in lock-step; one operates as the master while the other remains in standby. The standby CPU takes over control within milliseconds if the master fails, which is why a third-party HMI must be configured to follow the active master rather than binding to a single CPU IP address.
When the HMI is a Schneider Electric Magelis PC Panel running Vijeo Designer, EcoStruxure Operator Terminal Expert, or any OPC DA/UA client, the integration relies entirely on standard S7 communication over TCP/IP. No proprietary Siemens HMI protocol is required, but the HMI application must implement its own master/standby detection and connection failover because Schneider HMI drivers do not interpret the Siemens H redundancy state automatically.
This reference covers the topology, hardware list, IP planning, PLC programming (H_STATUS block and SFC51 polling), lifebit handling, HMI-side failover logic, and verification procedure for an S7-400H ↔ third-party HMI link. Notes on S7-1500R/H migration are included for projects that have moved to the newer redundant platform.
2. Prerequisites
| Component | Specification / Catalog Number | Notes |
|---|---|---|
| Redundant CPUs | 6ES7 412-5HK06-0AB0 (CPU 412-5H), 6ES7 414-5HM06-0AB0 (CPU 414-5H), 6ES7 416-5HS06-0AB0 (CPU 416-5H), 6ES7 417-5HT06-0AB0 (CPU 417-5H) | Firmware V6.0 or higher recommended for full SSL redundancy state coverage |
| Sync modules | 6ES7 960-1AB06-0XA0 (fibre-optic, up to 10 m) or 6ES7 960-1AE06-0XA0 (up to 10 km) | Required for hot-standby synchronisation |
| Industrial Ethernet | CP 443-1 (6GK7 443-1EX30-0XE0) or CP 443-1 Advanced (6GK7 443-1GX30-0XE0) | One CP per CPU rack; each CP gets its own IP address |
| HMI | Schneider Magelis iPC / PC Panel running Vijeo Designer, EcoStruxure Operator Terminal Expert, or OPC client | Dual Ethernet NICs recommended for physical network separation |
| Engineering tool | STEP 7 V5.6 (for S7-400H) or TIA Portal V17/V18 (for S7-1500R/H) | H_STATUS block download from Siemens support portal |
| Network | Managed Ethernet switches supporting MRP (IEC 62439-2) if PROFINET ring topology is used | Schneider HMI must support media redundancy if placed in PROFINET ring |
3. Network Topology
Two physically separated Ethernet networks are recommended for a redundant HMI link. Network A terminates on the integrated PROFINET interface of CPU 0 (or on CP 443-1 installed in the CPU 0 rack); Network B terminates on CPU 1. The HMI PC Panel hosts two NICs and connects to both networks. If a single network is used, the HMI must poll both CPU IPs and switch the active connection when the master changes.
The diagram above illustrates the dual-CP topology with a Schneider HMI on two independent Ethernet segments. If a single switch is preferred, both CP 443-1 modules must be addressed through separate subnets or the HMI must manage a primary/secondary driver pair that toggles on master/standby state.
4. IP Address Planning
| Device | Interface | IP Address | Subnet | VLAN (if used) |
|---|---|---|---|---|
| CPU 0 (H-CPU 0) | PROFINET X5 (integrated) | 192.168.10.10 | 255.255.255.0 | 10 |
| CP 443-1 on CPU 0 | Ethernet port | 192.168.10.11 | 255.255.255.0 | 10 |
| CPU 1 (H-CPU 1) | PROFINET X5 (integrated) | 192.168.10.20 | 255.255.255.0 | 10 |
| CP 443-1 on CPU 1 | Ethernet port | 192.168.10.21 | 255.255.255.0 | 10 |
| HMI NIC 1 | Network A | 192.168.10.50 | 255.255.255.0 | 10 |
| HMI NIC 2 (optional) | Network B | 192.168.10.51 | 255.255.255.0 | 10 |
| Engineering station | Programming port | 192.168.10.100 | 255.255.255.0 | 10 |
5. Step-by-Step Configuration
5.1 Hardware Installation
- Insert both CPU 41x-5H modules into the UR2-H rack (or two separate racks connected via the H sync cable). Verify the order slot of each CPU matches the H configuration in STEP 7.
- Install one CP 443-1 in each rack. Note that the CP slots are CPU-local; the S7-400H does not share CPs across CPUs.
- Connect the fibre-optic sync cables between the two sync module sub-slots and verify the SYNC LED on both CPUs is solid green.
- Connect the Ethernet cables from each CP 443-1 to the appropriate managed switch.
- Connect the Schneider HMI to both switches (or to a single switch if both CPs are on the same subnet and IP-level failover is acceptable).
5.2 STEP 7 Project Setup
- Open STEP 7 V5.6 and create a new S7-400H station. Add both CPU 41x-5H modules and both CP 443-1 modules to the hardware configuration.
- Configure the Ethernet interface of each CP 443-1 with the IPs from the planning table. Enable "Use the router" only if your network requires it.
- In NetPro, add a TCP/IP connection from the HMI to CPU 0 (one connection object) and a second connection from the HMI to CPU 1. The HMI driver will instantiate both; only one is active at a time.
- Set the connection type to "S7 connection" with the partner being the CPU's PROFINET interface IP, not the CP. The CP simply routes the S7 frames.
- Download the hardware configuration to both CPUs and verify online that both CPs are reachable from the engineering station (ping or "Accessible Nodes" in STEP 7).
5.3 H_STATUS Block Integration
Siemens publishes a free, ready-to-use block that polls the H system status via SFC51 and writes the results to a data block. Download the block from Siemens support entry 19537149 and integrate it into your STEP 7 project.
The block exposes the following outputs (refer to the block documentation shipped with the download for the exact DB layout, as it changes between block revisions):
| Output | Data Type | Meaning |
|---|---|---|
| MASTER_CPU | BOOL | TRUE if the CPU executing the block is the active master |
| STANDBY_CPU | BOOL | TRUE if the CPU is in standby |
| RED_STATE | BYTE / INT | H redundancy state code (e.g., 0 = solo, 1 = redundant, 2 = sync error) |
| SYNC_OK | BOOL | TRUE if H sync link is healthy |
| LIFEBIT | DINT / DWORD | Free-running counter that increments on the master only; HMI watches for change |
Call H_STATUS in OB1 (or in a cyclic OB35 at 100 ms) on both CPUs. Only the master will update the LIFEBIT and MASTER_CPU; the standby CPU returns LIFEBIT frozen. The HMI reads the DB from either CPU and uses the LIFEBIT delta to determine which CPU is currently authoritative.
5.4 Lifebit Programming
The lifebit is the most reliable mechanism to detect a CPU that has entered STOP mode. SSL state reads may freeze at the last valid value, so a changing counter is essential for correct failover.
Sample STL implementation (to be added inside H_STATUS or in a complementary block):
// Increment lifebit each cycle on master only
A "H_STATE_MASTER" // H_STATUS output
JCN NOUP
L "HMI_LIFEBIT".DBD0 // DWORD counter in shared DB
+ 1
T "HMI_LIFEBIT".DBD0
NOUP: NOP 0
Place the lifebit in a DB that is part of the S7 connection data viewable by the HMI. The HMI should sample the lifebit every 1–2 seconds; if the value does not change for more than 5 seconds, the current master is considered stopped and the HMI switches its active connection to the standby CPU.
5.5 HMI Configuration (Schneider Magelis / Vijeo Designer)
- Install the Schneider S7 driver (Siemens S7 MPI/TCP-IP) in Vijeo Designer or the equivalent driver in EcoStruxure Operator Terminal Expert.
- Create two driver instances, one pointing to 192.168.10.10 (CPU 0) and one pointing to 192.168.10.20 (CPU 1). Set the rack/slot to 0/3 for the integrated PROFINET interface (or to the CP slot if going through the CP).
- Bind every HMI tag to both driver instances, so the variable is read from either CPU. Vijeo Designer supports variable aliasing and "primary/secondary" driver failover natively; in EOTE, this is handled in the variable's "Quality" properties.
- Add a script (Vijeo Designer's VBA or EOTE's C# / VB.net script) that polls the H_STATUS DB on both CPUs. The script should:
- Read MASTER_CPU and LIFEBIT from the active driver.
- If MASTER_CPU is FALSE and LIFEBIT is frozen for more than 5 s, switch the primary driver to the standby connection.
- Re-evaluate every 2 s.
- Display a banner ("Connected to CPU 0 / CPU 1") on every screen so the operator can verify the active connection manually.
6. Redundancy State Detection via SSL IDs
The SFC51 "RDSYSST" function is the lowest-level mechanism to read system state lists. For a deeper understanding of the underlying data, the H_STATUS block internally calls SFC51 with the following SSL_IDs (the exact list depends on the CPU firmware; refer to the S7-400H System Manual and the H_STATUS block documentation for the version you use):
| SSL_ID (W#16#) | Description | Typical Use |
|---|---|---|
| 0092 | Status of the H system | Detect whether system is in redundant or solo mode |
| 00B1 | H CPU redundancy state | Master / standby identification |
| 00B2 | H CPU standby/backup state | Distinguish hot-standby from link-down |
| 0131 / 0132 | Module identification of the H CPUs | Verify which physical CPU is responding |
| 0424 / 0F31 | Communication status (on supported firmware) | CP and PN interface state |
Direct SFC51 usage (in STL) for reading the H state:
CALL "RDSYSST" // SFC51
REQ := TRUE
RET_VAL := MW100
BUSY := M101.0
SSL_ID := W#16#0092
INDEX := W#16#0000
SSL_ADDR:= P#DB20.DBX0.0 BYTE 32
For third-party HMI integration, it is strongly recommended to use the H_STATUS block rather than calling SFC51 directly, because the SSL data layout varies across firmware versions and a single DB change can break the HMI polling logic without any error indication at the HMI side.
7. HMI-Side Failover Logic
The HMI must implement a state machine that follows the master. A minimal implementation in pseudocode (translatable to Vijeo Designer VBA, EOTE C#, or any OPC client):
// Run every 2 seconds
function UpdateActiveConnection():
active_master = ReadTag("HMI_DB.H_STATE_MASTER")
active_lifebit = ReadTag("HMI_DB.HMI_LIFEBIT")
active_quality = GetTagQuality("HMI_DB.H_STATE_MASTER")
active_age = (now - last_lifebit_time)
if active_quality == BAD and now - last_failover > 30:
// Driver connection is broken; switch immediately
SetPrimaryDriver("CPU_1_DRIVER")
ShowBanner("Failover: connected to CPU 1")
last_failover = now
return
if active_master == FALSE and active_age > 5000:
// Master appears down; switch to standby
SetPrimaryDriver("CPU_1_DRIVER")
ShowBanner("Failover: connected to CPU 1")
last_failover = now
return
if last_lifebit_value != active_lifebit:
last_lifebit_value = active_lifebit
last_lifebit_time = now
Place the script in the HMI's main loop (Vijeo: Project > Scripts > Project Script; EOTE: Screen / Project scripting). Bind variable access through the driver so the script sees quality codes — if the connection is broken, the driver returns a "bad" quality and the script triggers an immediate failover without waiting for the lifebit timeout.
8. Verification and Commissioning
- Power-up test: Power both CPUs. Verify SYNC LEDs go solid green within 30 s. From the HMI, confirm that the H_STATE_MASTER tag from CPU 0 returns TRUE and from CPU 1 returns FALSE.
- Single-CPU stop test: With the system redundant, set CPU 0 to STOP via STEP 7 (online > STOP). Within 2 s, CPU 1 must take over and the HMI must switch its active driver to the CPU 1 connection. Verify the operator banner updates accordingly.
- Cable fault test: Disconnect the Ethernet cable between CP 443-1 of CPU 0 and Switch A. CPU 1 must remain master (if it was already master) or take over. The HMI must not lose its connection permanently if the active CP link is down and the standby CP is up.
- Sync fault test: Disconnect the fibre-optic sync cable. Both CPUs should fault (SF LED on); after the configured link-down time, the master should remain master and the standby should switch to STOP-with-sync-error. Restore the cable and verify resync without manual intervention.
- Lifebit test: With the HMI connected, observe the LIFEBIT tag in a watch window. It must increment at least once per second on the master. Now set the master to STOP. The LIFEBIT must freeze and the HMI must switch to the standby within 5 s.
- Tag round-trip: Toggle a boolean tag from the HMI and confirm the change appears in the PLC on the currently active CPU. Repeat for both CPU roles.
- Quality-code test: Pull the active Ethernet cable while the HMI is running. The driver should report a "bad" quality within the configured timeout (default 3–5 s), and the failover script should switch to the standby CPU before the lifebit timer expires.
- Sustained redundancy test: Run the system for at least 24 h with both CPUs online. Verify that LIFEBIT and MASTER_CPU do not flicker, that the HMI banner does not change spuriously, and that there are no S7 connection re-establishment events in the HMI log.
9. S7-1500R/H Considerations
Newer projects may run on S7-1500R (without H sync module) or S7-1500H (with H sync module). The redundancy philosophy is the same, but several details differ:
- PROFINET is the only supported fieldbus. PROFIBUS is not available on S7-1500R/H CPUs.
- Both PROFINET interfaces of the CPU are used for the H ring; an external CP is not required unless you need additional isolated networks.
- If the HMI is placed inside the PROFINET ring with S7-1500R, the HMI must support media redundancy (MRP client, IEC 62439-2). The H-Sync forwarding function is also recommended, as described in the S7-1500R/H application planning documentation.
- Connection to HMI panels is described in the Siemens application document "Connecting a SIMATIC HMI Panel with a SIMATIC S7-1500R/H". Although the document covers Siemens panels, the same principles apply to third-party HMIs over standard S7 communication.
- The H_STATUS block in STEP 7 V5.x is not directly compatible with S7-1500R/H. Use the redundancy status functions available in the S7-1500R/H CPU firmware (block "GetRedundancyState" or read the "RHINFO" structure) and provide the equivalent data to the HMI via a shared DB.
- TIA Portal V17 or V18 is required to engineer the S7-1500R/H station; STEP 7 V5.6 cannot program an S7-1500 CPU.
10. Troubleshooting Matrix
| Symptom | Likely Cause | Action |
|---|---|---|
| HMI cannot connect to either CPU | Subnet mismatch, wrong rack/slot, firewall on HMI blocking TCP/102 | Verify IP/subnet; ping from HMI; open TCP/102; confirm rack/slot in driver matches the integrated PN interface or CP slot |
| HMI connects only to CPU 0 | CP 443-1 on CPU 1 has wrong IP or no Ethernet link | Check CP diagnostics in STEP 7; check link LED on CP 443-1; verify second connection object is downloaded to HMI driver |
| HMI does not switch over after master STOP | Lifebit not implemented, or script polling interval too long | Confirm H_STATUS block is called on both CPUs; verify lifebit increments; reduce HMI poll interval to ≤ 2 s |
| HMI shows two masters simultaneously | Driver failover logic not engaged, both connections are bound in parallel | Configure primary/secondary driver pair instead of two independent drivers; add quality-code based selection |
| HMI freezes during failover for 10–30 s | HMI waits for driver retry timeout before switching | Reduce driver retry/timeout; use lifebit to switch before TCP timeout |
| Operator banner does not update | Banner tag bound to wrong driver or wrong DB address | Verify tag address in HMI matches H_STATUS output DB on the active CPU |
| SSL read returns all zeros | SFC51 RET_VAL ≠ 0 (busy, illegal SSL_ID, address range error) | Check RET_VAL; verify SSL_ID is supported on the CPU firmware; increase SSL_ADDR byte length |
| CP 443-1 link LED off after cable is reseated | Port disabled or auto-negotiation mismatch with switch | Force port speed/duplex in CP hardware config; cross-check switch port configuration; try a known-good patch cable |
| SF LED on standby CPU after sync cable restore | Resync still in progress; lasts up to 30 s | Wait for the LINK-UP/RESYNC event to clear; check OB70 / OB72 diagnostics buffer entries for sync errors |
| Operator screen values freeze on failover, then jump | HMI tag binding not refreshed after driver switch | Force a tag refresh in the failover script; verify Vijeo Designer "Synchronize variables" option is enabled |
11. Frequently Asked Questions
Do I need a special Siemens protocol or hardware to connect a Schneider HMI to an S7-400H?
No. The Schneider HMI uses the standard S7 communication over TCP/IP (port 102) just like any S7 client. Each CP 443-1 has its own IP, and the HMI opens a normal S7 connection to each CPU. Redundancy is achieved by the HMI application logic, not by Siemens-specific HMI protocols.
Where can I download the H_STATUS block and what does it provide?
The H_STATUS block is available free of charge from Siemens support entry 19537149. It encapsulates SFC51 calls to read the H redundancy state, the master/standby flag, sync health, and a free-running lifebit, writing the results to a shared DB that any third-party HMI can read.
How does the HMI know the master CPU has gone to STOP rather than just being unresponsive on the network?
Use a lifebit: a counter in the shared DB that increments on the master only, sampled every 1–2 s by the HMI. If the counter freezes for more than 5 s, the master has stopped. Combine this with TCP quality-code loss on the active S7 connection to distinguish a network fault from a CPU STOP.
Can both CP 443-1 modules share the same IP subnet?
Yes, but only if the HMI explicitly polls both IPs and selects the responding CPU as master. The simplest design uses two subnets (one per CP) with one HMI NIC per subnet; this gives the cleanest physical separation and lets the HMI driver handle failover without IP-level route changes.
Does the same procedure work for S7-1500R/H redundant systems?
Yes, with adaptations. PROFINET is the only fieldbus, the HMI inside the PROFINET ring must support MRP media redundancy, and the H_STATUS block from the S7-400H library is not directly compatible. Use the S7-1500R/H redundancy status functions and replicate the lifebit in a shared DB read by the HMI. The application document "Panels and S7-1500R/H" and the TIA Portal manual collection cover the HMI-side requirements.