Extended instructions
9.9 Recipes and Data logs
S7-1200 Programmable controller
514 System Manual, V4.2, 09/2016, A5E02486680-AK
DataLogOpen (Open data log)
Table 9- 203 DataLogOpen instruction
req:=_bool_in_,
mode:=_uint_in_,
done=>_bool_out_,
busy=>_bool_out_,
error=>_bool_out_,
status=>_word_out_,
name:=_string_inout_,
Opens a pre-existing data log file. You must open a data log before
you can write (Page 516
) new records to the log. You can open and
close data logs individually. A maximum of eight data logs can be
open at the same time.
STEP 7 automatically creates the associated instance DB when
you insert the instruction.
2
In the SCL example, "DataLogOpen_DB" is the name of the instance DB.
Table 9- 204 Data types for the parameters
REQ IN Bool A low to high (positive edge) signal starts the operation. (Default
MODE IN UInt Operation mode:
• 0 - Append to existing data (Default value)
• 1 - Clear all existing records
NAME IN Variant Name of an existing data log: This variant only supports a String
data type and can only be located in local, DB, or M memory. (De-
ID In/Out DWord Numeric identifier of a data log. (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
completed with no error. (Default value: False)
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 =
Execution condition code (Default value: 0)