Extended instructions
9.9 Recipes and Data logs
S7-1200 Programmable controller
516 System Manual, V4.2, 09/2016, A5E02486680-AK
DataLogWrite (Write data log)
Table 9- 206 DataLogWrite instruction
req:=_bool_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
Writes a data record into the specified data log. The pre-existing target
data log must be open (Page 514) before you can write to it with a Dat-
aLogWrite instruction.
STEP 7 automatically creates the associated instance DB when you
insert the instruction.
2
In the SCL example, "DataLogWrite_DB" is the name of the instance DB.
Table 9- 207 Data types for the parameters
REQ IN Bool A low to high (positive edge) signal starts the operation. (Default value:
ID In/Out DWord Numeric data log identifier. Only used as an input for the DataLogWrite
instruction. (Default value: 0)
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 com-
BUSY OUT Bool
• 0 - No operation in progress
• 1 - Operation on progress
ERROR OUT Bool The ERROR bit is TRUE for one scan, after the last request was termi-
nated 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)
The DATA parameter of a DataLogCreate instruction defines the memory address and data
structure of the record buffer. The control program must load the record buffer with current
runtime process values and then execute the DataLogWrite instruction to move new record
data from the buffer to the data log.
The ID parameter identifies a data log and data record configuration. The DataLogCreate
instruction generates the ID number.
If there are empty records in the circular data log file, then the DataLogWrite instruction
writes the next available empty record. If all records are full, then the DataLogWrite
instruction overwrites the oldest record.