×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 15389520, Entry date: 08/07/2006
(13)
Rate

What is the effect of the STEP 7 function "Copy RAM to ROM"?

  • Entry
  • Associated product(s)

 
Description:
This entry describes how the SIMATIC S7 function "Copy RAM to ROM..." works. We will be looking at how it works on data and code blocks in SIMATIC S7-300 CPUs and C7 devices (with reference to the controller part) taking into account various storage concepts. Since deleting the EPROM memory is also partially executed via the "Copy RAM to ROM..." function, this entry also includes an overview of how various storage media can be deleted. There is also a brief description of how to change a memory card (MC) using the "Copy RAM to ROM..." function.
A description of the various storage concepts is available in Entry ID 7302326 for S7-300 and in Entry ID 7302549 for S7-400.

The entry is divided into the following sections:

General

On all CPUs you can only run the "Copy RAM to ROM..." function in the "STOP" operating mode. If the CPU is not yet in the "STOP" operating mode, you are ask whether the CPU should be switched to "STOP" via STEP 7.
The PDF file lists the S7-300 CPUs and C7 devices that support the "Copy RAM to ROM..." function.

  Liste_der_Geraete_e.pdf ( 34 KB )  

SIMATIC S7-300 CPUs and SIMATIC C7 devices with built-in RAM and EPROM as load memory

In the case of CPU modules that have a built-in EPROM you can use the "Copy RAM to ROM..." function to copy the content of the internal RAM load memory to the built-in EPROM load memory so as not to lose data in the case of power failure without battery or overall reset. In the case of SIMATIC S7-300 CPUs or C7 devices with internal EPROM as load memory the code and data blocks are written from the RAM load memory to the EPROM load memory.

Warning:
When you run the STEP 7 "Copy RAM to ROM..." function, the actual values of the runtime-relevant data blocks in the load memory are overwritten with the actual values from the main memory. If the runtime-relevant data blocks are then transferred again to the main memory (e.g. after overall reset), then the CPU takes the actual values from the load memory as initial values. These new initial values are displayed in SIMATIC STEP 7 in the "Actual value" column.
The following table describes the procedure in three figures.
 

No. Procedure
1 In the case of data blocks the initial values and the actual values are transferred from STEP 7 to the CPU in the load memory (internal EPROM). However, the initial value is always then taken as the "First actual value" in the main memory if no actual value has been defined in STEP 7. If an actual value defined in STEP 7, it is transferred to the main memory.


Fig. 01

 
2 When you perform the "Copy RAM to ROM..." function, the actual values in the load memory are overwritten with the actual values from the main memory.


Fig. 02

 
3 If the load memory is transferred again to the main memory (e.g. after overall reset), then the actual values from the load memory are taken as the "First actual values" in the main memory.


Fig. 03

 

Delete EPROM
The built-in EPROM is deleted by deleting the complete contents of the RAM and using the "Copy RAM to ROM..." function to copy the new RAM contents into the internal load memory EPROM. The procedure is described in the table below.
 

No. Procedure
1 Connect the programming device (PG) with the CPU.
2 Open the SIMATIC Manager and go to "PLC/Display Accessible Nodes".
3 Open the view of the blocks "Accessible Nodes / MPI = .../Blocks" (click on "+").
4 Mark the blocks to be deleted (the system data too if you wish). If you want to delete the complete internal EPROM, mark all the blocks to be deleted and the system data.
You cannot delete system functions (SFC) and system function blocks (SFB).
5 Delete the marked blocks via "Edit/Delete" or via the "Del" key.
6 Perform "PLC / Copy RAM to ROM...".
This copies all the valid blocks from the RAM load memory to the internal EPROM memory. The blocks deleted in the internal RAM load memory are thus no longer written to the internal EPROM load memory and are thus also deleted in the EPROM.

SIMATIC S7-300 CPUs and SIMATIC C7 devices with built-in RAM and an external memory card (MC)

When you perform the "Copy RAM to ROM..." function, the runtime-relevant program and data blocks are copied from the internal RAM load memory to the memory card (MC).

Warning:
When you run the STEP 7 "Copy RAM to ROM..." function, the actual values of the runtime-relevant data blocks in the load memory are overwritten with the actual values from the main memory. If the runtime-relevant data blocks are then transferred again to the main memory (e.g. after overall reset), then the CPU takes the actual values from the load memory as initial values. These new initial values are displayed in SIMATIC STEP 7 in the "Actual value" column.
The following table explains how to proceed in three figures. The procedure is identical for all 3 load memory types (internal EPROM, FLASH Memory Card, Micro Memory Card). The figures are repeated so that all the information on the load memory type is together.
 

No. Procedure
1 In the case of data blocks the initial values and the actual values are transferred from STEP 7 to the CPU in the load memory (memory card). However, the initial value is always then taken as the "First actual value" in the main memory if no actual value has been defined in STEP 7. If an actual value defined in STEP 7, it is transferred to the main memory.


Fig. 01

 
2 When you perform the "Copy RAM to ROM..." function, the actual values in the load memory are overwritten with the actual values from the main memory.


Fig. 02

 
3 If the load memory is transferred again to the main memory (e.g. after overall reset), then the actual values from the load memory are taken as the "First actual values" in the main memory.


