Safe Online Software Revamping Strategies for CFC Charts in Live PCS 7 Controllers
In SIMATIC PCS 7, 'deactivating' an active CFC chart to hold it as a dormant backup while testing modified logic on a live controller cannot be accomplished by simply toggling an offline chart off, because the AS controller executes compiled machine code, not raw chart files. Deleting, moving, or changing the AS assignment of an existing chart requires downloading changes that physically remove the code from the CPU's work memory, precluding an instantaneous fallback. The manufacturer-approved strategy for live revamping without downtime is to implement the modified logic within the existing chart alongside the old logic, using a bumpless changeover switch (such as Sel02In or Mux02) controlled by an internal flag or faceplate toggle ('UseNewLogic'). Download the additions via 'Changes only' in RUN; if anomalies arise, toggle the switch back to the proven logic instantly with zero process interruption.
Table of Contents
- Executive Summary
- Architecture and Fundamental Mechanics
- Step-by-Step Implementation Procedure
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Executive Summary
Continuous process manufacturing facilities (refineries, petrochemicals, pharmaceuticals) operate 24/7 and cannot afford production halts to test software logic improvements or equipment modifications. Control engineers frequently seek a mechanism to keep an original CFC chart dormant in the controller while deploying a rewritten version, with the ability to instantly revert to the original if unpredicted control behavior occurs. Because PCS 7 enforces atomic program compilation and memory management, raw charts cannot be dynamically enabled or disabled in the controller. Adopting a parallel-logic design pattern with bumpless runtime selection switches delivers zero-downtime revamping and instantaneous fallback capabilities.
Architecture and Fundamental Mechanics
The execution model of SIMATIC PCS 7 Continuous Function Charts dictates how logic modifications interact with active controller memory:
- The Compiled Machine Code Reality:
* In PCS 7, CFC charts are graphical authoring views. When compiled, charts are translated into function blocks (FBs), data blocks (DBs), and execution pointers inserted into cyclic Organization Blocks (OB30-OB38).
* The AS controller has no concept of 'Chart A' vs 'Chart B'. It executes a continuous chain of runtime groups.
* If an engineer deletes a chart or changes its AS assignment, a 'Changes only' download immediately unlinks and deallocates those blocks from the CPU's memory. Reversing the change requires recompiling and re-downloading, which takes minutes and risks memory fragmentation. - The Hazard of Changing AS Assignment:
* Creating a 'dummy AS' in the project and moving the old chart into it severs the Plant Hierarchy and OS connections.
* Downloading the active AS removes the old chart's code entirely, while the new chart undergoes initial initialization, creating a potential process bump. - The Recommended Architecture (Parallel Logic with Bumpless Switching):
* Coexistence in Memory: The new modified logic is placed directly inside the active chart (or in a parallel chart executing in the same cyclic OB).
* Output Arbitration viaSel02In/Mux02:- The old logic's output connects to Input 1 of a selector block (
Sel02In.In1). - The new logic's output connects to Input 2 (
Sel02In.In2). - The output of
Sel02Inconnects to the physical actuator driver (Pcs7AnOuorPcs7DiOu). - Runtime Selection Flag (
Sel): - Parameter
Sel02In.Selis tied to an internal memory bit or an operator control toggle. - While
Sel = FALSE, the old logic governs the process. - When ready to test, an engineer toggles
Sel = TRUE. - If process parameters diverge, toggling
Sel = FALSEinstantly restores the proven algorithm within a single 100 ms cycle, with zero download latency.
- The old logic's output connects to Input 1 of a selector block (
Step-by-Step Implementation Procedure
Follow these best-practice engineering steps to execute a live software revamp without risk of downtime:
- Create an Offline Multi-Project Backup:
* Prior to initiating any logic modifications, executeFile > Archivein SIMATIC Manager.
* Save the complete baseline project (e.g.,Plant_Revamp_Baseline_20261014.zip). - Validate New Logic Offline via S7-PLCSIM:
* Test the new control algorithms thoroughly using S7-PLCSIM before introducing them to the production environment.
* Verify state transitions, interlocks, and edge cases. - Implement Parallel Logic in the Production Chart:
* In the production CFC chart, insert the new blocks alongside the existing logic.
* Do NOT disconnect the existing logic from the final output driver yet.
* Insert aSel02In(for analog setpoints/manipulated variables) orOr02/Sel02In(for digital outputs).
* Connect the output of the old logic toSel02In.In1.
* Connect the output of the new logic toSel02In.In2.
* ConnectSel02In.Outto the field actuator driver (Pcs7AnOu.PV_Inor valve control pin). - Parametrize the Selection Switch:
* ConnectSel02In.Selto a dedicated commissioning tag or internal parameter (e.g.,Revamp_Active).
* DefaultRevamp_Active = FALSE(Input 1 / Old Logic active).
* If analog control is involved, ensure bumpless tracking is enabled so that the dormant controller tracks the active output, preventing integral windup steps upon switchover. - Compile and Download Changes in RUN:
* In CFC, selectChart > Compile > Scope: Changes only.
* In the Download dialog, select Scope: Changes only.
* Confirm the download while the CPU remains in RUN. - Execute Live Testing and Validation:
* Verify that the plant continues operating normally under the old logic.
* Coordinate with operations, then toggleRevamp_Active = TRUE.
* Monitor the process. If abnormal behavior is observed, toggleRevamp_Active = FALSEimmediately. - Post-Commissioning Cleanup:
* After the new logic has proven stable over a defined trial period (e.g., several days of continuous operation), schedule a minor cleanup during normal maintenance:
* Remove the obsolete blocks and selector switch, connect the new logic directly to the driver, and execute a final 'Changes only' compile and download.
Verification
In CFC online test mode, verify that both the old and new logic calculate values concurrently. Observe Sel02In.Out; confirm that when Sel = FALSE, the output reflects In1 (old logic). Toggle Sel = TRUE; confirm that the output transitions smoothly to In2 (new logic) without tripping process interlocks or causing valve spikes. Verify that toggling back to FALSE restores previous control instantly.
Limitations and Operational Precautions
Ensure that the CPU 410-5H or S7-400 has adequate free work memory and communication resources to execute both algorithms simultaneously during the transition period. Avoid leaving obsolete logic permanently in active charts, as redundant blocks unnecessarily consume CPU cycle time and confuse future maintenance personnel.
Engineer FAQ
Can I just disable a runtime group to deactivate a chart?
Disabling a runtime group in the Run Sequence editor stops execution of those blocks, but their memory remains allocated and outputs freeze at their last state. If other charts read outputs from that group, they will receive stale data.
Why can't I just create a copy of the chart and rename it?
In PCS 7, block names within a chart and technological symbols must remain unique. Copying a chart duplicates blocks, requiring unique instance names and doubling hardware driver mappings, which will cause address conflicts on physical outputs.
Does downloading changes in RUN cause a bump in control valves?
Not if bumpless tracking is implemented. If the inactive PID or logic block tracks the active manipulated variable (MV), the output transition is completely smooth.
Can I store the backup chart in the Master Data Library?
Yes! Copying the original, unmodified chart into the Master Data Library or a dedicated backup folder provides a permanent offline reference that does not burden the AS controller.
Technical References
- SIMATIC Process Control System PCS 7 Engineering System (V9.0 SP3) Manual
- SIMATIC Process Control System PCS 7 CFC for S7 (V9.0 SP3) Manual (A5E41356001-AC)
- Siemens Industry Online Support Entry 109780813 - PCS 7 Licensing and Engineering Guidelines
Related Articles
- Preserving Delta Download Capability (Changes-Only Download) When Unpacking PCS 7 Multiprojects
- Configuring Entire OS vs Changes-Only Downloads and Resolving Grayed-Out Options in PCS 7
- Resolving CFC Error 1739 -60451 'Illegal Parameter Assignment' When Copying Charts and Templates
Related Tags
- Software Revamping
- Online Changes
- CFC
- Download in RUN
- Bumpless Transfer
- Sel02In