Extended instructions
8.7 Recipes and Data logs
S7-1200 Programmable controller
386 System Manual, 03/2014, A5E02486680-AG
Table 8- 162 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.
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 on 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)
You can provide either the NAME or an ID (ID parameter as an input) of a pre-existing data
log. If you provide both parameters and a valid ID does correspond to the NAME data log,
then the ID is used, and the NAME ignored.
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
operations.
Data log files are automatically closed after a PLC run to stop transition or a PLC power
cycle.
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
may exist, but some of them must be closed so no more than eight are open.