Using Your Program To Store Data Permanently; Copying V Memory To The Eeprom; Format Of Smb31 And Smw32 - Siemens SIMATIC S7-200 System Manual

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

Advertisement

CPU Memory: Data Types and Addressing Modes
5.4

Using Your Program to Store Data Permanently

You can save a value (byte, word, or double word) stored in V memory to
EEPROM. This feature can be used to store a value in any location of the
permanent V memory area.
A save-to-EEPROM operation typically affects the scan time by up to 5 ms. The
value written by the save operation overwrites any previous value stored in the
permanent V memory area of the EEPROM.
Note
The save-to-EEPROM operation does not update the data in the memory
cartridge.

Copying V Memory to the EEPROM

Special Memory Byte 31 (SMB31) and Special Memory Word 32 (SMW32)
command the CPU to copy a value in V memory to the permanent V memory area
of the EEPROM. Figure 5-19 shows the format of SMB31 and SMW32. Use the
following steps to program the CPU to save or write a specific value in V memory:
1.
Load the V memory address of the value to be saved in SMW32.
2.
Load the size of the data in SM31.0 and SM31.1. (See Figure 5-19.)
3.
Set SM31.7 to 1.
At the end of every scan cycle, the CPU checks SM31.7; if SM31.7 equals 1, the
specified value is saved to the EEPROM. The operation is complete when the
CPU resets SM31.7 to 0. Do not change the value in V memory until the save
operation is complete.
The
CPU
SM31.7 after each
save operation.
SMW32
Figure 5-19
5-20
MSB
7
SMB31
sv
0 0
resets
Save to EEPROM:
0 = No
1 = Yes
MSB
15
V memory address
Specify the V memory address as an offset from V0.

Format of SMB31 and SMW32

LSB
Size of value to be saved:
0
00 - byte
01 - byte
0
0
0 s1 s0
10 - word
11 - double word
S7-200 Programmable Controller System Manual
LSB
0
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents