The NAME must be the name of a data log created by the DataLogCreate instruction. If only
the NAME is provided and the NAME specifies a valid data log, then the corresponding ID
will be returned (ID parameter as an output).
Note
General usage of data log files
Data log files are automatically opened after the DataLogCreate and DataLogNewFile
Data log files are automatically closed after a PLC run to stop transition or a PLC power
A Data log file must be open before a new DataLogWrite operation is possible.
A maximum of eight data log files may be open at one time. More than eight data log files
Table 8- 127 Values of ERROR and STATUS
ERROR
STATUS (W#16#)
0
0000
0
0002
0
7000
0
7001
0
7002
1
8070
1
8090
1
8091
1
8092
1
80C0
1
80C1
8.7.2.3
DataLogClose
Table 8- 128 DataLogClose instruction
LAD / FBD
SCL
"DataLogClose_DB"(
In the SCL example, "DataLogClose_DB" is the name of the instance DB.
2
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
operations.
cycle.
may exist, but some of them must be closed so no more than eight are open.
Description
No error
Warning: Data log file already open by this application program
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.
Data log definition is inconsistent with existing data log file.
Name parameter is not a String reference.
Data log does not exist.
Data log file is locked.
Too many open files: No more than eight opened data log files are allowed.
req:=_bool_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
ID:=_dword_inout_);
Description
Closes an open data log file. DataLogWrite operations to
a closed data log result in an error. No write operations
are allowed to this data log until another DataLogOpen
operation is performed.
A transition to STOP mode will close all open data log
files.
STEP 7 automatically creates the associated instance
DB when you insert the instruction.
101BExtended instructions
8.7 Data logging
297