Safe Online Software Revamping Strategies for CFC Charts in Live PCS 7 Controllers

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

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:

  1. 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.
  2. 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.
  3. 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 via Sel02In / 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 Sel02In connects to the physical actuator driver (Pcs7AnOu or Pcs7DiOu).
    • Runtime Selection Flag (Sel):
    • Parameter Sel02In.Sel is 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 = FALSE instantly restores the proven algorithm within a single 100 ms cycle, with zero download latency.

Step-by-Step Implementation Procedure

Follow these best-practice engineering steps to execute a live software revamp without risk of downtime:

  1. Create an Offline Multi-Project Backup:
    * Prior to initiating any logic modifications, execute File > Archive in SIMATIC Manager.
    * Save the complete baseline project (e.g., Plant_Revamp_Baseline_20261014.zip).
  2. 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.
  3. 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 a Sel02In (for analog setpoints/manipulated variables) or Or02 / Sel02In (for digital outputs).
    * Connect the output of the old logic to Sel02In.In1.
    * Connect the output of the new logic to Sel02In.In2.
    * Connect Sel02In.Out to the field actuator driver (Pcs7AnOu.PV_In or valve control pin).
  4. Parametrize the Selection Switch:
    * Connect Sel02In.Sel to a dedicated commissioning tag or internal parameter (e.g., Revamp_Active).
    * Default Revamp_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.
  5. Compile and Download Changes in RUN:
    * In CFC, select Chart > Compile > Scope: Changes only.
    * In the Download dialog, select Scope: Changes only.
    * Confirm the download while the CPU remains in RUN.
  6. Execute Live Testing and Validation:
    * Verify that the plant continues operating normally under the old logic.
    * Coordinate with operations, then toggle Revamp_Active = TRUE.
    * Monitor the process. If abnormal behavior is observed, toggle Revamp_Active = FALSE immediately.
  7. 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

Related Articles

Related Tags

  • Software Revamping
  • Online Changes
  • CFC
  • Download in RUN
  • Bumpless Transfer
  • Sel02In
20 respuestas