Understanding CFC Immediate Database Writing, Chart Write Protection, and Accidental Edit Prevention in PCS 7

Understanding CFC Immediate Database Writing, Chart Write Protection, and Accidental Edit Prevention in PCS 7

In SIMATIC PCS 7, Continuous Function Chart (CFC) and Sequential Function Chart (SFC) editors do NOT feature an 'Undo', 'Redo', or 'Save / Cancel' prompt upon closing. In PCS 7's relational database architecture, all graphical edits—such as deleting blocks, moving connections, or editing parameters—are written immediately and permanently into the project database. To prevent catastrophic accidental edits during program inspection, engineers must: (1) activate Test Mode ('Debug > Test Mode') when viewing live logic, which locks the graphical topology, (2) enable 'Chart Write Protection' on the Charts folder in SIMATIC Manager, or (3) configure read-only engineering access rights.

Table of Contents

Relational Database Architecture of the CFC and SFC Editors

Engineers transitioning from standard micro-PLC editors (such as TIA Portal or Step 7 LAD/FBD) are often shocked to discover that closing a CFC chart never asks: 'Do you want to save changes?':
* The Standalone Editor Paradigm: Standard code editors hold logic in temporary RAM buffers; changes are only committed when the user clicks 'Save'.
* The PCS 7 DCS Database Paradigm:
* A PCS 7 project is a live relational database.
* Every mouse drag, block placement, and signal line deletion writes directly and instantaneously to database tables on disk.
* If an engineer accidentally clicks a signal line and presses Delete, the connection is permanently erased from the project database the exact millisecond the key is pressed!

Why There Is No 'Undo', 'Redo', or 'Cancel' in SIMATIC CFC

The absence of an 'Undo' button in CFC is an architectural constraint:
* Complex Multi-Table Cross-Referencing:
* An interconnection between Block A and Block B updates run sequence lists, instance data block maps, WinCC OS message routing, and module driver generator cross-references simultaneously across multiple database files.
* Rolling back a multi-table database transaction graphically in real time carries massive risk of leaving orphaned pointers or database desynchronization.
* The Consequence: Once an interconnection is broken or a block deleted, it cannot be undone with Ctrl + Z. The engineer must either manually re-wire the connection or restore from a backup archive.

Immediate Protection: Utilizing Test Mode During Live Program Inspection

The most effective daily habit for viewing logic without risking accidental edits:

  • Activating Test Mode (Debug > Test Mode):
  • Whenever opening a CFC chart merely to inspect parameters, verify logic flow, or troubleshoot a trip, immediately switch on Test Mode (Ctrl + T or click the glasses icon).
  • The Graphical Lockout:
  • In Test Mode, the CFC editor switches to an online monitoring state.
  • All graphical topology is locked: blocks cannot be dragged, signal lines cannot be deleted, and new blocks cannot be inserted.
  • The engineer can safely observe live signals, inspect values, and toggle faceplate parameters without any danger of modifying code.

Configuring Chart Write Protection in SIMATIC Manager (PCS 7 V8.0+)

Starting in PCS 7 V8.0 and enhanced in V8.1 and V8.2, Siemens introduced Chart Write Protection:

  1. Protecting the Charts Folder:
    * In SIMATIC Manager, navigate to the S7 Program container.
    * Right-click the Charts folder: select Object Properties.
    * Under the General or Protection tab, check the box: Write protected.
  2. Operational Effect:
    * All CFC and SFC charts under the container open in Read-Only Mode.
    * A padlock icon appears in the chart title bar.
    * Engineers can view code, open properties, and run test mode, but any attempt to alter connections or parameters is blocked with a security alert.
  3. Unprotecting for Authorized Changes:
    * To make approved engineering modifications, an authorized engineer simply unchecks the write protection flag.

Comparison of Program Viewing and Protection Modes

The table below compares protection mechanisms available to prevent accidental edits in PCS 7 CFC.

Mode / FeaturePrevents Signal Line Deletion?Allows Live Value Monitoring?Allows Parameter Edits?Activation MethodStandard Edit ModeNO (Immediate permanent write)NoYesDefault opening stateTest Mode (Debug)YES (Topology locked)YES (Live values displayed)Yes (Online parameters only)Ctrl + T in CFC editorChart Write ProtectionYES (Entire chart locked)YESNO (Read-only)Right-click Charts folder in SIMATIC ManagerWindows Read-Only FolderYESNo (Cannot open DB)NOProhibited (Corrupts DB)

Verification

To confirm that write protection prevents accidental edits:
1. In SIMATIC Manager, set the Charts folder to Write protected.
2. Open a critical interlocking CFC chart.
3. Verify that the title bar indicates [Read Only].
4. Attempt to delete an interconnection: confirm that pressing Delete produces an audible error chime and the connection remains intact.
5. Attempt to drag a new block from the catalog: confirm that insertion is inhibited.
6. Activate Test Mode (Ctrl + T): confirm that live process values update dynamically on block pins.

Limitations and Operational Precautions

  • Never attempt to enforce write protection by marking project files as 'Read-only' in Windows Explorer; doing so will cause SIMATIC Manager to crash with database lock errors.
  • Write protection is a local engineering guardrail; it does not replace formal Version Trail archiving or multi-project change management.
  • Before executing any major plant modifications, always create a timestamped backup archive (File > Archive...) in SIMATIC Manager.
  • Always validate final software licensing and system documentation against the applicable Siemens catalog and authorized distributor quotation.

Engineer FAQ

Does upgrading to PCS 7 V8.1 or V8.2 add an Undo function to CFC?

No. Due to the underlying relational database architecture, the CFC editor does not feature an Undo function in any version of PCS 7.

What should I do if I accidentally deleted a connection in CFC?

If you remember what was connected, manually reconnect the pins. If complex logic was deleted and uncompiled, restore the specific chart or multi-project from your last backup archive.

Can I password-protect specific CFC charts?

Yes. Using the STEP 7 'Protect Chart' function or SIMATIC Version Cross Manager / Version Trail, you can restrict chart modifications to authorized personnel.

Technical References

Related Articles

Related Tags

  • CFC Editor
  • Write Protection
  • Test Mode
  • Database Writing
  • Accidental Edits
6 respuestas