S7-315 2DP to MP277 HMI: Configuring Profibus-DP Communication

David Krause19 min read
HMI ProgrammingSiemensTutorial / How-to
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

Equipment Overview and Identification

The integration of a Siemens SIMATIC S7-300 CPU 315-2 DP with a SIMATIC MP277 operator panel is a common cell-level configuration in machine building. The CPU exposes two physical communication ports — an MPI port (X1) and a Profibus-DP port (X2) — both of which can be used independently to reach the panel. The MP277 in turn supports three transfer channels: Profibus-DP slave, Industrial Ethernet, and USB. Picking the right combination depends on the existing cabling, the available STEP 7 and WinCC Flexible versions, and whether the project requires cross-network routing through the CPU.

CPU 315-2 DP Variants

The CPU 315-2 DP is identified by catalog number 6ES7315-2xxxxx-xxxx. Common field revisions:

Catalog Number Firmware Work Memory Bit Execution MPI DP
6ES7315-2AF03-0AB0 2.0 64 KB 0.3 µs Yes Yes
6ES7315-2AG10-0AB0 2.0 128 KB 0.1 µs Yes Yes
6ES7315-2AH14-0AB0 3.3 256 KB 0.05 µs Yes Yes

The "2" in the type designation indicates the dual-port architecture. The first interface (X1) is fixed MPI/DP and the second (X2) is dedicated Profibus-DP master/slave on 6ES7315-2AG10 and later revisions. Default MPI address is 2, default DP address is 2 unless reconfigured in HW Config.

MP277 Variants

The MP277 family runs WinCC Flexible 2008 (or WinCC Comfort/Professional from V11 SP2). Each variant carries an MPI/DP slave port, an Ethernet port, and a USB Type-A host port:

Catalog Number Display Touch Keys Profibus Ethernet USB
6AV6643-0BA01-1AX0 8" TFT Yes No DP slave 10/100 Yes
6AV6643-0BA11-1AX0 8" TFT No Yes DP slave 10/100 Yes
6AV6643-0CB01-1AX0 10" TFT Yes No DP slave 10/100 Yes
6AV6643-0CB11-1AX0 10" TFT No Yes DP slave 10/100 Yes

For full operating instructions including pin assignments, transfer settings, and diagnostic screens, refer to the MP277 manual on the Siemens Industry Online Support: SIMATIC MP277 Operating Instructions (entry ID 23337820).

Field PG Programming Device

A SIMATIC Field PG (M3, M4, or M5) is a ruggedized laptop with a built-in MPI/Profibus adapter (CP 5711 internally, or PCMCIA CP 5512 / CP 5611) and an Ethernet port. The internal adapter appears in the PG/PC interface selection as "PC internal (MPI/DP)" or "CP xxxx (MPI/DP)". It allows both STEP 7 (SIMATIC Manager) and WinCC Flexible to use the same physical port for transfers, eliminating the need for two programming cables.

Physical Connection Options

The MP277 can be linked to the CPU 315-2 DP using any of three physical media. The choice influences topology, address planning, and which transfer channel must be enabled.

Profibus-DP (RS-485) — Recommended

Profibus-DP uses a shielded twisted-pair cable (typically 6XV1830-0EH10 violet) terminated at both ends with 220 Ω resistors and a strict bus topology (no stars, drops limited to 1 m spur length on a few devices). Data rates up to 12 Mbit/s are supported; the MP277 is a DP slave, the CPU is a DP master on port X2. This is the cleanest commissioning layout when the cell has a Field PG, one CPU, and one HMI.

Ethernet (Industrial Ethernet on S7-300, Profinet-compatible on MP277)

The MP277 10/100 Mbit Ethernet port supports the SIMATIC S7 protocol. The S7-300 needs a CP 343-1 Lean/Advanced (e.g., 6GK7343-1EX11-0XE0 or newer) to talk Ethernet. Use this option when the HMI must integrate with a higher-level network, when wiring distances exceed Profibus limits (1.2 km at 93.75 kbit/s to 100 m at 12 Mbit/s per segment), or when the plant standard mandates Ethernet on the cell level.

USB

USB is reserved for HMI project transfer only. A compiled project is exported to a USB stick in WinCC Flexible, then loaded into the MP277 via the control panel (Transfer → USB). It cannot be used to download STEP 7 programs to the CPU. USB is a fallback when no bus cable is available or when a service technician needs to update the HMI runtime without a PG on the network.

MPI (X1 Port on CPU)

The CPU's X1 port defaults to MPI (address 2) and can be reconfigured to Profibus-DP master in HW Config. If MPI is kept active on X1 and Profibus-DP is used on X2, the Field PG needs S7 routing to reach the MP277 from the MPI side. If everything is moved to a single Profibus-DP bus on X1 (or X2), routing is not required and commissioning is faster.

Profibus-DP Network Topology

The single-cable Profibus topology that lets the Field PG, the CPU 315-2 DP, and the MP277 all share the same bus is the cleanest commissioning layout. Each device attaches through a 9-pin Sub-D Profibus connector. The two physical end nodes must have termination switched ON; intermediate nodes must have termination OFF.

Topology rule: Profibus-DP is a bus, not a star. Use only daisy-chain connections through T-tap connectors; do not use a hub. The shield must be bonded to the connector backshell at every node and bonded to ground at least once per segment.
[Term ON]                                                  [Term ON]
CPU 315-2 DP --- PB conn. --- MP277 --- PB conn. --- Field PG
     (X2)              |                                  (PC internal)
                        |
                    [PG socket]
                 (programming tap)

The Profibus connector at the CPU should be the variant with a PG socket (a "piggy-back" 9-pin Sub-D) so the Field PG can be inserted at the cabinet door without opening the enclosure. The connector at the MP277 can be a standard feed-through type. The connector at the Field PG should be a terminating connector with the bus terminator switched ON since the PG is at one physical end of the bus during programming.

If the Field PG is only connected temporarily for commissioning, leave the PG-end connector with termination ON. When the PG is removed and the bus segment continues to another device, install a passive terminator (6ES7972-0DA00-0AA0) in its place, or move the terminator switch to the new end node.

Hardware Selection: Connectors and Cable

Profibus connectors are order-numbered by Siemens with the -0BBxx suffix denoting the PG-socket variant and -0BAxx denoting the through-only variant:

Part Number Description PG Socket Terminator Cable Outlet
6ES7972-0BA12-0XA0 Profibus connector No Switchable 90°
6ES7972-0BB12-0XA0 Profibus connector with PG socket Yes Switchable 90°
6ES7972-0BA42-0XA0 Profibus connector No Switchable 35°
6ES7972-0BB42-0XA0 Profibus connector with PG socket Yes Switchable 35°
6ES7972-0BA50-0XA0 Profibus connector No Switchable Axial
6ES7972-0BB50-0XA0 Profibus connector with PG socket, axial Yes Switchable Axial
6ES7972-0DA00-0AA0 Passive Profibus terminator — Always on —

The preferred cable is 6XV1830-0EH10 (standard Profibus cable, violet jacket, sold by the meter or in 20 m / 50 m / 100 m / 200 m / 500 m spools). Characteristic impedance is 150 Ω. Maximum segment lengths:

Baud Rate Max Segment Length
9.6 kbit/s – 93.75 kbit/s 1,200 m
187.5 kbit/s 1,000 m
500 kbit/s 400 m
1.5 Mbit/s 200 m
3 Mbit/s – 12 Mbit/s 100 m

For commissioning benches with the PG, CPU, and HMI in close proximity, a 1.5 Mbit/s or 3 Mbit/s profile is the most common choice. STEP 7 and WinCC Flexible adapt to the configured profile automatically once the bus profile is set identically on every node.

MPI and Profibus Address Assignment

Every node on an MPI or Profibus network must have a unique station address. The Field PG is typically 0, the OP is 1, and the CPU 315-2 DP is 2 — exactly the factory default addresses for those three roles, which is why most projects work without any address reconfiguration.

