You are on page 1of 51

WinCC Diagnostics

Siemens
WinCC V7 Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109757865 Support
Legal information

Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG (“Siemens”). They are non-
binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.

Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
© Siemens AG 2019 All rights reserved

damages arising from a breach of material contractual obligations shall however be limited to the
foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.

Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.

Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 2
Table of contents

Table of contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 5
1.1 Overview............................................................................................... 5
1.2 Components used ................................................................................ 6
2 General diagnostics .......................................................................................... 7
2.1 System alarms ...................................................................................... 8
2.2 Log files ................................................................................................ 9
2.2.1 Overview of the most important storage locations for log files............. 9
2.2.2 General diagnostics .............................................................................. 9
2.2.3 Events at runtime ............................................................................... 10
2.2.4 SIMATIC Assessment Suite - Data Collector (SAS-DC).................... 11
3 Diagnostic Communication ............................................................................ 12
3.1 Connection ......................................................................................... 12
3.1.1 Status - Logical Connections ............................................................. 12
3.1.2 Channel diagnostics ........................................................................... 13
3.1.3 Log files .............................................................................................. 14
3.1.4 System diagnostics ............................................................................ 15
3.2 Variables............................................................................................. 16
3.2.1 Variable status .................................................................................... 16
3.2.2 Quality code ....................................................................................... 17
© Siemens AG 2019 All rights reserved

3.2.3 Performance variables ....................................................................... 18


4 Diagnostics scripts .......................................................................................... 19
4.1 VBS actions ........................................................................................ 19
4.1.1 Trace statement ................................................................................. 19
4.1.2 Error handling ..................................................................................... 20
4.1.3 Script debugger .................................................................................. 21
4.1.4 Debugging with Visual Studio ............................................................ 24
4.2 C actions............................................................................................. 27
4.2.1 printf instruction .................................................................................. 27
4.2.2 Diagnostics tags ................................................................................. 28
4.2.3 Application diagnostics (ApDiag) ....................................................... 28
4.2.4 Debugging with ApDiag ...................................................................... 29
4.2.5 Performance analysis ......................................................................... 33
4.3 Log files .............................................................................................. 36
4.4 System alarms .................................................................................... 36
4.5 Global Script Inspector ....................................................................... 37
5 Diagnostics Server/client ................................................................................ 38
5.1 Connection overview .......................................................................... 38
5.2 System alarms .................................................................................... 38
5.3 Network test ....................................................................................... 39
5.3.1 Ping command ................................................................................... 39
5.3.2 Tracert ................................................................................................ 40
5.3.3 Nslookup............................................................................................. 40
5.4 SIMATIC Shell .................................................................................... 41
6 Diagnostics redundant systems .................................................................... 42
6.1 System variables ................................................................................ 42
6.2 System alarms .................................................................................... 43
6.3 Redundancy Control........................................................................... 45
7 Complementary tools ...................................................................................... 46

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 3
Table of contents

7.1 Windows Performance Monitor .......................................................... 46


7.2 SQL Server Profiler ............................................................................ 47
8 Appendix .......................................................................................................... 49
8.1 Service and support ........................................................................... 49
8.2 Links and literature ............................................................................. 50
8.3 Change documentation ...................................................................... 51
© Siemens AG 2019 All rights reserved

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 4
1 Introduction

1 Introduction
1.1 Overview
During technical problem solving, it is usually advantageous to proceed
systematically. For a SCADA application such as WinCC, the following steps are
recommended:

1. Problem determination
2. Problem description
– Performance
– Connection problems
– Installation problem
– sporadic or reproducible error
– different areas, e.g. script, graphics runtime
3. Diagnostics (cause research)
– Configuration error
– Software fault
– Hardware fault
4. Troubleshooting
© Siemens AG 2019 All rights reserved

Figure 1-1

4
3 Troubleshooting

2 Diagnostics

1
Problem determination
Problem description

This application example focuses on step 3 (diagnostics), in particular:

• How do you diagnose the application?


• Where can you find useful information?
• Which diagnostic tools are available to you?

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 5
1 Introduction

Required knowledge
Basic knowledge of WinCC V7 is required.

Note Basics are taught in the SITRAIN course "SIMATIC WinCC, System Course".
• SIMATIC WinCC, Systemkurs (de)
• SIMATIC WinCC, System Course (en)

1.2 Components used


The following hardware and software components were used to create this
application example:
Table 1-1
Component Quantity Article number Note
Engineering station 1 Development computer
SIMATIC WinCC V7 1 6AV63.1-....7-....
MS SQL Server 1

This application example consists of the following components:


© Siemens AG 2019 All rights reserved

Table 1-2
Component File name Note
Documentation 109757865_WinCC_Diagnostics_en.pdf This document

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 6
2 General diagnostics

2 General diagnostics
For the diagnostics of WinCC, you can use various tools provided by the
components involved:

• Operating system (Windows)


• Database (SQL server)
• WinCC with its basic functions
• WinCC with its options packages

Often, a combination of the various tools is helpful, e.g. in the form of performance
monitoring and log files.

Figure 2-1

WINDOWS WinCC WinCC


EventViewer Diagnostics Diagnostics - OPTIONS
Log files Log files
Resource Monitor
Siemens Data Collector Redundancy Control
Performance Monitor
© Siemens AG 2019 All rights reserved

WINDOWS Problem Channel Diagnostics Report Runtime Diagnostics


Steps Recorder (PSR) Server-Client-Connection IIS

SQL Server Script Debug PH Console


SQL Server
APDIAG Status page of
Log files
WebNavigator
ActivityMonitor ALM
… …
SQL Profiler

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 7
2 General diagnostics

2.1 System alarms


System messages are triggered in the runtime by various WinCC components. The
system messages are available in all WinCC installation languages.
System messages must be selected for use when you configure the message
system.

Preparation
1. Open the "Alarm Logging" editor.
2. Select the input language with the "View > Input language" command in the
main menu of WinCC.
3. Select the "System messages" folder in the navigation area.
4. Under "Message block for message text" in the properties area, select the user
text block in which the message texts are to be entered.

Note If you use WinCC system messages, you must update them after
• you have installed a language.
• have performed a system update or migration.

Updating used system messages


You can update the system messages to the latest version after installing a new
© Siemens AG 2019 All rights reserved

language, after a system update or after migration. System messages that do not
correspond to the template are highlighted in red in the table area.
1. In the table area, select the system messages that you want to refresh. If you
want to refresh all system messages, select the column "Used".
2. Select the "Update" command in the shortcut menu.

Note System messages that do not correspond to the template are highlighted in red
in the table area.

Using all system messages


1. Select the "Used" column in the table area.
2. Select the "Select all" command in the shortcut menu of the "Used" column.

Using individual system messages


1. Select the "Used" column in the table area.
2. Select the command "Deselect all" from the context menu.
3. Select the system message lines that you want to use.

Note The specific system memory numbers for the respective diagnostics are
described in the individual subchapters "System Messages".

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 8
2 General diagnostics

2.2 Log files


2.2.1 Overview of the most important storage locations for log files

Table 2-1
Source Path Comment
WinCC C:\Program Files(x86)\Siemens\WinCC\Diagnose Storage for General diagnostics
C:\ProgramData\Siemens\Automation\Logfiles e.g. OPC UAServer
C:\ProgramData\Siemens\Logs Trace files and also option
packages such as Process
Historian, Information Server,
Performance Monitor ...
[ProjectFolder]\ua\UALogFile.txt -
SQL Server SQL Server Management Studio → Management → -
SQL Server Logs
C:\Program Files(x86)\Microsoft SQL Server\ As of WinCC V7.5, the SQL
MSSQL10_50.WINCC\MSSQL\log Server used is a 64-bit
application and can therefore be
found in "C: \ Program Files \ ..."
Installation C:\ProgramData\Siemens\Automation\Logfiles\Setup\ -
C:\Program Files (x86)\Microsoft SQL Server\100\ As of WinCC V7.5, the SQL
Setup Bootstrap\log Server used is a 64-bit
application and can therefore be
© Siemens AG 2019 All rights reserved

found in "C: \ Program Files \ ..."

2.2.2 General diagnostics

Logfiles from the directory "C:\Program Files(x86)\Siemens\WinCC\Diagnose"


Table 2-2
Log File name Log files for
WinCC_SStart_xx.log All events that occur during WinCC startup in the
runtime are logged here.
WinCC_Sys_xx.log Events that occur during WinCC runtime are logged
in this log file.
CCAlgRtCollectAlarm.log Alarm Logging Server
PDLRT_GUI.log WinCC Runtime
SIMATIC_S7_Protocol_Suite_xx.log In case of communication errors, the corresponding
SIMATIC_S7-1200_S7-1500_Channel_01.log log file provides detailed descriptions of the events.
System_Info.log
SimotionTA_01.log
SIMATIC_S5_PROFIBUS_FDL_01.log OPC.log
Script.log An access violation in C or VB scripts generates the
"Script.log" file.
It contains, for example:
Image names, object names, properties/events, script
names, and line number of the error in the script.
CCAlgRtCommonArchiving.log Alarm and Tag Logging Server
CCTlgRtCommonArchiving.log
CCDeltaLoader.log Delta Loading (integrated projects)
CCTextServer.log TextServer
CCTlgCommonArchiving.log Tag Archiving

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 9
2 General diagnostics

Log File name Log files for


CUCSurrogate.log User context surrogate for WinCC
PictureTreeManagerCS.log Configurator PictureTree Manager
PMActivate / PMDeactivate / PMxxx … Project Manager events (open, close)

2.2.3 Events at runtime

In the log file "WinCC_Sys_01.log", from the directory "C:\Program


Files(x86)\Siemens\WinCC\Diagnosis", events are logged which occur during the
runtime of WinCC.
The following table provides information about the system messages contained in
it:
Table 2-3
Number Text Description
1007000 ActionOverflow:More than 10.000 Overflow, more than 10,000 actions in the queue.
Actions to work
1007001 ExecuteError in Action (Function An error occurred while processing an action. The
Name) Action ID was also output. If this is a global script
action, the connection to the action name can be
established via the GSC-Runtime application
window.
1007003 No Connection to Server (Server The connection to the server is broken. Action
© Siemens AG 2019 All rights reserved

Name) Restart WebServer


1007004 Function (Function Name) unknown Unknown function
1007004 10 Errors occurred, no more Errors The error has occurred ten times and is no longer
will be reported logged for performance reasons.
1007005 No PCode A global script action or function does not contain
any executable code (P code).
Action Compile action or function.
1007006 Variable not existing Requested tag does not exist.
1007006 Tag timeout Tag request was not answered within a certain
amount of time.
1007007 FindFirstFile For multi-user projects, the directory
INVALID_HANDLE_VALUE "..\Siemens\WinCC\aplib" with the name
GetLastError() SCRIPTFCT is released. If there is no access to
the directory, this entry is found and a second
attempt is started.
1007007 InstallClient OK Communication Client/Server disabled.
1007007 - A client was not able to establish communication
with the server.
1007009 Thread said good-bye A job thread has ended unexpectedly.
1007009 APDMConnect-Thread said good- The thread that prepares the connection between
bye the script control, tag management and other
applications was ended unexpectedly.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 10
2 General diagnostics

2.2.4 SIMATIC Assessment Suite - Data Collector (SAS-DC)

The SIMATIC Assessment Suite - Data Collector (SAS-DC) enables you to compile
diagnostic and system information from computers or other devices conveniently
and with little effort.
This diagnostic and system information is stored in system-specific archives.
You can find more detailed information under:
https://support.industry.siemens.com/cs/ww/en/view/65976201
© Siemens AG 2019 All rights reserved

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 11
3 Diagnostic Communication

3 Diagnostic Communication
An error or malfunction during the establishment of a communication connection is
usually only detected in the runtime.
Objects dynamized with WinCC variables that cannot be supplied with current
process values are displayed as inactive in the process screen. These can be, for
example, I/O fields, slider objects or bar charts.
• If the error only affects some WinCC variables of a connection, the connection
setup is generally guaranteed. In this case, you should check the addressing of
the variables and their names at the points of use.
• If the error affects all WinCC variables of a connection, this indicates an error
in the connection itself.
The following sections describe the measures and means you can use to locate the
source of the error.

3.1 Connection
3.1.1 Status - Logical Connections

With the function "Status - Logical connections" the WinCC Explorer offers a simple
possibility to display the current status of all configured connections. However, the
status can only be displayed in the runtime.
The function is started in WinCC Explorer via the "Tools" menu.
© Siemens AG 2019 All rights reserved

Figure 3-1

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 12
3 Diagnostic Communication

3.1.2 Channel diagnostics

With the "Channel Diagnostics" of WinCC, the WinCC user gets a quick overview
of the status of the active connections in the runtime.
Channel diagnostics provides status and diagnostic information on channel units
and also serves as a user interface for configuring the diagnostic output.
Channel diagnostics allows:
• The output of statistics or information about the status of communication, for
example, in a process screen.
• Text output in a log file for error analysis and correction by the service

Note The diagnostic module can be inserted into a process picture as an ActiveX
control or started as a stand-alone application via the Windows start menu.
The module only displays status information for channels that support
diagnostics.

Figure 3-2
© Siemens AG 2019 All rights reserved

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 13
3 Diagnostic Communication

3.1.3 Log files

In case of communication errors of the S7 channel for S7-300/S7-400, the file


