1. Problem Overview: The Single-Port Bottleneck
The SIMATIC S7-312C (6ES7312-5BF03-0AB0) ships with a single integrated X1 MPI/DP interface. On early 312C variants (firmware V1.x and V2.x) this port is hard-configured as an MPI master by default, and even on later units that support PROFIBUS DP, you only have one physical RS485 connector. The TP170A (6AV6 545-0BA15-2AX0) is an MPI-only HMI; it does not have a second port, nor a USB programming channel.
When the engineering PC also has to share the same MPI bus, the typical commissioning flow degenerates into this loop:
- Unplug the TP170A MPI lead from X1.
- Plug the PC adapter (PC-Adapter USB, 6ES7972-0CB20-0XA0) into X1.
- Download the STEP 7 project, perform a CPU restart, and verify the program online.
- Unplug the PC adapter.
- Reconnect the TP170A lead and bring the panel back to runtime.
- Discover a setpoint change is required on the HMI, so switch again.
The same problem never appears on an S7-226 (two ports: Port 0 RS485 + Port 1 RS485) or on an S7-315-2DP / S7-317-2DP where the second port is a true DP interface that can be addressed independently. The fix for the S7-312C is to keep the engineering channel on a separate physical bus segment from the HMI channel, while still letting them converge on the CPU's single X1 port through a PROFIBUS drop line with a programming tap.
2. Hardware Analysis: Why the S7-312C Cannot Solve This on Its Own
| CPU | X1 | X2 (if any) | Default X1 protocol | Independent PG port? |
|---|---|---|---|---|
| CPU 312C (6ES7312-5BF03-0AB0) | MPI/DP | none | MPI 187.5 kbit/s | No |
| CPU 313C / 313C-2 PtP | MPI/DP | PtP RS422/485 (DP variant: MPI/DP) | MPI 187.5 kbit/s | Only on -2DP variant |
| CPU 314C-2DP | MPI/DP | DP master/slave | MPI 187.5 kbit/s | Yes (X2) |
| CPU 315-2DP / 317-2DP | MPI/DP | DP master/slave | MPI 187.5 kbit/s | Yes (X2) |
| CPU 224 (S7-200) | Port 0 | Port 1 | PPI | Yes (independent) |
On the 312C the only way to provide a true second RS485 channel is to add a CP module to the central rack. A CP 342-5 (6GK7342-5DA02-0XE0) is the clean PROFIBUS-DP solution, but it occupies a slot, costs more than a PC card, and still requires you to bridge the segment. The cheaper and faster field fix is on the PC side, not the PLC side.
3. Solution Architecture: PC PROFIBUS Card + PG Tap on a Shared Segment
The recommended topology keeps the TP170A and the engineering PC on the same electrical RS485 segment, but uses a PROFIBUS drop connector with an integrated PG socket so both devices are physically parked at the same time. The CPU's single X1 port now hosts:
- The TP170A MPI lead (terminating node or mid-bus drop)
- A PROFIBUS bus cable to the engineering PC
Two PC-side cards cover virtually every laptop and desktop in a commissioning fleet:
| Card | Order number | Bus | Host interface | Max baud | Notes |
|---|---|---|---|---|---|
| CP 5512 | 6GK1551-2AA00 | PROFIBUS / MPI | PCMCIA / CardBus (Type II) | 12 Mbit/s | For laptops; no longer in production but abundant in field stock |
| CP 5611 | 6GK1561-1AA01 | PROFIBUS / MPI | PCI 3.3 V / 5 V | 12 Mbit/s | For desktop engineering PCs and tower IPCs |
| CP 5611 A2 | 6GK1561-1AA02 | PROFIBUS / MPI | PCI | 12 Mbit/s | Replacement of A01, current variant |
| CP 5711 | 6GK1571-1AA00 | PROFIBUS / MPI | USB 2.0 | 12 Mbit/s | Modern substitute, no internal slot needed |
4. PROFIBUS Cable and PG Connector Topology
The mechanical keystone is a PROFIBUS connector with an integrated programming (PG) socket. Standard catalog numbers:
| Connector | Order number | Cable outlet | PG socket |
|---|---|---|---|
| PROFIBUS connector, 90°, with PG | 6ES7972-0BB12-0XA0 | 90° | Yes |
| PROFIBUS connector, 35°, with PG | 6ES7972-0BA12-0XA0 | 35° | Yes |
| PROFIBUS connector, axial, with PG | 6ES7972-0BA50-0XA0 | 0° (axial) | Yes |
| PROFIBUS connector, no PG (terminator) | 6ES7972-0BA10-0XA0 | 35° | No |
Recommended wiring for the S7-312C + TP170A + engineering PC segment:
- CPU 312C X1 → PROFIBUS connector (with PG socket), 35° outlet, ON/OFF termination switch ON because the CPU is one end of the segment.
- Same connector → PROFIBUS bus cable (violet, 6XV1830-0EH10) → PROFIBUS connector (with PG socket) on the TP170A MPI/DP port.
- TP170A connector termination switch: ON only if the TP170A is at the far physical end of the segment. If a panel is mid-bus, switch the panel's terminator OFF and leave it on at the two physical ends only.
- PC CP 5611 / CP 5512 / CP 5711 lead plugs into the PG socket of the CPU-side connector (or any of the in-line PG sockets). Termination on the PC lead: OFF - the PC is a drop, never an end node.
Bus topology sketch (engineering view, RS485 segment, 187.5 kbit/s MPI):
+----------+ +-------+ +-----------------+
| S7-312C |-------| Bus |-------| TP170A HMI |
| X1 MPI | [PG] | cable | [PG] | (X1 MPI, end) |
+----------+ +-------+ +-----------------+
|
| drop (no term)
v
+---------+
| CP 5611 |
| (PC) |
+---------+
Pinout reference (PROFIBUS 9-pin sub-D, male on cable, female on device):
| Pin | Signal | Function |
|---|---|---|
| 1 | NC | Shield (chassis ground) |
| 2 | M24 | Ground for +24 V |
| 3 | L+ (RxD/TxD-P) | Data line B |
| 4 | RTS | Request To Send (PG only) |
| 5 | M5 | Data reference ground |
| 6 | P5 | +5 V (terminator supply) |
| 7 | P24 | +24 V (not used on 312C) |
| 8 | L- (RxD/TxD-N) | Data line A |
| 9 | NC | Reserved |
5. STEP 7 / PG-PC Interface Configuration
After the CP 5611 / CP 5711 is physically installed and its driver is loaded (SIMATIC NET PC software, version compatible with STEP 7), the PG/PC interface must be bound to the card:
- Open Start → SIMATIC → STEP 7 → Set PG-PC Interface.
- Select
CP5611(PROFIBUS)(orCP5711) as the access point of the S7ONLINE interface. - Click Properties. Under PROFIBUS, leave the station address at the default PG address (usually 0 or 1) and the baud rate at 187.5 kbit/s. Do not enable "PG/PC is the only master on the bus" - the TP170A is also a master-class device on MPI.
- In HW Config of the S7-300 station, open the CPU 312C properties on X1 and confirm:
- Interface: MPI
- Address: 2 (default; must not collide with the TP170A or with the PC PG address)
- Highest MPI address: 31
- Transmission rate: 187.5 kbit/s
- Add the TP170A to the MPI subnet: Insert → SIMATIC HMI → TP170A 6", set its MPI address (typically 3, must be unique on the bus), and draw a subnet connection from the CPU X1 to the TP170A MPI interface.
Recommended MPI address map for this topology:
| MPI address | Device | Role |
|---|---|---|
| 0 | Engineering PC (CP 5611 / CP 5711) | PG / online |
| 1 | Reserved (avoid on MPI - often taken by PG default) | - |
| 2 | S7-312C X1 | MPI master / CPU |
| 3 | TP170A | HMI |
| 4 | Reserved (PG of second programmer / service laptop) | - |
6. TP170A (WinCC flexible / ProTool) Communication Configuration
Open the TP170A project in WinCC flexible 2008 SP5 (or the original ProTool/Pro V6.0 SP3 if the project is legacy) and set the connection parameters to match the bus:
| Parameter | Value | Source |
|---|---|---|
| Communication driver | SIMATIC S7-300/400 | WinCC flexible connection editor |
| HMI device address (TP170A) | 3 | WinCC flexible / Panel setup |
| PLC device address (CPU 312C) | 2 | WinCC flexible / Panel setup |
| Slot / Rack | Rack 0, Slot 2 | WinCC flexible / Panel setup |
| Network | MPI 187.5 kbit/s | WinCC flexible / Panel setup |
| Cycle time / update | 1 s nominal, 2 s worst case | WinCC flexible project properties |
After configuring, transfer the project to the TP170A via the same MPI bus. The panel will hold the connection during a STEP 7 download to the CPU; the panel will momentarily show "Connection interrupted / establishing" and recover within 2 to 5 s without operator intervention.
7. Online Monitoring Workflow: Program + HMI + Monitor in Parallel
With the topology in place, the new daily workflow is:
- PC powered on, CP 5611 / CP 5711 enumerated, STEP 7 with the project open.
- TP170A running, machine in cycle, HMI controlling setpoints and start/stop.
- Engineer clicks Online → Monitor/Modify on any block in STEP 7. The HMI tags continue to update; the engineer sees the live value behind the HMI field at the same time the operator changes it.
- For a program change: Online → Download to Target System. STEP 7 uses the existing MPI connection at PG address 0. The TP170A holds the cyclic S7 connection and resumes read/write of the modified tags within 2-5 s of the CPU returning to RUN.
- For a setpoint-only change: edit the HMI tag, not the PLC block. No download needed.
Operationally, the engineer can pin a watch table (VAT) such as vat_motor_setpoint with the same tag (e.g. DB100.DBX0.0 for start, DB100.DBD4 for the speed setpoint in RPM) that the TP170A writes through its configured connection. The panel and the watch table both show the same value because both speak the same S7 protocol to the same CPU at the same address.
8. Verification and Diagnostics
After installation, perform this checklist before releasing the system to production commissioning:
- PG-Online test: from STEP 7, PLC → Accessible Nodes. The CPU at MPI 2 and the TP170A at MPI 3 should both appear. If the TP170A is missing, the panel is on a different baud rate or has a duplicate address.
- Diagnostic buffer: open PLC → Diagnostics/Settings → Diagnostic Buffer. Look for absence of Event 16#0E1F (HMI fault), 16#0E21 (DP fault), and 16#3842 (master-master collision). The buffer must be empty of MPI faults after a 10-minute runtime with HMI cycling tags.
- Bus statistics: on the CP 5611, open SIMATIC NET → Commissioning → PROFIBUS Diagnostics. Confirm 0 repeated telegrams per minute, 0 lost telegrams, average bus cycle < 50 ms at 187.5 kbit/s for this small subnet.
- TP170A diagnostics: on the panel, Control Panel → S7-Transfer → Diagnostics. The "Connection status" field must show "Connected" with the configured partner (CPU 312C) and the configured partner address (2). Cycle counter increments when the engineer forces a value from the watch table.
- Cable continuity: measure between pin 3 and pin 8 of the segment ends. With both terminators ON, the resistance must be 110 Ω (220 ‖ 220). With one terminator ON, expect 220 Ω. Any other reading indicates a damaged cable or a stuck termination switch.
9. Alternative Solutions and When to Use Them
| Alternative | When it wins | Cost | Drawbacks |
|---|---|---|---|
| CP 342-5 in the S7-300 rack, PROFIBUS on CP, MPI on X1 | Existing rack space, many HMIs | High (CP + slot) | Adds a true second net; requires a different STEP 7 project topology |
| DP/AS-i Link (6GK7151-1BA02) | Not relevant here - this is MPI not AS-i | - | Wrong bus type |
| Upgrade CPU to 315-2DP | Long-term fleet standardization | Medium | Requires re-wiring, new project, may need restart of acceptance |
| Ethernet CP 343-1 + TP170A over Ethernet | Impossible - TP170A is MPI only | - | TP170A does not support PROFINET or TCP/IP S7 |
| CP 5711 USB instead of CP 5611 PCI | Laptop-only workflow, no free PCI slot | Medium | USB bus latency; not for permanent in-cabinet mounting |
| Repeater (6ES7972-0AA01-0XA0) | Segment > 50 m or > 32 nodes | Low | Adds a powered device; one more potential failure point |
For the S7-312C / TP170A pair, the CP 5611 (or CP 5711) plus a PG-tap PROFIBUS connector is the lowest-risk, lowest-cost fix and requires no change to the PLC program, no change to the HMI project, and no spare slot in the rack.
10. Field-Proven Caveats and Commissioning Pitfalls
- Baud rate homogeneity: all MPI devices on the segment must be at 187.5 kbit/s. The TP170A cannot negotiate higher; the CPU 312C at firmware V1.x supports MPI only and will refuse to enter DP mode unless you explicitly reconfigure it with STEP 7.
- Bus cable color: use violet PROFIBUS cable (6XV1830-0EH10) for the drop. Standard 24 AWG twisted-pair "Profibus-compatible" cable from a non-Siemens supplier is acceptable only if its characteristic impedance is 150 Ω ± 15 Ω and capacitance is ≤ 30 pF/m. Off-brand cable is the most common cause of intermittent S7 communication at sites that have "tried everything".
- Shield bonding: bond the PROFIBUS shield to functional earth at one point only (typically the cabinet entry). Double-bonding creates a 50/60 Hz ground loop that injects noise on long runs.
- PG socket shared with operator: do not leave a live CP 5611 lead in the PG socket if the operator has physical access. An accidental pull will drop the bus and freeze the HMI. Use a captive screw-lock sub-D hood (6ES7972-0BB12-0XA0 ships with the screw-lock variant).
- Online block delete: while monitoring, Online → Delete a block on the CPU - the TP170A may show "Tag: invalid value" until the next tag cycle. Plan operator-visible tags for the next 2-5 s.
- CPU 312C firmware V1.x: does not support routing between MPI subnets. If the cabinet later grows a second MPI subnet for an OP77B or TD200, you will need a CP 342-5 anyway. The CP 5611 does not change this limitation.
- STEP 7 V5.4 vs V5.5: V5.5 added better CP 5611 A2 driver support under Windows 10. On Windows 7 / XP the CP 5611 A1 still works with the legacy SIMATIC NET 2007.
11. Summary
The cable-switching problem on an S7-312C with a TP170A is solved by keeping the engineering PC on the same electrical MPI segment as the panel, accessed through a PROFIBUS connector with PG socket and a CP 5611 / CP 5711 PROFIBUS card on the PC. The fix is mechanical (connector with PG socket) and electrical (a single RS485 segment at 187.5 kbit/s with two terminators), not a software change. Once installed, the engineer can program, monitor, download, and run the HMI at the same time, exactly the way an S7-226's two ports allowed without thinking about it.
Do I need to change the STEP 7 program or the TP170A project to add a CP 5611?
No. The CP 5611 speaks the same MPI / S7 protocol the panel already uses. You only change the PG/PC interface assignment in STEP 7 and ensure the CP 5611's MPI address does not collide with the CPU (default 2) or the TP170A (default 3).
Will the TP170A lose its connection to the CPU every time I download a new program?
The TP170A will show "Connection interrupted - establishing" for 2-5 seconds during a STEP 7 download and a CPU restart. It recovers automatically without operator action. The HMI does not need to be re-transferred or re-configured.
Can I leave the PC-Adapter USB plugged in at the same time as the CP 5611?
No. Two active RS485 masters on the same segment fight each other. Use either the PC-Adapter USB (no card) or the CP 5611 (with PG-tap connector) - never both at the same time on a single segment.
What is the difference between CP 5512, CP 5611, and CP 5711?
CP 5512 is a PCMCIA / CardBus card for older laptops. CP 5611 is a PCI card for desktop PCs. CP 5711 is a USB-2.0 adapter for modern laptops and PCs without a free PCI slot. All three run the same SIMATIC NET driver stack and support MPI/DP at up to 12 Mbit/s.
My TP170A shows "Connection to PLC interrupted" after the change. What is the most likely cause?
Address collision - either the TP170A defaulted back to MPI address 1 (same as the PG) or the CP 5611 is at the same address as the CPU. Check the panel under Control Panel → S7-Transfer → MPI Address and the CP 5611 under Set PG-PC Interface → Properties → PROFIBUS → Address, and force both to unique values.
Does this solution work on a 6ES7 312-1AD10 (the very early 312C) too?
Yes. The 312C family shares the same X1 MPI/DP interface and the same 187.5 kbit/s default. The PG-tap connector + CP 5611 solution is firmware-independent; it is a bus-level fix, not a CPU firmware feature.