How to Structure Program Data in PCS 7: Moving from TIA Portal to Control Module Types

How to Structure Program Data in PCS 7: Moving from TIA Portal to Control Module Types

When transitioning from discrete machine programming in Siemens TIA Portal to distributed process control in SIMATIC PCS 7, engineers must replace manual data block (DB) arrays and User-Defined Data Types (UDT) with Continuous Function Charts (CFC) and Control Module Types (CMT). In TIA Portal, discrete machines typically organize equipment via custom Function Blocks and global DB structs. In PCS 7, manual data block indexing breaks automated SCADA compilation and dynamic driver generation. The standard PCS 7 engineering methodology packages equipment logic—such as motors, valves, and analog transmitters—into standardized Control Module Types in the Master Data Library, allowing hundreds of identical instances to be instantiated, updated, and compiled automatically to WinCC OS without manual tag mapping.

Table of Contents

The Paradigm Shift: Discrete Machine Control vs. Distributed Process Control

Engineers experienced with TIA Portal (STEP 7 V13–V18) are accustomed to building custom equipment architectures:
* The TIA Portal Pattern: A developer creates custom FBs, writes complex UDT structures (e.g., typePumpData), instantiates global Data Blocks holding arrays of structs (DB_Pumps.Pump[1..20]), and binds HMI graphics using absolute DB addresses.
* The Process Control Reality: Continuous process plants (chemical, pharmaceutical, water treatment) feature thousands of standard field devices operating continuously for decades. Hand-coded custom logic, manual I/O mapping, and individual DB management create unmaintainable systems prone to runtime address corruption during online changes.
* The PCS 7 Philosophy: The system handles data structures, instance DB numbering, and SCADA tag generation automatically. The engineer's role is composing pre-validated, standardized functional blocks into technological equipment models.

Why Manual Global DBs and UDTs Fail in PCS 7 CFC

Attempting to replicate TIA Portal global DB arrays in PCS 7 CFC causes severe technical deadlocks:

  1. Instance DB Re-numbering: When CFC charts are compiled, the compiler dynamically allocates and re-orders instance DBs to optimize memory packing. If an engineer attempts to read absolute DB addresses in WinCC, the pointers scramble during the next compilation.
  2. Lack of Structure Interconnections: CFC does not support direct interconnections between complex user UDTs or nested structs across charts. Signal routing is strictly pin-to-pin using elementary types or standard APL structures (Value, ST).
  3. Loss of Diagnostic Driver Generation: The PCS 7 Driver Generator inspects standard channel driver blocks (Pcs7AnIn, Pcs7DiIn). Custom FBs reading raw global DB registers cannot generate automatic system alarms, wire-break diagnostics, or channel fault faceplates.

The Standard Solution: Control Module Types (CMT)

In SIMATIC PCS 7, the approved mechanism for managing multi-instance equipment is the Control Module Type (CMT):

FeatureTIA Portal Custom DB / UDTPCS 7 Control Module Type (CMT)Template StorageProject Library Type / Global UDTMaster Data Library (MDL) Plant HierarchyInstantiating 50 PumpsManually create 50 calls or DB array indexCopy CMT 50 times; instances bind to I/O automatically via Import/Export wizardCentral ModificationsModifying UDT forces full DB download (CPU STOP)Modify CMT in Master Library; synchronize instances online via Configuration in Run (CiR)SCADA IntegrationManually map HMI tags to DB elementsAutomatic: OS compile creates WinCC tags, alarms, and binds APL faceplates

Method: Designing and Deploying Reusable Equipment Models

Follow this workflow to create and deploy standardized equipment models in PCS 7:

Step 1: Create the Control Module Type in the Master Data Library

  1. In SIMATIC Manager Plant View, expand the Master Data Library > Plant Hierarchy.
  2. Right-click the folder and select Insert New Object > Control Module Type.
  3. Name the template CMT_Pump_Standard.
  4. Open the CMT chart in the CFC editor:
    - Insert an instance of MotL (FB1850) from the Advanced Process Library (APL).
    - Insert input driver Pcs7DiIn (for run feedback) and output driver Pcs7DiOu (for start command).
    - Insert an interlock block Intlk04 (for protective trips: overload, low suction pressure, emergency stop).
    - Interconnect drivers and interlocks to MotL.
  5. Expose Configuration Parameters:
    - Drag I/O pins intended for plant-specific binding (such as hardware I/O addresses and tag names) into the Control Module Architecture window.

Step 2: Instantiate Control Modules Across the Plant

  1. In SIMATIC Manager Plant View, navigate to your target technological units (e.g., Plant1/AreaA/Pumps).
  2. Copy CMT_Pump_Standard and paste it into the unit folder. Rename the instance PUMP_101.
  3. Open the instance: connect the specific hardware terminal addresses (e.g., I 10.0, Q 4.0).
  4. Repeat this step for PUMP_102 through PUMP_150, or automate mass creation using the Import/Export Assistant (IEA) or Advanced Process Functions (APF) spreadsheet tools.
  5. Compile CFC charts and execute Compile OS.

Verification

To verify that the CMT-based data structure operates properly:

  1. In SIMATIC Manager Component View, inspect the generated block folder:
    - Confirm that instance DBs were generated automatically with symbolic names matching your plant hierarchy tags (e.g., Plant1/AreaA/Pumps/PUMP_101\MotL).
  2. In WinCC Explorer, open Tag Management:
    - Verify that all pump process tags (PUMP_101.PV, PUMP_101.FbkRun) were instantiated automatically under the S7 Named Connections driver.
  3. Open a WinCC process screen: confirm that running Create/Update Block Icons placed identical, fully animated pump block icons that open APL faceplates upon clicking.

Limitations and Operational Precautions

  • Do Not Bypass Master Data Library: Always maintain Control Module Types in the Master Data Library, never in individual project folders. Modifying an instance directly breaks template synchronization.
  • Process Object Sizing: Every instantiated technological block (MotL, VlvL, PIDConL) consumes one AS Process Object license. Ensure your license key pool covers your total anticipated instance count.
  • Standardize Feature Bits: Configure block configuration parameters (Feature Bits) at the CMT level before mass instantiation. Modifying feature bits across hundreds of existing instances requires batch synchronization.

Engineer FAQ

How do I view all pump statuses simultaneously if they are in separate CFC charts?
In PCS 7 OS, configure a Group Display or an Overview Screen containing the block icons of all pumps. WinCC aggregates alarms and statuses automatically without requiring a single shared data block.

Can I modify a Control Module Type while the plant is running?
Yes. You can add auxiliary logic or modify block connections in the Master Data Library CMT, synchronize instances to the project, and download changes to the controller online via Configuration in Run (CiR).

Why doesn't PCS 7 allow direct UDT interconnections between CFC charts?
To preserve deterministic memory execution, avoid pointer corruption during runtime changes, and allow the OS compiler to generate standardized structured tags.

Technical References

  • Siemens Industry Online Support Entry ID 109742323: SIMATIC Process Control System PCS 7 Engineering System Manual
  • SIMATIC PCS 7 Control Module Engineering Manual (Document No. A5E02779836)
  • Siemens Industry Online Support Entry ID 109809264: PCS 7 Plant Automation Accelerator and CMT Engineering Guide

Related Articles

Related Tags

  • https://industrialautomation.net/search?query=simatic+pcs7
  • https://industrialautomation.net/search?query=control-module-types
  • https://industrialautomation.net/search?query=engineering-system
  • https://industrialautomation.net/search?query=tia-portal
20 respuestas