Configuring S7-315-2DP with CU310 and CU310-2DP Using Two GSD

David Krause13 min read
ProfibusSiemensTechnical Reference
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

On a PROFIBUS DP network, a single SIMATIC S7-315-2DP (6ES7315-2AG10-0AB0) cannot load a project that simply says "S120 drive" — the PLC must know exactly which Control Unit firmware class and GSD revision sits on the bus. When a customer maintains a fleet of SINAMICS S120 drives where the production line uses an older CU310 DP (6SL3040-1LA00-0AA0) and the spare machine uses the newer CU310-2 DP (6SL3040-1LA01-0AA0), the two units require different GSD files, different diagnostic slots, and frequently different telegram word counts.

This reference documents the only field-proven way to make a single PLC program run against either Control Unit without re-downloading HW Config: install both GSD files, drag both DP slaves into HW Config, give each a unique PROFIBUS address, and write PLC logic that detects which CU is physically connected and routes the process data accordingly.

Prerequisites

  • STEP 7 V5.5 + SP2/SP3 (or STEP 7 V5.6) with HW Config editor
  • Both SINAMICS S120 GSD files installed locally — see the Siemens GSD file library for SINAMICS drives
  • Firmware knowledge of both drives — confirm CU310 firmware 2.x/3.x vs CU310-2 firmware 4.x/5.x in the S120 parameter r0018 (Control Unit firmware version)
  • Two PROFIBUS DP addresses reserved, e.g. node 3 = old CU310, node 4 = new CU310-2DP
  • Consistent PROFIBUS baud rate (1.5 Mbit/s recommended for S120)
  • STARTER commissioning tool (V5.x) or SINAMICS Startdrive for offline parameterization of the spare CU
Critical: The PROFIBUS connector on both CU310 and CU310-2DP uses a 9-pin D-sub. Cable shielding must be 360° bonded at both ends. Termination is on the connector switch on the last device only.

Understanding the GSD Difference

Every DP slave on PROFIBUS is described by a GSD (General Station Description) file. The GSD tells HW Config:

  • Vendor and device identifier (Ident Number)
  • Supported baud rates
  • Number of slots and which telegram types are valid in each slot
  • Diagnostic frame length and contents
  • I/O address footprint per configured telegram

The CU310 (older) and CU310-2DP (newer) ship with different Ident Numbers and different slot maps. You cannot configure a single DP slave symbol in HW Config that points to two different physical units — STEP 7 enforces one GSD per device entry. The Ident Numbers used by SINAMICS S120 are documented in the S120 Function Manual; verify them in your installed GSD file header before you begin.

Property CU310 DP (legacy) CU310-2 DP (current)
Order number (MLFB) 6SL3040-1LA00-0AA0 6SL3040-1LA01-0AA0
Firmware series 2.x / 3.x / 4.4 4.5 / 4.7 / 5.x
Typical GSD root SIEM80F1 / SI0380F1 family SIEM80F2 / SI0280F2 family
Default telegrams 1–6, 370, 371 1–6, 110, 111, 220, 370, 371
Diagnostic slot count 1 + slots for configured telegrams 1 + slots for configured telegrams (extended)
PROFIsafe support No (CU310-2 only on -2DP-F) Yes, on -2DP-F variant
Do not assume that telegrams 1, 2, 3 have identical PZD width between the two CUs. Always check the slot configuration pane in HW Config after dragging the DP slave from the hardware catalog.

Step 1: Install Both GSD Files in STEP 7

  1. Close all STEP 7 applications.
  2. Copy the older CU310 GSD file (and matching .BMP icon) to C:\Program Files\Siemens\Automation\S7\DATA\GSD\ or your STEP 7 install path.
  3. Copy the CU310-2DP GSD file to the same folder.
  4. Open SIMATIC Manager → Options → Install GSD File...
  5. Browse to the GSD file → OK. STEP 7 reads the GSD and updates the hardware catalog.
  6. Repeat for the second GSD file.
  7. Open HW Config. In the hardware catalog, navigate to PROFIBUS DP → Drives → SINAMICS → S120. You will now see two entries: one for the CU310 and one for the CU310-2DP.
If the new entry does not appear, refresh the catalog with Options → Update Catalog. Restart HW Config if the icon is missing.

Step 2: Configure HW Config With Both DP Slaves

  1. Open the S7-300 station, insert the CPU 315-2DP (or use the existing one). The DP master interface is X2.
  2. Right-click the DP master → Add Master System and confirm baud rate 1.5 Mbit/s.
  3. Drag the CU310 DP slave from the catalog onto the bus. Set PROFIBUS address 3.
  4. Open the slot configuration. Insert the desired telegram (typically Standard Telegram 1 = 2 PZD words control, 2 PZD words status, plus PKW area as needed). Note the I and Q addresses STEP 7 assigns, e.g. PE 256..259 / PA 256..259.
  5. Drag the CU310-2DP DP slave onto the same bus at address 4.
  6. Open its slot configuration. Insert the matching telegram. Note its I/Q addresses, e.g. PE 264..267 / PA 264..267.
  7. Compile and save HW Config, then download to the CPU.

After this step the PLC project contains two distinct DP slaves, each with its own diagnostics, its own I/O footprint, and its own physical PROFIBUS address. This is the foundation of the dynamic-switch strategy.

Step 3: Use SFC14 / SFC15 for Consistent Data Access

For SINAMICS S120 it is best practice to read/write process data with the DP standard functions for consistent data, especially when the PZD length exceeds 4 bytes. Use the address ranges you noted in Step 2.

// Read status from "old" CU310 at PROFIBUS address 3, slot start PEW 256
CALL  "DPRD_DAT"  // SFC14
     LADDR  := W#16#100   // logical address of the start of the PZD input area (256 dec = 0x100)
     RET_VAL:= MW100       // error code
     RECORD := P#M 200.0 BYTE 8  // destination: 8 bytes of received PZD
// Read status from "new" CU310-2DP at PROFIBUS address 4, slot start PEW 264
CALL  "DPRD_DAT"
     LADDR  := W#16#108   // logical address 264 = 0x108
     RET_VAL:= MW102
     RECORD := P#M 220.0 BYTE 8

Repeat with SFC15 (DPWR_DAT) for control words to each drive. This gives the application two completely independent data channels — one per physical PROFIBUS node.

Step 4: Detect Which CU Is Physically Present

The PLC cannot download new HW Config at runtime, so the logic that switches between the two address sets must use a deterministic detection mechanism. The two most reliable methods are described below.

Method A — Use the DP Diagnostic Interrupts

When a DP slave is configured but absent, OB86 (Rack Failure OB) is called with an identifier that distinguishes station failure from station return. By examining the DP master diagnostic buffer and the OB86 input LADDR, the program can tell whether node 3 or node 4 is missing.

// OB86 — Rack / Station Failure
// Input: OB86_FLT_ID, OB86_DIAG, OB86_MDL_ADDR
// OB86_MDL_ADDR holds the logical base address of the failed/returned slave

L     #OB86_MDL_ADDR
L     W#16#100          // logical base of CU310 (node 3)
==I
S     "CU310_PRESENT"   // boolean marker

L     #OB86_MDL_ADDR
L     W#16#108          // logical base of CU310-2DP (node 4)
==I
S     "CU310_2_PRESENT"

At startup, the S7-300 calls OB86 once for every configured DP slave that is not answering, and once for every slave that returns. So after a CPU restart the markers reflect the current physical reality.

Method B — Read a Drive Parameter (r0018) via PKW

The PKW channel can be used to read parameter r0018 (Control Unit firmware version) from each drive. CU310 returns a value in the 2.x–4.4 range, CU310-2 returns 4.5 or higher. Use SFC58 / SFC59 or the standard SINAMICS parameter access FB (e.g. FB287 in the S120 DriveLib). If a read times out, the corresponding CU is not on the bus.

// Read r0018 from node 3
CALL  "FB287" / SFC58 "REC_RDPARM"
     LADDR  := W#16#100
     PARAM  := 18         // r0018 index
     VALUE  := MD150
     RET_VAL:= MW104
PKW access requires that the telegram configuration includes the PKW area. Standard Telegram 1 does not carry PKW. Use Telegram 4 or 370/371 if you need parameter read/write in parallel to cyclic PZD.

Step 5: Build the Dynamic Routing Logic

With detection in place, the application code becomes a simple demultiplexer. The two examples below show (1) writing the control word and (2) reading the status word from whichever CU is currently live.

Control Word Multiplex

// ST source: control word in MW10 (e.g. from user program)
A     "CU310_PRESENT"
JCN   NO1
L     MW10
T     PAW 256          // write to old CU310 PZD1
NO1: A     "CU310_2_PRESENT"
JCN   NO2
L     MW10
T     PAW 264          // write to new CU310-2DP PZD1
NO2: NOP 0

Status Word Demultiplex

// Read fresh PZD into MW12 / MW14 via SFC14 each scan
CALL  "DPRD_DAT"
     LADDR  := "STATUS_INPUT_LADDR"  // toggle between 0x100 and 0x108 per scan
     RET_VAL:= MW106
     RECORD := P#M 12.0 BYTE 4

A     "CU310_PRESENT"
JCN   SK1
L     PEW 256
T     MW20             // status from old CU
SK1: A     "CU310_2_PRESENT"
JCN   SK2
L     PEW 264
T     MW20             // status from new CU
SK2: NOP 0

For safety, also include an exclusive OR interlock: if both markers are true (a swap is in progress and both are momentarily on the bus), inhibit the drive enable until the diagnostics settle.

Step 6: Apply PROFIBUS Bus Termination and Connector Layout

Component Setting
Last device on bus Termination ON (switch on 9-pin D-sub connector)
All middle devices Termination OFF
Stub length per device < 1 m at 1.5 Mbit/s, < 0.3 m at 12 Mbit/s
Shielding 360° contact at every connector
Baud rate 1.5 Mbit/s default for S120; 12 Mbit/s only on short segments
Repeater RS-485 repeater required if > 32 nodes or > cable spec length

Verification

  1. Power up the S7-315-2DP with only the old CU310 connected. Open the online diagnostics in HW Config (right-click DP master → Operating Mode or Monitor/Modify). Confirm node 3 shows OK and node 4 shows Station Failure. The marker CU310_PRESENT must be TRUE, CU310_2_PRESENT must be FALSE.
  2. Issue a drive start command from the PLC. Verify on the SINAMICS BOP20 / STARTER that the drive ramps to setpoint. Use r0021 (speed actual smoothed) to confirm motion.
  3. Power down, swap the CU310 for the CU310-2DP at the same PROFIBUS cable (with the unit powered down, change the DP address on the new CU from S120 parameter p0918 to 3 if you want one physical address, or 4 if you keep the two-node layout described above).
  4. Power up. Confirm diagnostics flip: node 3 → Failure, node 4 → OK, marker CU310_2_PRESENT = TRUE.
  5. Issue the same drive start command — drive must run identically.
  6. Disconnect PROFIBUS cable mid-run: OB86 must fire with station failure, drives must coast to stop on configured fault response (default OFF1 / OFF3 per p0840, p0845, p0852 in the drive).

Common Faults and Corrections

Symptom Root Cause Correction
SF LED on CPU, diagnostic buffer "Station failure" but the drive is online Wrong telegram inserted; PZD length does not match GSD Compare HW Config slot view against the telegram configured in STARTER (p0922 / p2079)
Both CU markers go true at CPU restart OB86 fires for absent slaves only when the CPU re-initializes the bus; transient overlap possible Add a 500 ms debounce timer on the rising edge of each marker
Drive ignores control word after a swap Drive is in safety lockout or has not received OFF1 → ON command sequence per S120 startup Execute the S120 startup sequence: bit 0 = ON/OFF1, bit 3 = enable operation, bit 7 = fault acknowledge, sequence per S120 Function Manual
PKW reads return 0x0008 (Operation - Incorrect parameter number) Index 7 = write request sent to a read-only parameter, or wrong parameter number Verify p0918 / r0018 access rights and use read-only indices for diagnostics
PLC cannot see new CU310-2DP after GSD install Catalog not refreshed or GSD file is the wrong variant (PROFINET vs PROFIBUS) Verify GSD filename matches the PROFIBUS variant; reinstall and refresh
Address conflict (same I address assigned to both drives) STEP 7 reuses addresses by default when telegram is identical Manually reassign I/Q addresses per DP slave in HW Config to keep both ranges separate

Alternative Approaches (and When to Use Them)

  • PROFINET instead of PROFIBUS: For new lines, move both CUs onto PROFINET (CU310-2 PN) and use a shared device or redundant I-Devices. This eliminates GSD complexity entirely. Recommended for green-field projects.
  • Single Ident Number firmware alignment: If the customer can run the same firmware on both CUs, the GSD becomes identical and the problem disappears. Use STARTER to update the older CU310 to a matching firmware level — but verify hardware compatibility first.
  • One-PI/PO slot only with 16-bit words: If motion is not in scope, use Standard Telegram 1 with only 2 PZD in each direction and demultiplex by PROFIBUS address — minimal logic, easy to debug.

Commissioning Checklist

  • ☐ Both GSD files installed; both DP slaves visible in HW Config catalog
  • ☐ Each drive has a unique PROFIBUS address (3 and 4, or matching the new address on the spare)
  • ☐ I/Q addresses manually spaced to avoid overlap
  • ☐ Telegram type matches between HW Config and STARTER (p0922)
  • ☐ SFC14/SFC15 used for PZD access, not direct I/O access (avoids consistency issues)
  • ☐ OB86 logic implemented with both presence markers
  • ☐ Startup command sequence (0740 hex → 047F hex → 0000 7F7F hex) sourced from application, not from hard-coded bits
  • ☐ Drive fault word (ZSW1 bit 3) is OR'd into the global safety chain
  • ☐ Bus termination verified on last physical device
  • ☐ Swap test executed: old CU → new CU310-2DP without PLC stop

Field-Proven Caveats

Two issues surface again and again in plants running this exact configuration. First, the drive address is usually set on STARTER via p0918 and is not retained if the Control Unit's memory card is removed. Always label the card with the target address. Second, the swap procedure must be done with the S7 CPU in STOP or with the application code in a state that ignores the new node's diagnostics for the first ~500 ms — otherwise the OB86 storm from the initial bus scan can latch the drive enable off in the wrong direction.

FAQ

Can the S7-315-2DP automatically detect the CU310 vs CU310-2DP at runtime without re-downloading HW Config?

Yes. Install both GSD files, configure both DP slaves in HW Config with different PROFIBUS addresses, and let OB86 (Rack Failure) update a "present" flag for each station. The application then reads the correct PZD area based on which flag is true.

Is it possible to load the GSD for the new CU310-2DP into the same DP slave symbol as the old CU310?

No. STEP 7 ties each DP slave in HW Config to exactly one GSD. You must create two DP slave objects in the project. The CPU itself, however, runs one program that addresses both objects.

Do the telegrams (e.g. Standard Telegram 1) have the same PZD length on CU310 and CU310-2DP?

Usually yes for the basic standard telegrams, but the slot layout in the GSD can differ. Always verify the PZD length in the HW Config slot view and confirm with STARTER parameter p0922 = telegram number. If the lengths match, the same control/status bits can be used; if not, remap the signals in STARTER.

What PROFIBUS address should I assign to the spare CU310-2DP if I want a hot-swap without reconfiguring addresses?

Set the new CU to the same PROFIBUS address as the failed one (use p0918 in STARTER or DIP switches where available) and keep the corresponding DP slave configured in HW Config. The OB86 / OB82 mechanism handles the rest, but the other DP slave in the project becomes unused and should be disabled or assigned to a non-existent address.

Is there a function block in the S120 DriveLib that simplifies parameter access over PKW?

Yes. The SINAMICS S120 DriveLib (STEP 7 library) provides blocks such as FB287 (read parameter) and FB288 (write parameter) that handle the PKW protocol. They work for both CU310 and CU310-2DP provided the configured telegram includes the PKW area (e.g. Telegram 370 or 4).

Back to blog