Device Default Address Role Notes
Field PG 0 PG (programmer) Set in PG/PC interface
MP277 (OP) 1 Operator panel Default for Siemens HMI panels
CPU 315-2 DP (MPI) 2 PLC Default MPI address
CPU 315-2 DP (DP) 2 DP master Default DP address on X2

The highest allowable MPI/DP address in any single bus segment is 31 (5-bit address) under the standard S7 profile. The bus must be configured for the same highest station address (HSA) on every node so the token rotation logic stays consistent.

Setting the CPU MPI Address

Open the CPU properties in STEP 7 (SIMATIC Manager → HW Config → double-click the CPU in rack slot 2). The Interface tab shows the current MPI address under Address. Keep it at 2 unless the project requires otherwise.

Setting the MP277 HMI Station Address

From the MP277 control panel, navigate to:

Control Panel → Transfer → MPI/DP Settings → Address

The address field accepts values 1 through 31. Leave it at 1 unless the bus already has an OP at 1. The same dialog also exposes the transmission rate (1.5 Mbit/s default) and the highest station address (31 default).

Setting the Field PG Address

In SIMATIC Manager, select:

Options → PG/PC Interface → [CP 5711 / PC internal (MPI/DP)] → Properties → MPI Address

Default 0 is correct for the PG. If a second PG or another DP device must keep 0, raise the PG address and use 1 for the HMI — but in practice leaving the PG at 0 is standard and conflict-free.

STEP 7 / SIMATIC Manager PG/PC Interface Configuration

The PG/PC interface is the access point STEP 7 uses when it talks to the PLC. The wrong selection here is the most common cause of "Cannot reach the partner" errors.

Setting the Access Point

  1. Open Options → PG/PC Interface in SIMATIC Manager.
  2. Choose the access point S7ONLINE (or S7ONLINE (STEP 7) for the classic online interface).
  3. Select the physical adapter in use:
    • PC internal (MPI/DP) for the Field PG's internal port
    • CP 5711 (MPI/DP) or CP 5611 (MPI/DP) for a PCI/PCMCIA card
    • TCP/IP → [network card] for Ethernet routing
  4. Click Properties to set the transmission rate (1.5 Mbit/s is the safe default for short bus segments) and the highest station address (31 for MPI, 31 for Profibus-DP standard mode).
  5. Click OK and OK again to commit the setting.

Adding the MP277 to the STEP 7 Project (Optional)

If HMI tags and PLC tags are shared, WinCC Flexible's tag import from a STEP 7 project is the cleanest approach. The MP277 does not need to appear as a hardware object in HW Config; it can be added as a Profibus-DP slave in HW Config when S7 routing is used and STEP 7 must compile a routing table. In most cell-level projects, the MP277 is configured entirely inside WinCC Flexible and is invisible to STEP 7.

CPU 315-2 DP Communication Port Configuration

The two ports on the CPU 315-2 DP serve distinct roles once Profibus is the chosen transfer medium:

Port X1 (MPI/DP) X2 (DP)
Default mode MPI DP master
Default address 2 2
Use for PLC program download Yes (MPI or DP) Yes (DP)
Use for HMI project transfer No (use X2 DP) Yes
Reconfigurable to DP master, DP slave DP master, DP slave, S7 comms

To reconfigure X1 to Profibus-DP and use a single bus for everything, open HW Config, double-click the X1 interface, and set Interface → PROFIBUS-DP. Address 2, transmission rate 1.5 Mbit/s, profile DP. When X1 is in DP mode, X2 must either be on a different physical Profibus segment or be disabled — two DP masters on the same physical segment require a DP/DP coupler.

If the Field PG must download STEP 7 via MPI (X1 still in MPI mode) while WinCC Flexible transfers to the MP277 via Profibus-DP (X2 in DP mode), the topology has two logical networks and the PG must use S7 routing to reach the HMI through the CPU.

WinCC Flexible Project Connection Setup

The WinCC Flexible project defines the connection between the HMI and the PLC. The connection parameters must match the bus configuration.

Adding a Connection

  1. Open the WinCC Flexible project.
  2. In the project tree, expand Connections and double-click Connections.
  3. Click the first empty row to create a new connection.
  4. Configure the parameters:
Field Value Notes
Name e.g., S7-300_CPU315 Free text
Communication driver SIMATIC S7 300/400 Use this for S7-300/400
Online Yes Required for runtime tags
HMI station address 1 Must match MP277 hardware
HMI station type DP slave Profibus-DP
PLC station address 2 Must match CPU DP address
PLC station type DP master CPU 315-2 DP
Slot 2 Rack slot of the CPU (varies by project)
Rack 0 Always 0 for S7-300
Cycle time 500 ms (or per project) Default 1 s is too slow for many control loops
Timeout 3 s Default is fine for diagnostic use

Configuring the Transfer Channel

Project → Transfer → Transfer Settings opens the dialog that controls where the compiled WinCC Flexible runtime is sent. The MP277 supports three channels:

Channel Use Case Notes
MPI/DP Standard for Profibus or MPI Field PG must be able to route to MP277
Ethernet MP277 on the LAN Requires CP 343-1 in the PLC and S7 connection with right TSAPs
USB Standalone transfer from a USB stick No PG required, but no online PLC link during transfer

Select MPI/DP for Profibus-DP transfer. Set the transfer rate (1.5 Mbit/s) and the highest station address (31). The MP277's target address is 1, the CPU's address is 2.

S7 Routing for Cross-Network Transfer

S7 routing allows a Field PG attached to one network (typically MPI on X1) to reach a target device on a different subnetwork (typically Profibus-DP on X2 with the MP277 attached). The CPU 315-2 DP acts as a router between the two subnets.

When Routing Is Required

  • The PG is plugged into the X1 (MPI) port and the project on the PG includes the HMI.
  • The MP277 is on the X2 (DP) Profibus subnet.
  • The PG has no direct cable to the X2 subnet.

When Routing Is Not Required

  • The PG, CPU, and MP277 are all on the same Profibus-DP bus (X1 in DP mode with the MP277 and PG on the same cable, or X2 with all devices on a single DP segment).
  • The transfer is via Ethernet and both the PG and MP277 are on the same IP network.

Configuring Routing in STEP 7

  1. Open the STEP 7 project containing the HMI's PG/PC station.
  2. In the component view, double-click the PG/PC station.
  3. Open the Properties of the PG/PC interface.
  4. Add the network attachment for the S7 subnet. The PG/PC station in the project must reference both subnets if they exist (the MPI subnet on X1 and the DP subnet on X2).
  5. In HW Config of the PG/PC station, insert the same MPI/DP CP that the Field PG uses physically. Set its address to 0 and its bus profile to match the MPI subnet.
  6. In the S7 routing table, the CPU is listed as a router between the MPI and DP subnets. STEP 7 fills this in automatically if the CPU is configured as a router.

Configuring Routing in WinCC Flexible

When transfer is initiated from WinCC Flexible, it asks STEP 7 to use the S7 routing table to forward the HMI project through the CPU. No extra dialog in WinCC Flexible is needed beyond the standard Transfer to device command, provided the PG/PC interface and the routing table are correct.

For more detail on S7 routing with WinCC Flexible, refer to the Siemens Industry Online Support FAQ collection at WinCC flexible Entry ID 21838398 — Transferring via MPI/PROFIBUS to a Windows-based panel.

Program Transfer and Download Procedures

Downloading the STEP 7 Program to the CPU

  1. Connect the Field PG to the CPU via the PG socket on the Profibus connector.
  2. Open the STEP 7 project.
  3. Select the CPU in the project tree.
  4. Click PLC → Download to Target System (or Ctrl+L).
  5. Choose MPI or PROFIBUS depending on the active subnet.
  6. STEP 7 compiles the blocks, transfers them, and prompts for the operating-mode change if necessary.
  7. Verify the RUN LED on the CPU and the green DC5V indicator.

