101BExtended instructions
8.7 Data logging
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
299
Table 8- 132 Data types for the parameters
Parameter and type
Data type
Description
REQ
IN
Bool
A low to high (positive edge) signal starts the operation. (Default value: False)
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 completed with
no error.
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 = TRUE.
STATUS
OUT
Word
Execution condition code (Default value: 0)
The memory address and data structure of the record buffer is configured by the DATA
parameter of a DataLogCreate instruction. You must programmatically load the record buffer
with current run-time 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 ID number is
generated when a data log is created.
If there are empty records in the circular data log file, then the next available empty record
will be written. If all records are full, then the oldest record will be overwritten.
CAUTION
Potential for data log data loss during a CPU power failure
If there is a power failure during an incomplete DataLogWrite operation, then the data
record being transferred to the data log could be lost.
Table 8- 133 Values of ERROR and STATUS
ERROR
STATUS (W#16#)
Description
0
0000
No error
0
0001
Indicates that the data log is full: Each data log is created with a specified
maximum number of records. The last record of the maximum number has been
written. The next write operation will overwrite the oldest record.
0
7000
Call with no REQ edge: BUSY = 0, DONE = 0
0
7001
First call with REQ edge (working): BUSY = 1, DONE = 0
0
7002
N
th
call (working): BUSY = 1, DONE = 0
1
8070
All internal instance memory is in use.
1
8092
Data log does not exist.
1
80B0
Data log file is not open (for explicit open mode only).