Integrating S7-1200 as a PROFIBUS DP Slave to PCS 7 via CM 1242-5

Integrating S7-1200 as a PROFIBUS DP Slave to PCS 7 via CM 1242-5

To integrate a SIMATIC S7-1200 controller as a PROFIBUS DP slave to a SIMATIC PCS 7 S7-400 or CPU 410-5H master system using the CM 1242-5 communication module, configure the S7-1200 and CM 1242-5 as an I-Device / DP slave in TIA Portal, export the device's GSD file from TIA Portal, and import it into STEP 7 HW Config in PCS 7. In HW Config, assign consistent input/output transfer areas (e.g., 4 bytes read / 4 bytes write), map the peripheral addresses to CFC charts, and use SFC14 ('DPRD_DAT') and SFC15 ('DPWR_DAT') in the S7-400 program to ensure data consistency across the multi-byte bus interface.

Table of Contents

Executive Summary

Industrial process plants frequently integrate OEM skid equipment—such as chemical dosing packages, chillers, or air compressors controlled by compact SIMATIC S7-1200 PLCs—into a centralized SIMATIC PCS 7 distributed control system. Using the CM 1242-5 PROFIBUS DP slave communications module, an S7-1200 can exchange process parameters and interlocks with an S7-400 master. However, bridging the engineering divide between TIA Portal (used for S7-1200) and PCS 7 / STEP 7 V5.x requires proper GSD management, consistent data buffer addressing, and communication block calls. This guide details the complete end-to-end integration workflow.

Architecture and Fundamental Mechanics

Architecture of S7-1200 to PCS 7 PROFIBUS DP Slave Integration:

  • Master-Slave Roles Across Environments:
  • Master System (PCS 7): S7-400 (or CPU 410-5H) configured in STEP 7 V5.x / SIMATIC Manager acts as the Class 1 PROFIBUS DP Master.
  • Slave System (OEM Skid): S7-1200 (e.g., CPU 1214C) configured in TIA Portal with a CM 1242-5 module (e.g., 6GK7242-5DX30-0XE0) acts as a standard DP Slave.
  • The GSD Integration Bridge:
  • Because TIA Portal and STEP 7 V5.x are separate engineering databases, the S7-1200 configuration must be exported as a PROFIBUS GSD file (GSD_...) and imported into the PCS 7 hardware catalog.
  • I-Device Data Transfer Areas:
  • Transfer areas define bidirectional memory buffers between master and slave.
  • Example: S7-400 outputs QB200..QB203 (4 bytes) transfer across PROFIBUS DP and appear in S7-1200 inputs IB200..IB203.
  • S7-1200 outputs QB210..QB213 (4 bytes) transfer back and appear in S7-400 inputs IB210..IB213.
  • Data Consistency Rules:
  • When transferring multi-byte structures (e.g., a 4-byte REAL process value or 32-bit status word), standard peripheral load instructions (L PID) can experience byte fragmentation.
  • Multi-byte consistency across 4+ bytes must be managed using system functions SFC14 (DPRD_DAT) for reading and SFC15 (DPWR_DAT) for writing.

Step-by-Step Implementation Procedure

Step-by-Step Procedure to Integrate S7-1200 with PCS 7:

  1. Configure S7-1200 and CM 1242-5 in TIA Portal:
    - In TIA Portal, open the S7-1200 project.
    - Add the CM 1242-5 module to the left of the CPU in the Device View.
    - In CM 1242-5 Properties -> PROFIBUS interface -> Operating Mode -> select DP Slave.
    - Assign the PROFIBUS DP address (e.g., Address 12).
    - In 'I-Device / Transfer areas', add Transfer Area 1: 4 bytes Input / 4 bytes Output, Consistency: 'Entire length'.
    - Compile the S7-1200 station and download to the PLC.
    - In TIA Portal, export the GSD file for the configured CM 1242-5.
  2. Import GSD into PCS 7 STEP 7 HW Config:
    - On the PCS 7 Engineering Station, open HW Config.
    - Select Options -> Install GSD File... -> browse to the exported GSD file.
    - Select Options -> Update Catalog.
  3. Insert S7-1200 Slave onto PCS 7 PROFIBUS Master System:
    - In HW Config catalog, expand PROFIBUS DP -> Additional Field Devices -> PLC -> SIMATIC -> select the CM 1242-5 slave.
    - Drag the slave onto the S7-400 DP master bus.
    - Set the DP address to match TIA Portal (Address 12).
    - In the slave slots, insert the matching transfer area module: '4 Bytes In / 4 Bytes Out (Consistent)'.
    - Note the assigned I/O addresses (e.g., IB 210 / QB 200).
    - Save and Compile HW Config, then download to the S7-400.
  4. Program Communication in PCS 7 CFC:
    - Open the target CFC chart.
    - If data consistency is set to 'Entire length' (>4 bytes), insert SFC14 (DPRD_DAT) to read data from LADDR := W#16#D2 (210 decimal) into a DB structure.
    - Insert SFC15 (DPWR_DAT) to write data to LADDR := W#16#C8 (200 decimal).
    - Wire the decoded variables to standard APL blocks or interlocks.

Verification

To verify S7-1200 communication:
1. In PCS 7 HW Config, go online; verify that the CM 1242-5 slave shows normal operational status (no red slash or DP bus fault).
2. In TIA Portal, monitor the S7-1200 watch table; write a test float (123.45) to QD 210.
3. In PCS 7 CFC test mode, observe the corresponding input DB variable; confirm it reads 123.45.
4. Write a control bit from PCS 7 (QB 200.0 := 1); confirm the S7-1200 inputs update instantly.

Limitations and Operational Precautions

Operational precautions:
- Ensure that PROFIBUS DP baud rates and bus parameters in TIA Portal match the PCS 7 DP master system settings exactly (e.g., 1.5 Mbps, Profile DP).
- Multi-byte consistency across 4+ bytes must use SFC14 and SFC15; reading multi-byte variables directly via peripheral load commands (L PID) without SFC14 can capture partially updated bytes during bus transmission.
- Verify physical bus termination: ensure active bus terminating resistors are switched ON only at the two extreme physical ends of the PROFIBUS cable.

Engineer FAQ

Can an S7-1200 be programmed directly from SIMATIC Manager / PCS 7?

No. The S7-1200 hardware requires TIA Portal for programming; it integrates into PCS 7 as a standardized PROFIBUS or PROFINET slave via a GSD/GSDML file.

What communication module allows an S7-1200 to act as a PROFIBUS slave?

The SIMATIC CM 1242-5 communications module (6GK7242-5DX30-0XE0).

Why are SFC14 and SFC15 necessary for 4-byte transfers?

SFC14 (DPRD_DAT) and SFC15 (DPWR_DAT) guarantee that multi-byte values (such as 32-bit floating-point reals) are transferred with complete data consistency, preventing torn values.

Can an S7-1200 be integrated with PCS 7 over PROFINET instead?

Yes, by configuring the S7-1200 onboard PROFINET port as an I-Device and exporting a GSDML file into PCS 7 HW Config.

Does connecting an S7-1200 slave consume PCS 7 Process Objects?

The slave hardware itself does not consume POs; only the technological blocks instantiated in CFC to monitor or control the skid consume standard AS/OS POs.

Technical References

Related Articles

Related Tags

  • S7-1200
  • CM 1242-5
  • PROFIBUS DP Slave
  • GSD File
  • SFC14 SFC15
20 respuestas