Understanding How The S7-200 Saves And Restores Data - Siemens SIMATIC S7-200 System Manual

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

S7-200 Programmable Controller System Manual
Sample Program for Using a Pointer to Access Data in a Table
This example uses LD14 as a pointer to a recipe stored in a table of recipes that begins at VB100. In this example,
VW1008 stores the index to a specific recipe in the table. If each recipe in the table is 50 bytes long, you multiply the
index by 50 to obtain the offset for the starting address of a specific recipe. By adding the offset to the pointer, you can
access the individual recipe from the table. In this example, the recipe is copied to the 50 bytes that start at VB1500.

Understanding How the S7-200 Saves and Restores Data

The S7-200 provides a variety of features to ensure that your user program and data are properly
retained in the S7-200.
Retentive Data Memory -- Areas of data memory the user selects to remain unchanged
-
over a power cycle, as long as the super capacitor and the optional battery cartridge have
not been discharged. V, M, Timer Currents, and Counter Currents are the only data memory
areas that are configurable to be retentive.
Permanent Memory -- Non-volatile memory used to store the program block, data block,
-
system block, forced values, M memory configured to be saved on loss of power, and
selected values written under user program control
Memory Cartridge -- Removable non-volatile memory used to store the program block, data
-
block, system block, recipes, data logs, and forced values
You can use the S7-200 Explorer to store documentation files (doc, text, pdf, etc.) into the
cartridge. You can also use the S7-200 Explorer to perform general file maintenance on the
memory cartridge (copy, delete, directory and launch).
To install a memory cartridge, remove the plastic slot cover from the S7-200 CPU and insert the
memory cartridge in the slot. The memory cartridge is keyed for proper installation.
Caution
Electrostatic discharge can damage the memory cartridge or the receptacle on the S7-200 CPU.
Make contact with a grounded conductive pad and/or wear a grounded wrist strap when you
handle the cartridge. Store the cartridge in a conductive container.
36
Network 1 //How to transfer a recipe from a table of recipes:
// - - Each recipe is 50 bytes long.
// - - The index parameter (VW1008) identifies
//
the recipe to be loaded.
//
//1. Create a pointer to the starting address
//
of the recipe table.
//2. Convert the index of the recipe to a
//
double-word value.
//3. Multiply the offset to accommodate
//
the size of each recipe.
//4. Add the adjusted offset to the pointer.
//5. Transfer the selected recipe to
//
VB1500 through VB1549.
LD
SM0.0
MOVD &VB100, LD14
ITD
VW1008, LD18
*D
+50, LD18
+D
LD18, LD14
BMB
*LD14, VB1500, 50

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents