Extended instructions
9.9 Recipes and Data logs
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
523
Table 9- 215 Data types for the parameters
REQ IN Bool A low to high (positive edge) signal starts the operation. (Default value:
RECORDS IN UDInt The maximum number of data records the circular data log can contain
before overwriting the oldest entry. (Default value: 1)
The header record is not included. Sufficient available CPU load memory
must exist in order to successfully create the data log.
NAME IN Variant Data log name: You provide the name. This variant only supports a String
data type and can only be located in local, DB, or M memory. (Default value:
' ')
The string reference is also used as the name of the data log file. The name
characters must follow the Windows file system naming restrictions. Charac-
ters \ / : * ? " < > | and the space character are not allowed.)
ID In/Out DWord Numeric data log identifier(Default value: 0):
• At execution, the ID input identifies a valid data log. The new data log
configuration is copied from this data log.
• After execution, the ID parameter becomes an output that returns the ID
of the newly created data log file.
Note: Symbolic name access for this parameter is not allowed.
DONE OUT Bool The DONE bit is TRUE for one scan, after the last request was completed
BUSY OUT Bool
• 0 - No operation in progress
• 1 - Operation in progress
ERROR OUT Bool The ERROR bit is TRUE for one scan, after the last request was terminated
with an error. The error code value at the STATUS parameter is valid only
during the single scan where ERROR = TRUE.
Execution condition code (Default value: 0)
You can execute the DataLogNewFile instruction when a data log becomes full or is deemed
completed and you do not want to lose any data that is stored in the data log. A new empty
data log file can be created based on the structure of the full Data log file. The header record
will be duplicated from the original data log with the original data log properties (DATA record
buffer, data format, and timestamp settings). The original Data log file is implicitly closed and
the new Data log file is implicitly opened.
DataLogWrite parameter trigger: Your program must monitor the ERROR and STATUS
parameters of each DataLogWrite operation. When the final record is written and a data log
is full, the DataLogWrite ERROR bit = 1 and the DataLogWrite STATUS word = 1. These
ERROR and STATUS values are valid for one scan only, so your monitoring logic must use
ERROR = 1 as a time gate to capture the STATUS value and then test for STATUS = 1 (the
data log is full).