1. Overview: CPU 315-2DP / CPU 317-2DP Networking Paths
The Siemens SIMATIC S7-300 family integrates the programming interface and fieldbus interface on a single physical connector labelled MPI/DP (X1) on the front of the CPU. On the CPU 315-2DP (MLFB 6ES7315-2AG10-0AB0 and later) and the CPU 317-2DP (6ES7317-2AJ10-0AB0 and later), this port can operate in two modes selected in STEP 7 hardware configuration:
- MPI – multi-point interface for PG/OP communication and peer-to-peer data exchange among CPUs at 19.2 kbit/s or 187.5 kbit/s.
- PROFIBUS DP – master or slave at 9.6 kbit/s up to 12 Mbit/s (CPU 317-2DP supports full 12 Mbit/s; CPU 315-2DP is typically limited to 1.5 Mbit/s when used as DP master).
Two physical networking paths are practical when you only need light data exchange between two S7-300 stations:
| Path | Medium | Max Nodes | Max Distance | Baud Rate |
|---|---|---|---|---|
| MPI bus (RS-485) | Shielded PROFIBUS cable, two-core + shield | 32 (with repeaters) | 50 m at 187.5 kbit/s segment, 1000 m with 2 repeaters | 19.2 / 187.5 kbit/s |
| PROFIBUS DP | PROFIBUS cable violet (6XV1830-0EH10) | 127 (with repeaters) | 100 m at 12 Mbit/s, 1200 m at 9.6 kbit/s | 9.6 kbit/s – 12 Mbit/s |
| PG cable (MPI/DP to PC) | 6ES7901-2BF00-0AA0 (USB) or PC-Adapter USB | Point-to-point to single CPU | 5–10 m | 187.5 kbit/s or 1.5 Mbit/s |
The most common field situation for engineers connecting two S7-300 CPUs only is to use the MPI port on each CPU plus a single PROFIBUS drop cable with terminators ON at both ends. This is the configuration discussed in this article and matches the wiring shown in the source field problem.
2. Hardware Prerequisites
Before opening STEP 7, verify the following hardware items are present and undamaged:
-
Two PROFIBUS D-sub connectors with PG socket (piggy-back). Siemens MLFBs:
- 6ES7972-0BA50-0XA0 – 90° outgoing cable, with PG socket, terminating resistor switch.
- 6ES7972-0BB50-0XA0 – 35° outgoing cable, with PG socket.
- 6ES7972-0BA30-0XA0 – without PG socket (use only at network end).
- PROFIBUS violet cable (6XV1830-0EH10), twisted pair with foil + braid shield. Strip back exactly 25 mm and keep the braid pigtail as short as physically possible.
- PC Adapter USB (6ES7972-0CB20-0XA0) or CP 5611/CP 5613/CP 5711 for the engineering station.
- Terminating resistors ON at the two physical end nodes only. Slide the switch under the D-sub on the connector to "ON" – never enable it on a middle node.
- STEP 7 V5.5 SP4 or later with the HW Update for the installed CPU firmware. TIA Portal V13 SP1+ also works but the project layout described below uses classic STEP 7.
3. Network Topology
For a two-CPU MPI backbone the cable run is short (typically < 5 m on a panel) and can use one of two topologies:
Rules of thumb:
- The PG/PC MPI address must be unique and different from the two CPU addresses (default PG = 0).
- CPU default MPI address out-of-the-box is 2 on every S7-300 CPU – change the second one to 3 before connecting the bus, otherwise address collision will disable all communication.
- Do not place the PG cable directly between the two CPUs; it must attach to a piggy-back on one of the connectors, otherwise removing it drops the bus.
4. STEP 7 Project Setup
4.1 Create the project and insert the two stations
- Open SIMATIC Manager → File → New → name the project, e.g.
Two_C317_MPI. - Right-click the project → Insert New Object → SIMATIC 300 Station. Repeat twice and rename one to
Station_315and the other toStation_317. - Double-click Hardware in each station. From the hardware catalog open SIMATIC 300 → CPU 300 → CPU 315-2DP / 317-2DP → 6ES7 317-2AJ10-0AB0 / V2.6 (or whatever firmware matches the label on the CPU front). Drag it into slot 2.
4.2 Configure the MPI interface on each CPU
Select the CPU row in the hardware rack and double-click the MPI/DP entry. In the Properties – MPI interface dialog set:
| Parameter | CPU 315-2DP | CPU 317-2DP |
|---|---|---|
| Interface type | MPI | MPI |
| Address | 2 (default) | 3 |
| Highest MPI address | 31 | 31 |
| Baud rate | 187.5 kbit/s | 187.5 kbit/s |
| Subnet | Create new: MPI(1), 187.5 kbit/s | Assign to existing: MPI(1) |
Compile and download to each CPU individually first (PG connected directly to one CPU at a time, with no bus attached), before connecting them together. This avoids address-collision traps if both CPUs still sit at default address 2.
5. Configuring PROFIBUS DP Master / Slave (Alternative Path)
If the requirement is higher throughput or larger data volumes, switch the port from MPI to PROFIBUS DP. On the CPU 315-2DP acting as the slave:
- Open the CPU's MPI/DP properties → set Interface type =
PROFIBUS DP, Operating mode =DP-Slave. - Set the DP address (e.g. 4). Create or assign a PROFIBUS subnet (12 Mbit/s on CPU 317-2DP master, 1.5 Mbit/s on CPU 315-2DP master – choose the lower if the 315-2DP must also be master).
- Right-click the DP slave slot → Insert DP Master System – the editor draws the bus icon.
On the CPU 317-2DP acting as the master:
- Properties → Interface = PROFIBUS DP, mode =
DP-Master, address = 2. - Drag the previously configured DP-Slave (CPU 315-2DP, addr 4) from the catalog onto the master system line.
- Open the Configuration tab of the slave and add slot(s) for I/O exchange: typical mapping is
32 Bytes Input / 32 Bytes Outputon universal modules. Each side will have those bytes mapped into its own I-address and Q-address areas automatically.
Universal module at slot 1 with consistent length on both sides.
6. Programming the Data Exchange
For light data (a handful of words) over MPI or DP, the simplest method is the PUT/GET SFB pair, available in every S7-300 CPU from firmware V2.x onward.
6.1 PUT on the calling CPU (e.g. CPU 317, writes 8 bytes to CPU 315)
// FB call instance DB – "PUT_DB"
CALL "PUT" , "PUT_DB"
REQ := TRUE // pulse to start
ID := W#16#1 // local MPI/DP connection ID
DONE := M100.0;
ERROR := M100.1;
STATUS := MW102;
ADDR_1 := P#DB10.DBX0.0 BYTE 8; // destination: DB10 in partner
SD_1 := P#M 50.0 BYTE 8; // source: flag area in this CPU
6.2 GET on the partner CPU (CPU 315 reads 8 bytes back from CPU 317)
CALL "GET" , "GET_DB"
REQ := TRUE;
ID := W#16#1;
DONE := M200.0;
ERROR := M200.1;
STATUS := MW202;
ADDR_1 := P#DB20.DBX0.0 BYTE 8; // remote source
RD_1 := P#M 60.0 BYTE 8; // local destination
The MPI/DP connection ID 1 is reserved on every S7-300 CPU for PUT/GET if you enable Permit PUT/GET access from remote partner (router) in the CPU protection properties (default in firmware V3.x is OFF – set it to ON, otherwise STATUS = 0x8104 returns).
7. Online Access and "Accessible Nodes"
Once both CPUs are physically wired, the terminators enabled, and the MPI addresses unique:
- Plug the PG/PC adapter into the piggy-back of either connector.
- Set the PC interface: Start → SIMATIC → STEP 7 → Options → Set PG/PC Interface. Choose
PC Adapter (MPI)→ Properties → MPI address = 0, transmission rate = 187.5 kbit/s. - In SIMATIC Manager click PLC → Accessible Nodes. The bus should scan within 3–10 seconds and list every station with its address and module type.
| Visible nodes (expected) | Interpretation |
|---|---|
| Address 0, "PG" | PC adapter responding – bus and terminating resistors OK. |
| Address 2, "CPU 315-2DP" | First CPU visible. |
| Address 3, "CPU 317-2DP" | Second CPU visible – communication established. |
If only address 0 (the PG) appears, both CPUs are absent from the bus – the most common root causes are listed in §9.
8. LED Diagnostics on the CPUs
| LED | State | Meaning / Action |
|---|---|---|
| SF (red) | Off | No group fault – hardware and project match. |
| BF (red, on PROFIBUS) | On | Bus fault. Check terminating resistors, A/B lines swapped, shield not bonded. |
| BF flashing | Slave not addressed by master; check PROFIBUS address and master system assignment. | |
| RUN (green) | On | CPU in RUN – program executing, PUT/GET can run. |
| STOP (yellow) | On | CPU halted. PUT/GET will return STATUS = 0x8101. |
| DC5V (green) | On | Backplane power OK. |
9. Troubleshooting Matrix
| Symptom | Likely Cause | Fix |
|---|---|---|
| Accessible Nodes shows only PG (0) | CPU bus address collision – both still at default 2 | Connect PG to one CPU only, change address of the other to 3, download HW config, reconnect. |
| BF LED steady red on one CPU | Terminating resistor missing at one end or ON at a middle node | Enable termination only at the two physical end connectors. |
| BF LED steady red on both | A/B reversed in the cable, or shield floating | Verify pin 3 = B (green/red), pin 8 = A (red/green) on both ends with a multimeter. |
| PUT STATUS = 16#8101 | Partner CPU in STOP | Switch partner to RUN or use OP-communication. |
| PUT STATUS = 16#8104 | PUT/GET access blocked by CPU protection | CPU properties → Protection → tick "Permit PUT/GET from remote". |
| PUT STATUS = 16#8183 | Wrong connection ID or partner address | Connection ID must be identical on both sides; verify partner MPI/DP address. |
| Only one CPU appears, the other "not found" | Wrong MPI subnet chosen in HW config of second CPU | Re-open CPU properties → Interface → Subnet: assign to the same "MPI(1)" subnet created for the first CPU. |
| PG cable plugged directly between two CPUs (no piggy-back) | Removing the PG drops the bus | Use a piggy-back PROFIBUS connector (6ES7972-0BA50 or -0BB50 series). |
| Online → Accessible Nodes dialog spins forever | Baud rate mismatch on PG/PC adapter | Set PG/PC interface transmission rate to 187.5 kbit/s for MPI, or matching PROFIBUS rate for DP. |
10. Verification Checklist
- Both CPUs show no SF, no BF on the front LEDs.
- Accessible Nodes lists PG (0), CPU 315-2DP (2), CPU 317-2DP (3).
- From the SIMATIC Manager, double-click "Online" in Station_315 – the program blocks are visible. Repeat for Station_317.
- In Station_317 VAT table, force M50.0 = 1. In Station_315, observe DB10.DBX0.0 follow within one scan (PUT cycle).
- Force M200.0 in Station_315 (GET trigger). Observe M60.0 in Station_317 mirror DB20.DBX0.0.
- Cycle the power on Station_317 – the BF LED of Station_315 may flash for a few seconds during restart, then extinguish when Station_317 returns to RUN and re-joins the bus.
- Save the project to a STEP 7 archive: File → Archive → S7KProj and back up to the project server.
11. Common Configuration Pitfalls
- MPI addresses not set unique before connecting the bus. Two CPUs both at address 2 will both retreat from the bus silently; the user sees nothing, not an error.
- Terminator left ON in the middle of the bus. Causes BF on every downstream node.
- Mixing PROFIBUS cable with MPI baud rate. The cable is identical, but the PG/PC adapter baud rate setting must match what the CPUs are running. Mismatched rates return "Cannot establish connection" without an error code.
- Using STEP 7 V5.3 example project unchanged on V5.5 SP4. Some blocks (notably SFB PUT/GET) were updated in V3.x CPU firmware; always recompile the system data.
- Setting "Highest station address" too low. If you set 2 and address 3 exists, the master stops scanning past 2.
- Shield drain wire too long. The pigtail from the shield to the D-sub housing should be < 20 mm. A long pigtail acts as an antenna and corrupts the bus.
12. Going to TIA Portal
For new installations, migrating to TIA Portal V16 or later changes only the project layout, not the field wiring:
- Devices & Networks → add CPU 315-2DP and CPU 317-2DP into the same project.
- Drag an MPI subnet between them; assign addresses 2 and 3.
- Configure PUT/GET in program blocks the same way; connection IDs are now text-named.
- Download via the PG port; Online → Accessible Devices shows the same scan result.
The hardware on the panel does not change. The original STEP 7 V5.5 project can be migrated with TIA Portal → Migrate Project, then validated before being deployed.
13. Spare-Parts / Stocking List for the Field
| MLFB | Description | Qty / 10 panels |
|---|---|---|
| 6ES7972-0BA50-0XA0 | PROFIBUS connector 90°, with PG socket, terminating resistor | 25 |
| 6ES7972-0BB50-0XA0 | PROFIBUS connector 35°, with PG socket | 25 |
| 6XV1830-0EH10 | PROFIBUS cable violet, sold per metre | 200 m |
| 6ES7972-0CB20-0XA0 | PC Adapter USB A2 (MPI/DP) | 2 |
| 6GK1500-0EA02 | PROFIBUS repeater (if cable > 1000 m) | 2 |
14. FAQ
Why does my PG see only one CPU on the MPI bus when both are connected?
Almost always an MPI address collision – both CPUs still at the factory default address 2. Connect the PG directly to one CPU, change the other CPU's MPI address to 3 in STEP 7 Hardware and download. Reconnect the bus and run Accessible Nodes again.
Can I use a PROFIBUS cable between two MPI ports without enabling PROFIBUS DP mode?
Yes. The cable and connectors are physically identical for MPI and PROFIBUS DP. As long as both ports are configured as MPI in STEP 7 with the same 187.5 kbit/s rate and unique addresses (2 and 3), the violet PROFIBUS cable works fine for short MPI runs.
My BF LED is on steady and Accessible Nodes hangs. What is the first thing to check?
Terminating resistors. Exactly two – one at each physical end of the bus. Slide the switch under the D-sub to "ON" on the connector closest to the first CPU and the connector closest to the last CPU. All middle connectors must be OFF.
PUT/GET returns STATUS W#16#8104 even though the partner is in RUN. What is wrong?
CPU protection in firmware V3.x disables PUT/GET by default. Open the CPU properties in STEP 7, go to the Protection tab, and tick "Permit PUT/GET access from remote partner (router)". Download the new hardware configuration.
Do I need a repeater between two S7-300 CPUs that are only 10 m apart?
No. At 187.5 kbit/s the maximum segment length is 50 m; at 12 Mbit/s PROFIBUS DP it is 100 m. A 10 m cabinet link needs only two PROFIBUS connectors, the cable, and terminators ON at each end. Add a repeater only if the total bus length exceeds the segment limit or you need to isolate an electrically noisy section.