Fixing Empty CFC Editor Opening Failures and COM Re-Registration in SIMATIC PCS 7

Fixing Empty CFC Editor Opening Failures and COM Re-Registration in SIMATIC PCS 7

When double-clicking a Continuous Function Chart (CFC) in SIMATIC Manager Plant View launches the CFC editor but opens an empty window with no chart loaded, the Windows Shell command-line argument passing or STEP 7 COM automation server registration has become corrupted. In normal operation, STEP 7 invokes 's7cfcapp.exe /OpenChart

Table of Contents

Executive Summary

During engineering workflows in SIMATIC PCS 7 V9.0 SP2 with STEP 7 V5.6, engineers rely on double-clicking CFC charts in the Plant Hierarchy or Component View to open control strategies immediately for editing. A frustrating software anomaly occurs when double-clicking a chart launches the graphical CFC application, but displays a blank gray workspace without loading the selected chart. The engineer is forced to manually navigate to File -> Open inside the CFC editor, locate the chart path, and open it manually. This defect typically manifests following Windows cumulative updates, third-party software installations, or user profile permission resets. This article explains the Windows COM registration architecture connecting SIMATIC Manager to CFC and details the verified re-registration procedure.

Architecture and Fundamental Mechanics

STEP 7 Shell Architecture, OLE/COM Server Command Passing, and CFC Invocation Mechanics:

  • How SIMATIC Manager Opens a CFC Chart:
  • In SIMATIC Manager, the Plant View tree is managed by the Windows explorer shell extension s7wldx.exe.
  • Each CFC chart object possesses an internal GUID and an absolute database path inside the project's s7p container.
  • When the user double-clicks a chart, STEP 7 queries the Windows Registry under HKEY_CLASSES_ROOT to locate the registered automation server for CFC objects (s7cfcapp.exe).
  • STEP 7 executes an inter-process command invoking s7cfcapp.exe with command-line arguments specifying the target chart path: s7cfcapp.exe -open <ChartPath> (or via OLE automation interfaces IS7CFCApplication::OpenChart).

  • The Mechanism of the Empty Window Failure:

  • If the OLE/COM registration of s7cfcapp.exe becomes corrupted or unregistered (e.g. registry keys overwritten or missing), Windows executes the executable as a standalone process without forwarding the inter-process document parameter.
  • Consequently, s7cfcapp.exe launches in its default standby state: displaying the menu bar and toolbars, but with no active child MDI canvas.

  • Corrupted STEP 7 Workspace Cache:

  • STEP 7 maintains a local user layout cache under AppData\Local\Siemens\STEP7\Workspaces.
  • If a previous session crashed during chart opening, a corrupted window coordinate file can cause the newly opened chart to render off-screen or minimized into an invisible 0x0 pixel bounding box.

  • Solution via COM Server Self-Registration:

  • Siemens Windows binaries feature internal self-registration switches (/regserver).
  • Executing s7cfcapp.exe /regserver rewrites all required COM class IDs (CLSIDs), Type Libraries (TypeLibs), and OLE verb handlers into HKEY_CLASSES_ROOT, restoring automatic document binding.

Step-by-Step Implementation Procedure

  1. Close All Open SIMATIC Applications:
    * Save all work and close SIMATIC Manager, HW Config, CFC, and WinCC Explorer.
    * Open Windows Task Manager; verify that no orphaned instances of s7cfcapp.exe, s7wldx.exe, or s7tgtopx.exe are running.

  2. Re-Register CFC and STEP 7 COM Servers:
    * Open Windows Command Prompt as Administrator (Run as Administrator).
    * Navigate to the STEP 7 binary directory:
    cd /d "C:\Program Files (x86)\Siemens\STEP7\S7BIN"
    * Execute the following registration commands sequentially:
    cmd s7cfcapp.exe /regserver s7wldx.exe /regserver s7tgtopx.exe /regserver
    * Note: The commands execute silently within a few seconds without outputting text.

  3. Clear Corrupted STEP 7 User Cache Files:
    * In Windows File Explorer, navigate to:
    %LOCALAPPDATA%\Siemens\STEP7 (e.g. C:\Users\<Username>\AppData\Local\Siemens\STEP7).
    * Locate and delete temporary layout files and workspace caches (or rename the STEP7 folder to STEP7_Old).
    * STEP 7 automatically regenerates clean default layout files upon next launch.

  4. Relaunch and Test in SIMATIC Manager:
    * Launch SIMATIC Manager.
    * Open the project and switch to Plant View.
    * Double-click a CFC chart; confirm that the chart opens immediately inside the editor canvas.

Verification

  1. In SIMATIC Manager Plant View, double-click multiple distinct CFC charts across different hierarchy folders.
  2. Verify that each chart opens cleanly with all function blocks, sheets, and margin connectors rendered immediately.
  3. In Component View, right-click a chart -> Open Object; confirm identical rapid opening behavior.

Limitations and Operational Precautions

Re-registering binaries requires local Windows Administrator rights; standard user accounts cannot write to HKEY_CLASSES_ROOT. If COM registration succeeds but charts continue failing to open, check whether antivirus software is actively blocking inter-process DDE/COM communication between s7wldx.exe and s7cfcapp.exe.

Engineer FAQ

Why does double-clicking a CFC chart open an empty editor?

Because the OLE/COM registration of s7cfcapp.exe is corrupted, causing the editor to launch without receiving the chart path argument.

What command re-registers the CFC editor in Windows?

Run s7cfcapp.exe /regserver from an elevated command prompt inside C:\Program Files (x86)\Siemens\STEP7\S7BIN.

Where are temporary STEP 7 layout files stored?

In %LOCALAPPDATA%\Siemens\STEP7 within the user's Windows profile.

Does re-registering CFC alter project data or licenses?

No. It modifies only Windows Registry class bindings, leaving all project databases and licenses completely untouched.

What should I do if /regserver does not fix the problem?

Run the STEP 7 installer from installation media and choose the 'Repair' option to restore missing or corrupted DLL dependencies.

Technical References

Related Articles

Related Tags

  • CFC Editor
  • s7cfcapp.exe
  • COM Registration
  • regserver
  • Plant View
  • Double Click
  • STEP 7 V5.6
  • PCS 7 V9.0
20 respuestas