Entry type: FAQ, Entry ID: 598803, Entry date: 08/28/2006
(0)
Rate

Why does the retentivity behavior of the S7-300 CPUs and C7 devices without MMC (Micro Memory Card) influence the contents of the variables?

  • Entry
  • Associated product(s)

 
Description:
The retentivity behavior of the separate variables is important for developers when creating programs. Developers usually have variables in their programs, whose contents are to be retained even during POWER OFF (retentive) and other variables that then have to be reset to a defined value (non-retentive). In SIMATIC STEP 7 developers can therefore configure retentive address areas for data, markers, S7 timers and S7 counters which they can then use for retentive variables. This entry describes the retentivity behavior of the address areas of SIMATIC S7-300 CPUs and C7 devices without Micro Memory Card (MMC).  The retentivity behavior of the address areas is described for the POWER OFF/ON change of status, the STOP/RUN operating mode and for overall reset.
This entry does not refer to the retentivity behavior with the CPU S7-318. The retentivity behavior with CPU S7 318-2 is described in Entry ID: 23596519.

The entry is divided into the following topics:

Conditions of the retentivity behavior

The retentivity behavior of address areas with CPUs without MMC depends on:

  • The CPU.
  • The use of battery and memory card (MC).
  • The parameterization in the HW Configuration.

Note:
Not all CPUs and C7 devices can be equipped with battery, memory card or micro memory card.

Program blocks and data blocks at POWER OFF/ON

Without buffer battery:

  • If the program and data blocks in the main memory are not buffered by a battery, then they are lost after POWER OFF/ON. However, the values in the retentive address areas - as configured in the hardware configuration (see Table 02) - are retained. After POWER OFF/ON the runtime-relevant data blocks and program blocks are reloaded from the FLASH memory card (if slotted) or from the internal FLASH load memory (if available) into the main memory, whereby the values for data block elements declared as retentive are taken from the retentive memory.
    In the case of non-retentive data blocks the current values are reloaded from the load memory. If there are no current values in these data blocks in the load memory, then the initial values are loaded from the load memory.
  • Data blocks and program blocks in the internal RAM load memory are lost at POWER OFF/ON.

With buffer battery:

  • If you use a battery, the program and all the data blocks are buffered in the main memory. They are retained after POWER OFF/ON.
  • If a buffer battery is implement, all the data blocks are retentive.

With rechargeable battery:

  • When using a rechargeable battery, only the time is buffered.
  • However, the values in the retentive address areas - as configured in the hardware configuration (see Table 02) - are retained.

Data, markers, S7 timers and S7 counters at POWER OFF/ON

The following points apply for markers, S7 timers and S7 counters at POWER OFF/ON:

  • If a retentivity area has been parameterized for markers, S7 timers and S7 counters in the HW Configuration (see Table 02), the values in the address areas concerned are retained.
  • If a retentivity area has been parameterized for data blocks in the HW Configuration (see Table 02), then the data save at POWER OFF is transferred again to the data block areas concerned.

Program blocks and data blocks in STOP/RUN operating mode

The following points apply for program blocks and data blocks in the STOP/RUN operating mode:

  • The program blocks and data blocks are retained in the main memory and are not reloaded from the load memory.
  • There are no changes to the contents of the data blocks. All data blocks are retentive.

Data, markers, timers and counters in STOP/RUN operating mode

All the markers, S7 timers and S7 counters entered in the retentivity area in the HW Configuration (Fig. 03) are retained in the STOP/RUN operating mode. All other markers, S7 timers and S7 counters are reset.

Data, markers, S7 timers and S7 counters at overall reset

All markers, S7 timers and S7 counters are reset at overall reset. In the case of data blocks the current values are reloaded from the load memory (FLASH memory card or internal FLASH). If there are no current values in these data blocks in the load memory, then the initial values are loaded from the load memory.

Information on the elapsed time counter is available in the Entry ID: 2804630.

Important:
If you wish to communicate with the CPU from your PG/PC after the overall reset, the only option you have for setting up this communication is via the MPI or MPI/DP interface.

Comparison of overall reset and "POWER OFF/ON without buffer battery and without memory card" with S7-300 CPUs and with C7 devices without MMC

In the case of "POWER OFF/ON without buffer battery and without memory card" the retentive areas remain unaffected. If the program is reloaded in this case, then it works with the old values from the retentive area. By default these are the first 8 counters, for example. This can lead to dangerous plant statuses if you don't take this into account. The effects of overall reset and "POWER OFF/ON without buffer battery and without memory card" are compared in Table 01. 

Recommendation:
After a "POWER OFF/ON without buffer battery and without memory card" always do an overall reset.
 

  Overall reset "POWER OFF/ON without buffer battery and without memory card"
Changed
  • The hardware configuration is deleted.

  • The program is deleted.

  • The retentivity areas are deleted.

  • The hardware configuration is deleted.

  • The program is deleted.

Unchanged
  • The diagnostics buffer.

  • The protection level set.

  • The parameters of the MPI interface (MPI address, ...)

  • The retentivity areas are not deleted.
  • The diagnostics buffer.
  • The protection level set.

  • The parameters of the MPI interface (MPI address, ...)

Table 01

How to configure retentive address areas in STEP 7

The following Table 02 describes how to proceed to configure retentive address areas in an S7-300 CPU without MMC.
 

No. Procedure
1 Open the Hardware Configuration of your S7-300 station. Double-click on the icon of your CPU --> The "Properties - CPU 31x ..." window opens.


Fig. 01

 
2 Select the "Retentive Memory" tab.


Fig. 02

 
3 In the "Retentive Memory" tab, in the "Retentivity" field you can configure the retentive address areas for:
  • Markers
  • S7 timers
  • S7 counters

In the "Areas" field you can also configure the retentive areas in data blocks.


Fig. 03

 

Warning:
Please make sure that your data blocks defined as retentive are available in the CPU and are not too short.
Likewise the data blocks must not have the "Unlinked" property. Otherwise the data blocks are only loaded into the load memory.

4 After defining the desired retentive areas you can quit the CPU Properties dialog via "OK" or make changes in other tabs.
Table 02

Warning:
Please note that in the meantime C7 devices without MMC have been discontinued. An MMC must be used with all the current C7 devices (C7-613, C7-635 and C7-636).

Error details
Detailed error description
Help us to improve Online Support.
The page requested cannot be displayed. Please contact the webmaster.
Contact to webmaster