Tia Portal

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

SIMATIC TIA Portal WinCC (machine-oriented)

Table of contents 9
9. Logging tags ........................................................................................................... 9-3
9.1. Overview ............................................................................................................................... 9-4
9.2. Types of data logs ................................................................................................................. 9-5
9.3. Procedure for configuring data logs ...................................................................................... 9-6
9.4. Displaying data logs .............................................................................................................. 9-8
9.4.1. Trend view assign data log............................................................................................... 9-9
9.4.2. Trend view most important properties ............................................................................ 9-10
9.4.3. Trend view formatting table ............................................................................................ 9-11
9.5. Exercise 1: Configuring and displaying a data log .............................................................. 9-13

TIA Portal WinCC - Tag logging


Training document, V13.0.1, TIA-WCCM 9-1
SIMATIC TIA Portal WinCC (machine-oriented)

TIA Portal WinCC - Tag logging


9-2 Training document, V13.0.1, TIA-WCCM
SIMATIC TIA Portal WinCC (machine-oriented)

9. Logging tags

In this section, the user will learn about the log variants and practice using the logging functions.
Participants will get to know process value logs and the trend view. They will gain an overview of
the logging of tags.
Training aims:
Participants will be able to create process value logs, log process values and configure trend
views.

TIA Portal WinCC - Tag logging


Training document, V13.0.1, TIA-WCCM 9-3
SIMATIC TIA Portal WinCC (machine-oriented)

9.1. Overview

In addition to being displayed, tags can also be saved in a log file for subsequent analysis (e.g. as
temperatures, speeds, or states such as Motor Off).
Acquisition mode = On change
If a process tag needs to be logged in the background, even when it is not permanently
displayed on the HMI device, the acquisition mode of the tag must be set to "Cyclic
continuous".
With the Comfort Panels, in conjunction with the Siemens HMI memory cards, it is
guaranteed that the data on the SD card in the "Data" slot is safe even if there is a power
failure, if a Siemens HMI memory card is inserted in both slots.
It is therefore advisable to store logs and other user data on the SD card!

Tags
External tags
Acquisition of process values of the connected automation system (access to a memory
address)
Internal tags
Values within the HMI device

TIA Portal WinCC - Tag logging


9-4 Training document, V13.0.1, TIA-WCCM
SIMATIC TIA Portal WinCC (machine-oriented)

9.2. Types of data logs

Circular log
When the configured log size has been reached (log is full), the oldest entries are overwritten.

Segmented circular log


In this case, several logs of the same size are created and are filled in succession. When all logs
are completely full, the oldest log is overwritten.

Display system alarm when (log with system alarm depending on fill level)
When a configurable level (e.g. 90%) has been reached, a system alarm is triggered. When the
configured log size has been reached (log is full), the oldest entries are overwritten.

Trigger event when (log with "Overflow" event depending on fill level)
When the log is completely full, the "Overflow" event is triggered. A function list can be configured
for this event. The oldest entries are then overwritten again.
e.g. to copy logs prior to overwriting them

TIA Portal WinCC - Tag logging


Training document, V13.0.1, TIA-WCCM 9-5
SIMATIC TIA Portal WinCC (machine-oriented)

9.3. Procedure for configuring data logs

Create log
>> Project tree > HMI device > Historical data > Data logs tab
Clicking on an empty row in the table inserts a new log into the configuration.

Most important properties


>> Inspector window > Properties + Properties tab > General
Data records per log (number of possible entries)
Storage location (file format) and path
CSV file (ASCII)
Data is saved to a CSV file in standard ASCII format. (view for example with Excel)
File - RDB
Data is saved to a relational database for quick access. To be able to use the data outside
of WinCC Runtime Advanced, the RDB file can be converted to CSV format using the
"CopyLog" function.
Database
All data is saved to an ODBC database. (MS Data Engine 97/2000, MS Access 97/2000,
MS SQL Server 7.0/2000)
Text file (unicode)
The log data is stored in unicode. This file format supports all the characters that can be
used in WinCC and WinCC Runtime Advanced. (view for example with Notepad)
With the Comfort Panels, in conjunction with the Siemens HMI memory cards, it is
guaranteed that the data on the SD card in the "Data" slot is safe even if there is a
power failure.
It is therefore advisable to store logs and other user data on the SD card!

TIA Portal WinCC - Tag logging


9-6 Training document, V13.0.1, TIA-WCCM
SIMATIC TIA Portal WinCC (machine-oriented)

>> Inspector window > Properties + Properties tab > Start mode
Characteristics at runtime start
Log can continue to be written or deleted
Alarm logging is initiated immediately or only after execution of the system function
"StartLogging"
>> Inspector window > Properties + Properties tab > Logging method
Log type
Contents of log entries
with alarm text; otherwise no logging of alarm texts, only alarm number

Assign logs
Following creation of the data log, the logs must be assigned to the tags.
>> Project tree > HMI device > HMI tags > Logging tags tab
Select tag

and then double-click Add new and the logging property for this tag is enabled. The data log and
the acquisition mode (if required, also the logging cycle) can now be assigned.