Transferring the WinCC Flexible Project to the MP277

  1. Connect the Field PG to the same bus as the MP277.
  2. Open the WinCC Flexible project.
  3. Select Project → Transfer → Transfer.
  4. If using MPI/Profibus, set the target address to 1 (the MP277) and the channel to MPI/DP at 1.5 Mbit/s.
  5. Click Transfer. WinCC Flexible compiles, sends, and the MP277 reboots into runtime.
  6. Verify the MP277 displays the configured start screen.

If the MP277 control panel has transfer lock enabled, unlock it first:

Control Panel → Transfer → [uncheck] Transfer Lock

The MP277's Transfer LED blinks during transfer and stays off (or solid green) once runtime is up.

Verification and Commissioning Tests

Check Expected Result Tool
Online → Accessible Nodes shows CPU at 2 CPU listed STEP 7
Online → Diagnostic → Module Information → Communication Profibus OK, no diagnostic interrupts STEP 7
MP277 displays start screen Start screen visible Visual
MP277 shows connection status icon Green / no error MP277 HMI
MP277 online test in WinCC Flexible All tags show values WinCC Flexible
Tag simulator round-trip Write a tag from STEP 7 VAT, observe on HMI STEP 7 + HMI
Bus termination (ohmmeter between pins 3 and 8, both ends off) ~110 Ω (two 220 Ω in parallel) Multimeter
Bus voltage between pin 6 (VP) and pin 5 (DGND) at each node ~5 V DC Multimeter

The bus termination is the most overlooked physical-layer check. With the bus powered and all terminators ON at the two ends, the resistance between pin 3 (RxD/TxD-P, B-line) and pin 8 (RxD/TxD-N, A-line) at any connector on the bus should read ~110 Ω (two 220 Ω terminators in parallel). If it reads 220 Ω, only one end is terminated. If it reads open, neither end is terminated and the bus will fail to function reliably at any data rate.

Troubleshooting Matrix

Symptom Probable Cause Action
STEP 7 reports "Partner not reachable" Wrong PG/PC interface selected, wrong bus profile, wrong address Verify interface in PG/PC settings, set 1.5 Mbit/s and HSA 31, address 2
MP277 shows "Connection failed" HMI address conflict, bus terminated wrong, cable swapped Check OP address = 1, check terminators at both ends, verify pin 3→pin 3 / pin 8→pin 8 polarity
WinCC Flexible transfer hangs at 0% S7 routing not configured, no routing entry, CP 5711 in wrong mode Add CPU as router in STEP 7 PG/PC station, or move all devices to one Profibus subnet
Random communication errors at high speed Long stubs, missing termination, EMI on cable Lower baud rate to 1.5 Mbit/s, remove stubs, check shield bonding, keep cable away from VFD cables
MP277 "Transfer" LED stays off Transfer lock enabled, MP277 not in transfer mode, USB is selected Uncheck transfer lock, set transfer mode to MPI/DP, power cycle
CPU BF (Bus Fault) LED on solid No Profibus master, address conflict, cable short Check DP master configuration, verify all node addresses are unique, inspect cable for shorts
CPU SF (System Fault) LED on solid Diagnostic interrupt from Profibus slave, hardware error Open STEP 7 → PLC → Module Information → Diagnostic Buffer for the cause

Common Cable Wiring Mistakes

The 9-pin Sub-D Profibus pinout is:

Pin Signal Wire Color (6XV1830-0EH10)
1 — (not used)
2 — (not used)
3 RxD/TxD-P (B-line) Red
4 RTS —
5 DGND (data ground) —
6 VP (+5 V bus terminator supply) —
7 — (not used)
8 RxD/TxD-N (A-line) Green
9 — (not used)

The shield is bonded at the connector backshell. Reversing the red and green wires is the single most common wiring fault; the result is a bus that works for one device and fails for the next. Always verify with a multimeter before powering the bus terminator supply. The recommended test is to power the bus and measure VP (pin 6) to DGND (pin 5) at every node — if a node shows 0 V, the cable run is open or the connector is miswired.

