PC to S7-300 PROFIBUS Communication: CP5611 CP5622 Setup Guide

David Krause14 min read
ProfibusSiemensTutorial / 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

Overview

Connecting a PC to a SIMATIC S7-300 PLC over PROFIBUS is the traditional path for programming, online diagnostics, HMI development, and data exchange. The S7-300 CPU integrates a PROFIBUS-DP / MPI port on the front of the module, and the PC side uses a Siemens communications processor (CP) such as CP 5611, CP 5621, CP 5612, or CP 5622. These cards implement the PROFIBUS and MPI protocols in hardware/firmware, exposing a 9-pin D-sub PROFIBUS interface (RS-485 physical layer) for a 2-wire shielded PROFIBUS cable terminated with PROFIBUS connectors.

This reference documents the cable topology, connector pinning, CP card ordering data, STEP 7 / TIA Portal configuration steps, and the PUT/GET function block pair used for S7 communication between the PC station and the S7-300 CPU. It also covers diagnostic buffers, baud-rate settings, and field-proven troubleshooting for typical commissioning faults.

Network Topology and Protocol Stack

A PROFIBUS segment used for PC-to-S7-300 engineering is a single RS-485 bus shared by all nodes. The CPU acts as a class 1 master; the PC station is configured as a class 2 master when running STEP 7 PG functions, or as a class 1 master when running Softnet or an HMI gateway. PROFIBUS-DP and MPI coexist on the same physical medium because they share the same RS-485 electrical layer and use the same bus access (token passing between masters, master-slave polling for DP slaves). The PG/PC channel of STEP 7 uses the PROFIBUS FDL services, not DP, so a CP 5611/CP 5621 can be online with an S7-300 even when DP slaves are addressed by the CPU.

PCCP 5611/CP 5621PCI / PCIeSTEP 7PROFIBUSS7-300CPU 31x-2 DPMPI/DP PortPROFIBUS Addr 2TermResistorOn

Hardware Requirements

The PC station must host a Siemens CP card supported by the installed version of STEP 7 or TIA Portal. The historical product line and the supported PROFIBUS / MPI services are summarized below.

CP Card Order Number (MLFB) Bus Interface PROFIBUS MPI Bus Connector
CP 5611 6GK1 561-1AA01 PCI Yes (DP master class 1/2) Yes 9-pin D-sub
CP 5611 A2 6GK1 561-1AA00 PCI Yes Yes 9-pin D-sub
CP 5621 6GK1 562-1AA00 PCIe Yes (DP master class 1/2) Yes 9-pin D-sub
CP 5612 6GK1 561-2AA00 PCI Yes (DP master, DP slave) Yes 9-pin D-sub
CP 5622 6GK1 562-2AA00 PCIe Yes (DP master, DP slave) Yes 9-pin D-sub

For modern PCs, the CP 5621 (PCIe, DP master only) and CP 5622 (PCIe, DP master/slave) are the recommended replacements for the legacy CP 5611/CP 5612. All four are recognized by STEP 7 V5.5 and by TIA Portal V13 and later when the SIMATIC NET PC software is installed.

PROFIBUS Cable Specification

The PROFIBUS cable is a 2-wire, shielded, twisted-pair cable with a characteristic impedance of 150 Ω and a specified core cross-section. Siemens offers two product lines that match the IEC 61158 / EN 50170 cable spec.

Parameter Value Notes
Cable type PROFIBUS FC (Fast Connect) standard cable, violet jacket Siemens 6XV1 830-0EH10 or 6XV1 830-0AH10
Conductor 2 x 0.64 mm² (24 AWG) solid Twisted pair
Shield Overall foil + braid Must be bonded at every connector
Characteristic impedance 150 Ω at 3 to 20 MHz Per IEC 61158-2
Loop resistance ≤ 110 Ω/km DC, both cores in series
Capacitance ≤ 30 pF/m At 1 kHz
Baud rate vs. segment length 9.6 kbit/s - 12 Mbit/s; max 1200 m at 9.6/19.2/187.5 kbit/s, 1000 m at 500 kbit/s, 400 m at 1.5 Mbit/s, 200 m at 3/6/12 Mbit/s Per EN 50170
Color Violet (data) / green (PE) is the older variant; violet is the IEC standard Do not substitute non-IEC cables
Critical: Use a cable designed for PROFIBUS DP (150 Ω). Substituting with a generic RS-485 cable of 120 Ω will cause reflections, CRC errors, and intermittent online drops above 1.5 Mbit/s.

PROFIBUS Connector Wiring

