Configuring S7-300 PROFIBUS with a Local PLC and ET200M: Three Field-Proven Architectures
When a SIMATIC S7-300 is the central controller of a PROFIBUS DP segment that already carries an ET200M remote I/O station and a second (local) PLC, the engineer faces an early architectural decision: is the additional PLC a DP master, a DP slave, or a peer that exchanges S7-connection data? Each role is technically possible, but only two of them work without adding a communications processor to the S7-300, because the integrated MPI/DP interface of the CPU itself supports only the PROFIBUS DP protocol. This reference compares the three production-proven architectures - DP/DP Coupler, S7 connection via CP 342-5, and direct DP slave mode - and shows the STEP 7 and TIA Portal configuration steps, diagnostic addresses, and field-validated error recovery for each.
1. The Three Integration Architectures at a Glance
| Architecture | Role of the Local PLC | Required Additional Hardware | Programming Effort | Max Data Per Cycle |
|---|---|---|---|---|
| A - DP/DP Coupler | DP master (independent of S7-300) | 6ES7158-0AD01-0XA0 | None (GSD-driven) | 244 bytes in / 244 bytes out per direction |
| B - S7 connection via CP 342-5 | DP master OR S7 server | CP 342-5 in S7-300 rack | AG_SEND / AG_RECV in S7-300 user program | 240 bytes per job, 16 jobs per CP |
| C - Local PLC as DP slave | DP slave of S7-300 | None if the local PLC has a DP port | None in local PLC; HW Config only in S7-300 | 244 bytes in / 244 bytes out |
Selection rule: choose A when both controllers are masters of their own segments and no S7-300 hardware change is permitted; choose B when high flexibility, S7 functions, and the ability to make the local PLC a DP master for further ET200 stations are required; choose C when the local PLC is a simple data concentrator and the S7-300 retains full bus mastership.
2. Prerequisites
2.1 Hardware
- SIMATIC S7-300 with free backplane slot for an optional CP 342-5 (Architectures A and C do not require this slot; Architecture B does).
- ET200M distributed I/O, for example IM 153-1 (6ES7153-1AA03-0XB0) or IM 153-2 High Feature (6ES7153-2BA10-0XB0), with signal modules (SM 321/322/331/332).
- Local PLC with PROFIBUS DP interface, for example S7-300 CPU 315-2DP, S7-400 CPU 414-3DP, S7-1200 with CM 1243-5 (6GK7243-5DX30-0XE0), ET200S IM 151-1 with PROFIBUS, or a third-party controller with PROFIBUS-DP slave or master capability.
- PROFIBUS cable (violet, 2-wire, shielded) and PROFIBUS connectors (6ES7972-0BA52-0XA0 with PG socket, or 6ES7972-0BB52-0XA0 without).
- Active PROFIBUS terminator at both segment ends. Connectors with built-in terminating resistor: 6ES7972-0DA00-0AA0 (90 degree outlet) or 6ES7972-0DB00-0AA0 (35 degree outlet). Switch ON at both ends only.
- 24 V DC power supply sized for the DP/DP Coupler, the IM 153 power segment, and the local PLC interface.
2.2 Software
- STEP 7 V5.5 + SP2 (or later) with optional HSP for older CP/IM variants; or TIA Portal V15.1 and later with STEP 7 Professional.
- GSD file for the DP/DP Coupler, e.g.
SIEM811D.GSDfrom the Siemens support site. The current GSD is delivered as a compressed archive; unzip before installing. - For S7-1200/S7-1500 as the local PLC: GSD or HSP for the S7-300 / CP 342-5 station.
2.3 PROFIBUS Parameters Common to All Three Architectures
| Parameter | Typical Value | Notes |
|---|---|---|
| Transmission rate | 1.5 Mbps | Standard; 12 Mbps requires repeaters after 100 m |
| Bus profile | DP | Not "Universal (DP/FMS)" unless FMS services are required |
| Highest PROFIBUS address | 126 | Use sparingly to keep bus scan time low |
| Slot time (Tsl) | auto | Allow STEP 7 to compute |
| Min. slave interval (Tsm) | auto | STEP 7 uses 1 ms for ET200M |
| Max repeater hops | 9 | Includes diagnostic repeater |
| Segment length at 1.5 Mbps | 200 m | 1200 m at 9.6 kbps; 100 m at 12 Mbps |
3. Architecture A - DP/DP Coupler Between Two DP Masters
The DP/DP Coupler (6ES7158-0AD01-0XA0) is a two-port gateway that connects two electrically isolated PROFIBUS DP segments and copies input/output data between them. From the perspective of the S7-300 and the local PLC, the coupler behaves like a DP slave on each side. This means both controllers can remain masters of their own bus without losing bus mastership, and no programming inside the coupler is required. Two PROFIBUS masters can therefore exchange up to 244 bytes in each direction without an S7-300 slot change. Refer to the DP/DP Coupler manual (Siemens support entry 14065216) for the full device description.
3.1 Working Principle
When the S7-300 writes the configured output bytes to its logical DP slave slot, the coupler copies them to the local PLC's input image. The local PLC reads those bytes as standard DP input data and can mirror outputs back through the same coupler to the S7-300. The transfer is one-to-one and cyclic; no acyclic data is exchanged.
3.2 Hardware Setup
- Mount the DP/DP Coupler on a 35 mm DIN rail close to the S7-300 rack to keep the 24 V supply cable short.
- Wire 24 V DC to terminals 1 (L+) and 2 (M). Power consumption is approximately 250 mA; supply voltage range is 19.2 - 28.8 V DC.
- Connect PROFIBUS segment 1 (S7-300 side) to the upper D-sub (X1), segment 2 (local PLC side) to the lower D-sub (X2). Use PROFIBUS connectors with terminating resistor ON at the physical ends of each segment only.
- Set the rotary address switch on each side to a unique PROFIBUS address; conventional choice is 33 (S7-300 side) and 34 (local PLC side). The address must not conflict with any other DP node on that segment.
3.3 STEP 7 Classic Configuration
- Install the GSD file: Options > Install GSD File, then point to
SIEM811D.GSD. After installation, the DP/DP Coupler appears under PROFIBUS DP > Other Field Devices > Coupler > Siemens AG > DP/DP Coupler. - Drag the DP/DP Coupler onto the S7-300 PROFIBUS subnet and assign PROFIBUS address 33.
- Open the coupler object properties and configure the slot. Add a universal module of type DP/DP Coupler (1 slot, 244 bytes I / 244 bytes O) for one side. For bidirectional traffic, add the same module on a second slot with reversed I/O direction; this represents the second PROFIBUS segment.
- Assign I and Q addresses in the S7-300. Default starting address is 0; the address range is reserved from the process image and excluded from the standard bit memory / peripheral area overlap.
- Download the HW Config to the S7-300 CPU. Always download the connection table (NetPro) separately if a separate CP is in use.
3.4 Local PLC Configuration (S7-300 as Local PLC Example)
- In the local PLC's STEP 7 project, install the same
SIEM811D.GSDfile. - Insert the DP/DP Coupler onto the local PROFIBUS subnet at address 34.
- Configure the module slot with the complementary I/O direction to the S7-300 side. The byte counts must match exactly; STEP 7 will warn if the lengths differ.
- Download the HW Config to the local CPU.
3.5 Data Verification
Open Monitor/Modify in STEP 7 on the S7-300, set the trigger address to the process-image output range of the DP/DP Coupler, and force a known pattern (e.g. 0xAA55). On the local PLC, monitor the corresponding input bytes - they must match. Reverse the test to confirm both directions. A bus tester connected at the segment terminator (e.g. Softing BC-600-PB) reports telegram count and amplitude for both segments.
4. Architecture B - S7 Connection via CP 342-5 (Recommended)
The S7-300 onboard DP interface cannot terminate an S7 connection, but the CP 342-5 communications processor can. The CP supports up to 16 S7 connections in parallel and provides FB-style function calls (AG_SEND, AG_RECV) that are downloaded automatically with the CP firmware into the S7-300 CPU at the FBs tab of the library. The local PLC, being an S7-class controller, exposes its full data range (DBs, M, I, Q) through a single S7 connection, which is far more flexible than a fixed-size DP slot. The S7 connection is the cleanest path when both stations need symmetric read and write access.
4.1 CP 342-5 Variants
| Order Number | Description | Firmware |
|---|---|---|
| 6GK7342-5DA01-0XE0 | CP 342-5, basic DP master/slave + S7 | Up to V5.0 |
| 6GK7342-5DA02-0XE0 | CP 342-5, with 2 DP interfaces | V5.4 and later |
| 6GK7342-5DA03-0XE0 | CP 342-5 FO, with fiber-optic DP interface | V6.0 |
The CP 342-5 occupies 16 bytes of input and 16 bytes of output in the S7-300 backplane, regardless of configuration. Reserve this I/O range before assigning process I/O. The full manual is available at Siemens support entry 14065216 (CP 342-5 manual).
4.2 Hardware Insertion
- Power down the S7-300, plug the CP 342-5 into a free slot (slot 4 to 11 typical, slot 3 reserved for IM, slot 0/1 reserved for the rack and power supply).
- Connect the CP's PROFIBUS connector to the same segment as the ET200M IM 153 and the local PLC's DP interface, or to a separate segment connected via a repeater.
- Set the CP's PROFIBUS address via the rotary switch on the front panel; common choice is 4 (CPU default is 2, ET200M default is 3).
4.3 STEP 7 Configuration of the S7 Connection
- In HW Config, insert the CP 342-5 from the catalog at the chosen slot. Open its object properties, switch the operating mode to DP master (or DP slave if required) and set the PROFIBUS address.
- In NetPro (or Configure Network), right-click the CP 342-5 and choose Insert New Connection > S7 Connection. The partner can be:
- An unspecified S7 partner (enter the partner PROFIBUS address and the partner's connection resource, e.g. 04).
- A specific S7 station already in the project (preferred - NetPro validates rack/slot and reduces the chance of an address mismatch).
- Confirm the connection is established by clicking Status in NetPro; it should show the local ID (e.g. 1) and the partner ID.
- Download the HW Config and the connection table to the CPU; both are required for S7 connections to become active.
4.4 User Program in the S7-300 (Structured Text Example)
The S7-300 user program calls AG_SEND and AG_RECV to drive the S7 connection. These FBs are shipped with the CP 342-5 and must be present in the project (look under Library > Standard Library > Communication Blocks > CP 342-5).
// S7-300, OB1 cycle - send 10 bytes from DB10 to local PLC and read 10 bytes back into DB20
CALL FB 8, DB 8 // AG_SEND
ID := 1 // Local ID from NetPro
LADDR := W#16#100 // Diagnostic address of the CP 342-5 (from HW Config)
SEND := P#DB10.DBX0.0 BYTE 10
LEN := 10
DONE := M50.0
ERROR := M50.1
STATUS := MW52
CALL FB 9, DB 9 // AG_RECV
ID := 1
LADDR := W#16#100
RECV := P#DB20.DBX0.0 BYTE 10
NDR := M60.0
ERROR := M60.1
STATUS := MW62
LEN := MW64
For variable-length payloads up to 240 bytes, monitor the LEN output of AG_RECV to determine how many bytes arrived in the current cycle. For larger payloads, use AG_LSEND (FB 50) and AG_LRECV (FB 60) which support up to 8192 bytes per job and add 4 bytes of protocol header overhead. See the S7 communication with CP 342-5 FAQ (entry 6518822) for additional patterns.
4.5 Local PLC Setup (S7-1200 Example)
An S7-1200 cannot be a PROFIBUS master, but the CM 1243-5 (6GK7243-5DX30-0XE0) makes it a DP slave. To accept an S7 connection from the CP 342-5 in this configuration, route through the S7-300 as DP master, or use a PROFINET S7 connection with a CPU 315-2PN/DP on the central side. The cleanest path remains Architecture A (DP/DP Coupler) when an S7-1200 is the local PLC and no slot is available for a CP 343-1 on the S7-300.
4.6 Error Recovery from STATUS Codes
| STATUS (Hex) | Meaning | Field Action |
|---|---|---|
| 0000 | No error | - |
| 0x0E01 / 0x0E02 | Connection aborted, partner not reachable | Check PROFIBUS cable, terminator, partner address |
| 0x1A01 | Local resource missing | Increase number of S7 connections on CP 342-5 |
| 0x7000 / 0x7001 | No job active / job running | Informational; clear after DONE / NDR |
| 0x80B1 | Length > 240 bytes for AG_SEND/AG_RECV | Reduce LEN to ≤ 240 or switch to AG_LSEND/AG_LRECV |
| 0x80C3 | Connection not yet established | Wait for first status 0x7001 from partner |
5. Architecture C - Local PLC as DP Slave
When the local PLC is electrically and logically a slave on the S7-300 PROFIBUS segment, the configuration is the simplest of the three. The S7-300 CPU keeps bus mastership, the local PLC is a passive data concentrator, and no extra hardware is required. The local PLC must support DP slave operation; S7-300 CPUs with a single DP port (e.g. CPU 313C-2DP) and S7-1200 with CM 1243-5 qualify.
5.1 Configuration in HW Config
- Open the GSD/HSP for the local PLC type (S7-300 CPU as DP slave uses the standard Siemens DP slave GSD; S7-1200 with CM 1243-5 uses SLAVE_1200.GSD or a TIA Portal HSP).
- Drag the slave onto the S7-300 PROFIBUS subnet and assign an address (typical 5).
- Insert the universal DP slave module and configure up to 32 slots of inputs/outputs. Total length: 244 bytes in / 244 bytes out.
- Download HW Config to the S7-300.
5.2 Local PLC Setup
The local PLC's DP interface is configured as DP slave, with the slot/I/O definitions mirrored from the S7-300's HW Config. The S7-300 becomes the only bus master; the local PLC must not initiate any PROFIBUS traffic of its own. If the local PLC is an S7-300, the DP port is set to DP slave in its own HW Config and the slot table is uploaded or manually entered. The S7-300 master then downloads it as the GSD-equivalent description.
6. TIA Portal Equivalent (V15.1 and Later)
TIA Portal supports all three architectures, but the navigation differs. Open Devices & Networks, drag the S7-300 with CP 342-5 (if used) and the local PLC onto the network view, draw a PROFIBUS subnet between them, and configure the DP/DP Coupler via Catalog > Other Field Devices after importing the GSD. For S7 connections, right-click the CP 342-5 and choose Properties > S7 Connections. The system handles NetPro-equivalent steps automatically; the resulting connection block (PUT/GET) can be inserted directly into the S7-300 user program.
7. Diagnostics and Verification
7.1 LED States
| Device | LED | State | Meaning |
|---|---|---|---|
| CP 342-5 | SF | Red | Group fault, see diagnostic buffer |
| CP 342-5 | RUN | Green flashing | CP starting |
| CP 342-5 | RUN | Green steady | CP ready |
| DP/DP Coupler | ON | Green | 24 V present |
| DP/DP Coupler | X1 / X2 | Green | Side active on bus |
| IM 153-1 | SF | Red | Module diagnostic pending |
| IM 153-1 | BF | Red flashing | PROFIBUS telegram errors |
7.2 Online Diagnostics in STEP 7
- Open the S7 project online (target system > online).
- Right-click the CPU and choose Module Information. The Communication tab lists the active S7 connections and their status.
- Right-click the DP/DP Coupler or DP slave and choose DP Slave Diagnostics. The hex error code 0x0F (station failure) indicates a wiring or address conflict; 0x0E (station reserved) indicates a duplicate address.
7.3 Bus Scan with PROFIBUS Tester
A PROFIBUS bus tester (e.g. Softing BC-600-PB or Siemens BT 200) connected at the segment terminator reports signal level, slave list, and telegram quality. Acceptable amplitude at 1.5 Mbps is 3.3 V peak-to-peak minimum on the differential signal; anything below 1.0 V indicates a short or terminator issue. Repeats of telegrams or bus errors are logged with timestamp and slave PROFIBUS address, which makes isolating marginal nodes straightforward.
8. Comparison and Selection Guide
| Criterion | A - DP/DP Coupler | B - CP 342-5 + S7 | C - Direct DP Slave |
|---|---|---|---|
| Local PLC role | DP master | S7 server or DP master | DP slave |
| Hardware added to S7-300 | None | CP 342-5 in slot 4-11 | None |
| Programming effort | Low (GSD only) | Medium (AG_SEND/AG_RECV in S7-300) | Low (HW Config only) |
| Bidirectional data | Yes (mirrored) | Yes (independent jobs) | Yes (mirrored) |
| Maximum payload per cycle | 244 + 244 bytes | 240 bytes per job, 16 jobs | 244 + 244 bytes |
| Bus mastership | Both sides | S7-300 only (CP is a master on its subnet) | S7-300 only |
| Allows further ET200 on local PLC | Yes | Yes | No (local PLC is a slave) |
| Time to wire up | ~30 min | ~2 h including FBs | ~20 min |
| Cost delta (relative) | 1.0x (coupler only) | 1.8x (CP + coupler slot) | 0.9x (GSD only) |
Recommended path. For a brownfield installation where the S7-300 has no free slot, Architecture A is the lowest-risk option. For a new build where flexibility matters, Architecture B is the most maintainable. Architecture C is the right choice only when the local PLC is genuinely a data concentrator and no further expansion is anticipated.
9. Troubleshooting Matrix
| Symptom | Probable Root Cause | Verification Step | Fix |
|---|---|---|---|
| SF on CP 342-5 after download | Connection table not downloaded | Right-click the connection in NetPro, choose Status | Download the connection table separately from HW Config |
| DP/DP Coupler: X1 green, X2 off | No master on X2 segment | Check partner PLC DP port | Bring up local PLC, check its bus master state |
| ET200M IM 153 SF on | Missing or mismatched module | Open the IM 153 in HW Config, compare slot table | Realign module order in the ET200M rack |
| AG_SEND STATUS 0x0E01 | Partner not reachable | Check CP and partner PROFIBUS addresses | Verify PROFIBUS cable and terminator |
| AG_RECV NDR never sets | Partner does not call BSEND | Test with a forced value in the partner DB | Add BSEND call in partner program |
| Duplicate address SF on local PLC | Same PROFIBUS address as another slave | Online > Accessible Nodes | Re-address one node, re-power the segment |
| Bus scan reports > 30 telegram errors/min | EMI or missing shield termination | Inspect cable shield grounding | Clamp shield on both ends through PROFIBUS connector |
| Connection in NetPro shows Status=Online but data is frozen | Partner CPU in STOP | Check partner CPU RUN LED and mode switch | Switch partner to RUN or re-trigger S7 connection from the partner |
10. Field Commissioning Checklist
- Verify 24 V DC at every node; voltage drop on long runs should be < 5 percent (i.e. > 22.8 V at the last node).
- Set PROFIBUS addresses manually; document them on the cabinet drawing.
- Enable terminating resistor on the two physical ends of each segment only. Middle nodes must have the resistor OFF.
- Download HW Config first, then the connection table (NetPro).
- Force a known pattern at the S7-300 end and verify it on the local PLC; reverse the test.
- Save the S7 project to the Memory Card for portability and audit trail.
- Record the diagnostic buffer snapshot at commissioning for future reference.
- Cap each unused PROFIBUS connector PG socket to keep the bus clean of accidental shorts.
11. Frequently Asked Questions
Can the S7-300 onboard DP interface establish an S7 connection to a local PLC?
No. The integrated MPI/DP interface of any S7-300 CPU supports only PROFIBUS DP master or DP slave, not S7 communication services (PUT, GET, BSEND, BRCV). Use a CP 342-5 in the S7-300 rack for S7 connections, or migrate the application to PROFINET with a CPU 315-2PN/DP (6ES7315-2EH13-0AB0).
What is the maximum data length per cycle between an S7-300 and a local PLC?
Via DP/DP Coupler (6ES7158-0AD01-0XA0): 244 bytes input and 244 bytes output per direction. Via CP 342-5: 240 bytes per AG_SEND/AG_RECV job, with up to 16 concurrent S7 connections per CP. Beyond 240 bytes, use AG_LSEND/AG_LRECV for large payloads up to 8192 bytes per job.
Do I need to write a program in the DP/DP Coupler?
No. The DP/DP Coupler is a hardware gateway that copies input bytes from segment A to output bytes of segment B and vice versa. Configuration is done entirely in HW Config by importing the GSD file SIEM811D.GSD and dragging the device onto both PROFIBUS subnets. No program block is required in either controller beyond the standard I/O access.
How do I find the correct LADDR for the CP 342-5 in the user program?
Open HW Config, double-click the CP 342-5, and read the diagnostic address in the properties dialog (default 1022 decimal, i.e. 0x3FE). Pass this value to the LADDR input of AG_SEND/AG_RECV. In TIA Portal, the value appears in the device view under Properties > Diagnostic addresses. Some projects shift the CP to slot 4 to keep the address aligned on a word boundary.
What happens if both DP segments use the same PROFIBUS address on the DP/DP Coupler?
The coupler will not come online on either segment, and the master will report 0x0E (station reserved) or 0x0F (station failure) in the diagnostic buffer. Set the rotary switch on each side of the coupler to a unique address. A duplicate address is a hard bus fault that requires re-powering the affected segment to recover. Reserve a dedicated address range (for example 30-40) for the DP/DP Coupler to keep address planning clear.