S7-400H Profibus Master Setup: Y-Link and DP Slave Integration

David Krause19 min read
ProfibusSiemensTechnical 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 Overview: S7-400H Redundant Profibus Master

The SIMATIC S7-400H (CPU 412-3H, 414-4H, 416-4H, 417-4H) is a fault-tolerant controller platform designed for processes that cannot tolerate a single point of failure. The H suffix designates the high-availability / hot-standby architecture, in which two identical CPUs run the same user program in lock-step and synchronize over fiber-optic redundancy links. For Profibus DP networking, the H-station typically uses one or two CP 443-5 Extended communication processors, each wired to a separate physical Profibus segment (Profibus(1) and Profibus(2)). The redundant Profibus segments terminate at a pair of IM 153-2 interface modules mounted in a redundant ET 200M station with an active backplane.

When a third-party DCS or a single-sided DP slave (one with only one Profibus port) must be integrated into the redundant system, an additional component is required: the Y-Link. The Y-Link allows a non-redundant Profibus segment to be attached to a redundant S7-400H system without breaking the fault-tolerant architecture. The Y-Link consists of two IM 153-2 modules and a Y-coupler, and from the H-CPU side the entire downstream network appears as a single DP slave. From the third-party DCS side, the Y-Link acts as the DP master on the lower segment.

Architectural constraint: Profibus DP was originally designed as a fast remote I/O bus. Each DP slave can exchange a maximum of 244 bytes of input data and 244 bytes of output data. The Y-Link does not relax this limit. If multiple third-party slaves are daisy-chained behind the Y-Link, the sum of all cyclic I/O must still fit within 244 bytes IN / 244 bytes OUT.

Required Hardware and Software

Component Function Catalog / MLFB
CPU 412-3H / 414-4H / 416-4H / 417-4H Redundant CPU pair, fault-tolerant controller 6ES7412-3HJ14-0AB0 (example)
CP 443-5 Extended Profibus DP master interface, one per H-segment 6GK7443-5DX04-0XE0 / 6GK7443-5DX05-0XE0
IM 153-2 (redundant pair) ET 200M Profibus slave interface to the H-CPUs 6ES7153-2BA10-0XB0 / ...XB1
Y-Link (IM 153-2 pair + Y-coupler) Adapter between redundant H-system and single-sided DP slaves 6ES7157-0AC00-0XA0 Y-coupler + 2x 6ES7153-2BA10-0XB0
Fiber-optic sync modules H-CPU redundancy link 6ES7960-1AA04-0XA0 (up to 10 m), 6ES7960-1AB04-0XA0 (up to 10 km)
STEP 7 V5.5 + S7-H Option Programming and configuration of the H-station 6ES7810-4CC10-0YA5 (or current release)
SIMATIC NET library FB 125 / FC 125 for Profibus diagnostics Shipped with STEP 7

Y-Link Architecture and Limitations

The Y-Link is the only Siemens-approved method to attach a non-redundant Profibus DP segment to a redundant S7-400H. The Y-Link occupies one Profibus address on each of the two H-CPU segments. Inside the Y-Link, the active bus module is selected by the active H-CPU; the inactive bus module continues to monitor the bus but does not drive it. Switchover between Y-Link bus modules is bumpless from the application perspective - the same I/O area is always available, but the data is sourced from whichever module is currently active.

For a single-sided Profibus slave, the Y-Link acts as a Profibus DP master on the lower segment. The third-party DCS, in turn, becomes a Profibus DP slave to the Y-Link, configured using its vendor GSD file. From the S7-400H point of view, the Y-Link is just one more DP slave; the third-party slaves are visible only on the lower segment of NetPro.

Data direction: In the typical integration scenario (S7-400H as master, third-party DCS as slave), the H-CPU reads status / process values from the DCS and writes setpoints / commands to it. The Y-Link must be configured as a DP master on the lower segment with the DCS configured as a DP slave.

The hardware limit is the single-slave envelope: 244 bytes IN / 244 bytes OUT. This is independent of the number of slaves behind the Y-Link. For a single-sided Profibus slave using a Y-Link, the S7-400H is constrained to 244 bytes of cyclic input and 244 bytes of cyclic output per slot configuration. Plan the I/O count before commissioning.

Step-by-Step Configuration

