Preventing Parameter Loss During CFC Readback After Shifting DB Ranges
Expanding user DB ranges in PCS 7 compilation settings shifts the automatic instance DB numbers allocated by the CFC compiler (e.g. shifting VFD instance DBs from DB250 to DB476). Performing a direct download without precautions will overwrite online tuned parameters, PID gains, and operational setpoints with offline defaults. CFC Chart Readback matches parameters by technological Chart Name and Block Name, not raw DB numbers. To prevent parameter loss, connect to the live PLC using the original project backup, execute 'Chart -> Read Back...' (Scope: OCM-capable parameters), apply the DB range changes and block additions to the read-back project, compile, and download.
Table of Contents
- Why DB Range Alterations Shift Instance DB Numbering
- How CFC Chart Readback Maps Parameters Online
- Step-by-Step Procedure to Preserve Live Plant Parameters
- CFC Readback Scope and Parameter Retention Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Why DB Range Alterations Shift Instance DB Numbering
In SIMATIC PCS 7, the Continuous Function Chart (CFC) compiler dynamically manages all instance data blocks (DBs) for blocks placed on charts. The compiler reserves a specific range of DB numbers (configured under Options -> Customize -> Compilation/Download... in CFC, e.g. reserved user range DB1 to DB60, and CFC reserved range DB61 to DB999).
When an engineer expands the reserved user DB range (e.g. expanding user DBs up to DB400 to accommodate new manual DBs):
- The starting threshold for CFC-managed instance DBs moves upward (e.g. from DB61 to DB401).
- On the next compilation (Entire program), CFC shifts all automatically allocated instance DBs upward. A block previously compiled as
DB250becomesDB476. - If an engineer downloads this newly compiled program directly to the controller, the CPU receives newly initialized DBs containing default initial values from the offline chart, wiping out months of online PID tuning, calibrated operating hours, and recipe setpoints.
How CFC Chart Readback Maps Parameters Online
To protect live parameter tuning, PCS 7 provides the Chart Readback (Rücklesen) mechanism. Understanding how readback works resolves the fear of shifted DB numbers:
- Object-Oriented Parameter Mapping: Readback does not rely on raw DB numbers. It matches block parameters based on the technological Chart Name / Block Name / Parameter Name hierarchy.
- Cross-Reference Map Synchronization: When readback executes against the running CPU, it uses the offline project's cross-reference list to look up which physical DB is currently online, reads the live values from CPU RAM, and writes them into the offline CFC chart database.
However, readback must be executed before shifting DB ranges and recompiling, because once the offline cross-reference map is overwritten with new DB numbers, the engineering station can no longer correlate the online DBs with the offline charts.
Step-by-Step Procedure to Preserve Live Plant Parameters
Follow this rigorous engineering procedure before performing on-site downloads with shifted DB ranges:
- Baseline Live Readback (Before Changes):
- Connect the engineering PC to the live plant network.
- Open the untouched original project backup matching the running CPU.
- In any CFC chart, select Chart -> Read Back....
- Select Scope: OCM-capable parameters (or All parameters if complete operational state is required).
- Execute the readback. All live setpoints, PID gains, and runtime counts are safely transferred into the offline chart database. - Apply Hardware and Logic Changes to Read-Back Project:
- In this freshly read-back project, add the new VFD blocks, AI modules, and hardware configurations.
- In CFC, adjust the compiler DB ranges under Options -> Customize -> Compilation/Download.... - Compile Charts:
- Execute Chart -> Compile -> Charts as Program -> Entire program.
- The compiler allocates the new DB numbers (e.g.DB476), but populates them with the read-back live values! - Parameter Audit via Version Cross Manager (VXM):
- Use SIMATIC Version Cross Manager (6ES7658-1CX58-0YA5) to compare the read-back project against the plant archive to confirm that all operational parameters are preserved. - Execute AS Download: Download the project to the target CPU during the scheduled commissioning window.
CFC Readback Scope and Parameter Retention Matrix
The following table details what parameters are preserved under different CFC readback scopes:
S7_m_c := 'true'S7_read_back[!IMPORTANT]
Operational Precaution: Shifting DB ranges modifies the memory addresses of virtually all instance blocks, which forces the > CFC compiler to require a full AS download in STOP mode. Plan this engineering change during a scheduled plant outage.
Verification
Verify that live parameters were successfully captured and restored:
- CFC Offline Parameter Check: Before downloading, open a critical PID controller chart (e.g.
PIDConL). Confirm that the offlineGainandTIparameters match the values recorded in recent plant logsheets rather than factory defaults. - Online Verification Post-Download: After downloading and restarting the CPU, go online in CFC. Confirm that VFD setpoints, calibrated limits, and operating hours counters reflect their pre-download values.
- WinCC Faceplate Inspection: Check WinCC runtime faceplates. Verify that operator setpoints and alarm limits remain identical to pre-maintenance settings.
Limitations and Operational Precautions
Observe these guidelines when performing readback operations:
- Never Recompile Before Readback: If you recompile with new DB ranges before executing readback, the offline cross-reference pointer table is destroyed, preventing successful readback from the running CPU.
- Avoid Running Readback on Unmatched Offline Projects: Ensure the offline project opened for readback is identical in structure to the code executing in the online CPU.
- S7-400H Redundant CPUs: Perform readback on the master CPU; when downloading, the project synchronizes automatically to the standby CPU.
Engineer FAQ
Does CFC Readback rely on DB numbers to find values online?
No. Readback matches parameters by technological Chart Name and Block Name. However, it requires the original offline cross-reference map to locate which DB currently corresponds to each block in online CPU RAM.
Why did my instance DB numbers jump from DB250 to DB476?
You increased the reserved user DB range in CFC compilation settings. CFC shifted its dynamic instance DB range upward to avoid overlapping the new user DB numbers.
Can I download changed DB ranges in RUN?
No. Shifting DB ranges changes the block numbers of active instance DBs across the entire CPU, which forces a full AS download in STOP mode.
What is the best way to verify parameter changes before downloading?
Use SIMATIC Version Cross Manager (VXM) to compare the offline project against the online CPU or site archive to detect any unintentional parameter discrepancies.
Technical References
- SIMATIC PCS 7 CFC for S7 Programming Manual (Entry ID 109754983)
- SIMATIC PCS 7 Compendium Part A - Configuration Guidelines (Entry ID 109780813)
- SIMATIC Version Cross Manager (VXM) Operating Manual (Entry ID 109754984)
- Siemens Industry Online Support FAQ on CFC Readback Procedures (Entry ID 24209977)
Related Articles
- Managing CFC Dynamic Instance DB Allocations and Reserved Ranges
- Resolving CPU STOP Requirements During Delta Downloads in PCS 7
- Why Classic STEP 7 Block Consistency Checks Fail in SIMATIC PCS 7
- Adapting User DB Sizes and Downloading in RUN on CPU 410-5H
Related Tags
- CFC Readback
- DB Range
- Compilation Settings
- Parameter Retention
- Instance DB
- S7-400H