Resolving iFIX Redundancy with Siemens S7-400H and Kepware OPC

David Krause12 min read
SCADA ConfigurationSiemensTechnical 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 SIMATIC S7-400H fault-tolerant station contains two CPU racks (Rack 0 and Rack 1) running redundant CPUs of the 41x-H series. Each rack is equipped with its own CP443-1 Industrial Ethernet communications processor. The two CPUs maintain program-synchronized state over fiber-optic sync modules, while the CP443-1 modules expose the program data to TCP/IP clients using the S7 protocol on ISO-on-TCP port 102 (RFC1006).

When an iFIX-based SCADA layer needs redundant supervision, it must hold two distinct transport paths into the H-station: one through the CP443-1 in Rack 0 and another through the CP443-1 in Rack 1. The failover challenge is that, when one CP443-1 fails, transport connections traversing it are terminated by the TCP stack. From the OPC server (KEPServerEX, formerly Kepware) and the iFIX client, the connection through that path simply registers a timeout; the application must detect it and redirect the polling to the surviving path without operator intervention or data loss.

S7-400H Station Rack 0 (Master CPU) CPU 410-5H Slot 3 CP443-1 Slot 6 Rack 1 (Standby CPU) CPU 410-5H Slot 3 CP443-1 Slot 6 Plant LAN SCADA Workstation CP1613 (PCI) or CP1623 (PCIe) via S7-REDCONNECT S7-REDCONNECT logical fault-tolerant link KEPServerEX (PTC / Kepware) Siemens TCP/IP Ethernet driver OPC DA / OPC UA standard interface iFIX SCADA VBA switching logic

Why Native Path Redundancy Is Not Automatic at the SCADA Level

Siemens S7-400H delivers CPU-level redundancy: the program keeps running after any single CPU or rack failure. What it does not deliver automatically is path-level redundancy between an external OPC client and the CP443-1 modules. When the CP443-1 in Rack 0 loses its network link, every active ISO-on-TCP (port 102) connection routed through it is torn down by the transport stack. From the SCADA workstation's perspective, the OPC link through that path records a timeout event; nothing about the failure is propagated up to the application layer unless the application is watching for it.

To preserve process visibility the SCADA layer must hold two independent transport connections — one to each CP443-1 IP address — and switch the active read source when one path dies. There are two routes a controls engineer can take to deliver that behavior:

  • Option A — S7-REDCONNECT: Use a Siemens CP1613 or CP1623 PC module plus the SIMATIC NET S7-REDCONNECT software on the SCADA PC. The redundancy is handled inside the Siemens driver layer; the OPC server and iFIX see one logical fault-tolerant connection.
  • Option B — Software redundancy via two channels: Add a second KEPServerEX device pointing to the CP443-1 of Rack 1 and detect/switch in iFIX with a VBA watchdog script. This path uses only the SCADA PC's standard NIC and requires no additional Siemens hardware.
Note on H-station behavior: The S7-400H master/standby CPU state is independent of the CP443-1 state. A failed CP443-1 in the master rack does not cause a CPU master flip; the surviving CPU keeps running. What it does cause is loss of externally visible I/O until the SCADA path is re-routed.

Hardware and Software Requirements

Component Option A — S7-REDCONNECT Option B — Software Switching
S7-400H with two CP443-1 (one per rack) Required Required
PC networking card CP1613 (PCI) or CP1623 (PCIe) Standard on-board Ethernet NIC
Siemens S7-REDCONNECT license Required per SCADA PC Not required
SIMATIC NET installation on PC Required (provides S7-REDCONNECT runtime) Not required
STEP 7 / TIA Portal H-station configuration H-station compiled; redundant connections in NetPro H-station compiled; two OP connections in NetPro
KEPServerEX driver selection Siemens TCP/IP Ethernet (set up to use REDCONNECT endpoints) Siemens TCP/IP Ethernet (two separate devices)
iFIX redundancy Optional (single SCADA server also valid) Recommended for SCADA-server HA
Approximate additional cost CP module + S7-REDCONNECT license Engineering time only

S7-REDCONNECT and CP1613/CP1623 are part of the SIMATIC NET PC software/hardware catalogue; verify the current model and required firmware against the corresponding Siemens Industry Online Support entries before procurement, because CP1613 is older PCI hardware and the PCIe successor CP1623 is the contemporary choice on most modern SCADA PCs.

Option A — S7-REDCONNECT Configuration

This is the path of least surprise for the SCADA layer because KEPServerEX and iFIX see one S7 endpoint. The failover is carried out inside the Siemens driver.

  1. Install the CP1613 or CP1623 in the SCADA PC. Mount the card in a free PCI (CP1613) or PCIe (CP1623) slot; install the SIMATIC NET device driver package that ships with the card.
  2. Configure the CP in STEP 7 (or TIA Portal) under the PC station. In the PC station configuration, add the CP16x3 to slot 1 (or as required) and assign the same PROFINET IO / S7-subnet that is wired to the H-station.
  3. Install the S7-REDCONNECT software on the SCADA PC. The runtime is part of SIMATIC NET and must be licensed per PC.
  4. Configure redundant connections in NetPro. Open the PC station in NetPro, right-click the S7-REDCONNECT interface, and add two S7 connections—one targeting the CP443-1 in Rack 0 and one targeting the CP443-1 in Rack 1. Mark both as redundant; the wizard links them into one logical REDCONNECT endpoint.
  5. Compile and download the PC station from STEP 7 to the SCADA PC using the PC station configurator (Station Configuration Editor / "Configuration Console").
  6. Point KEPServerEX at the REDCONNECT channel. In the KEPServerEX Siemens TCP/IP Ethernet driver, set the device IP to the logical REDCONNECT endpoint address. The Siemens driver handles the underlying path selection.
  7. Connect iFIX through OPC DA (or OPC UA) to KEPServerEX as usual — no script-based failover logic is needed.
Pre-commissioning check: Verify in NetPro that both redundant connection paths are shown active before the iFIX project is started. A connection showing yellow/red at this stage means the underlying PC station configuration did not download cleanly.

Option B — Dual-Channel Redundancy Without CP1613/CP1623

When procurement of CP1613/CP1623 and the S7-REDCONNECT license is not an option, you can implement redundancy in the SCADA layer using a standard Ethernet NIC, two KEPServerEX devices, and a watchdog tag that allows iFIX to switch the active channel. Trade-offs versus Option A are longer switch-over time (driven by the SCADA polling cycle), bespoke switching logic, and additional engineering effort.

STEP 7 / TIA requirements

  • Compile the S7-400H station and configure it as an H-station with two CPUs (Type 41x-H).
  • In NetPro on the H-station side, define two separate S7 operator (OP) connections: one allowed partner to CP443-1 in Rack 0, one to CP443-1 in Rack 1. Alternatively, mark both connections as "all partners" if the SCADA PC is moved between subnets.
  • Each CP443-1 needs its own Ethernet address (IP / subnet mask / router) and its own S7 connection resources. Confirm available connection resources on the CP443-1 (typically 16 maximum for ISO-on-TCP at the time of writing) and account for other clients.

KEPServerEX Configuration

Two channels and two devices are required. Each device points at the IP of one CP443-1; data tags are duplicated so iFIX can read from either.

Setting Device A → CP443-1 Rack 0 Device B → CP443-1 Rack 1
Channel name Chan_Rack0 (Siemens TCP/IP Ethernet) Chan_Rack1 (Siemens TCP/IP Ethernet)
Device name S7_Rack0 S7_Rack1
Device ID (host IP) CP443-1 Rack 0 IP (e.g. 10.10.10.10) CP443-1 Rack 1 IP (e.g. 10.10.10.11)
CPU slot (rack/slot) Slot of CP443-1 in Rack 0 (typical: 6) Slot of CP443-1 in Rack 1 (typical: 6)
Communication type OP (operator) connection OP (operator) connection
Connect timeout (ms) 5000–7500 5000–7500
Request timeout (ms) 2000–4000 2000–4000
Watchdog tag name (recommended) WDG_PRIM (1 Hz pulse from PLC) WDG_SEC (1 Hz pulse from PLC)
Tag prefix convention A_TAGNAME B_TAGNAME

Both devices must reference the same PLC DB/M/I addresses. Naming with a prefix (A_ / B_) keeps iFIX switching logic readable.

PLC-Side Watchdog Block

Add a 1 Hz blinking bit in OB35 (cyclic interrupt, 1000 ms) on each CPU. This gives the SCADA layer a real-time heartbeat it can interrogate independently of stale-data detection in the OPC driver.

// FB175 "S7RedundancyHeartbeat" - call in OB35 of CPU 0 and CPU 1
// Output : BOOL Q_Heartbeat  - 1 Hz pulse (50 % duty)
// Memory : BOOL M_SecondToggle

Q_Heartbeat := NOT M_SecondToggle;
M_SecondToggle := NOT M_SecondToggle;

iFIX Switching Logic

iFIX acquires KEPServerEX tags through OPC DA. Two parallel tag databases are populated, one per channel. A VBA switching routine inspects the watchdog of each channel and toggles a database tag ACTIVE_CHANNEL that drives tag substitution in graphics.

' iFIX VBA routine - place in the iFIX Background Script (cyclic)
' Reads watchdog timers for both channels and chooses the healthier one.

Dim nPrimary As Long
Dim nSecondary As Long
Dim dblStale As Double
Dim nActiveCh As Long

nPrimary   = Fix32.ReadValue("A_WDG_PRIM.A_CV")
nSecondary = Fix32.ReadValue("B_WDG_SEC.A_CV")
dblStale   = 5   ' seconds without heartbeat before switching

If (nPrimary > 0) And ((Fix32.Time - Fix32.GetLastUpdate("A_WDG_PRIM")) < dblStale) Then
    nActiveCh = 0
ElseIf (nSecondary > 0) And ((Fix32.Time - Fix32.GetLastUpdate("B_WDG_SEC")) < dblStale) Then
    nActiveCh = 1
Else
    nActiveCh = 2   ' both paths unhealthy
End If

Fix32.WriteValue "ACTIVE_CHANNEL.A_CV", CStr(nActiveCh)

' Optional logging
If nActiveCh <> Fix32.ReadValue("ACTIVE_CHANNEL_AH.A_CV") Then
    Fix32.WriteValue "ACTIVE_CHANNEL_AH.A_CV", CStr(nActiveCh)
    Fix32.Msg "Redundancy switch to channel " & CStr(nActiveCh), 48, 0
End If

In graphics, replace direct reads of process tags with a database alias that points at A_TAGNAME when ACTIVE_CHANNEL = 0 and B_TAGNAME when ACTIVE_CHANNEL = 1. iFIX database indirect tags using D point references implement this with no display-level scripting.

Symbolic process tag Definition in iFIX
PROC_TANK_LEVEL Indirect tag → if ACTIVE_CHANNEL = 0 read A_TANK_LEVEL, else B_TANK_LEVEL
ACTIVE_CHANNEL Holds 0 = primary, 1 = secondary, 2 = both unhealthy
WATCHDOG_AGE Age in seconds since last successful update on the active channel

Verification and Commissioning Procedures

  1. Baseline traffic check: From the SCADA PC, ping both CP443-1 IP addresses. Confirm both succeed under healthy conditions.
  2. Force watchdog: Disable the Watchdog tag in PLC for one rack. Confirm that the OPC quality for the affected channel drops to BAD and that iFIX switches to the backup within one polling cycle.
  3. Physical disconnect test: With the plant in a controlled state, remove the network patch cable from the CP443-1 in Rack 0. Verify that:
    • KEPServerEX logs the channel as disconnected.
    • The iFIX ACTIVE_CHANNEL tag transitions from 0 to 1.
    • The Watchdog_Age value rises above the 5-second threshold before the switch.
    • Operator screens continue to display data sourced from Rack 1.
  4. Reverse failover test: Reconnect the Rack 0 cable. After the heartbeat is restored, iFIX should optionally fall back to the primary channel (configure this explicitly in the script; do not assume it).
  5. Alarm policy check: Confirm an operator alarm is generated on every ACTIVE_CHANNEL transition with the previous and new channel number.
  6. Latency check: Time the period between CP443-1 failure and iFIX-visible data continuity. For Option B, expect on the order of one iFIX polling interval (typically 1–5 s). For Option A, expect faster sub-second transition.

Troubleshooting Matrix

Symptom Likely cause Diagnostic Resolution
KEPServerEX channel reports "Connected" but iFIX shows BAD quality on startup OPC DA handshake failed or iFIX OPC Power Supply not configured Check OPC Power Supply tool; inspect iFIX_OPC.log Confirm KEPServerEX is started before iFIX; verify DCOM / OPC DA settings
One channel connects, the other times out CP443-1 not in same Ethernet subnet as SCADA PC, or ACL on plant switch Ping from SCADA PC to second CP443-1 IP; check NetPro connection resource Correct subnet routing; free up CP443-1 connection resources
Both channels connect but data does not update Device ID points at wrong slot of CP443-1 In KEPServerEX, read the standard status word; verify the driver's slot number against STEP 7 hardware config Set the correct rack/slot value in KEPServerEX
Active channel switches on every polling cycle Watchdog threshold set below polling interval Watch WATCHDOG_AGE trace Raise threshold (5 s typical) and verify heartbeat is faster than threshold
Active channel never returns to primary after fault clearance Reverse-failover not implemented Inspect background script Add a debounce timer; perform manual or scripted preemption only if heartbeat on primary remains stable
iFIX does not switch after CP443-1 disconnect Watchdog tag not in iFIX database, or stale-data check uses wrong field Confirm A_WDG_PRIM and B_WDG_SEC are visible in iFIX PDB Add tags to both process databases; review GetLastUpdate usage
S7-REDCONNECT: redundant connection is yellow PC station not downloaded; S7-REDCONNECT license missing Configuration Console; SIMATIC NET license tool Re-download PC station; license and restart the PC
iFIX DB says "No OPC Servers found" OPC enumeration blocked by Windows firewall / DCOM opcenum browser; DCOMCNFG for OPC DA Allow opcenum.exe and KEPServerEX through firewall; set DCOM permissions

Maintenance and Field-Proven Caveats

  • Keep two independent plant LAN paths between the SCADA PC and the H-station whenever possible. A redundant PLC pair connected via a single cable is not redundant in practice.
  • Avoid poll storms: iFIX polling faster than KEPServerEX can re-attempt connection will saturate the PC. Set iFIX scan slower than the OPC connection-recovery interval (default ~5 s).
  • Document the failover: Write ACTIVE_CHANNEL transitions to the iFIX Historian so root-cause analysis is possible after a controller trip. Time-stamping on every transition is essential.
  • Tag prefix discipline: Naming prefixes (A_ / B_ or P_ / S_) prevent mis-pairing tags to the wrong rack and simplify the iFIX indirect-tag table.
  • CPU slot rule: KEPServerEX's "slot" parameter is the slot of the CP443-1 in the S7-400 rack, not the CPU slot. Misconfigured slot is the single most common reason an S7 TCP/IP device returns data without errors but shows stale values.
  • Keep a license of iFIX's SCADA redundancy option on top of this setup if full SCADA-server high availability is required (iFIX supports a primary/standby SCADA pair). See the iFIX redundancy section in the official product documentation at GE Vernova iFIX.
  • Consider a parallel non-iFIX viewer during commissioning: Wireshark plus an S7 protocol filter shows which CP443-1 is responding to which ISO-on-TCP connection — invaluable when KEPServerEX logs are ambiguous.

Frequently Asked Questions

Is S7-REDCONNECT strictly required for SCADA redundancy on a Siemens S7-400H station?

Yes, if you want transparent, application-transparent network redundancy on the PC side. S7-REDCONNECT along with a CP1613 (PCI) or CP1623 (PCIe) module is the Siemens-recommended path. Without it, you can still achieve redundancy at the SCADA layer using two separate KEPServerEX devices and iFIX switching logic, but the failover is not application-transparent to iFIX.

Can KEPServerEX detect a failed CP443-1 without an iFIX script?

KEPServerEX (KEPServerEX Siemens TCP/IP Ethernet driver) marks the channel as disconnected when the underlying TCP session is broken, but it does not automatically switch to another device. The switching logic always has to live in the OPC client (iFIX) or in a KEPServerEX plug-in if you choose a non-standard route.

What is the typical failover time for the dual-channel software approach?

Failover time is dominated by the KEPServerEX connect timeout plus iFIX detection logic. With a 1 Hz watchdog and the 5 s threshold recommended above, the worst-case switch is roughly 5–10 s from a hard CP443-1 outage to iFIX displaying data from the secondary channel.

Does the CPU slot configured in KEPServerEX refer to the CPU or the CP443-1?

It refers to the slot of the CP443-1 itself inside the S7-400 rack, not the CPU. In a typical S7-400H build the CP443-1 sits in slot 6 of each rack; verify against your STEP 7 / TIA hardware configuration before commissioning.

Can iFIX SCADA itself be redundant alongside the channel redundancy?

Yes. iFIX supports a primary/standby SCADA-server topology that is independent of the OPC-side redundancy. For full availability, combine Option A or B above with the iFIX redundancy feature described in the official iFIX product documentation.

Back to blog