Memory concept
6.3 Recipes
6.3 6.3 Recipes
Introduction
A recipe represents a collection of user data.
You can implement a simple recipe concept using static DBs. In this case, the recipes should
have the same structure (length). One DB should exist per recipe.
Processing sequence
Recipe is written to load memory:
• The various data records of recipes are created as static DBs in
STEP 7
and then
downloaded to the CPU. Therefore, recipes only use load memory, rather than RAM.
Working with recipe data:
• SFC83 "READ_DBL" is called in the user program to copy the data record of a current
recipe from the DB in load memory to a static DB that is located in work memory. As a
result, the RAM only has to accommodate the data of one record.
The user program can now access data of the current recipe.
00&
:
&38
6)&
5($'B'%/
6)&
:5,7B'%/
/RDGPHPRU\
:RUNLQJPHPRU\
&XUUHQWUHFLSH
5HFLSH
5HFLSH
5HFLSHQ
Figure 6-4 Handling recipes
Saving a modified recipe:
• The data of new or modified recipe data records generated during program execution can
be written to load memory. To do this, call SFC 84 "WRIT_DBL" in the user program.
The data written to load memory are portable and retentive on CPU memory reset.
You can backup modified records (recipes) by uploading and saving these in a single
block to the PG/PC.
S7-300 CPU Data: CPU 315T-2 DP
6-14 Manual, 12/2005, A5E00427933-02