Technical data

Memory usage and application examples
3.2 Memory usage for data logging
Structure and Use of the CPU Memory
26 Function Manual, 01/2013, A5E03461664-01
3.2.2 Data structure of the data logs
Introduction
You use the "DataLogCreate" instruction to create a Data Log in STEP 7. The NAME
parameter assigns the Data Log a name. The DATA and HEADER parameters specify the
data type of all data elements in a Data Log data record and the header of the Data Logs.
The RECORDS parameter indicates the maximum number of data records in the Data Logs.
NAME parameter for the "DataLogCreate" instruction
You use the NAME parameter to assign a name for the Data Log. This is the name under
which the Data Log is saved in the "\datalogs" directory of the SIMATIC memory card.
DATA parameter for the "DataLogCreate" instruction
The DATA block parameter specifies the structure of the Data Log data records. The
columns and data types of a data record in the Data Log are determined by the elements of
the structure declaration or array declaration of this data buffer. Each element of a structure
or an array corresponds to a column in a row in the Data Log.
HEADER parameter for the "DataLogCreate" instruction
Using the HEADER block parameter, you can assign a heading in the header row to each
column in the Data Log.
RECORDS parameter for the "DataLogCreate" instruction
The RECORDS parameter specifies the maximum number of data records that can be
stored in a Data Log. If the specified maximum number of data records in a Data Log is
reached, the next write operation will overwrite the oldest data record.