Step 1: Install the Y-Link and Slave GSD Files

  1. Download the Y-Link GSD file from the Siemens Product Support portal. The standard GSD is shipped with STEP 7, but for new firmware versions you may need the latest revision (for example SIEM816D.GSD for the Y-Link).
  2. Copy the GSD file and the matching bitmap (e.g. SI0816D.BMP) into the STEP 7 GSD directory: C:\Program Files\Siemens\Automation\S7\Sys\PG\GSD or ...\STEP7\S7data\GSD.
  3. Open SIMATIC Manager and select Options > Install GSD File. After installation, the Y-Link appears in the HW catalog under PROFIBUS DP > DP-Slaves > Y-Link.
  4. Repeat for every third-party DP slave. The vendor GSD file is usually available on the vendor website or shipped on a CD with the slave. Place the file in the same directory and install.

Step 2: Configure the H-CPU Pair and the CP 443-5

  1. Open SIMATIC Manager and create a new S7 project. Insert a SIMATIC 400H station (e.g. 412-3H or 414-4H depending on your application).
  2. Open HW Config and place both CPUs in slot 3 of rack 0 and rack 1. The H-system requires both CPUs in the same slot position in two separate UR2-H racks.
  3. Insert the CP 443-5 Extended in the same rack as the CPU. Configure a Profibus subnet for Profibus(1) with the desired master Profibus address (typically 1 or 2). The CP 443-5 acts as a passive slave to the H-CPU for diagnostic data and as a DP master for the lower-level devices.
  4. Duplicate the configuration for the second CPU in rack 1, and configure the second CP 443-5 on Profibus(2). Profibus(1) and Profibus(2) are two physically separate buses, each terminated at a different Y-Link bus module.
  5. Configure the synchronization module in slot 1 of each CPU (for CPU 41x-H with synchronization module interface).
Master DP address: Set the Profibus address of the CP 443-5 to a low, fixed value (1 or 2) so that it is clearly identified in the diagnostic buffer. The H-system performs DP master redundancy by means of the Y-Link, not by a primary/backup master in the CPs themselves.

Step 3: Place the Y-Link and the DP Slaves

  1. In HW Config, drag the Y-Link from the catalog onto Profibus(1). Assign it a unique Profibus address (e.g. 3).
  2. Open the Y-Link's properties and place it on Profibus(2) as well. The Y-Link must appear on both Profibus segments with the same logical address (3).
  3. Open the lower Profibus subnet (the single-sided side of the Y-Link) and place the third-party DP slaves using their vendor GSD files. Assign a unique address to each slave (4, 5, 6, ...).
  4. For each slave, open the configuration table and define the I/O modules (digital inputs, digital outputs, analog inputs, analog outputs). The configuration on the Y-Link's lower side must match the slave's actual physical I/O.

Step 4: NetPro Network Configuration

  1. Open NetPro from SIMATIC Manager and select the S7-400H station. The two Profibus subnets (Profibus(1) and Profibus(2)) are visible as two bus segments.
  2. Verify that the Y-Link appears on both subnets and that the third-party slaves appear only on the lower (single-sided) subnet connected to the Y-Link.
  3. Compile and download the NetPro configuration (NetPro > PLC > Download to Target Station). With the H-system, the project is downloaded to both CPUs.
  4. Use the Download to Target Station wizard and ensure that both H-CPUs are reachable (typically both on the same Ethernet subnet for online access).

DP Slave I/O Mapping and Addressing

Profibus DP maps the modules of a DP slave to the digital and analog standard addresses of the DP master. The mapping is configured in HW Config. When the slave is inserted into the bus, STEP 7 automatically proposes input/output addresses in the I/Q and PIW/PQW area of the H-CPU. You can edit these addresses as long as they do not conflict with the existing I/O or with the redundant ET 200M station.

Slave Module Width Master Input Address Master Output Address Comment
Digital Input 1 1 byte I 0.0 - I 0.7 - Bit-addressable in the OB 1 program
Digital Output 1 2 bytes - Q 0.0 - Q 1.7 16-bit output area to the slave
Analog Input 1 2 words PIW 512 / PIW 514 - 2 channels of 16-bit analog input
Analog Output 1 4 words - PQW 512 / PQW 514 / PQW 516 / PQW 518 4 channels of 16-bit analog output
Mnemonic note: The original Siemens German mnemonics use E (Eingang) for input and A (Ausgang) for output. In English STEP 7 the equivalents are I and Q. The mapping rules are identical.

The slave's perspective is the mirror image: inputs to the master are outputs from the slave, and outputs from the master are inputs to the slave. When configuring the third-party DCS as a slave, ensure that the vendor's I/O definition matches this mirror. The slave receives the data in its own input area and the master receives the data in its own input area; the addressing is a pure mailbox between two controllers.