Notes and Recommendations for First-Time Commissioning

  1. Keep the Field PG address at 0, MP277 at 1, and CPU at 2. These are the Siemens defaults and avoid address conflicts with existing panel libraries.
  2. Use the Profibus connector with the PG socket (6ES7972-0BB12-0XA0) at the CPU. The PG socket allows the Field PG to be inserted at the cabinet door without opening the enclosure.
  3. If the project is brand new, set both the CPU and the MP277 to the same Profibus baud rate (1.5 Mbit/s is the safest default). Mismatched baud rates are silent until the first transfer.
  4. For the first download, disable any "Route via PLC" option in the Field PG and download directly to the CPU on the Profibus subnet, then start the WinCC Flexible transfer with S7 routing if the PG is on MPI.
  5. After commissioning, lock the MP277's transfer mode (Control Panel → Transfer → Transfer Lock) to prevent unauthorized project changes from a USB stick on the shop floor.
  6. Document the final bus profile (baud rate, HSA) on the cabinet door pocket card along with the network topology drawing. This avoids "I had to download a project to the panel and could not remember the baud rate" service calls.

The single-cable Profibus topology with a PG-socket connector at the CPU is the most maintainable configuration for a cell with one S7-300 and one MP277, and the address plan of PG=0, OP=1, CPU=2 lets the project start with the Siemens defaults and avoids reconfiguration steps.

Frequently Asked Questions

Do I have to use a Profibus connector with a PG socket at the CPU?

No — a standard feed-through Profibus connector at the CPU works for runtime. The PG-socket variant (6ES7972-0BB12-0XA0) is recommended for commissioning because it lets you plug the Field PG into the cabinet door without opening the enclosure, and the connector's built-in switchable terminator avoids needing a separate terminating plug at the CPU end.

What MPI addresses should I assign to the PG, MP277, and CPU 315-2 DP?

Use the Siemens defaults: PG = 0, MP277 (OP) = 1, and CPU 315-2 DP = 2. These addresses work on the same bus segment without conflicts and match the factory settings of the hardware, so no reconfiguration is required for first-time commissioning.

Can I use Ethernet instead of Profibus to connect the MP277 to the S7-300?

Yes — the MP277 has a 10/100 Mbit Ethernet port that supports the SIMATIC S7 protocol, and the S7-300 can be equipped with a CP 343-1 Lean/Advanced (6GK7343-1EX11-0XE0 or newer). Configure an S7 connection in WinCC Flexible with the CP 343-1's IP address and TSAPs 03.01 (local) and 02.01 (partner) for slot 1, or 03.02 / 02.02 for slot 2.

Do I need S7 routing if the PG is plugged into the MPI port and the MP277 is on Profibus-DP?

Yes — the CPU 315-2 DP must be configured as a router between the MPI subnet (X1) and the Profibus-DP subnet (X2). In STEP 7, open the PG/PC station, add the MPI/DP interface, and STEP 7 populates the routing table with the CPU as the gateway. WinCC Flexible uses this table automatically when you click "Transfer."

Why does the MP277 show "Connection failed" even though STEP 7 downloads fine?

The most common causes are a wrong HMI station address in WinCC Flexible (must match the MP277 hardware address, default 1), a missing or misconfigured Profibus terminator, or a cable polarity reversal (red/green wires swapped). Verify the address under Control Panel → Transfer on the MP277, measure ~110 Ω between pins 3 and 8 with the bus powered and all terminators on, and confirm the wiring pinout with a multimeter.

What baud rate should I use for the Profibus commissioning bus?

1.5 Mbit/s is the safe default for a short bench or cabinet bus (segment ≤ 200 m). For long plant networks, 500 kbit/s or 187.5 kbit/s may be required to meet the segment-length budget. All nodes on the bus must be set to the same baud rate; the bus profile "DP" with HSA 31 is the standard configuration.

Back to blog