Overview
This reference covers a recurring integration scenario in SIMATIC PCS 7 plants: a central S7-416-3DP master controller (programmed in PCS 7 V8.x/V9.x with STEP 7 V5.x) must exchange process data with two S7-315-2DP package-unit controllers that were engineered by a third-party vendor as standalone STEP 7 V5.x projects. The link must be established through a CP 342-5 PROFIBUS communication processor on the S7-300 side — not through the integrated DP port of the CPU and not through a DP/DP coupler. Because the package-unit projects are owned by the vendor, the integrator cannot edit them; instead the PCS 7 engineer must build a surrogate representation of each S7-300 station inside the PCS 7 master project using the GSD file of the CP 342-5, then bind the real slaves through their physical PROFIBUS address.
The resulting topology is a mono-master PROFIBUS DP segment where the S7-416-3DP acts as Class 1 DP master and each CP 342-5 acts as a DP slave with its own allocated I/O area in the master. Application data is moved between the S7-300 user program and the CP 342-5 using the FC1 DP_SEND / FC2 DP_RECV / FC50 DP_DIAG library functions shipped with the SIMATIC NET CP 300 software. The cross-project boundary is handled by mapping the surrogate S7-300 station onto the same hardware configuration as the real package unit (CPU order number, CP 342-5 order number, PROFIBUS address, slot/chassis layout) so that the cyclic I/O image of the slave lines up with the data buffers inside the CP.
Prerequisites
-
Hardware
- 1 × S7-416-3DP (6ES7 416-3XR05-0AB0 or compatible) with integrated DP master port (X2). The DP master interface must be configured with an active PROFIBUS line (default baud rate 1.5 Mbps; 12 Mbps is supported but sensitive to cable length and stub branches).
- 2 × S7-315-2DP (e.g. 6ES7 315-2AH14-0AB0) — the package-unit controllers. The integrated DP port of the 315-2DP is not used in this scenario.
- 2 × CP 342-5 (6GK7 342-5DA02-0XE0 for DP master/slave; 6GK7 342-5DF00-0XE0 for the FO variant) installed in the S7-300 rack of each package unit. The CP must sit on a supported slot (slots 4–11 on the S7-300 rack, slot 0 reserved for the CPU, slots 1–3 reserved for IM/PS).
- PROFIBUS DP cable (Siemens 6XV1 830-0EH10 or equivalent), PROFIBUS connectors with terminating resistor (6ES7 972-0BA12-0XA0) on both ends of the segment, and bus terminators enabled only at the two physical ends.
- 24 V DC supply for the CP 342-5 (the CP draws approximately 250 mA from the S7-300 backplane plus the 24 V load on the bus connector; total CP load is documented in the CP 342-5 manual as 5.5 W typical).
-
Software
- STEP 7 V5.5 + SP4 (or higher) with the SIMATIC NET CP 300 library installed on the engineering station used to program the package units. The CP library installs as SIMATIC_NET_CP on the library tab and provides FC1/FC2/FC50.
- PCS 7 V8.2 SP1 (or V9.0/V9.1) on the master engineering station. The PCS 7 master project can be opened in classic STEP 7 V5.5 for low-level networking edits even if the bulk of the program lives in the PCS 7 plant view.
- GSD file for CP 342-5:
SIEM81AB.GSD(DP master/slave CP) orSIEM81AF.GSD(FO variant). The GSD ships with STEP 7 in...\S7WBX\S7DATA\GSD\; if the file is missing, install the SIMATIC NET CD that accompanies the CP. - Vendor-supplied PROFIBUS address list for the two CP 342-5 nodes and the slave I/O slot layout. Without this, the surrogate station in the PCS 7 project cannot be aligned with the real hardware.
Topology and Addressing
The PROFIBUS segment carries a single DP master and two DP slaves. Default PROFIBUS addresses used in this reference:
| Station | Hardware | PROFIBUS Address | Role |
|---|---|---|---|
| PCS 7 master | S7-416-3DP, integrated DP port (X2) | 2 | DP master (Class 1) |
| Package unit A | CP 342-5 (6GK7 342-5DA02) | 3 | DP slave |
| Package unit B | CP 342-5 (6GK7 342-5DA02) | 4 | DP slave |
Master-Side Configuration (PCS 7 / S7-400 Project)
The objective on the master side is to simulate the S7-300 package-unit station inside the PCS 7 project so that the DP master view contains a fully defined slave with I/O slots. Once this surrogate is compiled and downloaded, the physical CP 342-5 (address 3 or 4) will exchange data with the surrogate because the byte layout matches.
- Open the PCS 7 project in STEP 7 V5.5 (right-click the project → Open in STEP 7 if you started from the PCS 7 plant view).
- In the SIMATIC Manager, select the S7-400 station and open Hardware. Confirm that the integrated DP port of the 416-3DP has a PROFIBUS subnet with master capability enabled and that the subnet baud rate matches the real cable plant.
- Install the CP 342-5 GSD if not already present: Options → Install GSD File → point to
SIEM81AB.GSD. After installation, the CP appears in the hardware catalog under PROFIBUS DP → Other Field Devices → I/O → CP 342-5. - Insert a new SIMATIC 300 station in the PCS 7 project (Project → Insert New Object → SIMATIC 300 Station). This station is a placeholder for the vendor's package unit and will not be downloaded; it exists only to host the surrogate PROFIBUS configuration.
- Open HW Config on the placeholder S7-300 station. Build a rack that mirrors the real package unit: insert a PS 307, the real CPU 315-2DP order number, and the CP 342-5 (same order number as on-site) in the same slot. Do not mark the rack for download.
- Drag the CP 342-5 from the catalog onto the PROFIBUS subnet of the S7-400 station. STEP 7 prompts for a slave address — assign 3 for package A and 4 for package B (these must match the DIP switches on the physical CP).
- Configure the CP as a DP slave: Properties → Operating Mode → DP Slave. Activate the desired slot configuration. The CP 342-5 supports up to 32 slots in DP slave mode and each slot can carry 1–16 bytes of consistent data. A typical configuration is:
Slot 0: 4 bytes input / 4 bytes output (diagnostic + handshake)
Slot 1: 16 bytes input / 16 bytes output (process data)
Slot 2: 32 bytes input / 32 bytes output (extended process data) - Note the I/O addresses STEP 7 assigns to each slot (e.g. PI 256…271 / PQ 256…271). The S7-400 user program reads from / writes to these addresses; the PROFIBUS stack automatically mirrors them to the physical CP 342-5.
- Compile and download only the S7-400 station (the S7-300 placeholder stays local).
Slave-Side Configuration (S7-300 Vendor Project)
The vendor's STEP 7 project on the package-unit side must be edited so that the CP 342-5 acts as a DP slave matching the surrogate built above. Because the project is owned by the vendor, request that they apply these changes — or, with their approval, edit it under change-control.
- In HW Config of the vendor project, place the CP 342-5 on the S7-300 rack at the same slot as the physical hardware. Open Properties → PROFIBUS Interface and set the address to 3 (or 4) with the same baud rate as the master subnet.
- Set the CP operating mode to DP Slave. Under DP Slave Properties, define the same slot/byte layout that was configured in the master surrogate. STEP 7 will then generate matching FC1/FC2 symbol names automatically (e.g.
SEND_DB,RECV_DB). - Wire the S7-300 user program to the CP using the SIMATIC NET CP library. The minimum call interface is:
The byte count inCALL "DP_SEND" // FC1 CPL_ADDR := W#16#100, // logical CP address (default 256) SEND := P#DB100.DBX0.0 BYTE 32, DONE := M10.0, ERROR := M10.1, STATUS := MW12 CALL "DP_RECV" // FC2 CPL_ADDR := W#16#100, RECV := P#DB101.DBX0.0 BYTE 32, NDR := M11.0, ERROR := M11.1, STATUS := MW14SEND/RECVmust equal the sum of the configured output/input slot lengths on the CP. - Compile and download the S7-300 project. After download the CP 342-5 enters data exchange and the SF/BF LEDs on the CP should both be OFF.
Cross-Project Data Mapping
Because the two STEP 7 V5.x projects are physically separate, there is no shared symbol table. The mapping between the S7-400 and S7-300 must be documented in a hand-written interface list. The official Siemens procedure for cross-project CPU-to-CPU configuration in STEP 7 V5.x is documented in Siemens Support Entry 19449428, which uses the same GSD-based surrogate technique described above.
| Master surrogate slot | Direction | Master I/O address | S7-300 DB / offset | Content (example) |
|---|---|---|---|---|
| Slot 0 | Input (slave → master) | PIW 256…263 | DB101.DBX 0.0…7.7 + DBW 2 | Diagnostic word + handshake bits |
| Slot 0 | Output (master → slave) | PQW 256…263 | DB100.DBX 0.0…7.7 + DBW 2 | Command word + handshake bits |
| Slot 1 | Input | PIW 272…303 | DB101.DBW 4…34 | Process measurements |
| Slot 1 | Output | PQW 272…303 | DB100.DBW 4…34 | Process setpoints |
Maintain a change log on the interface document because any reallocation of bytes in either project will silently desynchronise the data without raising an error.
PCS 7 Industry Library Path
If the package units are operated panels (HMI) rather than pure controllers, PCS 7 V8.2 SP1 and later provides the PCS 7 Industry Library blocks IPL_Pckg / IPL_PckgDi that wrap a PROFIBUS-coupled S7-300 station into a PCS 7-compatible asset shell. The library registers the surrogate station with the PCS 7 asset hierarchy and exposes the slave on the OS faceplate. Configuration path: PCS 7 Plant View → Insert Package Unit → SIMATIC 300, then point the wizard at the surrogate HW Config you built in Section 3. The Industry Library workflow is covered in the PCS 7 Industry Library manual (entry ID 109751706 on the Siemens support portal).
Commissioning and Verification
- Power up the S7-400 first, then the S7-300 stations. The CP 342-5 SF (system fault) and BF (bus fault) LEDs must be OFF once the master has cycled.
- On the S7-400, open HW Config → PROFIBUS → Diagnostics → Operating Mode. The two slaves at addresses 3 and 4 must appear in the list with status Data Exchange.
- In the S7-400 online view, force a known pattern into the surrogate output bytes (e.g.
PQW 256 = W#16#AA55) and read back the corresponding input byte at the S7-300 using a VAT table on the vendor project. - Watch the FC2
NDRbit on the S7-300. A rising edge confirms that new data has been copied from the CP receive buffer into the destination DB. A persistentERRORwithSTATUS = W#16#0001indicates no data exchange yet; check cabling and PROFIBUS address matching. - On the PCS 7 OS, open the package-unit faceplate. Live values from the S7-300 must update at the configured refresh rate (default 1 s for the Industry Library). If the faceplate shows No communication, the surrogate station is missing from the PCS 7 project or the slot layout does not match.
Troubleshooting Matrix
| Symptom | Likely root cause | Diagnostic step | Corrective action |
|---|---|---|---|
| BF LED on CP 342-5 steady ON | No PROFIBUS telegram, broken cable, wrong address | Check terminating resistor at both line ends; verify CP DIP switches vs. HW Config address | Re-terminate segment, re-set address, replace PROFIBUS connector |
| BF LED flashing | Master does not include this slave in its poll list | Master HW Config → DP slave list → confirm CP address is present and active | Re-run HW Config on master, recompile and download S7-400 station |
| SF LED on CP 342-5 ON, BF OFF | Slot length mismatch between master surrogate and slave | Compare byte count in master slot configuration vs. FC1/FC2 SEND/RECV length on slave | Realign slot layout on both sides; recompile both projects |
| FC1 STATUS = W#16#8001 | CP has not yet completed startup, OB100 not run | Check CPU RUN LED and CP startup LED sequence | Perform CP restart via HW Config online, verify OB100 on S7-300 is present |
| FC2 ERROR + STATUS = W#16#0010 | CP receive buffer overflow | Confirm master is sending at the configured cycle time | Reduce slot count or raise master DP cycle time |
| Surrogate station visible in HW Config but no data on OS | PCS 7 master project not regenerated after HW Config download | Check S7-400 connection in NetPro | Re-compile OS, run WinCC Explorer Tag Export/Import |
| Intermittent communication dropouts | EMC, missing shield grounding, baud rate too high for cable length | PROFIBUS diagnostics with BT 200 or oscilloscope on the DP line | Lower baud rate to 1.5 Mbps, add equipotential bonding, replace damaged cable |
Edge Cases and Field-Proven Caveats
-
Surrogate drift — when the vendor later upgrades the S7-300 CPU order number (for example from
6ES7 315-2AH14to6ES7 315-2FJ14), the surrogate station in the PCS 7 project still references the old part. The PROFIBUS exchange is unaffected because the GSD identity is on the CP, not the CPU, but the symbol layout in the vendor project may change. Re-issue the interface document whenever the vendor cuts a new release. - Multiple masters — the CP 342-5 in DP slave mode can serve only one Class 1 master per port. If another master exists on the same physical segment, use a DP/DP coupler (which is excluded from this scenario) or split the segment.
- CP 342-5 firmware — minimum firmware V3.0 is required for the slot configuration shown above; older firmware supports only fixed 32-byte windows. Check HW Config → CP 342-5 → Module Information → Firmware. The current firmware shipped with the CP is V5.2 as of CP 342-5DA02 production.
- STEP 7 V5.x vs. TIA Portal — the master surrogate method described here works only in STEP 7 V5.x. TIA Portal's "Insert as PROFINET/PROFIBUS device" with GSD uses a different proxy concept. If the PCS 7 project is migrated to PCS 7 V9 with TIA Portal Engineering, the GSD import path moves to Options → Manage GSD files in the TIA Portal device view.
- PROFIBUS vs. PROFINET — PROFIBUS is a peripheral bus for distributed I/O, drives, and third-party DP slaves. It is not the protocol used for CPU-to-CPU application messaging at the S7 protocol level (S7 communication uses ISO-on-TCP, S7 Communication, or PUT/GET). The GSD-slave approach used here exchanges process I/O, not S7 connections. For pure CPU-to-CPU data exchange, S7 communication over Industrial Ethernet is preferred.
Safety and PCS 7 Operational Considerations
Even though PROFIBUS DP slave communication is non-safety by default, PCS 7 plants frequently route the package-unit data through the central safety controller. If the package units implement PROFIsafe on the same CP 342-5, the surrogate station must declare the safety slots and the master CPU must be the PROFIsafe host (F-CPU, e.g. S7-416F-3). The CP 342-5 does not support PROFIsafe in DP slave mode; use a CP 343-2 or F-CPU integrated port instead. Mixing non-safe process data and PROFIsafe on the same CP is not permitted per IEC 61784-3.
FAQ
Can I use the integrated DP port of the S7-315-2DP instead of the CP 342-5?
Yes, but only if the project scope allows editing the vendor's S7-300 configuration. The integration then uses the CPU's own GSD (SIEM300B.GSD family) and the procedure is identical to the CP 342-5 method described in this article. The CP 342-5 is preferred when the vendor has already engineered the package with the CP, when consistent data > 4 bytes is required, or when the S7-300 CPU variant on site has no DP port.
How do I import the CP 342-5 GSD file into STEP 7 V5.x?
Copy SIEM81AB.GSD into ...\S7WBX\S7DATA\GSD\, then in HW Config choose Options → Install GSD File. After installation the CP appears under PROFIBUS DP → Other Field Devices → I/O → CP 342-5 in the hardware catalog. Restart HW Config if the entry does not appear immediately.
What is the maximum amount of consistent data I can transfer per slot?
With CP 342-5 firmware V3.0 or higher, each DP slot can carry up to 16 bytes of consistent data. For larger payloads use multiple slots. Total consistent data per slave is limited to 244 bytes input + 244 bytes output, distributed across a maximum of 32 slots. The slave-side FC1/FC2 interface treats the data as a single contiguous buffer, so the slot layout must be planned top-down.
Why does the surrogate S7-300 station in the PCS 7 project refuse to download?
0x01FE because the target system is the local PC, not a real PLC.Where can I find the official Siemens documentation for this procedure?
The reference procedure is published in Siemens Support Entry 19449428. The CP 342-5 function block manual and the PCS 7 Industry Library manual (entry ID 109751706) cover the slave-side programming and the PCS 7 integration shell, respectively. For background on the PROFIBUS protocol itself see the Siemens SIMATIC NET PROFIBUS manual (entry ID 8775553).