Why S7 Data Block Initial Values Do Not Reload During Full AS STOP Download in PCS 7
In SIMATIC PCS 7 (STEP 7 V5.6 on CPU 410-5H), modifying the 'Initial Value' column of a global Data Block (such as MBHPARAM) offline and performing a full compile with an 'Entire program STOP download' will not overwrite the online data block's values. In S7-300/400 memory architecture, Data Blocks maintain two distinct value sets: Initial Values (stored in Load Memory) and Actual Values (active in Work Memory). During a STOP download, the CPU preserves existing retentive Actual Values in battery-backed RAM to protect operational plant data. To force the controller to adopt modified Initial Values, you must open the DB in LAD/STL/FBD Editor, switch to 'Data View', execute 'Edit -> Initialize Data Block' to overwrite Actual Values with Initial Values, save the DB, and download.
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
Automation engineers commissioning custom communication blocks or vendor interface parameter blocks (such as MBHPARAM for Modbus TCP/RTU) often encounter confusing controller behavior: after modifying configuration parameters in the offline DB's 'Initial Value' column, performing a full chart compilation and downloading the entire program in CPU STOP mode leaves the online running values completely unchanged. Many engineers assume a STOP download wipes and replaces all data memory. In reality, Siemens S7 memory management deliberately shields retentive Actual Values from overwrite. This technical guide explains the dual-memory architecture of S7 Data Blocks and provides the exact procedure to initialize and download updated parameter values.
Architecture and Fundamental Mechanics
The memory architecture of SIMATIC S7-400 and CPU 410-5H separates load templates from active execution state:
1. Initial Values vs Actual Values in S7 DBs:
- When a Data Block is created, the engineer defines variables with Initial Values (the default template created in Declaration View).
- When the DB is compiled and downloaded for the first time, the CPU allocates space in Work Memory and populates it with Actual Values copied from the initial values.
2. S7 Controller Memory Retention Mechanics:
- During subsequent plant operation, parameters are modified online (e.g., via WinCC faceplates, operator commands, or communication blocks). These dynamic changes exist exclusively in the Actual Value space of RAM Work Memory.
- If a STOP download occurs, the CPU's memory management operating system checks whether the DB already exists in the CPU's retentive Work Memory.
- If the block interface (structure, variable types, length) has not changed, the CPU retains the existing Actual Values in Work Memory to prevent accidental loss of operational tuning, recipe parameters, or totalizers.
3. The Initial Value Trap:
- Modifying only the 'Initial Value' column offline updates the Load Memory template, but leaves the offline 'Actual Value' column unchanged.
- Because the compiler downloads the offline Actual Values (or the CPU retains existing online Actual Values), the newly typed Initial Values are ignored by the active CPU logic.
4. Forced Re-initialization Workarounds:
- To force the CPU to accept new values, the offline Actual Values must be updated to match the Initial Values before download, or the online DB must be explicitly deleted from the CPU.
Step-by-Step Implementation Procedure
-
Open Data Block in STEP 7 Block Editor:
a. In SIMATIC Manager, navigate to the S7 ProgramBlocksfolder.
b. Locate the target Data Block (e.g.,DB 100/MBHPARAM).
c. Double-click to open the block in the LAD/STL/FBD / DB Editor. -
Modify Initial Values in Declaration View:
a. In 'Declaration View', update the required parameter values in the Initial Value column.
b. Confirm that data types match (e.g.,REAL,INT,DWORD). -
Execute 'Initialize Data Block' in Data View:
a. From the editor main menu, selectView -> Data View(or pressCtrl + 4).
b. In Data View, notice that the 'Actual Value' column still displays the old numbers while 'Initial Value' displays the new numbers.
c. From the menu, selectEdit -> Initialize Data Block.
d. Confirm that every cell in the Actual Value column updates instantly to match the Initial Value column.
e. Save the Data Block (File -> Save). -
Download the Data Block to the AS:
a. If the plant is offline or in an authorized maintenance window, selectPLC -> Downloaddirectly from the DB Editor window.
b. Alternatively, perform a CFC compilation followed by download. -
Alternative Method: Online Block Deletion via SIMATIC Manager:
a. If the DB cannot be opened in Data View (e.g., complex protected block), open SIMATIC Manager.
b. Click the Online button (open online window for the CPU).
c. Locate the specific DB in the online Blocks folder.
d. With the CPU in STOP (or during maintenance), select the online DB and pressDelete.
e. Download the offline DB from the offline Blocks folder: because the block does not exist online, the CPU creates it fresh using the offline values.
Verification
- In SIMATIC Manager, select the DB in the offline Blocks folder and click the eyeglasses icon (Online Monitoring).
- Verify that the 'Actual Value' column online reflects the updated parameter values.
- In CFC or WinCC, confirm that the communication block (e.g., Modbus driver) adopts the new IP address, port, or unit ID configured in the DB.
Limitations and Operational Precautions
Initializing a Data Block overwrites ALL actual values in that DB. Never execute 'Initialize Data Block' on shared technological instance DBs where live calibration, runtime hours, or totalized weights must be preserved.
Engineer FAQ
Why did my STOP download not update the DB values in the PLC?
Because S7 controllers preserve existing retentive Actual Values in Work Memory during downloads if the block structure has not changed.
What is the difference between Initial Value and Actual Value in S7 DBs?
Initial Value is the default template. Actual Value is the active operational value stored in Work Memory and executed by the CPU.
How do I copy Initial Values into Actual Values in STEP 7?
Open the DB, switch to 'Data View' (Ctrl + 4), and execute 'Edit -> Initialize Data Block'.
Can I delete an online DB to force new values to load?
Yes. Deleting the DB online removes retentive Work Memory, forcing the CPU to instantiate the DB using offline values upon the next download.
Does performing an AS Memory Reset (MRES) clear Actual Values?
Yes. An MRES clears all Work Memory, forcing all DBs to reload fresh from Load Memory upon the next download.
Technical References
- SIMATIC STEP 7 V5.6 Programming with STEP 7 Manual
- SIMATIC S7-400 CPU Data Reference Manual
- Siemens Industry Online Support Entry 109780813 (S7 Data Block Value Initialization)
Related Articles
- Preventing Uncommanded AS STOP Download Requirements After Project Restoration in PCS 7
- Resolving Grayed-Out 'Changes only' Download Options in PCS 7
- Deploying Multiproject Revisions to Production Redundant S7-400H and WinCC OS Stations in PCS 7 V8.0
Related Tags
- Data Blocks
- Actual Value
- Initial Value
- STEP 7
- CPU 410-5H
- STOP Download