Siemens SIMATIC S7-1200 Manual page 32

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

Advertisement

4 Mode of Operation
4.5 Data logging - blocks
Name
NAME
Mode
Write
HEADER
Reset
State
Output
ErrorStatus
NumberRecords
DATA
InOut
Program flow chart
The "DataLog" FB is programmed as a sequence.
When the sequence is enabled ("On"), the sequence starts in step 0.
A DataLog file is created in csv format in the load memory of the CPU with the
specifications "NAME", "RECORDS", "Timestamp", "HEADER" and "DATA".
The file with the "MODE" mode is opened in step 1 once the positive "DONE"
feedback appears or the message that the file already exists. If a message appears
that the file does not exist, the block returns to step 0. If the feedback is positive,
"DONE", the file is written in step 20, when the "Write" input is enabled. If the error
messages "Data log does not exist" or "Data log not open" appear, it is jumped to
the respective step in order to remove this error. If there is a positive "DONE"
feedback, the number of the written data records ("NumberRecords") is
incremented and the next write request ("Write") is waited for.
If another error than stated above occurs, the sequence will remain in the current
step. From "State" and "ErrorStatus" the appropriate SFBs can be determined from
the error description.
The sequence and the counter of the written data records are reset via the "Reset"
input.
When the sequencer is disabled ("On" = "false") the DataLog file is closed via the
"DataLogClose" function. In this state the appropriate csv file on the web server
can be deleted.
The program flow chart is as follows.
Weighing, Controlling and Logging (Set 6)
Entry ID: 82454336,
V2.0,
Data
type
String
Name of the data log
Bool
Mode for opening the data log:
MODE= "0"
Data records of the data log remain
MODE= "1"
Data records of the data log are deleted
Execution of the "DataLogWrite" instruction in the event of a
Bool
rising edge
String
Header of the CSV file
Bool
Reset input
USInt
Status of the function (identical with the step)
Word
Status parameter if an error occurs (in combination with
"State", the corresponding SFB data log can be identified)
UDInt
Current number of written data records
Variant
Pointer to the structure or array of the data to be written
10/2017
Description
32

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Siwarex wp231

Table of Contents