Easy To Create Data Logs - Siemens SIMATIC S7-1200 Manual

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

Advertisement

Programming made easy

6.4 Easy to create data logs

The CTRL_PWM instruction stores the parameter information in the DB. For SCL, you must
first create the DB for the instruction before you can reference it. For LAD and FBD, STEP 7
automatically creates the DB when you insert the instruction. The data block parameters are
controlled by the CTRL_PWM instruction.
The pulse width will be set to the initial value configured in device configuration when the
CPU first enters the RUN mode. You write values to the word-length output (Q) address that
was specified in device configuration ("Output addresses" / "Start address") as needed to
change the pulse width. Use an instruction (such as Move, Convert, Math, or PID) to write
the specified pulse width to the appropriate word-length output (Q). You must use the valid
range for the output value (percent, thousandths, ten-thousandths, or S7 analog format).
The PWM output can be varied from 0 to full scale, providing a digital output that in many
ways is the same as an analog output. For example, the PWM output can be used to control
the speed of a motor from stop to full speed, or it can be used to control position of a valve
from closed to fully opened.
6.4
Easy to create data logs
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.
110
Cycle time
Pulse width time
Duty cycle can be expressed, for example, as a
percentage of the cycle time or as a relative quantity
(such as 0 to 1000 or 0 to 10000). The pulse width can
vary from 0 (no pulse, always off) to full scale (no
pulse, always on).
Easy Book
Manual, 11/2011, A5E02486774-04

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents