×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 18645578, Entry date: 12/06/2017
(2)
Rate

What does the terms Initial value (declaration view), Initial value (load memory) and Actual value mean in data blocks when a controller is loaded / restarted?

  • Entry
  • Associated product(s)

Configuration Notes:
When a plant is commissioned or in operation, certain values in data blocks may be adapted in line with the process. For example, the controller parameters or other parameters (e.g. runtimes, limits, ...) are generally changed during commissioning. If these changes are only made online, the current values in the data blocks may be overwritten by the originally configured values when the program is reloaded, the hardware configuration loaded or when the controller is cold-restarted. In order to understand how data blocks behave after the controller is loaded or started, it makes sense to become familiar with the memory concept and restart characteristics of the AS.

The following graphic will give you a general view of the storage concept:


Fig. 01

  1. Read-back: The actual values of the data blocks in the memory are transferred into the offline ES data blocks.
  2. Load program: The current offline - code and data blocks are loaded onto the CPU's load memory.
  3. Cold start: You transfer sequence-relevant sections of the code and data blocks from the load memory to the main memory.

Note:
On restart the program is edited at the point at which it was stopped. The actual values are retained. When warm starting, the program begins again in the main memory. The blocks with a programmed startup behavior are reset.

You can find additional information about the memory concept for the AS:

  • in the PCS 7 Online Help under "Help for STEP 7 > Appendix > S7 CPU memory areas > Load memory and main memory"
  • in the PCS 7 Online Help under "Help for STEP 7 > Load > Load from the PG into the PLC > Load and main memory in the CPU"

You can find information about the restart characteristics (warm restart, cold restart, hot restart)

  • in the PCS 7 Online Help under "Configuration - Engineering System > Implementing the PCS 7 Configuration > Configuring the Hardware > Configuring the SIMATIC 400 Station (CPU, CPs, Central I/O) > Setting the CPU Properties".

The table below describes the meaning of the terms Initial value (Declaration view), Initial value (Load memory) and Actual value of data blocks.
 

No. Description
1 Initial value (Declaration view)
The initial value is only of significance to the "offline" configuration of a data block. If a new data block is created offline or if a new variable is created in a data block in the course of the offline configuration, the initial value is applied to the actual value.

Example:

  • Creating a new variable
    You can create a new variable (new declaration line) in the declaration view for a data block. This involves assigning an initial value. This initial value is also used as an actual value. You can view or edit the actual value in the data view for the data block.
  • Copying a variable
    You can copy a variable (existing declaration line) in the declaration view for a data block. After being copied, the actual value of the new (copied) variables is identical to the initial value of the variables, even if the initial and actual values of the original variables are different.

Warning!
The menu command "Edit > Initialize Data Block" is available in the data view for a data block. You can transfer all the values from the "Initial value" column to the corresponding "Actual value" column using this command. However, use this option with extreme care because a data block's actual values (data from a plant which is in operation) are overwritten within the offline configuration. If this data block is then loaded into the controller, this might cause the plant to go into an unwanted state.

Example:
A plant has been in successful operation for a long time. The plant parameters have been optimized and read back into the offline configuration. The actual values of the data blocks contain the actual parameters of the plant. If the "Initialize Data Block" functionality is used, the actual values which have been read back from the plant will be overwritten with the configured initial values.

2 Initial value (Load memory)
When a data block is loaded into the controller, it is saved in the controller's load memory. The data block's actual values from the offline configuration are copied to the load memory. During loading into the controller, the runtime-relevant data blocks continue to be loaded into the main memory. When the controller is restarted cold, the runtime-relevant data from the load memory is also loaded into the main memory, overwriting the existing data blocks with the values in the loading memory. The values in the load memory are also referred to as initial values. The initial values in the loading memory are overwritten or changed when the AS program is loaded from the ES. The current values in the main memory are generally changed during commissioning or in process mode. These changes in value are not automatically applied to the initial values in the load memory.

Note:
If the actual values for a data block contained in the main memory differ from the initial values in the loading memory, the values of the corresponding data blocks are changed accordingly after the controller is restarted cold. This might cause unwanted system characteristics. You can take the following steps to avoid the initial values deviating from the actual values:

  • Always change parameters offline
    You can always change parameters in the ES configuration; then compile and load the changes. You should avoid making online changes to the actual values within the main memory.
  • Reading back actual values
    The actual values from the main memory can be read back into the offline configuration. After "reading back" compiling and loading, the actual and initial values are the same again. Information on reading back can be found in
    • in Entry ID: 23967880 How are block parameters labeled specially for read-back?
    • in Entry ID: 23966278 "How can you read out current data from the controller, which hasn't been taken into account by the CFC function "Chart > Read Back..."?
    • in the PCS 7 Online Help under "Service support and diagnostics > Safeguarding availability > Data backup > Saving ES project data > How to save parameter settings of the SIMATIC Station"
3 Actual value
The term "actual value" is used in the offline and online configuration:
  • Offline actual value
    During the offline configuration of a data block, an initial value is defined for each variable (declaration line) in the data block view. When the data block is loaded into the controller, this offline actual value is transferred into the controller's load memory as an initial value. During loading, the runtime-relevant data blocks continue to be loaded into the main memory. This means that the actual values from the offline configuration are also available online after loading.
  • Online actual value
    When a controller is restarted cold, the initial values from the load memory are transferred into the main memory. The values of the data blocks which are located in the main memory normally change in process mode.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.