The standard Siemens PROFIBUS connector (6ES7 972-0BA12-0XA0 for 90° cable entry, or 6ES7 972-0BB12-0XA0 for 35° entry) provides a 9-pin D-sub female socket on the device side and two screw terminals for the incoming and outgoing bus cable. The internal switchable termination resistor (220 Ω between pins 3 and 8, with 390 Ω pull-up to +5 V on pin 3 and pull-down to GND on pin 8) must be ON at the two physical ends of every segment and OFF at every node in between.

D-Sub Pin Signal Function Wire Color (Siemens)
1 NC Shield (optional bond) Braid
2 NC Reserved -
3 RxD/TxD-P (B) Positive data line Red
4 RTS Request to send (CNTR-P) -
5 GND (M5V) Data ground / 5 V reference -
6 +5 V (VP) Termination supply -
7 NC Reserved -
8 RxD/TxD-N (A) Negative data line Green
9 NC Reserved -
Termination rule: Exactly two connectors per segment must have the terminator switch in the "ON" position. Power down the segment before changing the switch position. Stations connected to a powered segment may reset if the bus reference is lost.

Bus Addresses and Baud Rate

Every node on PROFIBUS (and MPI) requires a unique address in the range 0 to 127, with 0 reserved for service tools. The S7-300 CPU is delivered with PROFIBUS address 2. The CP card defaults to address 0 and is automatically re-assigned by STEP 7 to a free address when the PC station is configured. Common baud rates for PC-to-S7-300 engineering are 1.5 Mbit/s (default for new STEP 7 projects) and 187.5 kbit/s (default for MPI and for OP connections).

Device Default Address Recommended Address Highest Bus Parameter
S7-300 CPU (MPI/DP port) 2 2 12 Mbit/s
PG/PC with CP 5611 / CP 5621 0 1 (PG) or 0 (Service) 12 Mbit/s
OP (e.g. OP 177B, TP 177B) 1 3 to 15 1.5 Mbit/s

STEP 7 / TIA Portal Project Configuration

The PC station is described by a software "PC Station" object inside the STEP 7 project. The CP card is inserted into slot 1 (PCI/PCIe) of the PC station, and an "S7 Connection" or "PG/PC routing" entry binds the CP to a partner CPU.

Procedure in STEP 7 V5.5 (Classic)

  1. Open the SIMATIC Manager and add a new PC station (Insert > Station > SIMATIC PC Station).
  2. Open the PC station object and double-click Configuration to launch HW Config.
  3. Drag the appropriate CP from the hardware catalog (SIMATIC PC > CP > PROFIBUS > CP 5621) into the PCI / PCIe slot of the PC station.
  4. Double-click the CP and assign the PROFIBUS subnet, the CP's bus address, and the operating mode (PG operation, DP master, S7 communication).
  5. Drag a "User Application" or "OPC Server" / "WinCC Application" into a free slot if you also want the PC to act as a runtime data consumer. For pure programming, the application slot is not required.
  6. Save and compile, then download the PC station to the local PC (target = local PC, not the PLC).
  7. Open Set PG/PC Interface and set the access point S7ONLINE to the CP 5621 (or CP 5611).
  8. Use Accessible Nodes to verify that the S7-300 appears in the live browse window.

Procedure in TIA Portal (V15.1 and later)

  1. Create a new project and add the S7-300 device from the hardware catalog (CPU 31x-2 DP, 31x-2 PN/DP, etc.).
  2. In Devices & Networks, select the CPU and open the PROFIBUS interface properties. Set the PROFIBUS address and create a new PROFIBUS subnet with the desired baud rate.
  3. From the catalog, add a PC System > Communications processor > CP 5621 to the project. Place it into the PC station.
  4. Connect the CP's PROFIBUS interface to the same subnet the CPU is on.
  5. Add an S7 Connection from the PC station to the S7-300 CPU. Set the partner's PROFIBUS address and the local connection resource.
  6. Compile the PC station, then download the configuration using the menu Online > Download to device (target = PC).
  7. Use Online > Accessible devices to confirm the S7-300 is reachable.

For detailed TIA Portal reference material see the Siemens TIA Portal help entry Instructions for communication tasks (S7-300, S7-400, S7-1500).

Address Assignment and Connection Resources

For S7 communication the CPU exposes a fixed pool of connection resources. Every PUT/GET, BSEND/BRCV, or PG connection consumes one resource. The S7-300 reserves:

  • PG connection resource: 1 (always reserved for the engineering tool)
  • OP/HMI connections: typically 1 to 6 depending on the HMI count
  • Free S7 connections: depends on the CPU type, see table
CPU Max S7 Connections Total Reserved PG Reserved OP Free for S7 Communication
CPU 312 6 1 1 4
CPU 315-2 DP 14 1 1 12
CPU 317-2 DP/PN 32 1 1 30
CPU 319-3 PN/DP 32 1 1 30

PUT/GET Programming in the S7-300

For data exchange between the S7-300 and a second S7 controller or a PC-based OPC server, Siemens provides function blocks FB15 "PUT" and FB14 "GET" in the standard library of STEP 7 V5.5. PUT writes from the local CPU to a partner; GET reads from a partner to the local CPU. Both blocks are time-driven by a periodic call (typically OB35) and use the partner's configured S7 connection IDB.

The official Siemens sample for sequential calling is in the document S7 Communication with PUT/GET.

PUT (FB15) Interface

I/O Declaration Type Meaning
REQ INPUT BOOL Rising edge starts the job
ID INPUT WORD Connection ID from NetPro
DONE OUTPUT BOOL Job complete without error
ERROR OUTPUT BOOL Job complete with error
STATUS OUTPUT WORD Status code (0x0000 = OK)
ADDR_i1..i4 INPUT ANY Partner memory areas to write
SD_i1..i4 INPUT ANY Local source areas

Sequencer Example (Structured Text)

FUNCTION_BLOCK S7_PutGet_Sequencer
VAR
  PutInstance  : PUT;       // FB15
  GetInstance  : GET;       // FB14
  PutStart     : BOOL;
  GetStart     : BOOL;
  PutState     : INT := 0;  // 0 = idle, 1 = running, 2 = done
  GetState     : INT := 0;
END_VAR

// PUT cycle: write DB10 from local CPU to partner DB20
IF PutStart AND PutState = 0 THEN
  PutInstance(REQ := TRUE,
              ID  := W#16#1,
              ADDR_1 := P#DB20.DBX 0.0 BYTE 20,
              SD_1   := P#DB10.DBX 0.0 BYTE 20);
  PutStart := FALSE;
  PutState := 1;
END_IF;

IF PutInstance.DONE OR PutInstance.ERROR THEN
  PutInstance(REQ := FALSE);
  IF PutInstance.ERROR THEN
    // Log STATUS; reset partner connection if STATUS = W#16#0033
    PutInstance.ERROR := FALSE;
  END_IF;
  PutState := 0;
END_IF;

// GET cycle: read DB30 from partner into local DB40
IF GetStart AND GetState = 0 THEN
  GetInstance(REQ := TRUE,
              ID  := W#16#2,
              ADDR_1 := P#DB30.DBX 0.0 BYTE 40,
              RD_1   := P#DB40.DBX 0.0 BYTE 40);
  GetStart := FALSE;
  GetState := 1;
END_IF;

IF GetInstance.DONE OR GetInstance.ERROR THEN
  GetInstance(REQ := FALSE);
  GetState := 0;
END_IF;

STATUS Code Mapping (FB14 / FB15)

STATUS (hex) Meaning Corrective Action
0000 Job complete, no error -
0030 Partner CPU in STOP, no startup Set partner mode switch to RUN
0031 Partner CPU in STOP, startup inhibited Switch to RUN-P or remove inhibit
0032 Partner CPU in RUN, access temporarily denied Retry after a few seconds
0033 Connection aborted by partner (e.g., resource overflow) Check connection resources, retry
0070 Connection establishment aborted (timeout) Check cable, addresses, bus termination
0071 Connection rejected (wrong TSAP or partner not configured) Verify S7 connection in NetPro on both sides
0081 Partner CPU memory access error Check DB existence and length on partner
0090 Local error: connection not configured Recompile PC station, re-download
00A0 Local error: data area not valid Check ANY pointer ranges

Verification Procedure

  1. Open SIMATIC Manager > Options > Set PG/PC Interface > CP 5621 (PROFIBUS). Run Diagnostics > Test to confirm the CP enumerates correctly and the bus is alive.
  2. Use Accessible Nodes in STEP 7. The S7-300 must appear with its configured PROFIBUS address.
  3. Open the S7-300 online and check the diagnostic buffer. The buffer must contain a startup entry and no PROFIBUS errors.
  4. Run Monitor / Modify on a test DB in the S7-300 to confirm read/write.
  5. For PUT/GET, set a watch on the FB14/FB15 STATUS output and verify it returns 0x0000 after each job.
  6. Physically disconnect one termination resistor to confirm the bus diagnostics correctly report the fault (per IEC 61158 segment testing).

Troubleshooting Matrix

Symptom Root Cause Corrective Action
CP card not recognized in Windows Wrong slot, driver not installed, BIOS issue Verify device in Device Manager. Reinstall SIMATIC NET PC software. Move card to a different PCIe slot.
STEP 7 Accessible Nodes empty Wrong CP selected in Set PG/PC Interface; PC station not downloaded Select the CP under S7ONLINE. Download the PC station configuration. Restart the S7DOS service.
Intermittent bus timeouts Missing or duplicate termination; wrong cable type; cable near VFD Enable terminator only at the two end nodes. Use violet PROFIBUS FC cable. Maintain 200 mm from power cables.
CPU diagnostic buffer: "Connection aborted, bus fault" Address conflict; CP card address equals CPU address Reassign the CP to a free address (commonly 1 for PG, 0 for service). Avoid CPU address 2 if used by OP at address 2.
PUT/GET STATUS 0x0071 S7 connection not configured in NetPro on partner side Open the partner project in STEP 7, add the S7 connection, recompile and download the partner CPU.
PUT/GET STATUS 0x0081 Target DB does not exist or is too short on the partner Create DB with the required length and any standard access, or use "optimized" off on the partner DB.
Bus scanner shows 31.25 kbit/s instead of 1.5 Mbit/s Auto-detect fallback due to wiring or termination Inspect the segment for missing terminator power (pin 6 +5 V). Check shield bonding.
PG connection drops when OP communicates Address duplication or excessive retries on a saturated bus Lower OP poll rate; separate the OP and PG into different address ranges; verify the OP's bus parameters match the master.

Field Commissioning Checklist

  • Confirm 24 V DC supply to the S7-300 rack (PS 307) and that the CPU's BF (bus fault) LED is off.
  • Inspect every PROFIBUS connector: terminator switch is ON only at the two physical end nodes; shield braid is clamped to the metal strain relief.
  • Measure +5 V between pin 6 and pin 5 of any powered node; must be ≥ 4.75 V to keep the termination resistor biased.
  • Document the PROFIBUS addresses of every node on the bus with a label on the connector.
  • Document the baud rate and the slot time / quiet time / TTR settings of the master (CPU) - all DP slaves and the PG must use the same value.
  • Save the PC station configuration and the CPU project to a versioned folder; include the NetPro screenshots showing the connection ID and the partner address.
  • Run a 24-hour soak test with the bus scanner or NCM Diagnostics watching the bus error counters.

Cross-Reference: STEP 7 Ethernet Alternative

If the S7-300 is fitted with a CP 343-1 (6GK7 343-1EX30-0XE0) or the CPU is a -2 PN/DP variant, ISO-on-TCP / S7 communication over Ethernet is often preferred for PC-based SCADA or OPC UA gateways. The configuration follows the same connection model in NetPro or TIA Portal, but the physical layer is RJ-45 instead of 9-pin D-sub. The CP 1613 / CP 1623 / CP 1626 are the PCIe Ethernet equivalents to the CP 5611/CP 5621 family. For a project walkthrough of Ethernet configuration see the PTC support document How To Configure S7-300/400 Connections in STEP 7 and the Siemens application example S7 Communication between SIMATIC S7-1200 and SIMATIC S7-300 for data-block exchange with the S7-1200 family.

FAQ

Which CP card should I buy for a modern PC to program an S7-300 over PROFIBUS?

Use the CP 5621 (Siemens 6GK1 562-1AA00) for a PCIe slot. The legacy CP 5611 (6GK1 561-1AA01) is supported only on PCI/PCI-X motherboards. Both are recognized by STEP 7 V5.5 SP2 and later and by TIA Portal V13+ when the SIMATIC NET PC software is installed.

Do I need a special PROFIBUS cable or can I use any shielded twisted pair?

Use a 150 Ω PROFIBUS cable such as the Siemens 6XV1 830-0EH10 (Fast Connect standard, violet jacket). Generic RS-485 cables are 120 Ω and will cause reflections, CRC errors, and bus faults above 1.5 Mbit/s.

What baud rate should I select for the PC to S7-300 link?

1.5 Mbit/s is the default in STEP 7 and is supported by all CP 5611/CP 5612/CP 5621/CP 5622 cards. Use 187.5 kbit/s only when an OP/TP is on the same bus and cannot be reconfigured for 1.5 Mbit/s.

Why does "Accessible Nodes" show nothing even though the CP is configured?

Open Options > Set PG/PC Interface and ensure the access point S7ONLINE points to CP5621.PROFIBUS.1 (or CP5611). Also confirm the PC station configuration was downloaded to the local PC, not to the S7-300. Restarting the S7DOS service can clear stale handles.

Can I use the same PROFIBUS cable to program the CPU and to talk to an OP at the same time?

Yes. PROFIBUS is a multi-drop bus and the CPU, PG, and OP all share the same two wires. Make sure each device has a unique address (CPU = 2, OP = 1 or 3, PG = 0 or 1) and that the terminator switch is ON only at the two end nodes.

Back to blog