"SIMATIC_S7_Protocol_Suite_xx.log" is generated.
The file "SIMATIC_S7_Protocol_Suite_xx.log" is located in the folder
"...\Siemens\WinCC\Diagnosis" of the WinCC installation path (see chapter 2.2.2).

Note Further information about flags can be logged via the channel diagnostics
(chapter 3.1.2).
For each configured WinCC channel, channel diagnostics creates its own log file
with the name "Channel name.log".

Figure 3-3
© Siemens AG 2019 All rights reserved

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 14
3 Diagnostic Communication

3.1.4 System diagnostics

WinCC offers with the SysDiagControl (under "ActiveX Controls") a possibility for
the fast error localization of the controllers S7-1200 and S7-1500.
Requirements:
• You have integrated the "SIMATIC S7-1200, S7-1500 Channel" in the project.
• You have created a connection in the "OMS+" channel unit.

Note If you want to display messages and texts of the S7-1500 channel in the
diagnostic buffer view, you must have loaded the messages and text list entries
from the controller in the "AS Messages" area of the WinCC Configuration Studio
/ Alarm Logging runtime.

Three views are available in the system diagnostic display:


Figure 3-4
Diagnostic overview
© Siemens AG 2019 All rights reserved

Diagnostic details

Diagnostic buffer

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 15
3 Diagnostic Communication

3.2 Variables
There are two quality indicators in WinCC that you can use to evaluate the quality
of variables. These two indicators are the variable status and the quality code.

3.2.1 Variable status

The variable status includes, among other things, violations of the configured
measuring range limits as well as the status of the coupling between WinCC and
the automation device.
The status of individual WinCC variables can be monitored in the runtime and thus
the status of the associated connection can be determined.

Figure 3-5
© Siemens AG 2019 All rights reserved

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 16
3 Diagnostic Communication

3.2.2 Quality code

The quality code contains the same information as the variable status. In addition
to this information, the quality code contains information about the connected
participants.
Possible participants are:
• Automation systems
• Automation systems with field devices
• OPC Server
• OPC server with subordinate automation systems

The quality code provides information on the quality of a variable, regardless of


where this code was formed. The status of the entire value transfer and value
processing is taken into account.
Figure 3-6
© Siemens AG 2019 All rights reserved

The quality code can be evaluated in different ways:


• with VB scripts
• with C scripts
• via the dynamics dialog
• via the "Quality Code Change Variable" event of an EA field

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 17
3 Diagnostic Communication

3.2.3 Performance variables

WinCC provides the "@PRF_..." system tags to analyze the WinCC project. This
allows you to evaluate the time behavior of the server.

Figure 3-7
© Siemens AG 2019 All rights reserved

Creating performance tags


You will find the system tags for performance analysis in the internal tag group
"Performance" in WinCC tag management.
Various components are assigned to the system variables:
Table 3-1
Tag name Component Creating the variables
@PRF_DMRT_SRV_... WinCC variable management The WinCC variable household creates
(Data Manager) the system variables when creating a
WinCC project.
@PRF_TLGRT_... WinCC tag logging
@PRF_DMRT_CHNCON_ WinCC process communication As soon as you create a new
<Connection_name>_... connection under a communication
driver, additional performance tags are
created for this connection.
You can find additional information
under "Communication Diagnostics >
Channel Diagnostics > Check
connection with performance tags".

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 18
4 Diagnostics scripts

4 Diagnostics scripts
4.1 VBS actions
4.1.1 Trace statement

The targeted implementation of trace statements, e.g. for the output of tag values,
enables the progress of actions and the procedures called in them to be traced.
To display trace statements, you need a special application window in your screen.
This application window, the GSC diagnostics, returns the trace statements
contained in the VBS actions in the order in which they are accessed. This also
applies to trace statements in procedures accessed in actions.

Note You specify the trace statement in the format "HMIRuntime.Trace


<Variable> .Value". For performance reasons, you should clear the trace
statements after you have tested the scripts.

1. From the "Smart Objects" object palette, paste the "Application Window" into
your screen.
2. Select the entry "Global Script" from the "Window Contents" dialog and confirm
© Siemens AG 2019 All rights reserved

by pressing "OK".
3. Select the entry "GSC Diagnostics" from the dialog "Template".
4. Confirm with "OK" to insert the diagnostics window.
Figure 4-1

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 19
4 Diagnostics scripts

4.1.2 Error handling

General Information
Error handling in VBS is not as convenient as in other high-level languages. For
example, no jump labels or goto instructions are used.
If you want to implement error handling in VBS, you must program it yourself. The
error object provides the following properties and methods for this:

Table 4-1
Properties
Err.Number Error number of the last script error (no error = 0)
Err.Source Provides the name of the error source (application)
Err.Description Error description as plain text

Table 4-2
Methods
Err.clear Reset error object (Err.Number = 0)

Implementation
To evaluate possible script errors at runtime, implement the following error handler
© Siemens AG 2019 All rights reserved

in your code:
1. At the beginning of the code, use the instruction "On Error Resume Next". This
prevents you from stopping further script processing in the event of a runtime
error.
2. Then write the actual code to be executed.
3. At the end of the code the error handling then takes place:
– With "IF Err.Number <> 0 THEN" ask if a runtime error occurred.
– If this is the case, a branch is made in the IF statement and the runtime
error is issued in plain text with "Err.Description."
– The error object is reset with "Err.clear."
– Close the IF statement with "END IF."

Figure 4-2

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 20
4 Diagnostics scripts

4.1.3 Script debugger

WinCC supports runtime debugging for global scripts and scripts in screens. To
test your VB scripts in runtime, you can use the Microsoft Visual Studio 2008
debugger.

Note The debugger of "Microsoft Visual Studio 2008" is supplied with the WinCC
setup. If another Visual Studio version is already installed, for example "Microsoft
Visual Studio 2010," use the debugger of this version.

Installation
To use the debugger in WinCC, you must start Setup and specify instance "Visual
Studio 2008" as the default:
1. During WinCC installation, the folder "VS 2008 Shell Redist" is created on a
drive of the PC, e.g. as "D:\VS 2008 Shell Redist". Start the Setup with the
following file: "D:\VS 2008 Shell Redist\Integrated Mode\Vside.enu.exe."
If the folder "D:\VS 2008 Shell Redist" is not on your PC, you can create it
later. To do this, start the "vs_ideredist.exe" application in the
"...\InstData\VSRedist\Setup" folder of the WinCC installation DVD.
2. Follow the instructions and accept the default settings.
3. The following program is installed: "Microsoft Visual Studio 2008 Shell
(Integrated Mode) – NEW."
© Siemens AG 2019 All rights reserved

4. The first time you start the debugger, the "Visual Studio Just-In-Time
Debugger" dialog opens.
5. Select the entry "New instance of Visual Studio 2008."
6. To set "Visual Studio 2008" as the default debugger, enable the "Set the
currently selected debugger as the default."

The following functions are supported:


• Viewing the source code of the script to be debugged.
• Step-by-step processing of the scripts to be checked.
• Change the tags and property values.
• Viewing and controlling the script flow.

Note Please note that your code displayed in the debugger is write-protected. You
cannot modify the code directly in the debugger, but rather only test the changes
made.

There are several ways to enable the debugger:


• Automatic activation of the debugger when an error occurs in runtime.
• Opening an error dialog in runtime via which the debugger can be activated.
• Starting the debugger from the Start menu and opening a running runtime
script.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 21
4 Diagnostics scripts

Automatic access, showing an error dialog


1. In the computer's context menu in WinCC Explorer, select the command
"Properties." The "Computer Properties" dialog opens.
2. Select the "Runtime" tab.
3. Activate the desired debug options. The debug behavior for actions in Global
Script and Graphics Designer can be set independently of each other:
Figure 4-3

4. Select "Start debugger" when the debugger should be started directly following
an error in the runtime.
5. Select "Display Error Dialog" if you do not want to start the debugger directly,
but wish to display an error dialog with information about the error. The
debugger can be started from the error dialog by means of a button.

Figure 4-4
© Siemens AG 2019 All rights reserved

6. Click "OK" to confirm your entry.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 22
4 Diagnostics scripts

Starting the debugger from the Start menu


If the Microsoft Script Debugger is accessed via Windows instead of automatic
activation using WinCC, scripts which are currently running can be accessed for
editing in runtime.
Define a connection in the debugger to the respective processes, "pdlrt.exe" for the
Graphical Runtime System and "gscrt.exe" for the Global Runtime System.

• Start Microsoft Visual Studio 2008:


"START > Programs > Microsoft Visual Studio 2008"
• Create a new script file:
File > New > File… > Script template "Windows Script Host."
• Start debugging with "Debug > Attach to Process" and select gscrt.exe or
pdlrt.exe, for example.
Figure 4-5
© Siemens AG 2019 All rights reserved

Note • To debug a picture, the following prerequisites must be met:


– Runtime is activated.
– The picture to be debugged is active.
• You can close the debugger at any time without closing the WinCC Runtime.
• The first time you start the debugger, the "Visual Studio Just-In-Time
Debugger" dialog opens. Select the entry "New instance of Visual Studio
2008." To set "Visual Studio 2008" as the default debugger, enable the "Set
the currently selected debugger as the default."

DF FA S SUP HMI

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 23
4 Diagnostics scripts

4.1.4 Debugging with Visual Studio

Executing scripts step-by-step


You can execute your scripts step-by-step to test the effects of each individual line
of script in the runtime, or to limit logical errors.
1. Activate the document to be debugged in runtime.
2. Manually start the debugger from the start menu and open the desired script
file or activate the debugger in WinCC. When activated in WinCC, the
debugger automatically opens when a faulty script is executed.
3. Put a breakpoint in the script file. Breakpoints are typically placed before lines
of code in which you suspect errors.
4. Switch to WinCC runtime and trigger an action that causes the script to run.
The debugger stops at the first breakpoint and marks the current line.
5. Select one of the following menu commands to go through the script document
step-by-step:
– "Debug > Step Into:" Goes to the next code line.
– If the script in this line calls up a procedure, use the "Step Into" command
to jump to this procedure. You can then process the accessed procedure
step by step.
– "Debug > Step Over:" Skips the called-up procedure. The procedure is run,
but the debugger does not guide you through the individual lines of the
procedure. Instead, it takes you to the next line of the current script after
© Siemens AG 2019 All rights reserved

the procedure has been executed.


6. To abort the step-by-step execution of a procedure, select the menu command
"Debug> Step Out." The debugger then jumps to the next action.
7. Proceed step by step to the end of the document or select the menu command
"Debug> Run" to restart the script in runtime.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 24
4 Diagnostics scripts

Setting breakpoints
1. Start the debugger and select the script. If you have selected the automatic
activation of the debugger in WinCC, the debugger is called up as soon as a
faulty script is executed.
2. Place the cursor in the action where you want to set a breakpoint.
3. From the "Debug" menu, choose "Toggle Breakpoint" or its icon from the
toolbar.
The next executable line is marked with a red dot.
Figure 4-6

4. Change to the WinCC runtime and execute the action that you want to debug.
The debugger stops at the first breakpoint it finds in the script. The current line
© Siemens AG 2019 All rights reserved

is highlighted in yellow. You can now go through the script step by step.
Figure 4-7

– The code can be traversed line by line with <F11>.


– Tag values can be observed in the window "Watch."
– The yellow arrow (current script position) can be moved with the mouse to
another line of code (e.g. to leave the loop).
– <F5> continues the script until the next breakpoint.

Clearing breakpoints
1. Place the cursor in the line whose breakpoint you want to clear.
2. Select the entry "Toggle Breakpoint" from the "Debug" menu.
3. The line is displayed again without marking.
4. To clear all breakpoints in a script, select "Clear all Breakpoints" from the
"Debug" menu.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 25
4 Diagnostics scripts

Setting and clearing bookmarks


During debugging, you can bookmark lines of code to make it easier to find a line
later.
• Place the mouse pointer in the line in which you want to bookmark.
• Press <Ctrl + F9> to set a bookmark.
• Press <Ctrl + Shift + F9> to clear a bookmark.
• Press <F9> to go to the next bookmark in the script.
• <Shift + F9> takes you to the previous bookmark in the script.

Monitoring tags and objects


While a script is running in runtime, you can use the debugger "Watch Window" to
find values of tags or objects.

1. Set at least one breakpoint in the current script.


2. Switch to WinCC runtime and execute an action that executes the script.
3. Activate the entry "Windows> Watch> Watch 1" in the "Debug" menu.
The "Watch Window" opens.
4. To find the value of a tag or property, enter "?" followed by a space and the
name of the tag or property you want to find, such as "? myTag." Press
<Return> to execute the command.
© Siemens AG 2019 All rights reserved

Figure 4-8

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 26
4 Diagnostics scripts

4.2 C actions
4.2.1 printf instruction

Through the targeted use of printf instructions, for example to issue tag values, the
sequence of actions and the functions called in it can be tracked.
To display printf instructions, you need a special application window in your screen.
This application window, the GSC diagnostics, returns the printf instructions
contained in the C actions in the order in which they are accessed. This also
applies to the printf instructions in functions that are called up in actions.

Note Specify the printf instructions in the format "printf ("\ r \ n value1:% d", sum);". For
performance reasons, you should delete the printf statements after you have
tested the scripts.
The printf() instructions can contain a maximum of 360 characters.

