Troubleshooting MPI Communication: S7-315-2PN/DP to Magelis HMI

David Krause15 min read
Serial CommunicationSiemensTroubleshooting
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

Troubleshooting MPI Communication: S7-315-2PN/DP to Magelis HMI

Problem Overview

An MPI (Multi-Point Interface) link between a Siemens SIMATIC S7-315-2PN/DP CPU and a Schneider Electric Magelis HMI fails to establish after the PLC was replaced. The original CPU was an S7-315-2DP, which communicated with the same HMI on the same RJ45 cabling. The user has confirmed the MPI addresses, local network settings, and RJ45 pinout match the previous working configuration, yet the bus remains silent on the new CPU. This is a recurring field issue when migrating from a CPU that exposes MPI on its DB9 front port to one that exposes MPI/DP on the same physical connector type but with different electrical and address defaults.

The diagnostic path must rule out four distinct causes before swapping hardware:

  1. MPI protocol is not configured or disabled on the S7-315-2PN/DP interface.
  2. MPI bus address conflict between HMI and CPU.
  3. RS485 Data+/Data- polarity inversion between the HMI COM2 RJ45 socket and the CPU MPI/DP connector.
  4. Wrong interface selected on the S7-315-2PN/DP (PROFINET port is not MPI-capable, the X1 MPI/DP port is the only MPI path).
Critical constraint: The PROFINET (PN) port on the S7-315-2PN/DP is an Ethernet interface and cannot carry MPI traffic. MPI is strictly a serial RS485 protocol operating at 19.2 kbit/s to 12 Mbit/s. Any configuration that attempts to bind MPI to the PN port will fail to come up.

MPI Protocol Fundamentals

MPI is Siemens' proprietary serial bus based on RS485 physical layer with a Siemens-specific token-passing data link protocol. It is the default programming and HMI protocol for S7-300/400 CPUs. Maximum bus length without repeaters is 50 m at 187.5 kbit/s, the most common HMI baud rate. Up to 32 nodes can be addressed (0 to 31, with reserved defaults for PG=0, OP=1, CPU=2).

Default MPI parameters for S7-300 CPUs are:

Parameter Default Value
Baud rate 187.5 kbit/s
Highest MPI address 31
Default CPU MPI address 2
Default PG/PC address 0
Default OP/HMI address 1

When migrating from a CPU where MPI worked, the new CPU must be assigned the same address it replaces, and the bus profile (baud rate, highest station address) must match the HMI configuration exactly. Mismatches do not produce an obvious error on the HMI; the HMI simply times out and shows "Connection failed" or "PLC not responding".

S7-315-2PN/DP vs S7-315-2DP Interface Comparison

Both CPUs are 6ES7315-series devices, but the interface layout differs in ways that drive this exact failure mode.

CPU Order Number Port 1 (X1) Port 2 (X2) MPI Path
S7-315-2DP 6ES7315-2AH14-0AB0 (typical) MPI (DB9) DP (DB9) X1 DB9
S7-315-2PN/DP 6ES7315-2EH14-0AB0 (typical) MPI/DP combined (DB9) PROFINET (2 x RJ45) X1 DB9 only

On the S7-315-2PN/DP, the DB9 connector labeled MPI/DP can operate in three modes selectable in STEP 7 / TIA Portal hardware configuration:

  • MPI – master/slave token passing, default for HMI integration.
  • DP-Master – PROFIBUS DP-V0/V1 master.
  • DP-Slave – DP slave to a higher-level master.

If the port is left at its factory default or switched to DP, the HMI's MPI requests are ignored. The TIA Portal must explicitly set the X1 interface to "MPI" with the correct address and transmission rate.

Field note: After firmware updates or TIA Portal project re-downloads, the interface mode can revert to DP if the project block was not recompiled with the correct interface object. Always verify the interface assignment after a download.

Physical Layer: RJ45 on the Magelis COM2 Port

The Magelis HMI (for example XBTGT, HMIGTO, HMISCU series) provides MPI/PROFIBUS on its COM2 port through an RJ45 connector wired for RS485. The RJ45 on the HMI is not Ethernet; it is a Siemens-style RS485 pinout that matches the PROFIBUS cable standard (6XV1830-0EH10). This is the most common source of confusion when migrating HMI cabling: an installer sees RJ45 and assumes Ethernet.

Magelis COM2 RS485 RJ45 pinout (Schneider Electric standard, compatible with Siemens PROFIBUS cable):

RJ45 Pin Signal Wire Color (Siemens PROFIBUS cable)
1 Shield / PE
2 M24 (ground reference, no connect on some models)
3 Data+ (B / TxD+/RxD+) Red
4
5
6 Data- (A / TxD-/RxD-) Green
7 +24 V (only on PG/PC RS485 repeater cables; not on passive HMI ports)
8

The CPU DB9 MPI/DP pinout is the legacy Siemens PROFIBUS assignment:

DB9 Pin Signal Function
3 Data+ (B) RS485 non-inverting
8 Data- (A) RS485 inverting
5 DGND Digital ground / shield reference
6 +5 V Bus terminator power (used only with active terminator)
1, 2, 4, 7, 9 Not connected

The legacy CPU MPI/DP DB9 has Data+ on pin 3 and Data- on pin 8. The Magelis COM2 RJ45 has Data+ on pin 3 and Data- on pin 6. When the field cable was wired for the old S7-315-2DP, the Data+ / Data- mapping is fixed. Because the HMI RJ45 and CPU DB9 use different physical pins for the same logical signals, a passive 1:1 cable is not possible. A crossover wiring is required.

Root Cause: Data+/Data- Polarity Inversion

The single most common cause of "MPI worked on the old CPU, fails on the new CPU" with identical RJ45 cables is pin remapping, not polarity inversion. The cable was wired for the old DB9 pinout (pin 3 = Data+, pin 8 = Data-). On the new S7-315-2PN/DP, the DB9 pinout is unchanged, but the wiring into the HMI RJ45 may have been done by referencing the wrong pinout table (Schneider Magelis uses pin 3 = Data+, pin 6 = Data-, while some older XBT models use pin 4 / pin 5).

Two failure modes appear in the field:

  1. Crossed polarity: HMI pin 3 (Data+) wired to CPU pin 8 (Data-) and HMI pin 6 (Data-) wired to CPU pin 3 (Data+). Bus stays in error state; no node responds.
  2. Straight-through with wrong DB9 pin: HMI Data+ goes to DB9 pin 8 instead of pin 3, leaving the RS485 driver un-driven from the CPU side.

The corrective action is to swap the Data+ and Data- wires on one end of the segment (industry-standard practice: swap on the cable, not on the device). After the swap, the CPU and HMI see the same logical polarity on the bus and the token-passing sequence can begin.

Verification step: With a multimeter on continuity mode, trace each Data wire from HMI RJ45 pin to CPU DB9 pin. HMI Data+ (pin 3) must land on CPU pin 3. HMI Data- (pin 6) must land on CPU pin 8. DGND (HMI pin 2, sometimes pin 5 depending on model) must land on CPU pin 5.

MPI Bus Address Configuration

Address assignment is the second most frequent cause of this failure. On a working MPI bus the addresses must be unique and must be set in two places:

  1. CPU side (TIA Portal or STEP 7): Properties → MPI/DP interface → Address. The S7-315-2PN/DP default is 2. If the previous CPU used address 2, the new CPU must also use 2.
  2. HMI side (Vijeo Designer / EcoStruxure Operator Terminal Expert): The HMI's own MPI node address must be unique on the bus, default 1 for Magelis OP panels.

Procedure to set the CPU MPI address when the original project is available:

  1. Open the STEP 7 / TIA Portal project matching the station.
  2. Navigate to Devices & Networks → select the S7-315-2PN/DP → open PropertiesMPI/DP interface.
  3. Set Interface type = MPI.
  4. Set Address to the value the HMI expects (typically 2).
  5. Set Transmission rate = 187.5 kbit/s unless the HMI is configured for a different rate (1.5 Mbit/s or 12 Mbit/s are also possible on S7-300 MPI/DP combined ports).
  6. Set Highest MPI address to 31 (default) or to the highest node physically on the bus to limit token rotation time.
  7. Compile and download the hardware configuration to the CPU.

When the original project is not available, the only option is to connect a PG with STEP 7 and use Accessible nodes or Online & Diagnostics to inspect the current interface assignment. The MPI address can be changed online via Online & DiagnosticsAssign MPI address without a full project download, but the baud rate and bus profile can only be changed with a configuration download or by writing the system data blocks manually with an active connection.

TIA Portal HMI Connection Configuration (Reference)

For a complete HMI-to-S7-300 MPI link, the TIA Portal connection setup follows a specific path documented in the Siemens TIA Portal Help (V20) under Configuring an HMI connection via MPI. The full procedure is documented at the official Siemens TIA Portal documentation portal.

High-level steps for a working HMI connection via MPI in TIA Portal:

  1. Add the S7-300 CPU to the project; ensure the X1 MPI/DP interface is set to MPI with the correct address and baud rate.
  2. Add the HMI device (Basic Panel, Comfort Panel, or PC RT) under the same project.
  3. Open Devices & Networks, select the HMI, and create a new HMI connection.
  4. Set the connection endpoint to the S7-300 MPI/DP interface.
  5. Configure the HMI's own MPI node address (default 1) and the same transmission rate as the CPU.
  6. Compile and download the HMI configuration separately from the CPU configuration.

