101BExtended instructions
8.7 Data logging
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
291
●
Cycle time: Enter your cycle time value. This value can only be changed in Device
configuration.
●
Initial pulse width: Enter your initial pulse width value. The pulse width value can be
changed during runtime.
Enter the start address to configure the output addresses. Enter the Q word address where
you want to locate the pulse width value.
NOTICE
Pulse-train outputs cannot be used by other instructions in the user program
When you configure the outputs of the CPU or signal board as pulse generators (for use
with the PWM or basic motion control instructions), the corresponding outputs addresses
(Q0.0, Q0.1, Q4.0, and Q4.1) are removed from the Q memory and cannot be used for
other purposes in your user program. If your user program writes a value to an output used
as a pulse generator, the CPU does not write that value to the physical output.
The default location is QW1000 for PWM1, and QW1002 for PWM2. The value at this
location controls the width of the pulse and is initialized to the "Initial pulse width:" value
specified above each time the CPU transitions from STOP to RUN mode. You change this
Q-word value during run time to cause a change in the pulse width.
8.7
Data logging
Your control program can use the Data log instructions to store run-time data values in
persistent log files. The data log files are stored in flash memory (CPU or memory card). Log
file data is stored in standard CSV (Comma Separated Value) format. The data records are
organized as a circular log file of a pre-determined size.
The Data log instructions are used in your program to create, open, write a record, and close
the log files. You decide which program values will be logged by creating a data buffer that
defines a single log record. Your data buffer is used as temporary storage for a new log
record. New current values must be programmatically moved into the buffer during run-time.
When all of the current data values are updated, you can execute the DataLogWrite
instruction to transfer data from the buffer to a data log record.
Use the built-in PLC Web server to manage your data log files. Download recent records, all
records, clear records, or delete log files with the "Data Logs" standard web page. After a
data log file is transferred to your PC, then you can analyze the data with standard
spreadsheet tools like Microsoft Excel.
8.7.1
Data log record structure
The DATA and HEADER parameters of the DataLogCreate instruction assign the data type
and the column header description of all data elements of a log record.