Why Classic STEP 7 Block Consistency Checks Fail in SIMATIC PCS 7
Never execute 'Check Block Consistency' or 'Compile All' from classic STEP 7 in a SIMATIC PCS 7 project. In PCS 7, the Continuous Function Chart (CFC) and Sequential Function Chart (SFC) compilers manage block organization, instance data blocks (DBs), and runtime groups. Classic STEP 7 consistency checks process blocks in alphabetical and numerical order without understanding CFC chart dependencies or reserved DB structures. This results in false-positive compile errors and can corrupt CFC instance DB allocations. In PCS 7, verify software consistency exclusively using 'CFC -> Compile -> Charts as Program' and Master Data Library block type synchronization.
Table of Contents
- Architectural Conflict: Classic STEP 7 vs PCS 7 CFC Data Model
- Consequences of Executing 'Compile All' in Classic Consistency Check
- Approved Methods for Ensuring Block Consistency in PCS 7
- Comparison: STEP 7 Block Consistency vs PCS 7 Program Compilation
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Architectural Conflict: Classic STEP 7 vs PCS 7 CFC Data Model
In traditional STEP 7 programming (LAD/FBD/STL), blocks are authored independently. When a Function Block (FB) interface changes, the programmer must execute Options -> Check Block Consistency (Bausteinkonsistenzprüfung) and run Program -> Compile All to recompile calling blocks and regenerate instance DBs.
In SIMATIC PCS 7, the engineering paradigm is fundamentally different:
- CFC Ownership of DBs: The CFC compiler dynamically generates and manages all instance DBs, chart cross-connections, and temporary internal variables. CFC reserves block and DB numerical ranges (typically DB60 to DB999+) for its internal data models.
- Chart Dependency Hierarchy: CFC blocks are executed within runtime groups linked to specific cyclic organization blocks (such as OB35, OB32). Their compilation sequence is dictated by topological execution order, not alphabetical block numbering.
- Incompatible Recompilation Logic: When classic STEP 7 Block Consistency is executed on a PCS 7 CPU, the classic compiler attempts to recompile blocks sequentially. It misinterprets CFC-generated instance DBs as orphan blocks or detects timestamp mismatches against raw block headers, flagging hundreds of spurious compilation errors.
Consequences of Executing 'Compile All' in Classic Consistency Check
Triggering Compile All from the classic STEP 7 Block Consistency window on a PCS 7 program can introduce severe engineering corruptions:
- Overwriting CFC Instance DB Structures: The classic compiler may overwrite DB interface offsets according to generic STEP 7 rules, breaking the internal memory map expected by CFC.
- Loss of Online Changes Capability: Discrepancies between the CFC database (
chart folder) and the raw block container force the CFC compiler into requiring a full CPU download in STOP mode, preventing delta downloads in RUN. - Message Configuration Invalidation: Alarm attributes (
S7_server,S7_m_c) embedded in CFC blocks can be detached from the OS message system, leading to unacknowledged or missing alarm faceplates in WinCC.
Approved Methods for Ensuring Block Consistency in PCS 7
To maintain absolute block consistency across a PCS 7 multiproject, adhere strictly to the following certified procedures:
- Master Data Library Synchronization:
- Always store certified library blocks (APL, Industry Library, or custom FBs) in the project's Master Data Library (MDL).
- To update modified block types across the multiproject, select the MDL block folder, click Options -> Charts -> Update Block Types..., and select all target automation stations. - CFC Program Compilation:
- Open any CFC chart and navigate to Chart -> Compile -> Charts as Program....
- For routine changes, select Scope: Changes only.
- For complete consistency verification, select Scope: Entire program and check Generate module drivers.
- The CFC compiler performs exhaustive dependency checks, interface validation, and address collision detection. - SCL Block Recompilation: If custom SCL blocks are modified, recompile them directly from the SCL source editor. Once the new FB is generated in the block folder, execute Update Block Types from the Master Data Library.
Comparison: STEP 7 Block Consistency vs PCS 7 Program Compilation
The following table highlights the critical differences between classic block consistency checks and PCS 7 CFC compilation:
| Evaluation Criteria | Classic STEP 7 Block Consistency | SIMATIC PCS 7 CFC Compilation |
|---|---|---|---|
| Target Environment | Discrete STEP 7 (LAD/FBD/STL) | Process Control (CFC/SFC/APL) |
| Instance DB Management | User-assigned or regenerated statically | Dynamically generated and managed by CFC compiler |
| Compilation Order | Alphabetical / Numerical order | Topological execution hierarchy & runtime groups |
| Impact on PCS 7 Projects | Corrupts CFC instance DB mappings; forces CPU STOP | Preserves online change capability (Download in RUN) |
| Hardware Diagnostic Generation | None | Automatically creates module drivers (MOD_D1, etc.) |
| Alarm System Integration | Basic STEP 7 message generation | Compiles WinCC OS tags and message server structures |
[!IMPORTANT]
Operational Directive: Never click 'Compile All' in the STEP 7 Block Consistency dialogue on any project containing > CFC charts. If classic consistency checks were accidentally executed, restore the project from an uncompressed backup or > perform a full CFC compilation ('Entire program') before attempting an online download.
Verification
Verify the consistency and integrity of a PCS 7 AS program using approved tools:
- CFC Full Compile Log: Open CFC and compile the Entire program. Check the compile log window; it must conclude with 0 Errors and detail the exact number of compiled blocks and PO consumption.
- Download Changes Capability: Open the download dialogue (PLC -> Download). Confirm that the option Scope: Changes only remains selectable and does not force an entire download in STOP mode.
- OS Compilation Validation: Run OS Compile from SIMATIC Manager. Confirm that all AS blocks transfer tags and messages to WinCC without interface mismatch warnings.
Limitations and Operational Precautions
Follow these precautions to protect the CFC block database:
- Never Manually Edit CFC Instance DBs: Do not open, modify, or renumber instance DBs created by CFC (DBs within the reserved range) in the classic LAD/STL editor.
- Do Not Delete Blocks from Block Folder: Never delete FBs or DBs directly from the SIMATIC Manager block folder if they are referenced in CFC. Always delete the block instance from the CFC chart first.
- Version Consistency in Multiproject: Ensure that all AS stations within a multiproject reference identical library versions from the Master Data Library.
Engineer FAQ
Why does STEP 7 Block Consistency report errors when CFC compiles with zero errors?
The classic STEP 7 consistency tool does not understand the CFC database or its dynamic instance DB structures. It tries to evaluate blocks according to discrete STEP 7 rules, generating false-positive errors.
What should I do if someone accidentally clicked 'Compile All' in Block Consistency?
Immediately open any CFC chart and execute 'Chart -> Compile -> Charts as Program -> Entire program'. Check 'Generate module drivers'. This allows the CFC compiler to overwrite classic inconsistencies and restore its internal DB map.
Can I use classic block consistency if my project has no CFC charts?
Yes. If a project is strictly programmed using discrete STEP 7 (LAD, FBD, STL) without CFC or PCS 7 libraries, the classic block consistency check is appropriate and recommended.
Does running CFC full compilation require a CPU STOP?
Compiling the entire program offline does not stop the controller. However, downloading the result may require a CPU STOP if block interface definitions or DB memory layouts were altered.
Technical References
- SIMATIC PCS 7 CFC for S7 Programming Guide (Entry ID 109754983)
- SIMATIC STEP 7 V5.6 System and Standard Functions Manual (Entry ID 109751826)
- SIMATIC PCS 7 Master Data Library Engineering Guide (Entry ID 109780813)
- Siemens Industry Online Support FAQ on Block Consistency in PCS 7 (Entry ID 24209977)
Related Articles
- Synchronizing Block Types and Attributes from PCS 7 Master Data Library
- Managing CFC Dynamic Instance DB Allocations and Reserved Ranges
- Resolving CPU STOP Requirements During Delta Downloads in PCS 7
- Best Practices for SCL Function Block Development in SIMATIC PCS 7
Related Tags
- Block Consistency
- CFC Compilation
- Instance DB
- Master Data Library
- PCS 7 Engineering
- STEP 7 Consistency