Resolving CFC Download Error Block Already Exists in the CPU (FC3220, DB10237)

Resolving CFC Download Error Block Already Exists in the CPU (FC3220, DB10237)

The Continuous Function Chart (CFC) download error 'Block already exists in the CPU. Block was not downloaded' (e.g., for FC3220 or DB10237) occurs when offline chart compilation creates blocks whose numbers conflict with orphaned blocks resident in the online CPU. This condition arises after aborted download changes, manual block copying in SIMATIC Manager, or desynchronized instance DB allocations. In RUN mode, engineers can resolve the error by inspecting online blocks, identifying orphaned DBs and FCs not referenced in offline Chart Reference Data, and deleting them from the online CPU container. Executing a block type cleanup in CFC followed by a changes-only compile and download restores synchronized online execution.

Table of Contents

CFC Block Allocation and Download Mechanics

In SIMATIC PCS 7, Continuous Function Chart (CFC) dynamically manages the generation, numbering, and interconnection of internal function blocks (FB), functions (FC), and instance data blocks (DB). Unlike classic STEP 7 where programmers assign block numbers manually, CFC assigns numbers from reserved ranges (e.g., FC 60 to FC 1400, DB 1 to DB 16383).

When an engineer downloads changes, CFC compares the offline chart reference data against the online CPU's active block directory. If the online CPU already contains a block with the target number that the offline compiler believes it is creating for the first time, the download engine halts immediately to prevent overwriting active memory.

Root Causes of Block Existence Conflicts

The conflict typically stems from three operational scenarios:

ScenarioDescriptionImpact on CFC DownloadInterrupted DownloadA previous 'Download Changes' was canceled mid-transfer or lost communication.Online CPU contains newly transferred blocks, but offline CFC marked them as un-downloaded.Direct Block TransferBlocks were copied or downloaded directly from the SIMATIC Manager 'Blocks' folder.Offline CFC management database is bypassed, creating an online desynchronization.Uncommitted DeletionsA block (e.g., PIDConL or Pcs7DiOu) was deleted in CFC, but changes were not downloaded before adding new blocks.The compiler attempts to reassign the freed DB/FC number while the old instance still executes online.

Remediation Procedure Without Controller STOP

When the plant is operating and a full controller download (CPU STOP) is strictly prohibited, perform this procedure:

Step 1: Audit Offline vs Online Chart Reference Data

  1. In the CFC Editor, select Options -> Chart Reference Data (Ctrl + Shift + R).
  2. Navigate to the Block Types and PO Count for Instance DB views.
  3. Check whether the conflicting block (e.g., DB10237 or FC3220) is listed as active or marked as Deleted.

Step 2: Clean Up Block Types in Offline Charts

  1. In CFC, select Options -> Block Types....
  2. Click the Clean Up button: this clears unused block type registrations from the chart container.

Step 3: Remove Orphaned Blocks from Online CPU

  1. In SIMATIC Manager, select the AS station and click the Online window icon (accessible via toolbar).
  2. Open the online Blocks folder.
  3. Locate the specific conflicting DB or FC reported in the error log.
  4. Verify that this block is truly orphaned (i.e., not linked to any active offline CFC chart).
  5. Delete the orphaned block from the online CPU container.

Step 4: Recompile and Download Changes

  1. In CFC, initiate Compile -> select Changes only.
  2. Initiate Download -> select Changes only: the download completes successfully.

Verification

To verify that the block download error is fully resolved:

  1. Confirm that the CFC 'Download Changes' dialog finishes with progress bar reaching 100% and displays Download completed successfully.
  2. Check the CPU Diagnostic Buffer (Ctrl + D): verify zero block mismatch or memory management errors.
  3. Open the newly added block (e.g., Pcs7DiOu or CMP_R) in CFC and switch to Online Test mode (eyeglasses icon).
  4. Verify that output values dynamically update and that signal quality codes indicate good status (16#80).
  5. Open Chart Reference Data again: confirm zero orphaned or deleted instance DBs.

Limitations and Operational Precautions

Operational boundaries when managing online blocks:

  • Extreme Caution Deleting Online Blocks: Never delete an online DB or FC without verifying its instance relationship in Chart Reference Data. Deleting an active block will crash the CPU (OB121 programming error or CPU STOP).
  • Full Download Fallback: If extensive corruption occurs across hundreds of instance DBs, schedule a planned maintenance window to execute a full download (Download Entire Program).
  • WinCC Faceplate Independence: Deleting or creating faceplates in WinCC Graphics Designer does not affect PLC block existence in the AS.

Engineer FAQ

Can deleting a block from CFC cause block already exists errors later?

Yes. If a block is deleted from a chart, the compiler marks its instance DB for deletion. If you cancel the download changes mid-stream, the DB remains in the controller while offline CFC assumes the number is available.

Does downloading from SIMATIC Manager cause this error?

Yes. Downloading blocks directly from the SIMATIC Manager Blocks folder bypasses CFC's change tracking table, leading to immediate number collision during subsequent CFC downloads.

How can I test the fix safely in S7-PLCSIM?

Load your project into S7-PLCSIM, reproduce the error by canceling a download changes, delete the un-tracked online DB from PLCSIM's block folder, and re-run download changes.

What does CFC Block Type Clean Up do?

It scans all charts in the project, removes block types that are no longer instantiated, and reclaims reserved system function numbers.

Technical References

Related Articles

Related Tags

  • CFC-Download
  • Block-Already-Exists
  • FC3220
  • DB-Conflict
  • Download-Changes
  • Chart-Reference-Data
8 respuestas