Siemens S7-1200 System Manual page 391

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

Advertisement

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).
DataLogNewFile operation: When your program logic gets the data log is full signal, this
state is used to activate a DataLogNewFile operation. You must execute DataLogNewFile
with the ID of an existing (usually full) and open data log, but a new unique NAME
parameter. After the DataLogNewFile operation is done, a new data log ID value is returned
(as an output parameter) that corresponds to the new data log name. The new data log file is
implicitly opened and is ready to store new records. New DataLogWrite operations that are
directed to the new data log file, must use the ID value returned by the DataLogNewFile
operation.
NOTICE
Data log creation operations must be complete, before starting a data log write operation
DataLogCreate and DataLogNewFile log file creation operations extend over many
program scan cycles. The actual time required for the log file creation depends on the
record structure and number of records. Your program logic must monitor and catch the
DONE bit's transition to the TRUE state that signals the completion of a log file creation. If a
DataLogWrite instruction is executed before a data log creation operation is complete, then
the write operation will fail to write a new data log record as expected.
Table 8- 172 Values of ERROR and STATUS
ERROR
STATUS (W#16#)
0
0000
0
7000
0
7001
0
7002
1
8070
1
8090
1
8091
1
8092
1
8093
1
8097
1
80B3
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Description
No error
Call with no REQ edge: BUSY = 0, DONE = 0
First call with REQ edge (working): BUSY = 1, DONE = 0
N
call (working): BUSY = 1, DONE = 0
th
All internal instance memory is in use.
Invalid file name
Name parameter is not a String reference.
Data log does not exist.
Data log already exists.
Requested file length exceeds file system maximum.
Insufficient load memory available.
Extended instructions
8.7 Recipes and Data logs
391

Advertisement

Table of Contents
loading

Table of Contents