Configuring S7-300 PROFIBUS DP Communication with DEIF GPC3

David Krause11 min read
S7-300SiemensTutorial / 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: Integrating DEIF GPC3 with a Siemens S7-300 over PROFIBUS DP

The DEIF GPC3 (Generator Protection and Control) and the related AGC (Automatic Generator Controller) families support multiple industrial protocols including CAN bus, Modbus (RTU/TCP), and PROFIBUS DP. For Siemens SIMATIC S7-300 projects, PROFIBUS DP is the deterministic, high-speed option that gives the PLC cyclic access to measured values, alarms, and control setpoints exposed by the genset controller.

Because the GPC3 is a third-party PROFIBUS slave, it does not appear in the default STEP 7 hardware catalog. Integration requires the manufacturer-supplied GSD file. Once the GSD is installed, the device is added like any other DP slave, occupies a defined range of process I/O, and is read from user programs using the standard S7 I/O access instructions (e.g. L PEW / T PAW, MOVE, or the DPRD_DAT/DPWR_DAT SFCs in safety-relevant projects).

This article documents the full integration path: obtaining and installing the GSD, configuring the DP slave in HW Config, mapping input and output addresses, and accessing the data from the S7-300 user program. The procedures are valid for STEP 7 V5.5 and the S7-300 CPUs that expose an integrated DP port (e.g. CPU 315-2 DP, CPU 317-2 DP) or that are paired with a CP 342-5 / CP 343-5 communications processor.

Prerequisites

Before configuring the link, confirm the following hardware, software, and documentation items are available:

Item Requirement Notes
STEP 7 (SIMATIC Manager) V5.5 + SPx or later TIA Portal V16+ is acceptable for S7-300/400 projects; GSD import is identical.
S7-300 CPU with DP master CPU 31x-2 DP or CP 342-5 / CP 343-5 Verify the DP master firmware revision is current.
DEIF GPC3 GSD file Manufacturer-supplied *.gsd / *.gsg / *.bmp Download from DEIF product support pages; do not substitute a generic GSD.
DEIF GPC3 datasheet / Designer's Reference Handbook Document number from device label Required to interpret the I/O slot structure and module identifiers.
PROFIBUS cable Two-wire shielded, characteristic impedance 150 Ω Use Siemens PROFIBUS FC cable (6XV1830-0EH10) for typical runs.
PROFIBUS connector D-sub 9-pin with termination switch Enable termination only on the two physical end nodes of the segment.
PG/PC interface PC Adapter USB or CP 5611 / CP 5613 For online commissioning and diagnosis.
Always match the GSD revision to the GPC3 firmware. A GSD written for firmware V2.x will not describe the slot structure of a V3.x device and will produce Station Failure or Diagnostic Not OK immediately on bus start-up.

Step 1: Obtain and Stage the GSD File

  1. Navigate to the DEIF product support portal and locate the GPC3 (or AGC) product page.
  2. Download the GSD/GSG bundle, typically packaged as a ZIP containing the .gsd, .gsg, and any associated .bmp bitmap used for the device icon in HW Config.
  3. Extract the bundle to a working folder, for example C:\Temp\DEIF_GPC3\. Keep all three file types in the same directory so STEP 7 can resolve bitmap references.
  4. Verify the GSD header with a text editor. Confirm fields such as Model_Name, Ident_Number, Vendor_Name = DEIF, and that Protocol_Ident = 0 (DP) is declared.

Step 2: Install the GSD in SIMATIC Manager (STEP 7 V5.5)

  1. Open the SIMATIC Manager and load the target S7-300 station.
  2. Open HW Config by double-clicking the Hardware object in the station.
  3. From the menu bar select Options → Install GSD Files...
  4. In the dialog, click Browse..., navigate to the folder containing the DEIF GSD, and select the GSD file (or the whole folder using the Include subfolders option).
  5. Confirm by clicking Install. STEP 7 parses the GSD, registers the device type, and copies the bitmap to its catalog directory.
  6. When the installation completes, update the hardware catalog by pressing F5 or selecting Options → Update Catalog.

After installation the GPC3 appears in the catalog tree at PROFIBUS DP → Additional Field Devices → General. The exact catalog branch can vary between GSD revisions; some DEIF devices are registered under PROFIBUS DP → General directly.

Step 3: Place the GPC3 on the DP Master System

  1. In HW Config, drag the GPC3 from the catalog and drop it onto the DP master system line of the S7-300 CPU (or onto the CP 342-5 / CP 343-5 DP master line if used).
  2. The Properties – PROFIBUS Interface dialog appears. Set the PROFIBUS address for the GPC3. Typical values are 3 or 4 for genset controllers; ensure it does not conflict with the S7-300 CPU (default 2) or any other DP slave.
  3. Click New to create a subnet, or assign the device to the existing PROFIBUS(1) subnet. Confirm with OK.
  4. Double-click the GPC3 slot in the station window to open its Properties dialog and verify the configured address.

Step 4: Configure the I/O Modules in the GPC3 Slot Table

The GPC3 GSD exposes one or more module slots that represent cyclic data exchanged with the PLC. The exact slot list is GSD-defined; a typical GPC3 module profile resembles the example below.

Slot Module Identifier (GSD) Direction Length (bytes) Typical Use
0 Status / Diagnostics word Input 2 / 4 Device state, alarm summary, life bit
1 Analog measurements block 1 Input 8 / 16 Voltage, current, frequency, power
2 Analog measurements block 2 Input 8 / 16 Pf, kVAr, kWh, engine values
3 Discrete alarms / events Input 4 Pre-alarms, trip alarms, breaker status
4 Control word / setpoints Output 2 / 4 Start/stop, breaker open/close, AVR setpoint
  1. Highlight the GPC3 in the station window. The lower pane lists the available slots.
  2. Insert the required modules by selecting each row and clicking Insert (or right-click → Insert Module).
  3. For each inserted module, STEP 7 displays a starter address in the I and Q columns. These are the cyclic I/O addresses the user program will use.
  4. Adjust the start address only if you need to align the GPC3 area with a specific DB range; do not overlap it with the local S7-300 I/O.
The total length of all input modules determines the input area size; the total length of all output modules determines the output area size. STEP 7 enforces consistent addressing across the DP slave.

Step 5: Compile and Download the Configuration

  1. From HW Config, select Station → Save and Compile (Ctrl+S). Check the Compile dialog for warnings about overlapping addresses or unsupported modules.
  2. Select PLC → Download to Target. Confirm the target module (the S7-300 CPU).
  3. When prompted, choose Download to Target System → Complete project if this is the first commissioning; otherwise Download changes is sufficient.
  4. After the download, switch the CPU to RUN and observe the Online → Diagnose Hardware view to confirm the GPC3 reports Station OK.

Step 6: Access the Cyclic Data from the S7-300 User Program

With the DP slave configured, the GPC3 data is available in the process image of the S7-300 CPU. You can read it directly using load/transfer operations or copy blocks into a data block (DB) for structured access.

Direct peripheral access (non-process-image)

For fast access without waiting for the process image update, use the peripheral I/O area directly:

// Read first 4 bytes of GPC3 input area (example: PIW 256..PIW 259)
L     PIW 256        // Status / diagnostics
T     MW 100         // Buffer to flags
L     PID  258       // First 4 bytes of analog block 1
T     MD 104         // 32-bit measured value, e.g. line voltage

Structured access via data block

The conventional pattern is to copy the cyclic I/O into a DB once per OB1 cycle using SFC14 (DPRD_DAT) for consistency. This is the recommended method for safety-related or critical control applications and is the same approach Siemens documents for SENDDP/RCVDP and SENDS7/RCVS7 safety communication blocks on the S7-300/400 platform.

// OB1 – read 16 bytes from GPC3 input area at PEB 256 into DB100
CALL  "DPRD_DAT"
LADDR := W#16#100        // Logical address of the first input module (256 dec)
RET_VAL := MW 200        // Return code (0 = OK)
RECORD := P#DB100.DBX0.0 BYTE 16
// (DB100 must be defined as a structure that matches the GPC3 module layout)

Output setpoints (e.g. start/stop commands, AVR setpoint) are written with SFC15 DPWR_DAT:

CALL  "DPWR_DAT"
LADDR := W#16#110        // Logical address of the first output module
RECORD := P#DB110.DBX0.0 BYTE 4
RET_VAL := MW 202

The exact logical addresses (LADDR) match the slot start addresses assigned by HW Config in Step 4. Cross-reference the I/Q columns in HW Config to derive the hex values.

Alternative Communication Paths: Modbus TCP, Modbus RTU, CAN

The DEIF GPC3 is a multi-protocol device. If PROFIBUS DP is unavailable — for example when the S7-300 is replaced by a WAGO controller, or when the existing SCADA is Modbus-only — use one of the following alternatives.

Protocol S7-300 Hardware Function Block / SFC 2-wire RS-485; baud up to 38 400
CAN / J1939 External gateway (e.g. DEIF M-Logic + CANopen bridge) or CP 5603 (PCI) – note: S7-300 has no native CAN Vendor-specific FB Used for engine ECU data only

For a Modbus TCP path, follow the PTC Kepware S7-300/400 STEP 7 connection guide for the connection-handle and TSAP configuration that the S7-300 expects when opened from an external Modbus master. Although that document is written for an OPC driver context, the underlying TCP connection properties (Local TSAP, Partner TSAP, Active/Passive connection establishment, connection count in CPU object properties) are identical to a Modbus TCP integration.

Verifying the Link

After commissioning, validate both layers of the integration:

  1. Bus-level check: In HW Config online view, double-click the GPC3. The DP Slave Diagnostics page must show Station Status = 0x00 (OK) and the configured module identifiers.
  2. Cyclic data check: In the S7-300, open Monitor/Modify on the configured input area (e.g. PIW 256). Toggling a value at the GPC3 (e.g. a discrete alarm) must be reflected in the PIW within one DP cycle.
  3. Application check: In OB1, set a breakpoint after the DPRD_DAT call and inspect the destination DB. Confirm that the first bytes match the GPC3 manual's documented layout for the inserted module identifier.
  4. Time and load check: Open CPU → Operator Panel → Information and verify the cycle time has not increased beyond the DP cycle (typically 5–10 ms with 1.5 Mbps).

Troubleshooting Matrix

Symptom Likely Cause Action
Device not visible in catalog after GSD install STEP 7 did not refresh the catalog Press F5 in HW Config, or restart SIMATIC Manager. Verify the GSD/GSG/BMP were all in the same folder.
Station Failure immediately on RUN Wrong GSD revision vs. device firmware Re-download the GSD that matches the GPC3 firmware printed on the device label.
Station OK but all inputs read 0xFF or constant value Module identifiers not selected in slot table Open GPC3 properties; ensure at least one input module is inserted for each configured slot.
Diagnostic Not OK, slot 0 fault PROFIBUS address conflict Scan the bus with the BT 200 or PG/PC online diagnosis; renumber the conflicting slave.
Inputs valid for some modules, invalid for others Address overlap with local S7-300 I/O Reassign the GPC3 start address in HW Config so it does not overlap with SM modules.
Bus periodically faults under load Missing or incorrect bus termination Enable termination on the two physical end nodes only; verify shield is grounded on one side.
RetVal of SFC14 / SFC15 = W#16#80A1 Logical address does not exist on the DP slave Cross-check the LADDR with the I/Q column in HW Config.
Modbus TCP path: connection refused Insufficient PG/OP or S7 connections configured in CPU properties Open CPU → Object Properties → Communication; raise the maximum number of connections for OP/Modbus as required by the integration guide.

Field-Proven Notes

  • Always keep a local copy of the GSD inside the STEP 7 project folder (under ...\S7Proj\<project>\GSD) and add it to version control. Lost GSDs are a common source of repeat engineering effort when hardware is replaced years later.
  • If the S7-300 project is later migrated to TIA Portal, the GSD must be re-imported through Options → Manage general station description files (GSD). The slot structure and I/O addresses are preserved but the GSD must be available in the TIA hardware catalog.
  • When more than one GPC3 or AGC is on the same segment, assign consecutive PROFIBUS addresses and reserve a gap of at least one address between controllers to simplify diagnosis.
  • For genset applications, treat the GPC3 Life Bit (a toggling bit in the status word) as a runtime health indicator. In the S7 program, latch a DB bit that goes true when the life bit fails to toggle for two consecutive OB1 cycles — this is the cheapest PROFIBUS watchdog available without additional SFCs.

Which GSD file does the DEIF GPC3 use for PROFIBUS DP integration with an S7-300?

The GPC3 is a third-party DP slave and requires the DEIF-supplied GSD/GSG/BMP bundle. The GSD revision must match the GPC3 firmware printed on the device label; a mismatched revision causes Station Failure at bus start-up.

How is the DEIF GPC3 added to the STEP 7 hardware catalog?

Open HW Config and select Options → Install GSD Files. Browse to the folder containing the GSD, install it, then press F5 to update the catalog. The GPC3 appears under PROFIBUS DP → Additional Field Devices → General (or under General, depending on GSD revision).

Do I need a dedicated FB or FC to read the GPC3 from the S7-300?

No. Once the GPC3 is configured as a DP slave, its cyclic data is mapped to the S7-300 process image and can be read with standard operations (L PIW / T PQW) or copied into a DB with SFC14 (DPRD_DAT) and SFC15 (DPWR_DAT). Vendor-specific FC/FB blocks are not required for the PROFIBUS DP path.

Can the S7-300 talk to the GPC3 over Modbus TCP if PROFIBUS is not available?

Yes. Use a CPU 31x-2 PN/DP or a CP 343-1 and implement Modbus TCP via the SIMATIC NET Open User Communication blocks (TCON/TSEND/TRCV) or a licensed Modbus TCP FB. Expect scan times in the 50–200 ms range, which is acceptable for monitoring but slower than PROFIBUS DP for closed-loop control.

How do I confirm the PROFIBUS link is healthy at commissioning?

Open HW Config online, double-click the GPC3, and confirm Station Status 0x00 in the DP Slave Diagnostics. Then use Monitor/Modify on the configured peripheral input area to verify that changes at the GPC3 are reflected in the S7-300 within one DP cycle.

Back to blog