Siemens SIMATIC S7-1200 Manual page 111

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

Advertisement

Use the DataLog instructions to programmatically store run-time process data in flash
memory of the CPU. The data records are organized as a circular log file of a pre-
determined size. New records are appended to the data log file. After the data log file has
stored the maximum number of records, the next record written overwrites the oldest record.
To prevent overwriting any data records, use the DataLogNewFile instruction. New data
records are stored in the new data log file, while the old data log file remains in the CPU.
Table 6- 21
DataLogWrite instruction
LAD/FBD
SCL
"DataLogWrite_DB"(
Table 6- 22
DataLogCreate and DataLogNewFile instructions
LAD/FBD
The DataLogCreate and DataLogNewFile operations extend over many program scan cycles. The actual time required
1
for the log file creation depends on the record structure and number of records. Before the new data log can be used for
other data log operations, your program logic must monitor the transition of the DONE bit to TRUE.
Easy Book
Manual, 11/2011, A5E02486774-04
req:=_bool_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
ID:=_dword_inout_);
SCL
"DataLogCreate_DB"(
req:=_bool_in_,
records:=_udint_in_,
format:=_uint_in_,
timestamp:=_uint_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
name:=_string_inout_,
ID:=_dword_inout_,
header:=_variant_inout_,
data:=_variant_inout_);
"DataLogNewFile_DB"(
req:=_bool_in_,
records=:_udint_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
name=:_DataLog_out_,
ID:=_dword_inout_);
Description
DataLogWrite writes a data record into the specified data log.
The pre-existing target data log must be open.
You must programmatically load the record buffer with current
run-time data values and then execute the DataLogWrite
instruction to move new record data from the buffer to the data
log.
If there is a power failure during an incomplete DataLogWrite
operation, then the data record being transferred to the data log
could be lost.
Description
DataLogCreate
data log file stored in the \DataLogs
directory of the CPU. The data log file is
created with a pre-determined fixed size.
DataLogNewFile
create a new data log file based upon an
existing data log file. A new data log will be
created and implicitly opened based with
the specified NAME. The header record will
be duplicated from the original data log
along with the original data log properties.
The original data log file will be implicitly
closed.
Programming made easy
6.4 Easy to create data logs
creates and initializes a
1
allows your program to
1
111

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents