Resolving Delta Download Blocks and Phantom Data Block References in SIMATIC PCS 7 CFC
In SIMATIC PCS 7, when an engineer cannot perform a Changes-only download (Delta Download) to the Automation Station and the compiler halts citing an internal phantom Data Block (such as DB83) that does not exist in either the online or offline blocks folder, the failure is caused by corrupted delta tracking tables or orphaned compiler-generated runtime Function Calls (FCs). This occurs when charts or block instances are deleted or restructured without clearing the compiler's temporary execution cache. To resolve this, navigate to the AS S7 Program's Blocks folder, delete all compiler-generated FCs (blocks with names starting with @ or Chart_), execute 'File > Save As... (with reorganization)' in SIMATIC Manager, perform a full compilation ('Entire program' with 'Generate S7 blocks' and 'Generate Module Drivers'), and download the program.
Table of Contents
- Mechanics of Delta Compilation and the Delta Download Lock
- Root Causes of Phantom Block References (e.g., DB83)
- Step-by-Step Recovery: Purging Compiler FCs and Reorganizing
- CFC Compilation Scope and Block Generation Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Mechanics of Delta Compilation and the Delta Download Lock
Continuous Function Chart (CFC) programming in SIMATIC PCS 7 enables engineers to modify control logic, tune parameters, and add new blocks online without interrupting active plant processes. This capability is governed by the Delta Download engine (Download Changes).
To support delta downloads, the CFC compiler maintains an internal database of structural footprints, block call sequences, and instance Data Block allocations. When an engineer clicks Compile > Changes only:
1. The compiler compares the current graphical chart topology against the database of the last successful compile.
2. It generates executable S7 machine code containing only the modified logic.
3. It packages these changes into incremental blocks that the CPU operating system can dynamically swap in memory while in RUN mode.
However, if an inconsistency arises between the offline CFC chart topology and the S7 program Blocks folder—such as an instance DB or runtime FC being referenced in the compiler's tracking table while absent from the disk—the compiler locks out delta compilation, reporting that an entire download is mandatory.
Root Causes of Phantom Block References (e.g., DB83)
When the engineering system generates errors citing a missing block (e.g., 'DB83 does not exist' or 'Block DB83 referenced by compiler cache is missing'), engineers often search both the offline Blocks folder and the CPU online memory, finding no trace of the block.
This phantom block phenomenon arises from four technical failure modes:
1. Orphaned Runtime FCs: The CFC compiler translates graphical charts into hidden executable routines called Runtime Function Calls (e.g., @CFC_..., Chart_FC1). These FCs contain hardcoded pointer calls to instance DBs. If a chart is deleted, but its generated FC remains in the Blocks container, subsequent delta compilations attempt to link against obsolete DB numbers.
2. Aborted Compilation Sessions: If SIMATIC Manager or the ES workstation crashes, loses power, or is terminated via Task Manager during a compilation run, the compiler database writes partial records into the project's internal Sybase / Microsoft Access database tables.
3. Database Fragment De-synchronization Following Re-numbering: When an engineer manually renumbers a block or reorganizes the symbol table, the cross-reference pointer inside the chart management database retains the previous DB address.
4. Copying Charts Between AS Stations: Copying CFC charts from a donor AS project that already allocated DB83 into a recipient AS station whose symbol table reserved DB83 for a different function creates an unresolvable collision.
Step-by-Step Recovery: Purging Compiler FCs and Reorganizing
When a standard full compile fails to clear the phantom DB error, execute the following definitive procedure:
Step 1: Delete Compiler-Generated Function Calls (FCs)
- Open SIMATIC Manager and navigate to the AS station's S7 Program > Blocks folder.
- Sort the blocks by Object Name or Symbolic Name.
- Select and DELETE all compiler-generated FCs:
- All blocks whose symbolic name begins with@(e.g.,@CFC_...,@SFC_...).
- All blocks named after CFC charts (e.g.,Chart_1,FC_TempCtrl).
- CRITICAL PRECAUTION: Do NOT delete standard library FBs (e.g.,FB1845,FB1850), Organization Blocks (OB1,OB35,OB86), or user-written SCL/LAD blocks. - By deleting these generated FCs, you force the compiler to reconstruct its entire execution run-sequence from scratch.
Step 2: Reorganize the Project Database
- In SIMATIC Manager, select menu File > Save As....
- Select the option: With Reorganization (Slow).
- Specify a temporary project name.
- The reorganization utility purges orphaned pointers, cleans deleted database records, and rebuilds internal index trees.
Step 3: Perform Full Compilation with Module Drivers
- Open the reorganized project.
- Select the
Chartsfolder and click Chart > Compile > Charts as Program.... - In the compilation dialog, select Entire program (do not select Changes only).
- Ensure both checkboxes are active:
- Generate S7 blocks
- Generate Module Drivers - Execute the compilation: The compiler scans all charts, allocates fresh sequential DB and FC numbers, and reports 0 Errors.
Step 4: Download to the Automation Station
- If the CPU is currently in RUN and process conditions allow delta download, attempt a Changes-only download.
- If block structural addresses were reordered, schedule a plant maintenance window and perform a Full Download in CPU STOP mode to re-synchronize online and offline memory.
CFC Compilation Scope and Block Generation Matrix
The following matrix compares compilation modes and their impacts on runtime blocks:
@MOD_... diagnostic and channel driversVerification
To confirm that delta download capability is fully restored:
1. In CFC Editor, make a minor, safe operational change (e.g., modify an alarm warning limit or adjust a filter time on an uncritical block).
2. Click Compile and select Changes only: Verify that compilation finishes with 0 Errors and 0 Warnings.
3. Select PLC > Download.
4. In the download dialog, verify that the option Changes only is active and selectable (not grayed out).
5. Click OK: Confirm that the delta download completes while the CPU remains continuously in RUN mode without throwing phantom DB errors.
Limitations and Operational Precautions
Observe the following engineering precautions:
- Full Download Requires Controller STOP: If the database cleanup shifted instance DB numbers, the engineering system will disallow delta download and require a full download. A full download transitions the CPU to STOP. Never initiate a full download without verifying plant interlocks and obtaining management approval.
- Do Not Manually Assign Reserved DB Numbers: In the S7 symbol table, never manually assign user Data Blocks into the range reserved for CFC (typically DB1 to DB599 or as configured in CFC Chart Properties). Collisions between manual DBs and auto-generated DBs corrupt delta compilation.
- Keep Master Data Library Synchronized: Ensure all blocks used in CFC charts derive exclusively from the Master Data Library to prevent block header conflicts.
Engineer FAQ
Why did deleting compiler-generated FCs fix the missing DB error?
Compiler-generated FCs contain compiled pointer references to specific instance DBs. If a chart was previously deleted or restructured, an obsolete FC lingering in the Blocks folder continuously demanded the missing DB. Deleting the FCs forced the compiler to regenerate clean code matching only existing charts.
What does 'Save As with Reorganization' actually do?
STEP 7 uses an underlying relational database to manage charts and symbols. Deleted objects leave fragmented, hidden records. 'Reorganize' creates a clean database, defragmenting storage and permanently removing orphaned pointers.
Can I avoid a CPU STOP after a full compilation?
If the full compilation did not alter existing block interfaces, instance DB numbers, or memory structures, the compiler may still permit a 'Changes only' download in RUN mode. However, if DB numbering shifted, a CPU STOP is strictly mandatory.
Technical References
- SIMATIC Process Control System PCS 7 CFC for S7 Function Manual (A5E36988876-AA)
- SIMATIC Process Control System PCS 7 Compendium Part A - Configuration Guidelines (A5E43573954-AB)
- SIMATIC STEP 7 V5.5 S7-SCL and CFC Block Consistency Manual (A5E02789666-01)
Related Articles
- Resolving SFC Chart Does Not Exist Errors During Download and Online Monitoring
- Understanding Parameter Read Back in SIMATIC PCS 7 CFC and Preventing Data Loss
- Identifying Data Blocks and Instance DBs Generated by SFC Charts in SIMATIC PCS 7
- Resolving CFC Compilation Error Parameter Assignment of Sampling Times Not Possible
Related Tags
- CFC
- Delta Download
- Changes Only
- Compilation
- Database Corruption
- SIMATIC PCS 7
- S7-400