0% found this document useful (0 votes)
83 views3 pages

Eeprom S7200

The document describes how to use subprograms to directly or indirectly write data to an EEPROM from a CPU. It provides examples of using the subprograms, their parameters, and testing the programs by deleting and reloading the stored data.

Uploaded by

OckeWe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views3 pages

Eeprom S7200

The document describes how to use subprograms to directly or indirectly write data to an EEPROM from a CPU. It provides examples of using the subprograms, their parameters, and testing the programs by deleting and reloading the stored data.

Uploaded by

OckeWe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1. .

The "EEPROM (v1.0)" folder added contains the subprograms "EEPROM_Direct" and "EEPROM_Indirect".

Fig. 01

Using the subprograms


1. Insert the required subprogram from the "EEPROM (v1.0)" folder into your network.
2. Assign the inputs and outputs of the selected subprogram call Notes on this are in the parameter tables of the
examples.

Using appropriate connection logic to ensure that the trigger for executing the program remains 1 (high) at the "Start"
input for the duration of the execution.

More information is also available in the comments of the subprogram.

Note
Do not store any data with high frequency in the EEPROM. Typically, only 100,000 memory accesses to an EEPROM
are possible. If this value is exceeded, the CPU becomes defective. If you store values on the EEPROM by the hour,
then the EEPROM has an expected service life of 11 to 12 years.
Example of direct addressing of the start address "EEPROM_direct"

Fig. 02

Parameters Variable Explanation


type
EN BOOL Must always be 1 (high)
Start BOOL Trigger for program execution, activated by rising edge (0 ->1); must remain 1 (high) until BUSY
bit becomes 0 (low).
V_Start INT Absolute specification of the start address, e.g. 200=VB 200
Length INT Number of bytes to be stored as from the start address
Memory INT Temporary memory for subprogram
Busy BOOL Processing status 1 (high), program in operation
Done BOOL Finished status 1 (high), storage completed successfully
Table 01
Example of indirect addressing of the start address "EEPROM_indirect"

Fig. 03

Parameters Variable Explanation


type
EN BOOL Must always be 1 (high)
Start BOOL Trigger for program execution, activated by rising edge (0 ->1); must remain 1 (high) until BUSY
bit becomes 0 (low).
Address DWORD Pointer to the first bit of the start address (the start address is read into a variable of the type
DWORD)
Length INT Number of bytes to be stored as from the start address
Memory INT Temporary memory for subprogram
Busy BOOL Processing status 1 (high), program in operation
Done BOOL Finished status 1 (high), storage completed successfully
Table 02
Testing the program
After running the program, delete the retained V variables and load the stored data back into the CPU.

No. Remarks
1 Deleting the data
Navigate via "View > Component > System Block" to the "System Block" dialog and select the "Retentive Ranges"
tab.

Fig. 04
Select the data area and enter the start address and start range. Click on the "Clear" button. Sample values are shown in the
figure below.
Fig. 05
2 Loading the data
 Switch off the CPU.
 Switch on the CPU.
During startup of the CPU, the stored data is written from the CPU's internal EEPROM into the memory.
Table 03
Additional information
 Information on inserting libraries in STEP 7 Micro/WIN is available in Entry ID: 16689345.
 SP7 for STEP 7 Micro/WIN V4.0 is available for downloading free of charge in Entry ID: 33005232 .
Download

store_to_eeprom.zip ( 4 KB )

Keywords:
SMB31, SMW32

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy