×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 22726112, Entry date: 01/29/2010
(7)
Rate

How can you have data from a tag log displayed in table form for panels or the WinCC flexible PC Runtime?

  • Entry
  • Associated product(s)

Instructions:
Using the projects prepared for downloading, you can read out data from the tag log created by the system and transfer it into a table.
The solution is based on scripts.

The following navigation properties and functions are implemented in the sample project:

  • You can scroll entries up and down in single steps in the log.
  • You can scroll entries up and down in steps of 10 in the log.
  • You can jump from the beginning to the end of the log.
  • You can specify the log name in a text field.
  • The tag name, time stamp and value are read out of the log entry.
  • The entry numbers in the log are displayed.

Description of functions and operating instructions:
 

No. Configuration
1 General information:
The project consists of a PC Runtime and an MP 277 Touch configuration. Both projects are structured in the same way and contain the same functions.
The projects only differ in the command syntax used for the scripts.

The PC Runtime source code cannot be used for operator panels with Windows CE because access to the file system from Windows CE with this source code is not possible.
The same applies in the opposite case if you use the MP 277 Touch source code.

2

Description of functions and operating instructions:
The following gives you an overview of the configuration.


Fig. 01
  • Log name:
    Here you enter the relevant tag name that you defined previously in the configuration (see 2). In this example, Log_1 or Log_2.


Fig. 02
  • Control buttons:
    You use the control buttons next to the table to scroll through the logged tag values.
  • Stopping / starting logging:
    Via the "StopLogging" buttons, you can stop the logging of logs 1 and 2 respectively.
    Via the "StartLogging" buttons you can start logging of logs 1 and 2 respectively.

If, for example, a log with 50000 entries is used (max. number of log entries for panels), a "jump" to the end of the log file might take several seconds. This comes from simultaneous read and write access.
It is therefore recommended to stop the logs in order to improve performance.

Note that Windows CE operator panels are not primarily designed for logging data cyclically. They are more intended for logging acyclic error states.
The operator panels are not designed for extensive logging tasks with high quantity frameworks or with high performance requirements.

  • Simulating tag values:
    The values for "Variable_1" and "Variable_2" are obtained through simulations that are stored in the properties in "Screen_01". These values would normally be "process values" that are stored in the corresponding log.


Fig. 03
  • Scripts:
    The function for reading out log data is based on scripts. A description of the functions used is available in the Online Help of WinCC flexible and in the relevant specialist literature.
    The individual sections in the scripts have the corresponding headers.
3 Extending and changing the configuration:
You can change and extend the configuration as you wish.
If you want to use another storage path or file name or want to use another picture name, for example, you must change the parts of the script listed below.

Script "Button_Visible":

Line 7   -> Name of the picture
Line 11 -> Storage path

Script "Read_Line":

Line 7   -> Name of the picture
Line 16 -> Storage path

Script "Scroll_To_End":

Line 7   -> Name of the picture
Line 16 -> Storage path

The attached downloads contain the archived WinCC flexible 2007 project with the functions described above.

Runnability and test environment
The examples can be used on operator panels that support script functions or can be used with WinCC flexible PC Runtime.
Scripts are used in the WinCC flexible configuration. When copying pictures (e.g. into your own project), make sure that "Transfer name information" is checked in the device settings.
The following table lists the components that have been used to create this entry and verify the functions described.
 

Component Product and version designation
PC operating system Microsoft Windows XP SP2
Standard tools -
Engineering tools -
HMI software WinCC flexible 2007 HF4
HMI devices PC Runtime; MP 277 Touch
Controllers -
Table 1: Creation environment of the download attached

Attachment 1: Project_01_V1.0.zip ( 2036 KB ) (MP 277 Touch)

Attachment 2: Project_02_V1.0.zip ( 1994 KB ) (PC-Runtime)

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Rate entry
no rating
Requests and feedback
What do you want to do?
Hinweis: Das Feedback bezieht sich immer auf den vorliegenden Beitrag. Ihre Nachricht wird an die Redakteure im Online Support gesendet. In einigen Tagen erhalten Sie von uns eine Antwort, wenn Ihr Feedback das erfordert. Ist für uns alles klar, werden wir Ihnen nicht mehr antworten.