Reference documentation:

Note on unsupported HMI configurations: Magelis HMIs are programmed in Vijeo Designer or EcoStruxure Operator Terminal Expert, not in TIA Portal. The TIA Portal procedure above applies when a Siemens HMI replaces the Magelis. If the Magelis must stay, the HMI project is configured in the Schneider tool, and the CPU side is configured in STEP 7 / TIA Portal independently. The two projects do not need to be linked inside TIA Portal because Magelis is not a TIA Portal device.

Diagnostic Procedure When the HMI Project Is Unavailable

The user explicitly stated the original Magelis project file is not on hand, which is a common constraint in brownfield retrofits. The following procedure verifies communication and identifies the HMI's actual settings without needing the project.

  1. Confirm physical wiring polarity. Use a multimeter to verify HMI RJ45 pin 3 (Data+) → CPU DB9 pin 3 (Data+) and HMI RJ45 pin 6 (Data-) → CPU DB9 pin 8 (Data-). If inverted, swap on the cable.
  2. Connect a Siemens PG via MPI. Set the PG to MPI, address 0, baud 187.5 kbit/s, and attach to the CPU MPI/DP port. If the PG finds the CPU, MPI is operational and the issue is HMI-side (address, baud, or wiring to HMI).
  3. Read the CPU interface assignment. In STEP 7 / TIA Portal Online & Diagnostics, read the CPU's MPI address, baud rate, and bus profile. Note these values.
  4. Read the HMI's own MPI address. On most Magelis panels, navigate to SettingsNetworkCOM2 on the HMI itself. The HMI will display its configured MPI address and baud rate without needing the project file.
  5. Compare HMI address to CPU address. They must differ. If both are 2, the HMI cannot take the token. Reassign the HMI to a free address (commonly 1) or the CPU to a free address (commonly 2, then HMI = 1).
  6. Compare baud rates. Both must match. The default 187.5 kbit/s is the most reliable for HMI panels. Mismatches produce silent timeouts with no diagnostic on the HMI screen.
  7. Set the HMI as bus master. The HMI must be a master on the MPI bus to read/write the CPU. If the HMI is configured as a passive listener, it will not poll and will appear "offline" from the CPU's perspective. In Magelis configuration this is the Master/Slave parameter under the COM2 MPI driver settings, default Master.
  8. Check bus termination. MPI segments require termination at both ends. The S7-315-2PN/DP DB9 port has no built-in terminator. The HMI COM2 has no built-in terminator. A PROFIBUS connector with switchable terminator (Siemens 6ES7972-0BA12-0XA0) is required at each end of the segment. Missing terminators cause intermittent failures that look like address or baud mismatches.

Verification: Confirming the Link Is Live

After applying the corrective wiring and configuration, verify operation with the following checks:

  1. HMI diagnostic screen: Magelis panels show a connection status indicator on the system screen. "Connected" / green confirms MPI is up.
  2. CPU diagnostic buffer: In TIA Portal online view of the S7-315-2PN/DP, check DiagnosticsDiagnostic buffer. No MPI bus errors (SF / BF) should appear after the HMI polls.
  3. PG accessible nodes scan: With a PG attached to the bus, run Accessible nodes. The HMI should appear in the discovered node list with its configured MPI address.
  4. Live tag read: On the Magelis, configure a numeric display bound to a known tag (e.g., MW0 or a DB bit) in the CPU. The display should update at the configured polling rate. A static value or "####" indicates the HMI is connected to the CPU variable table but receiving a default/faulted value.
  5. LED status on CPU: The S7-315-2PN/DP SF LED should be off, BF LED should be off (or briefly flashing during HMI poll), and the LINK LEDs on the PN port are unrelated to MPI operation.

Troubleshooting Matrix

Symptom on HMI Probable Cause Corrective Action
"PLC No Response" / timeout on every poll Wiring polarity reversed Swap Data+ / Data- on cable
Same error after wiring swap Address conflict or HMI set to slave Verify HMI address != CPU address; set HMI = Master
Intermittent timeouts, works after PG attached Missing bus terminator Install 6ES7972-0BA12-0XA0 at both ends
PG finds CPU, HMI does not Baud rate mismatch Force both to 187.5 kbit/s
PG cannot find CPU on MPI CPU interface set to DP, not MPI Reconfigure X1 in TIA Portal to MPI, redownload HW Config
All above pass, HMI still offline HMI driver set to wrong protocol (Modbus, Ethernet) Verify COM2 driver is "Siemens MPI/PROFIBUS" in Vijeo Designer
Communication works for 30 s, then drops Token rotation timeout, too many nodes or highest address too high Set highest MPI address to the highest physical node

Field-Proven Recommendations

  1. Always use a Siemens PROFIBUS cable (6XV1830-0EH10) or equivalent with characteristic impedance 135 to 165 ohm. Standard Ethernet Cat5 cable is not rated for RS485 at the speeds used on MPI; it works at 187.5 kbit/s over short distances but is not recommended for new installations.
  2. Label both ends of every MPI cable with the signal mapping (e.g., "HMI pin 3 → CPU pin 3, HMI pin 6 → CPU pin 8"). This eliminates the polarity question on every future retrofit.
  3. When migrating an HMI/PLC pair, capture the active project files from both devices before the swap. For Magelis, the active project can be uploaded from the HMI itself through Vijeo Designer's TransferGet from HMI function if the HMI firmware allows it.
  4. Keep a PG with STEP 7 / TIA Portal on site for any MPI troubleshooting; the Accessible nodes function is the fastest way to confirm bus health without an HMI.
  5. Document the MPI bus profile (baud, highest address, master/slave roles) in the panel drawing so the next commissioning engineer does not have to reverse-engineer it from the hardware.

Safety and Wiring Precautions

MPI/DP bus cables carry low-voltage signals but the S7-300 systems typically include 24 VDC power wiring in the same cabinet. Observe the following before touching any conductor:

  • De-energize the 24 VDC supply to the CPU and HMI before inserting or removing DB9 or RJ45 connectors. Hot-plugging MPI connectors can corrupt the CPU interface object and require a full hardware reconfiguration.
  • Verify the shield is bonded to PE at one end only (typically the cabinet entry point) to avoid ground loops that can shift the RS485 common-mode voltage outside the transceiver's input range.
  • Never apply 24 V to the HMI RJ45 pin 7 unless the cable is specifically a Siemens PG/PC RS485 repeater cable (6ES7901-4BD00-0XA0). Standard PROFIBUS cables do not carry 24 V on pin 7; if a custom cable ties 24 V to a CPU pin, the result is immediate driver damage.

FAQ

Why does MPI work on the S7-315-2DP but not on the S7-315-2PN/DP with the same RJ45 cable?

The S7-315-2PN/DP has its MPI/DP combined on a single DB9 (X1) and exposes PROFINET on the two RJ45 ports (X2 P1, X2 P2). The X1 port must be set to "MPI" in the TIA Portal hardware configuration; it does not default to MPI on a new device. If the port is left at DP, the HMI's MPI requests are ignored. The PROFINET RJ45 ports cannot carry MPI traffic under any configuration.

How do I swap Data+ and Data- on an MPI cable between a Magelis RJ45 and a Siemens DB9?

Cut the cable and re-terminate: HMI RJ45 pin 3 (Data+) must land on CPU DB9 pin 3, and HMI RJ45 pin 6 (Data-) must land on CPU DB9 pin 8. DGND goes from HMI pin 2 (or 5) to CPU pin 5. Use continuity mode on a multimeter to confirm before powering the bus. Industry practice is to swap on one end only; do not swap at both ends.

What is the default MPI address for an S7-300 CPU and a Magelis HMI?

S7-300 CPUs default to MPI address 2. Magelis OP/HMI panels default to MPI address 1. These defaults must not collide and must match the partner device's expectation. If the previous CPU used address 2 and the HMI is set to 1, configure the new CPU to address 2 via TIA Portal or STEP 7 Online & Diagnostics before attempting to poll from the HMI.

Can I configure MPI on the PROFINET port of the S7-315-2PN/DP?

No. The PROFINET port is an industrial Ethernet interface running PROFINET IO, not MPI. MPI is strictly a serial RS485 protocol on the DB9 X1 port. Any attempt to bind an MPI connection to the PN port in TIA Portal will not compile or will fail at runtime. If Ethernet-based communication is required, migrate the HMI driver to S7-ISO-on-TCP (RFC1006) on the PN port instead.

My HMI shows "PLC No Response" but a Siemens PG finds the CPU on the same cable. What is wrong?

Three checks resolve 90 percent of these cases: (1) HMI and CPU baud rates must match, default 187.5 kbit/s; (2) HMI MPI address must differ from the CPU MPI address; (3) the HMI COM2 driver in Vijeo Designer must be set to "Siemens MPI/PROFIBUS" master mode, not Modbus or Ethernet. If all three are correct, the HMI's MPI stack is polling but receiving corrupted frames, indicating a polarity swap or missing bus terminator on the segment.

Back to blog