Technical data

Memory usage and application examples
3.2 Memory usage for data logging
Structure and Use of the CPU Memory
Function Manual, 01/2013, A5E03461664-01
27
3.2.3 Instructions for data logging
Overview
The following table gives an overview of the instructions for Data Logging. You will find the
"Data Logging" instructionsin STEP 7 in the "Instructions" task card, under "Extended
instructions > Recipe and data logging > Data Logging".
Table 3- 1 Overview of the "Data Logging" instructions
Name of the instruction Description
"DataLogCreate":
Create data log
You use the "DataLogCreate" instruction to create a Data Log. The
Data Log is saved on the SIMATIC memory card in the "\datalogs"
directory. You can use the data logging instructions to save
process data. The amount of data that can be stored in a Data Log
depends on the storage space available on the SIMATIC
memory card.
"DataLogOpen":
Open data log
You use the "DataLogOpen" instruction to open an existing Data
Log on the SIMATIC memory card. Before you can write new data
records to a Data Log, the Data Log must be open.
The Data Log is automatically opened when the "DataLogCreate"
and "DataLogNewFile" instructions are executed.
A maximum of 10 Data Logs can be open at any one time. You
can select the Data Log to be opened using either the ID or the
name of the Data Log.
"DataLogWrite":
Write data log
You use the "DataLogWrite" instruction to write a data record to an
existing Data Log. Use the ID parameter to select the Data Log to
which the data record is to be written. Before a new data record
can be written, the Data Log must be opened.
"DataLogClose":
Close data log
You use the "DataLogClose" instruction to close an open Data
Log. You use the ID parameter to select the Data Log.
All open Data Logs are closed when the CPU switches to STOP.
"DataLogNewFile":
Data log in new file
You use the "DataLogNewFile" instruction to create a new
Data-Log with the same properties as an existing Data Log. By
creating new Data Logs, you prevent cyclic overwriting of existing
data records.
When the instruction is called, it creates a new Data Log on the
SIMATIC memory card with the name defined at the NAME
parameter. Use the ID parameter to specify the ID of the existing
Data Log whose properties you want to apply to the new Data Log.
The ID of the new Data Log is then output at the ID parameter.
"DataLogClear":
Clear data log
Use the "DataLogClear" instruction to delete all data records from
an existing Data Log. The header of the Data Log is not deleted
(see the description of the parameter HEADER of the
"DataLogCreate" instruction (Page 26)).
"DataLogDelete":
Delete data log
You use the "DataLogDelete" instruction to delete a Data Log from
the SIMATIC memory card.
Select the Data Log to be deleted using the NAME and ID
parameters.