How to Configure PROFIBUS DP Master-Slave Communication Between SIMATIC PCS 7 and S7-300 PLCs

How to Configure PROFIBUS DP Master-Slave Communication Between SIMATIC PCS 7 and S7-300 PLCs

Configuring PROFIBUS DP Master-Slave communication between a SIMATIC PCS 7 S7-400 master and an S7-315-2 PN/DP intelligent slave (I-Slave) to exchange up to 110 words (220 bytes) of cyclic data is fully supported within PROFIBUS DP standards. PROFIBUS DP specifies a maximum frame limit of 244 bytes of inputs and 244 bytes of outputs per slave station. In HW Config, the S7-315 DP interface is configured in 'Slave' mode, and cross-station coupling is established using modular input/output slot configurations. To maintain absolute data integrity across 110 words in the S7-300 controller, communication must be transferred with 'Total Length' consistency using standard system functions SFC14 (DPRD_DAT) and SFC15 (DPWR_DAT).

Table of Contents

PROFIBUS DP Master-Slave Architecture and Maximum Frame Limits

In hybrid manufacturing plants, specialized skid packages (such as centrifuges, compressors, or packaging units) frequently run on SIMATIC S7-300 controllers, which must exchange high-density telemetry with the central SIMATIC PCS 7 DCS:

  • PROFIBUS DP Standard Limits (EN 50170):
  • Maximum input data per DP slave: 244 bytes.
  • Maximum output data per DP slave: 244 bytes.
  • Total frame length: 244 bytes in each direction.
  • Feasibility of Exchanging 110 Words:
  • 110 words equals 220 bytes (110 * 2).
  • Because 220 bytes is strictly within the 244-byte physical PROFIBUS DP limit, the entire dataset can be transferred cyclically in a single master-slave configuration without requiring multi-cycle multiplexing or serial communication blocks.

Configuring S7-315-2 PN/DP as an Intelligent Slave (I-Slave) in HW Config

To establish the master-slave link across the two projects:

  1. Configure the S7-300 Slave Project:
    * Open HW Config for the S7-315-2 PN/DP.
    * Double-click the DP interface (X2 port).
    * Operating Mode tab: Select Slave.
    * Uncheck Test, Commissioning, Routing if not strictly required.
    * Configuration tab: Define input and output communication areas (e.g., modular rows of 32 words / 64 bytes consistent data).
    * Assign a unique PROFIBUS DP address (e.g., Address 12). Save and compile.
  2. Integrate Slave into PCS 7 Master HW Config:
    * Open HW Config for the PCS 7 S7-400 station.
    * In the hardware catalog, browse to: PROFIBUS DP > Configured Stations.
    * Drag the S7 300 CPU-31x station onto the S7-400 PROFIBUS DP master line.
    * Link the slave object to the S7-300 station project (or import the matching GSD file if in separate multi-projects).
    * Double-click the coupled slave: map the master I/O peripheral address ranges to the corresponding slave rows.

Slot-Based I/O Address Mapping and Data Consistency Rules

When partitioning 110 words across PROFIBUS DP slots:

  • Modular Sub-division: Rather than attempting a single 220-byte block, partition the transfer into standard modular chunks:
  • Slot 1: 32 Words (64 Bytes) Inputs / Outputs - Consistency: All
  • Slot 2: 32 Words (64 Bytes) Inputs / Outputs - Consistency: All
  • Slot 3: 32 Words (64 Bytes) Inputs / Outputs - Consistency: All
  • Slot 4: 14 Words (28 Bytes) Inputs / Outputs - Consistency: All
  • Total: 32 + 32 + 32 + 14 = 110 Words (220 Bytes).
  • The Consistency Dilemma:
  • Byte/Word Consistency: The S7 CPU updates each byte/word independently. If an analog value or floating-point REAL spans multiple bytes, the receiving CPU could read half-updated data during a cyclic interrupt.
  • Total Length Consistency (All): Guarantees that the entire slot block is frozen, transmitted, and unpacked as an indivisible atomic entity.

Programming Consistent Data Transfer via SFC14 and SFC15

In both the S7-300 slave and S7-400 master, slots configured with 'All' (Total Length) consistency cannot be read using simple L PIW or T PQW instructions; they require system functions:

  1. Reading Consistent Inputs via SFC14 (DPRD_DAT):
    pascal CALL "DPRD_DAT" LADDR := W#16#200 // Start peripheral input address in Hex (e.g. 512 dec) RET_VAL := #RetVal RECORD := P#DB50.DBX0.0 BYTE 64 // Target Data Block buffer
  2. Writing Consistent Outputs via SFC15 (DPWR_DAT):
    pascal CALL "DPWR_DAT" LADDR := W#16#200 // Start peripheral output address in Hex (e.g. 512 dec) RECORD := P#DB51.DBX0.0 BYTE 64 // Source Data Block buffer RET_VAL := #RetVal
  3. Execution Scheduling:
    * Execute SFC14 and SFC15 in cyclic execution tasks (OB35 in S7-400 / OB35 in S7-300) to ensure deterministic telemetry exchange.

Comparison of Data Consistency Types in PROFIBUS DP

The table below outlines the differences between consistency levels when transferring data over PROFIBUS DP.

Consistency LevelGranularityAccess Method in CPUMax Transfer SizeRisk of Data TearingByte8 bitsL PIB / T PQB1 ByteHigh (Multi-byte floats corrupt)Word16 bitsL PIW / T PQW1 Word (2 Bytes)High for 32-bit REAL variablesDword (S7-400)32 bitsL PID / T PQD2 Words (4 Bytes)Zero for single REAL valuesTotal Length (All)Full SlotSFC14 (Read) / SFC15 (Write)Up to 64 bytes per slotZero (Atomic block transfer)

Verification

To confirm that PROFIBUS DP master-slave communication is healthy:
1. In HW Config on both S7-400 and S7-315 stations, verify that all modules report Operational with no red fault indicators on the DP master bus.
2. In the S7-300 PLC, inspect RET_VAL of SFC14 and SFC15: verify it reports W#16#0000 (success).
3. In S7-300 DB51, write test values into the send buffer (e.g., 1234.56 into the first REAL word).
4. In PCS 7, open a variable table (VAT) monitoring the receiving data block: confirm that the identical value 1234.56 appears without byte swapping or latency.
5. In PCS 7, disconnect the PROFIBUS DP connector: verify that OB86 (Rack Failure) and OB122 (I/O Access Error) trigger cleanly and generate expected system alarms in WinCC.

Limitations and Operational Precautions

  • Never exceed 244 bytes of inputs or outputs per DP slave; configuring beyond 244 bytes causes HW Config compilation failure.
  • Both master and slave must configure identical slot modularity; if Slot 1 on the master is 32 words consistent and Slot 1 on the slave is configured as 16 words, the DP slave will reject parameterization and remain in BF (Bus Fault).
  • If OB86 is not programmed in the S7-300 CPU, disconnecting the PROFIBUS cable will transition the CPU immediately to STOP mode.
  • Always validate final hardware modules, bus cables, and software licensing against the applicable Siemens catalog and authorized distributor quotation.

Engineer FAQ

Why does SFC14 return error 8090?

Error 8090 indicates that the address specified at LADDR does not exist in the hardware configuration or was not configured with 'Total Length' consistency in HW Config.

Can I use GSD files to link PCS 7 to S7-300 across different projects?

Yes. When the S7-400 and S7-300 reside in separate multi-projects, export the S7-300 GSD file or use the standard Siemens S7-300 CPU GSD in the PCS 7 hardware catalog to configure the slave.

Does PROFIBUS DP communication consume PCS 7 Process Objects (PO)?

Raw PROFIBUS DP master-slave communication blocks (SFC14/15) do not consume PCS 7 Process Objects. Only technological blocks exposed to WinCC (S7_m_c := 'true') consume PO licenses.

Technical References

Related Articles

Related Tags

  • PROFIBUS DP
  • S7-300 Slave
  • SFC14
  • SFC15
  • Data Consistency
6 respuestas