Comparing Offline and Online CFC Programs and Parameter Readback in SIMATIC PCS 7

Comparing Offline and Online CFC Programs and Parameter Readback in SIMATIC PCS 7

In SIMATIC PCS 7, Continuous Function Charts (CFC) cannot be uploaded from the S7-400 controller to the Engineering Station because the controller stores only compiled binary machine code (MC7 blocks), while graphical chart structures exist exclusively in the offline ES database. To compare charts, opening any single CFC chart belonging to that CPU and switching to Test Mode automatically compares online and offline program timestamps across the entire controller. If timestamps match, the code logic is identical. To synchronize operational parameter changes (such as PID tuning and alarm limits) made online, execute 'Chart > Read Back' from any CFC chart; Read Back operates globally on the entire CPU program. Detailed graphical code comparisons require the SIMATIC Version Cross Manager (VXM).

Table of Contents

Executive Summary

When upgrading, modernizing, or performing software audits on legacy SIMATIC PCS 7 systems (such as migrating from PCS 7 V6.0 to V8.x or V9.x), automation engineers frequently face projects where backup archives exist on the Engineering Station (ES), but uncertainty remains as to whether the offline project precisely matches the code executing in the active S7-400 Automation Station. In classic STEP 7 (LAD/FBD/STL), engineers routinely upload blocks from the PLC to reconstruct offline projects. However, attempting to 'Upload' CFC charts from a PCS 7 controller is impossible by operating system design. Understanding why CFC upload is prohibited, how to verify online/offline timestamp equality through a single chart, and how to preserve operational parameters via 'Read Back' is essential to prevent catastrophic code overwrites. This guide details the verification principles and procedures.

The CFC Compilation Paradigm: Offline Source vs Online MC7 Machine Code

SIMATIC PCS 7 enforces a strict compilation paradigm:

  • Offline ES Database: Holds high-level engineering metadata: graphical chart layout, block interconnections, textual comments, Plant Hierarchy paths, and technological types.
  • AS Controller Memory: When CFC charts are compiled, the compiler decomposes the graphical structures into hundreds of standard STEP 7 machine blocks (OBs, FBs, FCs, DBs) containing raw MC7 bytecode.

Because graphical topology and signal interconnection pointers are stripped during compilation, the controller lacks the data required to reconstruct CFC charts.

Why CFC Upload from AS is Architecturally Impossible

Attempting to upload from the CPU via PLC > Upload Station to PG uploads only raw, disassembled STL blocks and global DBs into a standard STEP 7 container. These uploaded blocks cannot be re-imported into CFC; attempting to do so breaks the AS-OS engineering links.

Online/Offline Timestamp Verification via Single-Chart Test Mode

To determine if the offline CFC project matches the AS:

  • You do NOT need to open and inspect every individual CFC chart.
  • Opening any single CFC chart belonging to a CPU and switching to Test Mode (Debug > Test Mode) forces the editor to compare the global offline program timestamp with the online controller timestamp.
  • If the timestamps match, the editor goes online smoothly: the offline logic is 100% identical to the online controller.
  • If timestamps differ, PCS 7 displays an immediate warning dialog: 'There are differences between the offline and online program', indicating that changes were downloaded from another database or modified online.

Parameter Read Back Mechanics and Global Scope

Even when code logic is identical, operational parameters (such as PID proportional gains, alarm setpoints, and timer values) may have been adjusted in runtime by operators or commissioning engineers. Executing Chart > Read Back from any CFC chart reads back all changed parameter values from controller memory into the offline ES database for the entire CPU program.

Program Comparison and Synchronization Method Comparison

The following table compares methods for verifying and synchronizing PCS 7 programs:

Engineering ActionExecution ScopeWhat is Verified / TransferredSystem PrerequisitesPrimary Application ScopeCFC Test ModeEntire CPU (Single Chart Open)Program compilation timestamp equalityActive AS communication linkRapid confirmation that offline matches online.Chart Read BackEntire CPU ProgramOperational setpoints, tuning parametersOffline matches online timestampsCapturing runtime field tuning into project.Version Cross Manager (VXM)Detailed Chart LevelGraphical block-by-block differencesVXM license & XML exportAudit comparison between two project versions.PLC Upload to PGDisassembled MC7 BlocksRaw STL code only (No CFC charts!)Prohibited in PCS 7Prohibited; destroys CFC project links.Compare Blocks (STEP 7)S7 Block ContainerCompares raw DB/FB codeStandard STEP 7 toolDetects DB differences, but lacks CFC context.

Step-by-Step Program Verification and Read Back Procedure

Method 1: Verifying Online/Offline Code Timestamp Consistency

  1. Open the multiproject on the Engineering Station in SIMATIC Manager.
  2. Open any single CFC chart under the target AS program.
  3. In the CFC editor, click the Test Mode button (or select Debug > Test Mode).
  4. Evaluation:
    * If the editor transitions to test mode with yellow/cyan status banners and zero warnings, the entire offline program matches the AS.
    * If an error dialog appears stating differences exist, do NOT download; locate the authentic project backup or utilize VXM.

Method 2: Reading Back Runtime Parameters into the Offline Project

  1. Ensure the AS controller is online and operational.
  2. In the CFC editor, select Chart > Read Back from the menu bar.
  3. In the Read Back dialog, select scope Entire program.
  4. Choose which parameters to capture:
    * Operator control and monitoring (OCM) attributes (Captures operator faceplate setpoints).
    * Parameters marked for readback (Captures tuning values flagged with S7_read_back = true).
  5. Click OK. The wizard reads all live values from the CPU and commits them into the offline CFC database.
  6. Create a timestamped archive (.zip) of the synchronized multiproject.

Verification

To verify that the offline project is fully synchronized:

  1. Post-Readback Compilation Check: Execute Chart > Compile > Changes Only. Confirm that compilation finishes with 0 errors and requires zero structural changes.
  2. Online Delta Download Check: Perform a delta download (PLC > Download > Changes Only). Confirm that the wizard reports 'No changes to download' or executes without prompting for CPU STOP.
  3. Tuning Parameter Inspection: Open a known PID controller (e.g. PIDConL). Verify that parameter Gain in the offline chart reflects the live field tuning.

Limitations and Operational Precautions

  • Never Download on Timestamp Mismatch: If Test Mode reports differences, downloading from the ES will overwrite unknown plant modifications made online, risking process trips.
  • Loss of Offline Project: If the original ES multiproject is permanently lost, uploading blocks from the CPU cannot recreate the CFC charts; the automation system must be re-engineered from functional specifications.
  • Multi-Controller Projects: Parameter Read Back must be performed separately for each individual CPU in a multi-AS plant.

Engineer FAQ

Do I need to open every CFC chart to verify that all charts match the PLC?

No. Opening a single CFC chart in Test Mode checks the compilation timestamp of the entire S7 program for that CPU.

Can Parameter Read Back be performed while the process is actively running?

Yes. Read Back reads live data block values asynchronously; it has zero impact on controller execution or production stability.

What tool allows graphical block-by-block comparison between two PCS 7 projects?

The SIMATIC Version Cross Manager (VXM) provides detailed, side-by-side graphical comparison of CFC charts, parameters, and hardware configurations.

Technical References

Related Articles

Related Tags

  • https://industrialautomation.net/search?query=simatic-pcs7
  • https://industrialautomation.net/search?query=cfc-editor
  • https://industrialautomation.net/search?query=read-back
  • https://industrialautomation.net/search?query=engineering-workflow
6 respuestas