Logging of values can be further limited so that only values within/outside a configurable range
are saved in the log.
>> Inspector window > Properties + Properties tab > Deadband for logging

Variable or
constant
limits

Activating or
deactivating

TIA Portal WinCC - Tag logging


Training document, V13.0.1, TIA-WCCM 9-7
SIMATIC TIA Portal WinCC (machine-oriented)

It is possible to save multiple tags in one common log.


The name of the tag is also saved, and can be selected when displaying log data.

9.4. Displaying data logs

Logged values of tags can be graphically displayed on the HMI device using a trend view.
The trend view shows the current or logged values within a particular time window.
When displaying data logs, the operator can shift the time window on the HMI device to view the
required information from the log.
The log view is not updated automatically.The contents of the log are displayed
statically when the screen is selected, although logging continues in the background. The
current log content is only shown after selecting the display again.

TIA Portal WinCC - Tag logging


9-8 Training document, V13.0.1, TIA-WCCM
SIMATIC TIA Portal WinCC (machine-oriented)

9.4.1. Trend view assign data log

The assignment of values to the trend view is based on trend view properties
>> Inspector window > Properties + Properties tab > Trends
Several trends can be output in a view regardless of where they are stored (in the same log or in
different logs).
The source of the value is then set when defining the trend.
To improve clarity when displaying multiple trends, these can be assigned different line types

and different colors.

TIA Portal WinCC - Tag logging


Training document, V13.0.1, TIA-WCCM 9-9
SIMATIC TIA Portal WinCC (machine-oriented)

9.4.2. Trend view most important properties

Buttons
>> Inspector window > Properties + Properties tab > Toolbar
When displaying logs, these must be activated, otherwise the user can only see the section of
displayed values and not move the display range.
When displaying real-time values, these are only necessary when the number of values in the
trend exceeds the displayed time (Time axis).

X axis
This must be adapted according to the displayed values.
>> Inspector window > Properties + Properties tab > Time axis

Y axis
This must be adapted to the displayed values.
>> Inspector window > Properties + Properties tab > Left value axis
>> Inspector window > Properties + Properties tab > Right value axis
A Y axis can be configured on the left and right. When displaying more than one trend, it is also
possible to set two different scales.

TIA Portal WinCC - Tag logging


9-10 Training document, V13.0.1, TIA-WCCM
SIMATIC TIA Portal WinCC (machine-oriented)

9.4.3. Trend view formatting table

When the trend view is inserted, a standard width and sequenz is set for the columns of the table.
These can be adapted individually.

TIA Portal WinCC - Tag logging


Training document, V13.0.1, TIA-WCCM 9-11
SIMATIC TIA Portal WinCC (machine-oriented)

TIA Portal WinCC - Tag logging


9-12 Training document, V13.0.1, TIA-WCCM
SIMATIC TIA Portal WinCC (machine-oriented)

9.5. Exercise 1: Configuring and displaying a data log

Task
Create the "Speed" log in which the values of the setpoint and actual speeds are saved
A circular log with 500 entries is adequate
Displaying the data log
Trend view in the "Trends" screen

Procedure

TIA Portal WinCC - Tag logging


Training document, V13.0.1, TIA-WCCM 9-13
SIMATIC TIA Portal WinCC (machine-oriented)

1. Create data log


Create the "Speed" log
>> Project tree > HMI device > Logs > Data logs
and double-click on an empty row in the table to generate a new log.
Log properties:
File in D:\Courses\
Response on Runtime start
Logging should begin automatically
The log should continue to be written

2. Assign data log


Assign the newly created log to the tags "User.Speed_act" and "User.Speed_set".
>> Project tree > HMI device > HMI tags >
lower section > Logging tags tab
Select the "On change" acquisition mode.
No logging limits should limit the value logging.
>> Inspector window > Properties + Properties tab > Settings
Also select the acquisition mode "Cyclic continuous" for the tag "User.Actual_speed".

3. Display data log


Configure a trend view in the "Trends" screen.
Open the screen, and insert a trend view from Controls in the "Toolbox" task card.
Trend properties:
>> Inspector window > Properties + Properties tab > Trend

>> Inspector window > Properties + Properties tab > Left value axis
Set the end of the value axis to 1400
Set the length of the axis label to 4
>> Inspector window > Properties + Properties tab > Right value axis
Set the end of the value axis to 1400
Set the length of the axis label to 4
>> Inspector window > Properties + Properties tab > Toolbar

>> Inspector window > Properties + Properties > Appearance
Enable the option "Show ruler"
>> Inspector window > Properties + Properties tab > Table
Enable the option "Show value table"
Number of rows in the value table = 2

TIA Portal WinCC - Tag logging


9-14 Training document, V13.0.1, TIA-WCCM
SIMATIC TIA Portal WinCC (machine-oriented)

4. Configure the button for updating the log view


Insert a button into the picture "Trends".

5. Test the configuration


In order to test logging in the background and the update of the trends view, you can
change the speed via the TP177B while the "Trends" screen is displayed on the PC.

TIA Portal WinCC - Tag logging


Training document, V13.0.1, TIA-WCCM 9-15

You might also like