Fig. 03

 

Change the Memory Card (MC)
 

No. Procedure
1 Set CPU in STOP mode.
2 Remove any slotted memory card.
3 Slot the "new" memory card.
4 Do an overall reset of the CPU.
5 If the memory card does not yet contain the matching user program, you must first load the user program into the CPU (internal RAM load memory) and then use "Copy RAM to ROM..." to transfer it to the memory card. Please note here that blocks already in the RAM load memory that are not overwritten by the new user program are also transferred to the memory card.

But here you can also use the "Load user program onto memory card" function directly.

Note:
It is not permitted to remove and slot the memory card (MC) in the RUN operating mode.
When you remove/slot a memory card the CPU demands an overall reset and so the user program is lost in the RAM.

Delete individual blocks
You cannot delete individual blocks from a memory card on the PG.
You can only delete individual blocks with a combination of the CPU and PG.
The requirement for this is that you slot the memory card in the CPU.
Then proceed as follows.
 

No. Procedure
1 Connect the programming device (PG) with the CPU.
2 Open the SIMATIC Manager and go to "PLC/Display Accessible Nodes".
3 Open the view of the blocks "Accessible Nodes / MPI = .../Blocks" (click on "+").
4 Mark the blocks to be deleted (the system data too if you wish).
5 Delete the marked blocks via "Edit/Delete" or via the "Del" key.
6 Perform "PLC / Copy RAM to ROM...". This copies all the valid blocks to the memory card. The block deleted in the CPU is then no longer written to the memory card and is therefore deleted.

Completely delete the memory card (MC)
 

No. Procedure
1 Slot the memory card into the programming device (PG).
2 In the SIMATIC Manager select "File/S7-MemoryCard/Delete".
3 Acknowledge with "yes" the security question asking whether you really want to delete.

If you are using a CPU with which you cannot write any memory cards or a PC with which you cannot write any memory cards, we recommend the prommer given below with its order number.
 

Order number Description
6ES7792-0AA00-0XA0 SIMATIC PG, USB PROMMER 115/220V

SIMATIC S7-300 CPUs and SIMATIC C7 devices with micro memory card (MMC)

When you perform the "Copy RAM to ROM..." function, the runtime-relevant data blocks are copied from the main memory to the MMC. Here the actual values of the data blocks are overwritten on the MMC so that after an overall reset new initial values (the new actual values) are effective. These new initial values are displayed in SIMATIC STEP 7 in the "Actual value" column.
The following table explains how to proceed in three figures. The procedure is identical for all 3 load memory types (internal EPROM, FLASH Memory Card, Micro Memory Card). The figures are repeated so that all the information on the load memory type is together.
 

No. Procedure
1 In the case of data blocks the initial values and the actual values are transferred from STEP 7 to the CPU in the load memory (MMC). However, the initial value is always then taken as the "First actual value" in the main memory if no actual value has been defined in STEP 7. If an actual value defined in STEP 7, it is transferred to the main memory. The actual values in the main memory are used when processing the program.


Fig. 01

 
2 When you perform the "Copy RAM to ROM..." function, the actual values in the load memory are overwritten with the actual values from the main memory.


Fig. 02

 
3 If the load memory is transferred again to the main memory (e.g. after overall reset), then the actual values from the load memory are taken as the "First actual values" in the main memory.


Fig. 03

 

In the case of CPU modules that work with a micro memory card (MMC) the load memory is on the MMC. When loaded, the program is stored on the MMC in such a way as to be immune to power failure and overall reset. The program is therefore always remanent in the load memory (on the MMC). 

Delete individual blocks on a micro memory card (MMC)

  • With the PG
No. Procedure
1 Slot the MMC into the programming device (PG).
2 In the SIMATIC Manager select "File/S7-MemoryCard/Open".
3 Mark the blocks to be deleted (the system data too if you wish).
4 Delete the marked blocks via "Edit/Delete" or via the "Del" key.
  • Via the CPU
    The requirement for this is that you slot the micro memory card in the CPU.
No. Procedure
1 Connect the programming device (PG) and your CPU.
2 Open the SIMATIC Manager and go to "PLC/Display Accessible Nodes".
3 Open the view of the blocks "Accessible Nodes / MPI = .../Blocks" (click on "+").
4 Mark the blocks to be deleted (the system data too if you wish).
5 Delete the marked blocks via "Edit/Delete" or via the "Del" key.

Completely delete the micro memory card (MMC)
 

No. Procedure
1 Slot the MMC into the programming device (PG).
2 In the SIMATIC Manager select "File/S7-MemoryCard/Delete".
3 Acknowledge with "yes" the security question asking whether you really want to delete.

Note:
In order to be able to read and write micro memory cards (MMC) on your PC too you need a prommer that can read and write the special format of the micro memory cards. A suitable prommer is available under order number 6ES7792-0AA00-0XA0.

You must never format the MMC in a standard slot or card reader with Windows, otherwise you will no longer be able to use the MMC for the SIMATIC-CPUs! (see Entry ID: 21830698)

SIMATIC S7-400 CPUs

The "Copy RAM to ROM..." function is not supported by S7-400 CPUs and the CPU S7-318 2DP. The options offered by the S7-400 are given in Entry ID 23670531.

Keywords:
Change

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.
Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit