Professional Documents
Culture Documents
WinCC Diagnostics en PDF
WinCC Diagnostics en PDF
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
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 3
Table of contents
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
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)
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:
Often, a combination of the various tools is helpful, e.g. in the form of performance
monitoring and log files.
Figure 2-1
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 7
2 General diagnostics
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.
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.
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
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
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 9
2 General diagnostics
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 10
2 General diagnostics
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
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
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
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.
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.
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
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
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 17
3 Diagnostic Communication
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
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.
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
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
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."
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.
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 21
4 Diagnostics scripts
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
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 22
4 Diagnostics scripts
DF FA S SUP HMI
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 23
4 Diagnostics scripts
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
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
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
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 27
4 Diagnostics scripts
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
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.
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 28
4 Diagnostics scripts
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
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
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 31
4 Diagnostics scripts
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.
Figure 4-13
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 32
4 Diagnostics scripts
A targeted performance analysis can be carried out through the targeted extension
of the standard "OnTime" function.
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);
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
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".
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
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 36
4 Diagnostics scripts
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
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 38
5 Diagnostics Server/client
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
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.
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 40
5 Diagnostics Server/client
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
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 41
6 Diagnostics redundant systems
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.
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 42
6 Diagnostics redundant systems
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 43
6 Diagnostics redundant systems
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 44
6 Diagnostics redundant systems
• 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.
Figure 7-1
© Siemens AG 2019 All rights reserved
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 46
7 Complementary tools
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".
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 47
7 Complementary tools
Figure 7-2
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
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
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
WinCC Diagnostics
Article ID: 109757865, V2.0, 10/2019 51