Data Log Record Structure - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

8.7.2.1

Data log record structure

The DATA and HEADER parameters of the DataLogCreate instruction assign the data type
and the column header description of all data elements in a log record.
DATA parameter for the DataLogCreate instruction
The DATA parameter points to memory used as a temporary buffer for a new log record and
must be assigned to an M or DB location.
You can assign an entire DB (derived from a PLC data type that you assign when the DB is
created) or part of a DB (the specified DB element can be any data type, data type structure,
PLC data type, or data array).
Structure data types are limited to a single nesting level. The total number of data elements
declared should correspond to the number of columns specified in the header parameter.
The maximum number of data elements you can assign is 253 (with a timestamp) or 255
(without a timestamp). This restriction keeps your record inside the 256 column limit of an
Excel sheet.
The DATA parameter can assign either retentive or non-retentive data elements in a
"Standard" (compatible with S7-300/400) or "Optimized" DB type.
In order to write a Data log record you must first load the temporary DATA record with new
process values and then execute the DataLogWrite instruction that saves new record values
in the Datalog file.
HEADER parameter for the DataLogCreate instruction
The HEADER parameter points to column header names for the top row of the data matrix
encoded in the CSV file. HEADER data must be located in DB or M memory and the
characters must follow standard CSV format rules with commas separating each column
name. The data type may be a string, byte array, or character array. Character/byte arrays
allow increased size, where strings are limited to a maximum of 255 bytes. The HEADER
parameter is optional. If the HEADER is not assigned, then no header row is created in the
Data log file.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Extended instructions
8.7 Recipes and Data logs
381

Advertisement

Table of Contents
loading

Table of Contents