Resolving 'Cannot Read OCM Attributes' Error When Deleting CFC Chart Folders in PCS 7

Resolving 'Cannot Read OCM Attributes' Error When Deleting CFC Chart Folders in PCS 7

The error message "Cannot read OCM attributes" when attempting to delete a CFC chart folder in a SIMATIC PCS 7 multiproject occurs because the underlying Step 7 and CFC cross-reference database (ombstx and globdb) contains orphaned, locked, or corrupt Operator Communication and Monitoring (OCM) attribute pointers (S7_m_c := 'true'). This condition is typically triggered by concurrent open editors, active WinCC background compilers (s7tgtopx.exe), unresolved cross-chart interconnections, or incomplete OS compilation transactions. Resolving the fault requires closing all engineering editors, executing a "Save with Reorganization (Slow)" on the user project to purge stale OCM references, dissolving unresolved textual interconnections, and terminating orphan database lock processes.

Table of Contents

Database Architecture of OCM Attributes in PCS 7

In SIMATIC PCS 7, block parameters intended for operator visualization and alarm messaging carry the special system attribute S7_m_c := 'true' (Operator Communication and Monitoring). When blocks carrying OCM attributes are placed within Continuous Function Charts (CFC), the engineering system registers these parameters in the Step 7 database (ombstx) and the global symbol management tables.

When an entire chart folder within the component view or plant hierarchy is marked for deletion, SIMATIC Manager must verify and unbind every registered OCM attribute, dereference all WinCC message tags, dissolve chart-to-chart cross-references, and clear block instance registrations from the OS compilation cache. If an attribute pointer points to a non-existent database record or is locked by a background process, the deletion transaction aborts with the error: Cannot read OCM attributes.

Common Triggers for OCM Lock and Corruption Errors

The failure to read or modify OCM attributes during deletion operations stems from specific database lock and synchronization issues:

Failure Root CauseMechanism / ConflictAssociated File or ProcessResolution MethodActive Editor LocksCFC, SFC, or WinCC Explorer holding an active file handles7cfcx.exe, WinCCExplorer.exeClose all engineering editors; kill stale background tasksStale OS Compilation CacheInterrupted OS compile leaving temporary OCM tags lockeds7tgtopx.exe, globdb.dbfExecute 'Save with Reorganization (Slow)' in SIMATIC ManagerUnresolved Textual LinksCharts in folder reference external charts that were deletedCFC Textual Interconnections tableOpen Chart Reference Data; clear or dissolve textual linksDatabase Index FragmentationHeavy engineering edits causing table corruptionombstx\ subfolder in S7 projectReorganize project or retrieve uncorrupted archiveShared Multi-User AccessAnother engineering station currently editing the projectSimatic Shell database lockClose remote sessions and restart Engineering Station

If a user previously deleted individual blocks or charts while WinCC was compiling in the background, the OCM table becomes desynchronized, leaving dangling pointers that reject standard deletion commands.

Step-by-Step Recovery Procedure via Reorganization

To clear corrupt OCM pointers and safely delete the target chart folder:

  1. Close All Active Applications: Close CFC, SFC, Hardware Configuration, NetPro, and WinCC Explorer. Open Windows Task Manager and verify that no orphaned background processes remain active (specifically check for s7cfcx.exe, s7tgtopx.exe, s7wndx.exe, and ccapp.exe).
  2. Execute Deep Project Reorganization:
    - In SIMATIC Manager, select the specific user project within the Multiproject containing the problematic chart folder.
    - Click File -> Save with Reorganization (Slow)... (or File -> Save As... with the With Reorganization (Slow) checkbox enabled).
    - This process scans the entire S7 relational database, purges deleted records, re-indexes OCM tables, and removes dangling symbol pointers.
  3. Dissolve Chart Reference Interconnections:
    - Open any remaining valid chart in the program.
    - Navigate to Options -> Chart Reference Data.
    - Select Interconnections -> Textual Interconnections.
    - If references point to the folder to be deleted, click Delete Interconnection or Dissolve.
  4. Delete the Chart Folder:
    - In SIMATIC Manager Component View, navigate to the target Charts folder.
    - Right-click the folder and select Delete. The deletion should now complete without database exceptions.

Resolving Cross-Chart and Textual Interconnections

When deleting a chart folder that contains blocks linked to other charts outside the folder, SIMATIC Manager attempts to convert those connections into open 'textual interconnections'. If the cross-reference tables are inconsistent, this conversion fails, throwing the OCM attribute error.

To circumvent this, open the charts inside the folder prior to deletion, use the Chart Reference Data tool to trace all external cross-chart interconnections, and manually disconnect them. Once all inputs and outputs are isolated from external charts, delete the individual CFC charts first before deleting the parent folder.

Verification

To verify that the chart folder has been cleanly deleted and database consistency is restored:
1. In SIMATIC Manager Component View, confirm that the target chart folder no longer appears under the S7 Program.
2. Select the S7 Program, right-click, and select Check Block Consistency...; execute a full consistency check and ensure zero fatal database errors are reported.
3. Open the CFC Editor on a remaining chart and select Chart -> Compile -> As Program (Changes only); confirm that compilation completes successfully without OCM generation errors.
4. Open the OS project and execute an OS Compile (Changes only) to confirm that WinCC tags and message definitions synchronize cleanly.

Limitations and Operational Precautions

Never delete a chart folder directly from the Windows file system (e.g., deleting folders under the S7 project directory on disk). Step 7 relies on synchronized binary databases across multiple subdirectories; deleting files via Windows Explorer causes catastrophic project corruption. Always perform a complete Multiproject backup via File -> Archive before performing database reorganization or mass chart deletions.

Engineer FAQ

What does 'Save with Reorganization (Slow)' actually do?

Standard 'Save' simply marks deleted records as inactive. 'Save with Reorganization (Slow)' creates a clean database, physically removes deleted records, eliminates fragmentation, and recalculates all OCM and symbol cross-reference tables.

Can I delete a chart folder while WinCC Explorer is open?

No. WinCC maintains active database locks on OCM-tagged tags and alarm configurations. Attempting to delete charts with WinCC open frequently causes OCM read/write collisions.

What if 'Save with Reorganization' fails with a database lock error?

Reboot the Engineering Station to release all lingering file locks held by Siemens background services. If the failure persists, create a new clean project and copy the functional S7 components into it.

Technical References

Related Articles

Related Tags

  • CFC Editor
  • OCM Attributes
  • Database Corruption
  • Save with Reorganization
  • Step 7 Engineering
6 respuestas