1. From the "Smart Objects" object palette, paste the "Application Window" into
your screen.
2. Select the entry "Global Script" from the "Window Contents" dialog and confirm
by pressing "OK".
3. Select the entry "GSC Diagnostics" from the dialog "Template".
© Siemens AG 2019 All rights reserved

4. Confirm with "OK" to insert the diagnostics window.


Figure 4-9

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 27
4 Diagnostics scripts

4.2.2 Diagnostics tags

WinCC offers a number of system tags, including three diagnostic tags, for the
status display of script processing.
Table 4-3
Tag name Meaning
@SCRIPT_COUNT_TAGS This tag contains the current number of
script-requested tags.
@SCRIPT_COUNT_REQUESTS_IN_QUEUES This tag contains the current number of
jobs.
@SCRIPT_COUNT_ACTIONS_IN_QUEUES This tag contains the current number of
actions pending for processing.

Note For performance reasons, the diagnostic tags are not supplied with current
values by default.
There are two ways to turn on the update for diagnostic purposes:
• In the script with the function "void FillDiagnoseInTags (BOOL bFill);"
• With ApDiag in the menu "Diagnostics> FillTags ...> OnTags ON"
Parameter "bFill":
TRUE = switch on the supply of the diagnostic tags.
FALSE = switch off supply of diagnostic tags.
© Siemens AG 2019 All rights reserved

More information on application diagnostics (ApDiag) can be found in the


chapter 4.2.3.

4.2.3 Application diagnostics (ApDiag)

The "ApDiag.exe" diagnostic tool supports the analysis of errors and performance
issues.
The file "ApDiag.exe" is located in the folder "...\Siemens\WinCC\uTools" of the
WinCC installation path.

The application diagnostics offers the following functions:


• Output of trace entries
• Saving all diagnostic data to files
• Script runtime monitoring
• Output of trace and script errors
• Detailed information about current actions

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 28
4 Diagnostics scripts

4.2.4 Debugging with ApDiag

Description
As soon as WinCC is open, you can start the ApDiag application as usual (double-
click). It does not matter if the runtime is activated or not. If no project is open, no
connection to the action control can be established.
When a project is changed and when WinCC is closed, ApDiag is terminated.
ApDiag is in the foreground in order to always have a view of the diagnostic
information independent of operation and navigation in the system. Set your
window position and size so that ApDiag disturbs as little as possible. These
settings will be saved and restored at the next start.

Menu items
The menu bar is constructed as follows:

Figure 4-10
© Siemens AG 2019 All rights reserved

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 29
4 Diagnostics scripts

• File
• Diagnostics
– Using "Start," "Change" and "Stop," the recording of diagnostic
information (trace) can be controlled. Different trace levels can be defined.
– Diagnostic information (e.g. "OnErrorExecute", "printf") can be converted
into a text file via the dialog of the "OnFile" menu command. All settings
are saved in the registry and restored after a reboot.

Figure 4-11
© Siemens AG 2019 All rights reserved

– The "Profiles" menu command allows early detection of queue growth or


overflow. The runtime of actions can be measured, and an increase of the
queue can be checked (see chapter 4.2.5).
– The menu command "FillTags" enables and disables the storage of
important diagnostic information in internal variables.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 30
4 Diagnostics scripts

• Output
– The menu command "Output On Screen" opens the diagnostics window.
The previously collected trace entries are output here. Unlike the output
window, the diagnostics window is only updated when opening and with
the "Refresh" button. The contents are only deleted if "Reset" is actuated
or the diagnostics buffer has been written full.

Figure 4-12

Note
The diagnostics buffer is a circulating buffer. The lowest entry is therefore
not necessarily the oldest entry.
– Menu command "Output To File" can be used one time to put the
© Siemens AG 2019 All rights reserved

previously collected trace entries into a text file.


– Use menu command "Reset Buffer" to delete the previously collected
trace entries. This functionality corresponds with the "Reset" button in the
diagnostics window.
• Info
– The menu command "First Action" delivers information on the currently
running action and therefore provides the possibility of recognizing which
action in the queue is in the first position and e.g. blocks the processing of
other actions with a loop.
– The menu command "Count of Connections" lists all applications that
have established a connection to the action control.
– Menu command "Count of Actions in RequestQueue" outputs the
current number of actions that are queued for processing.
There are jobs from Global Script, cycle jobs from pictures and event-
controlled jobs from pictures.
– Menu command "Count of TransAction" lists the current number of
transactions for every application that is logged in.
One transaction is established e.g. for every event-controlled action, for
every picture window, which contains at least one cyclic action, and for
global scripts.
– Menu command "Count of Actions of each Transaction" lists the
number of actions contained in the transactions.

The output is composed as follows:

- Name of the application


- Number of the transaction
- Number of actions

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 31
4 Diagnostics scripts

– Menu command "Count of Tags in each Transaction" lists the number of


tags requested in the transactions.

The output is composed as follows:

- Name of the application


- Number of the transaction
- Cycle time when the tags are logged
- Number of tags

At the end of the list, the total sum of tags requested in transactions is
output.
– Menu command "Count of Actions in Cycle" lists the amount of cyclic
actions sorted by trigger.
– Menu command "Count of Functions" provides the number of standard
functions and project functions and lists the functions by name.
• Trace points
– The levels of certain trace points can be changed with the menu command
"Change Level."

If you expect e.g. only one certain trace point, you can set the respective
level high and are no longer disrupted by a number of other trace points.
You can change the level by double clicking "Actual Level" for the desired
trace point, setting the desired level in the dialog box and leaving the box
© Siemens AG 2019 All rights reserved

with "OK."
The original level is set again with "Reset."
• Output Window
– Opens or closes the output window.

The output window corresponds with application window GSC diagnostics,


but offers the following advantages:

It is independent of the configuration. The configuration does not have to


be accessed, especially with third-party projects.
It also remains visible during a picture change.
It can be opened even before activating runtime and can therefore show
error messages during power up, which remain hidden from the application
window GSC diagnostics.

Figure 4-13

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 32
4 Diagnostics scripts

4.2.5 Performance analysis

A targeted performance analysis can be carried out through the targeted extension
of the standard "OnTime" function.

1. Copy the following code to the clipboard:


{
#pragma code ("kernel32.dll")
BOOL IsBadStringPtrA(
LPCTSTR lpsz, // address of string
UINT ucchMax // maximum size of string
);
#pragma code()

char szPic[255], szPro[255], szObj[255];


BYTE* tmp;
SYSTEMTIME stDateTime;

GetSystemTime(&stDateTime);

if (!strcmp((char*)time.szApplicationName,"PDLRuntimeSystem"))
© Siemens AG 2019 All rights reserved

{
if (time.lpParam && time.dwParamSize >= 12){
tmp = *(BYTE**)time.lpParam;
if (tmp) strcpy ( szPic , (char *) tmp);

tmp = *((BYTE**)time.lpParam+1);
if (tmp) strcpy ( szObj , (char *) tmp);

tmp = *((BYTE**)time.lpParam+2);
if (tmp && !IsBadStringPtrA( (LPCTSTR ) tmp, 1 ))
strcpy ( szPro , (char *) tmp);

if (strrchr( szPic , ':' ) != NULL)


printf("%02d.%03d\t%5.0f\t%-15.15s\t%-20.20s\t%-
20.20s\t\r\n", stDateTime.wSecond , stDateTime.wMilliseconds ,
time.dblTime, (strrchr( szPic , ':' )+1) , szObj, szPro);
else
printf("%02d.%03d\t%5.0f\t%-15.15s\t%-20.20s\t%-
20.20s\t\r\n" , stDateTime.wSecond , stDateTime.wMilliseconds ,
time.dblTime, szPic, szObj, szPro);
}
}
else
if (!strcmp((char*)time.szApplicationName,"TLG-RT")){
printf("%02d.%03d\t%5.0f\t%-20.20s\t%-20.20s\t\r\n",
stDateTime.wSecond , stDateTime.wMilliseconds ,
time.dblTime,time.szApplicationName, time.szFunctionName);
}else{

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 33
4 Diagnostics scripts

printf("%02d.%03d\t%5.0f\t%-20.20s\t%-20.20s\t\r\n",
stDateTime.wSecond , stDateTime.wMilliseconds ,
time.dblTime,time.szApplicationName, time.szFunctionName);
}
}

2. Open the standard function "OnTime" in WinCC and copy the code from the
clipboard to the appropriate place:
Figure 4-14

2
© Siemens AG 2019 All rights reserved

4 >>> Copy the code here <<<

3. Call the diagnostic tool "ApDiag.exe" in the folder "...\Siemens\WinCC\uTools "


of the WinCC installation path.
4. Call up the menu item "Diagnostics > Profiles...".

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 34
4 Diagnostics scripts

5. Activate the options "Profile on" and "Call OnTime for each Action".
Figure 4-15

2
© Siemens AG 2019 All rights reserved

6. Open the output window via the menu item "Output Window > Open".

The output contains in each line:


- Current second, millisecond
- Runtime in milliseconds
- Application, Screen name, Function name, Object name, Property

Note When calling global scripts, the action name does not appear in plain text in the
output window, but as an indexed value, e.g. "@3".
The assignment of the indexed value to the action name as plain text can be
obtained via the "GSC Runtime" application window. Proceed as described in
chapter 4.2.1 and select the entry "GSC Runtime" as "Template".

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 35
4 Diagnostics scripts

4.3 Log files


An access violation in C or VB scripts generates the "Script.log" file. The
"Script.log" file is located in the "...\Siemens\WinCC\Diagnosis" folder of the WinCC
installation path (see chapter 2.2.2).

It contains, for example:


• Screen names
• Object names
• Properties / events
• Script name
• Line number of the error in the script

The corresponding information is also displayed in the WinCC diagnostics window


or in APDiag
Figure 4-16
© Siemens AG 2019 All rights reserved

4.4 System alarms


Make sure that the following system messages (see 2.1) are used:
Table 4-4
Message Message text
number
1007000 SCRIPT:@100%s@:Overflow
1007001 SCRIPT:@100%s@:Action Error
1007002 SCRIPT:@100%s@:Overflow
1007003 SCRIPT:@100%s@:Connection error
1007004 SCRIPT:@100%s@:Action error 1
1007005 SCRIPT:@100%s@:Action error 2
1007006 SCRIPT:@100%s@:Tag error
1007007 SCRIPT:@100%s@:Info
1007009 SCRIPT:@100%s@:Error in thread

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 36
4 Diagnostics scripts

4.5 Global Script Inspector


The "CCScriptInspector.exe" diagnostic tool examines the source code of the
global scripts and indicates potential errors at runtime.

"CCScriptInspector.exe" is located in the folder "...\Siemens\WinCC\ uTools" of the


WinCC installation path.
1. All global scripts can be examined via "Action> Check All" (1).
2. In the output window you receive warnings (2) and possibly errors of the global
scripts, which could lead to problems in the service mode.

Figure 4-17
1
© Siemens AG 2019 All rights reserved

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 37
5 Diagnostics Server/client

5 Diagnostics Server/client
5.1 Connection overview
A connection overview of all clients connected to the WinCC project is available via
the menu entry "Tools > Status of Client Connections".

Note The menu entries beginning with "Status ..." can only be selected if the project is
in the runtime.

Figure 5-1

2
© Siemens AG 2019 All rights reserved

5.2 System alarms


Make sure that the following system messages (see chapter 2.1) are used:
Table 5-1
Message Message text
number
1000206 WCCRT:Client connection established
1000207 WCCRT:Client connection disconnected
1000208 WCCRT:Client connection broken

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 38
5 Diagnostics Server/client

5.3 Network test


Various tools are available in Windows for the network test.

5.3.1 Ping command

Ping is a diagnostics tool which can be used to check whether a specific host can
be reached in an IP network.

Note Newer Windows operating systems, such as Windows 10, block ping requests by
default. In this case, adjust the Defender firewall settings accordingly.

Basic accessibility
How to test the computer address with the ping command:
• To do this, open the "Execute" window using the key combination <Win + R>.
• Then, type "cmd" to open the command prompt.
• Execute the command "ping + IP address" (e.g. "ping 192.168.0.2") for the
respective other computers.
• If you do not receive an answer, you must check the complete network
configuration and parameterization.

Name resolution
© Siemens AG 2019 All rights reserved

A name resolution is mandatory for communication between server and client.


To test the name resolution with the Ping command:
• To do this, open the "Execute" window using the key combination <Win + R>.
• Then, type "cmd" to open the command prompt.
• Execute the command "ping+computer name" (e.g. "ping WINCCPC01") for all
computers.
• If you do not receive an answer, you must check the DHCP service on your
network in conjunction with DNS, for example or alternatively configure the
"lmhosts" file.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 39
5 Diagnostics Server/client

5.3.2 Tracert

Tracert is a computer program that determines via which routers and nodes IP data
packets reach the queried computer.
In comparison to the Ping command, the Tracert command can be used to test not
only the general accessibility of the target computer, but also get concrete
information about the route covered and the intermediate stations involved in the
network.

Note During the connection test with the Tracert command, both IP addresses and
host names can be specified. The actual test always takes place with the IP
address of the target system.

How to determine the trace route from the source computer to the target host:
• To do this, open the "Execute" window using the key combination <Win + R>.
• Then, type "cmd" to open the command prompt.
• Execute the command "tracert+machine name" (for example, "tracert
WINCCPC01") for the machine.

5.3.3 Nslookup
© Siemens AG 2019 All rights reserved

The Nslookup command allows you to query the DNS server (Domain Name
System) for IP addresses or domains of a particular computer. The DNS server
serves as a central directory service for all network addressees with regard to their
names and IP addresses.

Note By default, the set DNS server is used to query the name or IP address
resolution.
If another DNS server is to be used for the resolution, this must be specified
additionally with the query.

How to query the Domain Name System (DNS):


• To do this, open the "Execute" window using the key combination <Win + R>.
• Then, type "cmd" to open the command prompt.
• Execute the command "nslookup + host name" (for example, "nslookup
WINCCPC01") for the host.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 40
5 Diagnostics Server/client

5.4 SIMATIC Shell


The SIMATIC Shell is part of WinCC and is used for central maintenance and
diagnostics of all computers integrated in your WinCC client-server system.
1. In Windows Explorer, select the "Simatic Shell" folder (last entry under
"Workspace").
2. In the navigation window the computers are displayed in the tree view under
the entry "Simatic Shell". If this is not the case, check the order of the network
adapters in the Control Panel under "Network Connection > Advanced >
Advanced Settings".

Note The network card for the terminal bus communication must always be at the top
of the "Connections" list if you use several network cards in your target station.

3. Right-click the "Simatic Shell" entry in the "Simatic Shell" navigation window
and select the "Settings..." entry from the context menu. The dialog "Selection
of the terminal bus" opens.
4. Check whether the correct network adapter is set as the access point for the
terminal bus. Adjust the setting if necessary.

Figure 5-2
© Siemens AG 2019 All rights reserved

You can find more detailed information under:


https://support.industry.siemens.com/cs/ww/en/view/25437381

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 41
6 Diagnostics redundant systems

6 Diagnostics redundant systems


6.1 System variables
WinCC applications create tags required for internal administration of the project.
The system variables "@RM_MASTER" and "@RM_MASTER_NAME" are used
by WinCC Redundancy for master/standby control of the two redundant servers
and for client switching.

Note The system variables are located in the variable household under "Internal
variables" in the "Redundancy" folder.
You must open the editor "Redundancy" in the WinCC Explorer and close it
again with "OK" so that the system variables of WinCC Redundancy are set up.

The following variables are created by the "Redundancy" option:


Table 6-1
System variables Meaning
@LocalMachineName Contains the local computer name.
@RedundantServerState Displays the redundancy status of the server:
© Siemens AG 2019 All rights reserved

0: Not defined status or start value


1: Server is "Master"
2: Server is "Standby"
3: Server is "Fault"
4: Server is standalone or no redundant operation
@RM_MASTER Identifies the master server. If the server becomes the standby server,
"@RM_MASTER" is reset.
@RM_MASTER_NAME Name of the master server
@RM_SERVER_NAME Name of the server to which a client is connected
@RM_UA_ONL_”Archivename" Is used for diagnostics. A separate tag with the corresponding tag
name is inserted for each user archive.
The tag has the value "1" when a user archive has changed. After
online synchronization the tag has the value "0" again.
@RM_Offline_UA_Name Is used for diagnostics. The tag contains the name of the user archive
that has just been synchronized.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 42
6 Diagnostics redundant systems

6.2 System alarms


Make sure that the following system messages (see chapter 2.1) are used:
Table 6-2
Message Message text
number
1012200 REDRT:Partner station has failed
WinCC was terminated on the partner server.
1012201 REDRT:Partner station restarted
WinCC was restarted on the partner server.
1012202 REDRT:Projects are not functionally identical
1012203 REDRT:Archive synchronization failed
1012204 REDRT:Internal error in Redundancy
1012205 REDRT:Connection to partner disturbed
The connection to the partner server is down.
1012206 REDRT:Connection to the partner has been reestablished
The connection to the partner server is restored.
1012207 REDRT:Partner server - WinCC is not activated
During startup, it is determined that WinCC has not been started.
1012208 REDRT:Archive synchronization starts
This message is output at the beginning of an archive adjustment.
© Siemens AG 2019 All rights reserved

1012209 REDRT:Synchronization finished


This message is output at the end of an archive adjustment.
1012216 REDRT:Synchronization was paused
Adjustment interrupted due to another failure
1012217 REDRT:Partner Server-Project has not been activated
During startup, it is determined that WinCC is not activated on the partner
server or is not in the runtime.
1012218 SWITCH:Client has been switched automatically
Client was automatically switched to the partner server.
1012219 SWITCH:Client has been switched manually
Client was switched to the partner server manually
1012220 REDRT: Synchronization not ready for all user archives.
The adjustment is not ready for all locally configured user archives, since
the archive structure of the partner is different for at least one archive or
the adjustment is not activated on the partner.
1012221 REDRT: Adjustment ready for all user archives.
The comparison is ready for the locally configured user archives and the
archive structure matches that of the partner.
1012226 REDRT:Partner Server-Project has been activated
During startup, it was determined that WinCC is activated on the partner
server.
1012227 REDRT:Error partner computer is not a server
During startup it was determined that the configured partner server is not a
server.
1012240 REDRT: Error <error description> in <application name> triggers
switchover. Switching was triggered by Application Health Check due to an
error in the above application.
1012241 REDRT: Switch to status <Status designation>
Notification of a status change.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 43
6 Diagnostics redundant systems

Message Message text


number
1012244 REDRT: Overload during online adjustment of alarm logging
Too many messages to be synchronized.
1012245 REDRT: Loss of serial connection
1012246 REDRT: Serial connection reestablished
1012247 REDRT: <machine name on which the message was created>:OS Server
(Master) <machine name> OS Server (Standby) <machine name>
redundancy error. Depending on the failure scenario, the master server
and the standby server or one of the two servers report the redundancy
error. Redundancy is endangered.
1012248 REDRT: OS server (standby) redundancy reestablished
1012349 REDRT: Connection of network card (MAC) address lost
The connection to the partner server via the redundant LAN is interrupted
or disturbed.
1012350 REDRT: Connection via network card (MAC) address established again
The connection to the partner server via the redundant LAN is restored.
1012351 REDRT:RedundancyControl: System blockage detected. Switch to Fault
status.
1012352 REDRT:RedundancyControl: System blockage detected. Restart the
computer as soon as possible.
1012354 RedundancyControl: Status changed to FAULT, but server isolation is not
activated.
© Siemens AG 2019 All rights reserved

1012355 RedundancyControl: Status changed to FAULT, but server isolation is


disabled by @1%s@. Reason: @2%s@
1012356 RedundancyControl: Status changed to FAULT => server is isolated
1012357 RedundancyControl: Status changed to FAULT, but automatic restart is not
activated.
1012358 RedundancyControl: Status changed to FAULT, but automatic restart is
disabled because network adapter is disconnected and DHCP is enabled.
1012359 RedundancyControl: Computer restart disabled by @1%s@. Reason:
@2%s@
1012360 RedundancyControl: Computer restart canceled because the previous
restart took place less than @1%s@ seconds ago.
1012361 RedundancyControl: Computer restart canceled because no additional
restart is permitted for @2%s@ seconds after @1%s@ restarts.
1012362 RedundancyControl: Computer will be restarted in @1%s@ seconds.
1012700 Self-diagnostics: Value @7%s@ of station @10%s@ is invalid.
1012701 Self-diagnostics: Value @7%s@ of station @10%s@ violated the HIGH
error limit.
1012702 Self-diagnostics: Value @7%s@ of station @10%s@ violated the LOW
error limit.
1012703 Self-diagnostics: @100%s@: Value @7%s@ of station @10%s@ violated
the HIGH warning limit.
1012704 Self-diagnostics: @100%s@: Value @7%s@ of station @10%s@ violated
the LOW warning limit.
1012705 Self-diagnostics: @100%s@: Value @7%s@ of station @10%s@ no
longer violates the error limit.
1012706 Self-diagnostics: @100%s@: Value @7%s@ of station @10%s@ is OK.
1012707 Self-diagnostics: @100%s@: Station @10%s@ causes @2%s@.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 44
6 Diagnostics redundant systems

6.3 Redundancy Control


With the diagnostic tool "Redundancy Control", WinCC offers various scenarios for
testing redundancy.

Note The "Redundancy Control" is located in the directory "C:\Program Files


(x86)\Common Files\Siemens\ace\bin\RedundancyControlDiagnosis.exe".

• Both redundant partners must be accessible before the start of the test.
• If the redundancy is configured correctly, both servers will have the same
values for "Validation", "P. validation" and "MC connections".

Figure 6-1
© Siemens AG 2019 All rights reserved

Note • The options "RPC server conn2partner" and "RPC client conn2partner" must
be activated.
• At least one of the options "Serial connection" and "Secondary LAN
connection" must be active.

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 45
7 Complementary tools

7 Complementary tools
This chapter describes additional diagnostic tools that complement the WinCC
tools.

7.1 Windows Performance Monitor


The Windows Performance Monitor can be used to examine how running programs
affect your computer's performance.
The Windows Performance Monitor provides the following functions:
• Detailed monitoring of the operating system resources used
• Cyclic recording of system resources

1. Start the Performance Monitor with "Start > Run".


2. Enter "perfmon" and confirm with "OK".
3. Create a new "Data collector set". To do this, navigate to "Data Collector Sets
> User Defined". In the "User Defined" context menu, select "New > Data
collector set".

Figure 7-1
© Siemens AG 2019 All rights reserved

You can find more detailed information under:


https://support.industry.siemens.com/cs/ww/en/view/23782899

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 46
7 Complementary tools

7.2 SQL Server Profiler


The SQL Server Profiler is a tool that captures SQL Server events from a server.
The events are stored in a trace file.

Note According to the latest information from Microsoft, this tool will not be further
developed in the future and will be replaced by "SQL Extended Events".

1. Open the "Microsoft SQL Server Management Studio".


2. Start the SQL Server Profiler via "Tools > SQL Server Profiler".
3. Configure the profiler (for example, only error, database name,
type of SQL operation).
4. Start the recording.
© Siemens AG 2019 All rights reserved

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 47
7 Complementary tools

Figure 7-2

Start Pause Stop


© Siemens AG 2019 All rights reserved

Detailed information
(e. g. SQL statements)

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 48
8 Appendix

8 Appendix
8.1 Service and support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire
service and support know-how and portfolio.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks:
https://support.industry.siemens.com

Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts. Please send queries
to Technical Support via Web form:
www.siemens.com/industry/supportrequest
© Siemens AG 2019 All rights reserved

SITRAIN – Training for Industry


We support you with our globally available training courses for industry with
practical experience, innovative learning methods and a concept that’s tailored to
the customer’s specific needs.
For more information on our offered trainings and courses, as well as their
locations and dates, refer to our web page:
www.siemens.com/sitrain

Note Basics are taught in the SITRAIN course "SIMATIC WinCC, System Course".
• SIMATIC WinCC, Systemkurs (de)
• SIMATIC WinCC, System Course (en)
Topics for troubleshooting and diagnostics are taught, among many other topics,
in the course "SIMATIC WinCC, Advanced Course."
• SIMATIC WinCC, Aufbaukurs course (de)
• SIMATIC WinCC, advanced course (en)

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 49
8 Appendix

Service offer
Our range of services includes the following:
• Plant data services
• Spare parts services
• Repair services
• On-site and maintenance services
• Retrofitting and modernization services
• Service programs and contracts
You can find detailed information on our range of services in the service catalog
web page:
https://support.industry.siemens.com/cs/sc

Industry Online Support app


You will receive optimum support wherever you are with the "Siemens Industry
Online Support" app. The app is available for Apple iOS, Android and Windows
Phone:
https://support.industry.siemens.com/cs/ww/en/sc/2067

8.2 Links and literature


© Siemens AG 2019 All rights reserved

Table 8-1
No. Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to the entry page of the application example
https://support.industry.siemens.com/cs/ww/en/view/109757865
\3\ Application example "Diagnostics of SIMATIC IPCs"
https://support.industry.siemens.com/cs/ww/en/view/109478242
\4\ FAQ "What are the requirements in a Windows network for the operation of
SIMATIC WinCC?"
https://support.industry.siemens.com/cs/ww/en/view/868014
\5\ FAQ "Evaluation of WinCC Diagnostic Files"
https://support.industry.siemens.com/cs/ww/en/view/38645769
\6\ FAQ "What diagnostic options are available for WinCC and PCS 7 OS?"
https://support.industry.siemens.com/cs/ww/en/view/48698507
\7\ FAQ "Evaluation of WinCC Diagnostic Files"
https://support.industry.siemens.com/cs/ww/en/view/38645769
\8\ FAQ "What do entries in the WinCC diagnostic file
"SIMATIC_S7_PROTOCOL_SUITE_01.LOG" mean in the event of a connection
fault?"
https://support.industry.siemens.com/cs/ww/en/view/16622456
\9\ FAQ "Where can I find explanations to the error messages of the WinCC diagnostic
files License.log, WinCC_SStart_xx.log and WinCC_Sys_xx.log?"
https://support.industry.siemens.com/cs/ww/en/view/11965771

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 50
8 Appendix

8.3 Change documentation


Table 8-2
Version Date Change
V1.0 09/2018 First version
V2.0 10/2019 Supplemented by diagnostic tools, diagnostic client-server,
diagnostic redundancy
© Siemens AG 2019 All rights reserved

WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 51

You might also like