5 recipes – Siemens Simatic S7-300 CPU 31xC and CPU 31x S7-300 User Manual

Page 77

Advertising
background image

Memory concept

4.2 Memory functions

CPU 31xC and CPU 31x, Technical data
Manual, Edition 08/2004, A5E00105475-05

4-15

4.2.5

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. The figure below shows how to handle recipe

data:

Loading memory

:

Current

recipe

Recipe 1

Recipe 2

Recipe n

Working memory

(MMC)

(CPU)

SFC 83 READ_DBL

SFC 84 WRIT_DBL

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.

These data written to load memory are portable and also retentive on memory reset. You

can backup modified records (recipes) by uploading and saving these in a single block to

the PG/PC.

Note
Active system functions SFC82 to 84 (active access to the MMC) have a distinct

influence on PG functions (for example, block status, variable status, download block,

upload, open). This typically reduces performance (compared to passive system

functions) by the factor 10.

Advertising