Preserving Controller Data in SIMATIC PCS 7 - CFC Readback Rules, OCM Attributes, and Runtime Backup Strategies
In SIMATIC PCS 7, preserving controller runtime data against power failures, phase loss, or CPU replacement requires a dual strategy: controller-level data retention and engineering-level parameter backup. S7-400 controllers maintain retentive data blocks in RAM backed by power supply batteries or retentive NVRAM/FRAM. To capture operator-adjusted setpoints (PID parameters, recipe timers, alarm limits) back into the offline CFC project, engineers execute 'CFC Chart Read Back' using either 'OCM-capable parameters' (attributes S7_m_c := 'true') or 'Designated parameters' (S7_read_back := 'true').
Table of Contents
- Controller Data Retention Architecture vs Engineering Backup
- The Mechanics of CFC Chart Read Back: Scopes and Attributes
- Rules and Constraints Matrix for CFC Read Back
- Alternative Runtime Backup Strategies (WinCC User Archives and Reports)
- Step-by-Step Procedure to Perform a CFC Readback and Re-Compile
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Controller Data Retention Architecture vs Engineering Backup
In automated process facilities, maintaining operational parameters when a controller loses power or undergoes maintenance is a fundamental design requirement:
* Controller-Level Data Retention:
* S7-400 (e.g., CPU 414-5H, 416-3, 417-4): Retentive data blocks reside in volatile system RAM maintained by backup batteries (6ES7971-0BA00) in the rack power supply. If power is lost and batteries fail, RAM content is wiped, reverting to the initial load memory state upon restart.
* CPU 410-5H (6ES7410-5HX08-0AB0): Retentive data blocks are stored in non-volatile Ferroelectric RAM (FRAM). Retentive tags survive indefinite power outages without requiring backup batteries.
* The Engineering Disconnect:
During plant operation, operators tune PID gains, adjust alarm limits, and calibrate scaling factors via WinCC faceplates. These changes exist only inside the controller's active DB memory. If an engineer later performs a full CFC download from the Engineering Station (ES), all online tuning is overwritten by the stale offline parameters unless a CFC Read Back was executed beforehand.
The Mechanics of CFC Chart Read Back: Scopes and Attributes
CFC Chart Read Back connects to the online CPU, extracts modified values from instance DBs, and updates the offline CFC chart configuration:
* Read Back Scopes:
1. OCM-capable parameters (Operator Control and Monitoring):
Reads back all block inputs marked with the system attribute S7_m_c := 'true'. These represent all parameters that operators can manipulate from WinCC faceplates.
2. Designated parameters:
Reads back all inputs explicitly configured with the system attribute S7_read_back := 'true'.
3. All parameters:
Reads back every un-interconnected block input in the program (used primarily during full commissioning backups).
* Attribute Inheritance in SCL / Custom Blocks:
For custom function blocks created in SCL, attributes must be declared in the source code:
pascal
VAR_INPUT
Gain { S7_m_c := 'true'; S7_read_back := 'true' } : REAL := 1.0;
TI { S7_m_c := 'true'; S7_read_back := 'true' } : REAL := 20.0;
END_VAR
Rules and Constraints Matrix for CFC Read Back
The following rules govern what data can and cannot be read back into CFC:
| Parameter Type / Configuration | Read Back Supported? | Technical Restriction / Reason |
|---|---|---|---|
| Block Inputs (VAR_INPUT) | Yes | Supported if not interconnected to other block outputs |
| In/Out Parameters (VAR_IN_OUT) | Yes | Supported if not interconnected |
| Block Outputs (VAR_OUTPUT) | No | Outputs are dynamically computed by block algorithms each scan |
| Interconnected Inputs | No | Values driven by chart connections cannot be overridden by static values |
| Inputs Connected to SFC | No | SFC state logic controls the pin dynamically |
| Complex Types (STRUCT) | Yes (Partial) | Entire structure read back if un-interconnected; sub-elements must have S7_xm_c |
| Dynamic Types (ANY, POINTER) | No | Memory pointers cannot be represented as static CFC parameters |
| Arrays (ARRAY[...]) | No | Standard CFC does not support direct scalar readback of raw array buffers |
| Blocks with S7_read_back := 'false' | No | Block type explicitly locks readback execution |
Alternative Runtime Backup Strategies (WinCC User Archives and Reports)
When parameters cannot be maintained solely via CFC Read Back:
1. WinCC User Archives (6AV6371-1CB07-0AX0 / 6ES7658-2CX58-0YB5):
* Stores recipe parameters, product formulations, and equipment setpoints in a relational SQL database on the WinCC OS Server.
* Provides bidirectional synchronization: the operator can download recipes to the AS or upload current operational setpoints into SQL archives with a single button click.
* Survives catastrophic CPU replacement: a newly downloaded blank CPU can be repopulated with all process setpoints within seconds via User Archives.
2. WinCC Report Designer Automated Print Jobs:
* Generates periodic CSV/PDF shift reports capturing active tank levels, totalizers, and batch parameters, establishing an audited paper trail for disaster recovery.
Step-by-Step Procedure to Perform a CFC Readback and Re-Compile
- Ensure Online/Offline Consistency:
In SIMATIC Manager, verify that the offline CFC charts match the online program timestamp. If code differences exist, a readback cannot be performed safely. - Open Read Back Dialog:
In SIMATIC Manager, select the chart folder and click Chart -> Read Back.... - Select Read Back Scope:
* Select the target CPU.
* Choose OCM-capable parameters (recommended for standard operational updates) or Designated parameters. - Execute Readback:
Click OK. The CFC editor connects to the CPU, reads the active instance DB parameters, and updates the offline chart database. - Verify Modified Values:
Open a CFC chart (e.g., a PID controllerPIDConL). Confirm that theGainandTIinputs reflect the latest online tuning values. - Compile CFC Charts (Changes Only):
Perform a CFC compilation (Charts -> Compile -> Changes only). This writes the updated initial values into the offline DB templates without requiring an AS stop.
Verification
To verify that readback successfully saved critical controller parameters:
1. Open a modified CFC chart in test mode (online). Note down the value of an operator-tuned parameter (e.g., SP_LiOp or Gain).
2. Switch CFC to offline view. Verify that the offline parameter matches the online value exactly.
3. Perform a test compilation (Changes only). Verify that the compiler finishes with zero errors.
4. Review the change log in SIMATIC Version Trail or Version Cross Manager to audit all modified initial values.
Limitations and Operational Precautions
- Unconnected Struct Limitations: Reading back complex structures requires that no internal structure element is tied to a chart connection. If one bit of a struct is connected, the entire struct readback may be rejected.
- Overwriting Active Tuning: If an engineer performs a readback while an operator is actively tuning a loop, transitional setpoints may be permanently captured into the offline database. Always coordinate readback windows with plant operations.
- Licensing Disclaimer: Procuring optional software such as WinCC User Archives (
6AV6371-1CB07-0AX0) requires validation against the applicable Siemens catalog and authorized distributor quotation.
Engineer FAQ
Technical References
- SIMATIC Process Control System PCS 7 CFC for S7 Configuration Manual (A5E35802288-AB)
- SIMATIC S7-400 Programmable Controller CPU Specifications (A5E00850741-08)
- SIMATIC HMI WinCC User Archives Configuration Manual (A5E37536412-AB)
Related Articles
- Auditing Changes in PCS 7 CFC - Version Cross-Checks, Download Images, and Change Logs
- Designing Shift Reports with 8-Hour Statistical Calculations (Avg, Min, Max) in WinCC Report Designer
- Resolving S7-400 Local Data Stack Exceeded in Priority Class 27 (OB100) During CFC Compilation
Related Tags
- CFC Read Back
- S7_m_c
- S7_read_back
- Data Retention
- S7-400
- CPU 410-5H
- User Archives