In the table-style reference given in the source, a CPU 315-2DP is used as a DP slave with the same mapping: 1 byte of digital inputs at I 0.0 - I 0.7, 2 bytes of digital outputs at Q 0.0 - Q 1.7, 2 words of analog inputs at PIW 512 / PIW 514, and 4 words of analog outputs at PQW 512 - PQW 518. The slave is configured with a mirror set of modules: 1 byte of digital output (which the master reads as I 0.0 - I 0.7), 2 bytes of digital input (which the master writes as Q 0.0 - Q 1.7), 2 words of analog output (master reads as PIW 512 / PIW 514), and 4 words of analog input (master writes as PQW 512 - PQW 518). The size and order of the modules must match on both sides.

Required Organization Blocks

For a redundant S7-400H to operate, the following OBs must be loaded in the S7 program (in addition to OB 1):

OB Purpose Trigger
OB 1 Main cyclic program Cyclic, priority 1
OB 35 Cyclic interrupt, typical 100 ms Cyclic interrupt, priority 12
OB 70 I/O redundancy error (H-system) Loss of an I/O device in the redundant I/O
OB 72 CPU redundancy error (H-system) Loss of redundancy, master-reserve switchover
OB 80 Time error Cyclic time exceeded
OB 81 Power supply error PS failure, battery low
OB 82 Diagnostic interrupt DP slave diagnostic interrupt
OB 83 Insert / remove interrupt Module insertion / removal
OB 84 CPU hardware fault Hardware error in CPU
OB 85 Program execution error OB not loaded, class A error
OB 86 Failure of an expansion rack / DP master system DP station failure
OB 87 Communication error Communication fault
OB 100 Warm restart CPU restart
OB 102 Cold restart CPU cold start
OB 121 Programming error STEP 7 programming error
OB 122 I/O access error Direct I/O access fault

For DP-master-specific behavior, the most relevant OBs are OB 82 (diagnostic interrupt from a DP slave), OB 86 (DP master system failure), and OB 70 / OB 72 for H-system redundancy. Loading dummy (empty) OBs for OB 70, OB 72, OB 80-87, OB 100, OB 121, and OB 122 is the standard commissioning practice to prevent the CPU from going into STOP if any of these events occur.

Sample Program Code

After STEP 7 compiles the HW Config and writes the address mapping, the cyclic OB 1 program simply accesses the configured I/Q and PIW/PQW addresses. No special function call is required to read a Profibus slave; the data is read by the DP master automatically every Profibus cycle and deposited in the input area. The addressing is straightforward: a slave occupying "Master I Slave Q 1 B unit" at Profibus address 1 is accessed in the master program by its absolute input / output addresses - for example I 1.0 for the first bit of the digital input byte, or Q 1.0 for the first bit of the digital output byte.

Example - read two analog inputs and one digital input from the third-party DCS at slave address 4:

// OB 1 - cyclic section
// Assume: digital input at I 4.0, analog at PIW 540 / PIW 542

// Latch the digital input into a flag
      A     I     4.0
      =     M     100.0      // Process flag

// Read the first 16-bit analog input and scale it
      L     PIW   540
      ITD                     // Integer to double integer
      DTR                     // Double integer to real
      L     2.764800e+01      // Scaling factor 27648 / 100
      *R
      T     MD   200          // Store scaled value (REAL) in MD 200

// Read the second analog input
      L     PIW   542
      ITD
      DTR
      L     1.000000e+00
      *R
      T     MD   204

Example - write a setpoint to the third-party DCS via the configured analog output at PQW 540:

// Scale an internal REAL setpoint (MD 300) into a 16-bit integer
// and write to PQW 540
      L     MD   300          // REAL setpoint, 0.0 ... 100.0
      L     2.764800e+01      // 27648 / 100, Siemens S7 normalization
      *R
      RND                     // Round to 32-bit integer
      T     PQW  540

Example - consistent read of a Profibus slave data area using SFC 14 (only required for buffers larger than 4 bytes):

// SFC 14 "DPRD_DAT" - consistent read from a DP slave
// LADDR := W#16#0200 (start address of the slave input area, here IB 512)
// RET_VAL := MW 50
// RECORD := P#M 100.0 BYTE 32 (target area in the flag area)

      CALL  "DPRD_DAT"
        LADDR  := W#16#0200
        RET_VAL:= MW50
        RECORD := P#M 100.0 BYTE 32
      NOP   0
Consistent data: Standard STEP 7 I/O access (L PIW) is by definition consistent for a single byte, word, or double word. If a slave exchanges more than 4 bytes contiguously and consistency across the whole buffer is required, use SFC 14 "DPRD_DAT" and SFC 15 "DPWR_DAT". Configure the corresponding slot in HW Config with "Consistency over the complete data length" in the DP slave properties.

Profibus Diagnostics Using FB 125 / FC 125

Siemens supplies the standard library "SIMATIC_NET" with diagnostic blocks for Profibus:

  • FB 125 "DP_DIAG" - reads the diagnostic data of a DP master system. Output includes the slave address, the diagnostic status, the slot number, and the manufacturer-specific diagnostic bytes.
  • FC 125 "DP_DIAG" - older variant for STEP 7 V5.

FB 125 is the recommended way to display the diagnostic state of every slave on the HMI or in the user program. The call is:

// FB 125 - DP_DIAG, single instance DB 125
      CALL "DP_DIAG", DB125
        DP_MASTER_SYS := 1          // Profibus(1)
        EXTERNAL_DP_INTERFACE := FALSE
        MANUAL_MODE := FALSE
        SINGLE_STEP_SLAVE := 0
        SINGLE_STEP_OP := 0
        ACK_BUTTON := M 200.0
        DIAG_OUT := DB125.DBD0
        RET_VAL := MW 210
        BUSY := M 201.0
      NOP   0

Commissioning and Verification

  1. Power on the redundant ET 200M and verify that both IM 153-2 modules are in RUN with the SF and BF LEDs off.
  2. Power on the Y-Link and the third-party slaves.
  3. Connect the STEP 7 PG to either H-CPU. Open Accessible Nodes (PLC > Accessible Nodes) and confirm both H-CPUs are visible.
  4. Download the hardware configuration and the user program. Both H-CPUs accept the download and synchronize.
  5. Open Monitor/Modify in HW Config and verify that the configured input addresses (I 0.0, PIW 512, etc.) are updated as the slave changes its outputs.
  6. Force an output in the output area (Q 0.0, PQW 512) and confirm that the corresponding value arrives at the slave. Many DCS vendors provide a Profibus slave test utility that displays the process image.
  7. Open the diagnostic buffer of the H-CPU (PLC > Diagnostic Buffer) and confirm no OB 70, OB 72, or OB 86 events are pending. If events are present, the OB event class tells you the affected station.
  8. Trigger a master-reserve switchover (H-system panel button or WinCC control) and verify that DP communication continues without interruption. The H-system re-routes the lower Profibus segment through the surviving Y-Link bus module within one Profibus cycle.
  9. Pull the fiber-optic sync link on the master CPU and verify that the reserve CPU takes over and the DP slaves see no interruption. The diagnostic buffer of the reserve CPU should show OB 72 with the master-reserve switchover event.

Troubleshooting Matrix

Symptom Probable Cause Diagnostic Step Remedy
BF (Bus Fault) LED on CP 443-5 Wiring fault, terminator missing, slave missing Check PROFIBUS connector wiring, check terminating resistors at segment ends Install terminating resistor at both segment ends, verify shield grounding
SF (System Fault) LED on H-CPU DP slave failure, configuration mismatch Check diagnostic buffer, identify slave with OB 86 event Compare slave configuration in HW Config with actual I/O, re-download configuration
OB 86 "Station failure" on Profibus(1) Slave or Y-Link bus module lost Look at the OB 86 start info - it contains the failed DP address Replace the failed slave; check PROFIBUS cable and connector
OB 82 "Diagnostic interrupt" from slave Vendor-specific diagnostic event Read diagnostic buffer of the slave (DP_DIAG) Refer to vendor manual; usually a low-priority event if it does not escalate to OB 86
I/O data is "frozen" after Y-Link switchover Wrong address mapping on the second H-CPU Compare HW Config on both H-CPUs, verify the lower Profibus subnet is identical Re-download HW Config to both CPUs; do not edit one CPU independently
No communication to third-party slave, but GSD is installed Vendor GSD revision mismatch with slave firmware Compare the GSD version stamp with the vendor's release notes Install the GSD revision matching the slave firmware
244-byte limit exceeded at compile time Total slave I/O sum > 244 bytes IN or OUT Add up the input / output bytes in the slave configuration Reduce the number of slaves on the Y-Link segment, or move slaves to a non-redundant DP master outside the H-system
Configured input "Master I Slave Q 1 B unit" address 1 cannot be read in ladder Symbolic reference undefined; address is bit-level, not a DB Use the absolute address in the program (e.g. I 1.0) or create a symbol table entry Either use the absolute address directly or assign a symbol in the symbol table
Master-reserve switchover causes brief loss of DP communication Y-Link bus module is slower than the Profibus watchdog Increase the DP watchdog time in HW Config Set the DP watchdog to 10 s for the Y-Link and 1 s for fast slaves

Limitations and Field-Proven Caveats

  • Y-Link as a single slave: The Y-Link appears as one DP slave to the H-CPUs. The sum of all slaves behind the Y-Link must still fit in 244 bytes IN / 244 bytes OUT. Plan your I/O count before commissioning.
  • GSD maintenance: When the third-party DCS firmware changes its GSD revision, the existing Y-Link configuration must be re-validated. Always re-install the GSD and re-compile HW Config before commissioning the new firmware.
  • Symbolic vs. absolute addressing: For clarity, especially when integrating with a third-party DCS, prefer absolute addressing (I, Q, PIW, PQW) for the Profibus data. The symbol table can still hold meaningful names; just resolve to the absolute address. The configuration table entry "Master I Slave Q 1 B unit" with address 1 is bit-level accessible - use I 1.0 / Q 1.0 or assign a symbol that points to those addresses.
  • Hot-standby behavior: The user does not need to manage which H-CPU is currently the master. Both CPUs read the same input area; both write the same output area. The active H-CPU drives the Profibus segments. The reserve CPU executes the same program but its CP 443-5 is in passive mode.
  • Master port on the CPU vs. CP 443-5: Some S7-400 CPUs have an integrated Profibus DP port. For the S7-400H, this built-in port is generally used for H-system synchronization modules, not for third-party slaves. Use the CP 443-5 Extended for the Y-Link and third-party slaves. The integrated DP port can be used as a non-redundant DP master if the application does not require CP 443-5 redundancy, but the standard H-system uses the CPs.
  • One Y-Link per lower segment: Do not cascade Y-Links. A Y-Link must be the first segment downstream of the H-CPUs. Cascade by adding a second Y-Link to a different pair of CPs, or move the slaves to a non-redundant DP master outside the H-system.
  • Watchdog time: Set the DP watchdog appropriately. With redundant segments and Y-Link switchover, the lower segment may go through a brief reconfiguration that exceeds the default 10 ms watchdog. Typical values are 100 ms - 1 s for non-critical slaves, with longer values for slaves that are slow to come back online.

Key Siemens Documentation References

Frequently Asked Questions

What is the maximum I/O data size per Profibus slave on a Y-Link to an S7-400H?

The Y-Link appears as one Profibus DP slave to the H-CPU and is limited to 244 bytes of input data and 244 bytes of output data. The sum of all slaves behind the Y-Link must fit within this single-slave envelope, so a single Profibus slave using a Y-Link is constrained to 244 bytes IN / 244 bytes OUT.

Does the S7-400H built-in Profibus port support the Y-Link, or must I use a CP 443-5?

Both options are theoretically possible, but the standard reference design uses the CP 443-5 Extended on both Profibus(1) and Profibus(2). The integrated Profibus port of the H-CPU is typically used for H-system synchronization modules and should not be used for third-party slave communication in a redundant configuration.

Which Organization Blocks must be loaded in an S7-400H Profibus master program?

At minimum: OB 1 (cyclic program), OB 35 (cyclic interrupt), OB 70 and OB 72 (H-system redundancy), OB 80-87 (error handling), OB 100 (warm restart), and OB 121-122 (programming and I/O access errors). For DP diagnostics, FB 125 "DP_DIAG" is the standard way to read DP slave states from the user program.

Why is the BF LED on my CP 443-5 lit, and how do I clear it?

A Bus Fault LED on the CP 443-5 indicates a wiring problem, a missing bus terminator at the segment end, a missing or failed slave, or a Profibus address conflict. Re-check the wiring, ensure terminating resistors are powered at both segment ends, and verify that every configured slave is present with a unique address. The diagnostic buffer of the CP 443-5 shows the last event.

How is the third-party DCS slave addressed from the S7 program?

The slave is accessed by the H-CPU at the I/Q and PIW/PQW addresses configured in HW Config. For example, an analog input at PIW 540 is read with a single L PIW 540 in OB 1, and an output at PQW 540 is written with a single T PQW 540. The DP master deposits the data in the input area every Profibus cycle, so no explicit read call is needed in user code.

Back to blog