Sie sind auf Seite 1von 374

Siemens Certified Service Technician Level 1

(inkl. SPS-Techniker entspr. VDMA/ZVEI)


SITRAIN:
Training for Industry
Siemens AG
Industry Sector
Gleiwitzer Str. 555
90475 NRNBERG Operating and Monitoring with WinCC
DEUTSCHLAND (ST-BWINCCS)

siemens.com/sitrain
01. System Overview

SITRAIN 02. Projects and Tags


Training for Automation
and Industrial Solutions
03. TIA

04. Graphics Designer


SIMATIC HMI
05. Graphics Designer Part2

Operating and
Monitoriung with 06. Scripts

WinCC
07. Global Script
Course ST-BWINCCS

08. User Administrator

09. Picture Blocks

10. Tag Logging


Name:

Kurs vom: bis:

11. Alarm Logging


Kursleiter:

Kursort:

12. Report Designer


Diese Unterlage wurde zu Trainingszwecken erstellt.
SIEMENS bernimmt bezglich des Inhalts keine Gewhr.
Weitergabe sowie Vervielfltigung dieser Unterlage,
Verwertung und Mitteilung ihres Inhalts ist nicht gestattet,
soweit nicht ausdrcklich zugestanden. Zuwiderhandlungen
verpflichten u. a. zu Schadenersatz. 13. User Archiv
Copyright Siemens AG 2015. Alle Rechte vorbehalten,
insbesondere das Recht Patente und/oder andere
gewerbliche Schutzrechte anzumelden und erteilen zu
lassen.
14. Appendix BPC
SITRAIN Kursangebot im Internet: www.siemens.de/sitrain

Ausgabestand V7.3
15. Training and Support
Contents Page
Training aims ....................................................................................................................................... 2
Customer benefits ............................................................................................................................... 3
Potential applications for WinCC ..................................................................................................... 4
Basic functions in the WinCC SCADA system .................................................................................... 5
Licenses .......................................................................................................................................... 6
Expandability with options ............................................................................................................... 7
Expandability with add-ons ............................................................................................................... 8
WinCC software protection ................................................................................................................. 9
System configurations single-user system .......................................................................................... 10
System configurations multi-user system ....................................................................................... 11
System configurations multi-user system with redundant servers ................................................... 12
System configurations WinCC distributed system ........................................................................... 13
System configurations WebNavigator ............................................................................................ 14
Architecture ..................................................................................................................................... 15
Openness ......................................................................................................................................... 16
Communication with controllers ....................................................................................................... 17
Communication with the SIMATIC S7 controller..................................................................................... 18
Which versions of Windows etc. can be used? ............................................................................... 19

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 System Overview
The participant will:

understand the customer benefits of using WinCC


be able to assess the possible applications of WinCC for the task in
question
be able to specify the possible system configurations
learn how to use the key stick
know about the available system software packages
understand the core functions of the system software
understand the architecture of the WinCC software
learn about the structure of openness
learn about the PLC drivers and Microsoft interfaces
be able to classify the optional packages
become familiar with the core blocks

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 System Overview
WinCC because

Standard operating systems of Microsoft can be used


Use of Windows resources (printer, drivers, etc.)
Data exchange with other Windows applications, for example using OLE
ODBC, SQL, OLE-DB, ADO database interfaces
API programming interface with development package ODK
Integration of OCX and ActiveX controls, e.g. in graphic pictures
Use of the OPC interface
Use of the MS SQL Server database
ANSI C, VBA, VBS programming interfaces in the Graphic Designer

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 System Overview
From building installation systems through to industrial plants

Building installation systems, ventilation, air-conditioning


Conveyor systems
Mechanical engineering
Water and waste management
Steel industry
Iron producing industry
Foundries
Cold rolling mills
Steel-making industry
Chemical industry
Wood pulp, paper and cardboard production
Breweries, malt houses, drinks manufacturing
Food, beverage and tobacco industries
Milk processing industry
Sugar industry
etc.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 System Overview
Basic functions This slide shows the functionality of modern process visualization with

- Fully graphic display

- Message display, archiving and logging.

- Measured value acquisition (archiving functions, data compression, minimum


and maximum values, etc.).

- Documentation of machine and process sequences with individual


logging

- Process communication with different PLC systems

- Standard interfaces for database and data processing, e.g. in Microsoft


programs

- Programming interfaces (API) exist for all WinCC application modules and
enable data and functions to be accessed.

Complex visualization tasks can be solved with the


ANSI-C programming language and/or with Visual Basic Script.

SCADA Supervisory Control and Data Acquisition

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 System Overview
Basic software The system software "WinCC" (core blocks with the basic functions) is scaled
according to different licenses.
RT licenses RT licenses permit the operation of WinCC in Runtime mode for an unlimited
period of time. The editors may only be used in demo mode for a limited period of
time.
RC licenses RC licenses permit the operation of WinCC in Runtime mode and in configuration
mode for an unlimited period of time.
Archive tags 512 archive tags are included in the basic system, more up to 120,000 are
available as an option.
Powerpack With the powerpacks the number of tags is upgraded. The price corresponds
exactly to the price difference between the relevant WinCC software packages for
configuration and runtime software. Powerpacks also allow the
number of archive tags to be expanded.

WinCC versions The WinCC licenses are version-dependent, e.g. "WinCC V7.3 RC 512"
For this reason there is therefore the following upgrade package for version V7.3:
Upgrade RT Version, V6.2/V7.0 -> V7.3
Upgrade RT Version, V7.2 -> V7.3

Upgrade RC Version, V6.2/V7.0 -> V7.3


Upgrade RC Version, V7.2 -> V7.3

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 System Overview
Options The basic software can be expanded with options.
The statements made in the slides apply to WinCC V7.2 (dated 03.02.14).

You will find the current statements at


www.siemens.de/simatic-wincc-optionen

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 System Overview
Add-ons The basic software can be expanded with add-ons.
Customer-specific or technological expansions based on the sector-neutral
WinCC, e.g. PM-MAINT maintenance program, PM-Aqua etc.

On the Internet http://www.siemens.com/wincc or


http://www.siemens.de/simatic-wincc-addons you will find the currently
available
add-ons from the Competence Centers Erlangen, Mannheim, Stuttgart and
contacts.

Please check the releases for your WinCC version.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 System Overview
License and demo mode
The WinCC software is released by a supplied authorization
(Key disk). It is possible to configure in demo mode for one hour without a license
after which the WinCC Explorer and the editors will be closed. After restarting an
editor, the system will then request a valid license at intervals of 10 minutes.
WinCC also switches to demo mode when the maximum authorized number of
process tags or archive tags is exceeded in a project. When you install a license, it
is transferred from the storage medium to a local drive and is unregistered on the
storage medium so that WinCC can use this license. The cumulation of more than
one license per component subject to a license is possible only for archive
licenses. Other licenses cannot be cumulated.

Installation When the rights of use are transferred from the key stick to the PC, the installation
counter is decremented on the key stick.

Note After the licenses have been installed, DEFRAG must not be performed because
the licenses can be lost.

Uninstalling When the access rights are transferred back from the PC to the key stick or to any
other data carrier, it is possible to prepare for transfer to another PC.

Virus scan Virus tests can only the performed during operation with tested virus programs.
See FAQ 241 220 09.
Note It is not allowed to run WinCC in process mode without valid licenses. Neither the
name nor the attributes of the "AX NF ZZ" directory may be changed because the
transferred license keys can be irrecoverably lost.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 System Overview
Configurations Single-user systems are used in less complex applications and can also be used
for operating and monitoring separate sections of plant.

Autonomous Autonomously operating single-user systems incorporate all the


equipment necessary for operation.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 System Overview
Multi-user system
This configuration allows up to 32 clients on one server.

The configuration of the WinCC project which is always located on the server, can
also be performed on the client.

WinCC Server Tasks of the WinCC Server:


- Process communication
- Acquisition of the process data
- Archiving the messages and the process data
- Supplying the clients with process and archive data

Standard client The standard client is also known as the "client without its own project".

Note Number of clients for server with operator station: 4


Clients for server without operator station: 32

Statements about the possible operating systems will be made later.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 System Overview
Multi-user system
This configuration allows up to 32 clients on one server or a redundant server
pair.

WinCC Server Tasks of the WinCC Server:


- Process communication
- Acquisition of the process data
- Archiving the messages and the process data
- Supplying the clients with process and archive data

Standard client The standard client is also known as the "client without its own project".

Redundant servers
When two WinCC stations are operating in parallel, the archives are compared
automatically during runtime or after a server fails.

The continuity of process control and operation is assured with automatic failover
of a client to the active server.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 System Overview
WinCC distributed system
Distributed system with multiple WinCC servers
Clients have access to to up to 18 different servers or redundant server pairs.
With WinCC V7.0 only up to 12 different servers.
The required server information is imported
Individual configuration of each client (separate project)
Distribution of the tasks over several servers
Process and archive data is made available by the servers

Multi-client The multi-client is also known as a "client with its own project".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 System Overview
WebNavigator Option for SIMATIC WinCC for operator control and monitoring of plants via
the Internet, in-house intranet or LAN

Web server A Web server with the SIMATIC WinCC software. License is only stored
on the server. The simultaneous access of x WebClients is counted.

WebClient Web client that allows control and monitoring of a running WinCC
project via an Internet browser with ActiveX support.

The WinCC basic system does not need to exist on the client computer.

It is also possible to use the Web client without the Microsoft Internet
Explorer.

Licensing A license is required for using the Web server


Licenses are available for access to the Web server by 1, 3, 5, 10, 25, 50, 100
or 150 clients
For remote diagnostics via multiple distributed Web servers with guaranteed
access, low priced Web Navigator diagnostics licenses are available

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 System Overview
Architecture This slide displays the relationships of the individual modules within the WinCC
Explorer.
WinCC Explorer The WinCC Explorer combines all the data necessary for operating a single-user
or multi-user system and ensures hierarchically-ordered storage.
System Controller The system controller takes care of system communication between the stations.
For multi-user systems, the system controller also provides the network-wide
project view, as well as communication between the client and server. The system
controller also handles coordination through the terminal bus.
Data Manager The data manager is the start-up location for processing central tasks in a WinCC
project. The data manager exists on every station and works closely together with
the system controller. The main task is handling tag management. The
communication channels are used to access process data.
Function modules - Graphics Designer (graphics system)
Graphic display and process connection
- Global scripts (script editing)
Making the project dynamic to user-specific requirements
- Alarm logging (message system)
Displaying messages and acknowledgements
- Tag logging (measured value archiving, processing and trending)
Processing measured values and their long-term storage
Processing user-oriented data and their long-term storage
- Report designer (report system)
Reporting system states
Note The WinCC Explorer allows you to navigate through the WinCC applications and
their data with few operations. From its appearance and operation, the WinCC
Explorer is similar to the Explorer in Windows.
MS SQL Server Database Management System from Microsoft suitable for industry
WinCC V7.3 uses MS SQL-Server 2008 R2.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 System Overview
Openness This slide illustrates all system modules with opened interfaces.
You can use your own programs with Windows applications, as well as data and
functions from WinCC here.
User programs can also be started from WinCC.
Applications that run under Windows, such as Excel, Word, or Access can be
combined freely with WinCC and individual user programs.
This also makes solutions to unusual management level tasks possible.

User Routines User routines run interpretively in WinCC. This means that a compiler is not
necessary. If an application requires many extensive user routines with a high
processing capacity, standard tools (e.g. C++) can compile these routines, and
they can be attached to the WinCC sequence.

OPC OPC (OLE for Process Control) integrated client/server communication interface.

WinCC supports
OPC Data Access 2.05a
OPC Data Access 3.00
OPC XML Data Access 1.00 (Connectivity Pack / Connectivity Station)

OPC HDA 1.20 (Connectivity Pack/Connectivity Station)

OPC A&E 1.10 (Connectivity Pack/Connectivity Station)

OPC UA Client Data Access


OPC UA Server Data Access, HDA (Connectivity Pack / Connectivity Station)

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 System Overview
S7-1200/S7-1500 In WinCC V7.2 there are still the following restrictions:

- Only released for single user systems


- No correct sequence in reporting (program alarm)
- No process controlled measured value archiving

The following functions are implemented:

- Cyclic reading of tags


- Absolute addressing (no symbolic addressing)
- Use of the S7-1200/S7-1500 tags in WinCC in two steps
1. Export of the tags from the TIA Portal
2. Import into WinCC via the WinCC Configuration Studio
- Time synchronization

Improvements as of WinCC V7.3:


- Support of the symbolic address and CPU alarming in the communications
channel to the new CPU S7-1500
- The access to the symbolic addresses and CPU alarming only via the
online connection to the CPU
- The offline configuration can only be created for the absolute addresses

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 System Overview
SoftNet/HardNet In the case of SoftNet, communication runs on the PC processor. With Ethernet,
the integrated Ethernet interface of the PC is used.
SoftNet requires a license.

In the case of HardNet, the communication card has its own microprocessor and
relieves the PC processor during communication. With Ethernet, a CP 1613 for
example is used. The driver (S7 1613) requires a license.

Only a SoftNet module may be operated in the PC for the process communication.
Combinations with HARDNET communication cards are possible. The driver
software for HARDNET communication cards ships on the supplied SIMATIC NET
CDs.

SOFTNET Lean Also uses, for example, the integrated Ethernet interface of the PC.
SOFTNET S7 Lean driver license is included in WinCC.
Max. 8 x S7 TCP/IP or Ind.Eth. or S5 TCP/IP

This makes 8 connections free of charge when using WinCC.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 System Overview
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 19 System Overview
Contents Page
Training aims.......................................................................................................................................... 3
Preparing for configuration ............................................................................................................. 4
Creating a project ................................................................................................................................ 5
WinCC project structure and files .................................................................................................. 6
Changing to a different project ........................................................................................................ 7
Specifying project properties (1/2) ................................................................................................. 8
Specifying project properties (user interface and design) (2/2) .......................................................... 9
Computer properties 1/2 ................................................................................................................ 10
Computer properties 2/2 ................................................................................................................ 11
Task of the training project ...................................................................................................... 12
Tags for connecting to the process ................................................................................................. 13
Data exchange with SIMATIC S7 ..................................................................................................... 14
Set PG/PC Interface e.g. for CP 5611 ................................................................................ 15
Specifying the properties of the CP 5711 card...................................................................................... 16
Installation of the SIMATIC device drivers (S7-DOS)........................................................................... 17
Communication structure ................................................................................................................... 18
Selecting communications drivers for the connection ....................................................................... 19
Creating a new connection (PROFIBUS) ........................................................................................... 20
Selecting communications drivers for the connection (PROFIBUS) .................................................. 21
Creating a new connection (TCP/IP) ................................................................................................. 22
Selecting communications drivers for the connection (TCP/IP) ........................................................ 23
Exercise 1: Creating the project Control Room, configuring an AS connection 1/2 ........................... 24
Exercise 1: Creating the project Control Room, configuring an AS connection 2/2 ........................... 25
Creating tags and groups ....................................................................................................... 26
Creating process tags for SIMATIC S7 1/2 .............................................................................. 27

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Projects and Tags
Contents Page
Creating process tags for SIMATIC S7 2/2 .............................................................................. 28
Changing process tags ................................................................................................................ 29
Displaying process tags ............................................................................................................. 30
Filtering, searching for and replacing process tags................................................................................ 31
Exercise 2: Configuring process tags and tag groups ...................................................... 32
System info channel ............................................................................................................................. 33
Inserting a system info channel............................................................................................................. 34
System info channel Inserting tags ............................................................................................. 35
Exercise 3: Configuring system info channel tags and groups 1/2 ................................................ 36
Exercise 3: Configuring system info channel tags and groups 2/2 ................................................ 37
Configuring internal tags (1/2) ..................................................................................................... 38
Configuring internal tags (2/2) ..................................................................................................... 39
Exercise 4: Configuring internal tags and tag groups ........................................................ 40
Diagnostics of connections ............................................................................................................ 41
Diagnosing connections with Channel Diagnosis ........................................................................ 42
Quality code of individual tags .............................................................................................. 43
Exercise 5: Diagnostics of process communication 1/2.......................................................................... 44
Exercise 5: Diagnostics of process communication 2/2.......................................................................... 45
Configuration Studio Tips and tricks - adapting user interfaces, new window .............................. 46
Configuration Studio Tips and tricks - Export ................................................................................. 47
Configuration Studio Tips and tricks - Further options ......................................................... 48
Cross Reference editor Introduction .................................................................................................... 49
Cross Reference editor Filters ........................................................................................................... 50
Cross Reference editor Go To ...................................................................................................... 51
Cross Reference editor Requirements for scripts ..................................................................... 52
Tools: Cross Reference Assistant ................................................................................................... 53
Tools: Simulation of tags (1/2) ................................................................................................. 54
Tools: Simulation of tags (2/2) .................................................................................................. 55

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Projects and Tags
The participant will:

Recognize configuration interrelationships


Be able to start WinCC and create a project
Be able to describe the startup of WinCC
Be familiar with the WinCC Explorer
Get to know the function modules of WinCC
Be able to describe a data exchange
Be able to use the computer properties
Be able to install the communications drivers for the connection
Be able to make the required parameter assignment for the
communications connection
Be able to configure tags and tag groups
Be able to install the auxiliary program for tag simulation
Be able to work with the auxiliary program for tag simulation
Be able to use the result of the cross reference list

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Projects and Tags
Preparing for configuration
Process coupling
- Specifying automation systems (AS) for the data exchange
- Specifying the physical layer and protocol for the data transfer
(Example: Ethernet bus with TCP/IP)
- Specifying input/output data of the AS communication
- The update cycle for tags will be defined later

Visualization, password protection, archiving, message system


- See later section

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Projects and Tags
Starting WinCC from Windows
After you first start WinCC, you will be prompted to create a project. WinCC
automatically creates a project folder (use for example Control Room).
When you restart the configuration, the last project to be processed is called. If you
want to create a new project, select the following in the WinCC Explorer:

P >File, O >New...

Key P corresponds to pull-down menu


O corresponds to an operation in the pull-down menu

Selection options in the Start dialog


The Start dialog provides 3 options for creating a new project.
With a further dialog, an existing project can be opened.

Use the context-sensitive help. You open the context-sensitive help with a
mouse click on the question mark in the WinCC Explorer dialog shown above.
After clicking the question mark icon, move on to the various texts in the dialog
window to obtain additional information

Note Project names are case-sensitive.

Forbidden characters . , ; : ! ? " ' -+ = / \ @ * [ ] { } < > space

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Projects and Tags
Note The directory structure is dynamic and depends on the installed
software tools and the use of WinCC options.

ldf, mdf Databases always consist of two files.

ArchiveManager AlarmLogging
Structure of the file name:
Computername_Projectname_ALG_Fromtime_Totime.mdf

ArchiveManager TagLogging Fast


Structure of the file name:
Computername_Projectname_TLG_Fromtime_Totime.mdf
e.g. acquisition cycle <1min.

ArchiveManager TagLogging Slow


Structure of the file name:
Computername_Projectname_TLG_Fromtime_Totime.mdf
e.g. acquisition cycle >1min.

*.Log file Log files *.log contain setup data, system statuses and error messages for
developers and service technicians.
Installation directory: Siemens\\WinCC\\Diagnose

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Projects and Tags
Changing to a different project You change between existing projects as follows:

1. In the WinCC Explorer select P>File, O>Open.

2. Search for your project in the "Open" window.

3. Set the file name found, for example as shown in the figure above (file name:
Example.MCP):

Note If an external WinCC project (copied to the hard disk from a data medium) is
started in runtime, the computer name in the project must be replaced by the local
computer name in "Computer", Properties, "General" tab. Following this, WinCC
must be closed and restarted. Runtime can now be started again.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Projects and Tags
Specifying project properties
Via the shortcut menu of your project name, enter the project type, the creator, the
version and a comment in the Windows project properties that appear in the
"General" tab.

Update cycle
In the "Update Cycles" tab, 16 update cycles are displayed for the project of which
five settings can be changed user-specifically
(update: 100 ms...1 h). You use the update cycle, for example, in the Graphics
Designer for output objects.

Hotkeys Hotkeys are key combinations that can trigger certain actions
within WinCC e.g. hardcopy, logon and logoff.

Additional project options


- Allow activation of RT on ES
- Help available during runtime (e.g. with Online Trend Control)

Operating mode Here you specify whether the project is operated in the "Standard" or "Service"
mode. Typically, WinCC runs as Service if the computer is located in a separate
room. No user should be able to make changes here. For this reason no one is
logged in and WinCC runs without Graphics Runtime.

User interface design


Settings for the user interface (enable system dialogs) and design (e.g. central
color palette). For details, see next page

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Projects and Tags
Specifying project properties for the user interface and design
On the "User Interface and Design" tab, the editor can use the central color
management and make settings for the user interface and design (central color
palette, hover, shadow and transparent effects).

Central color palette: With the "Color Selection" editor, the colors used in the project
can be managed and modified in a central color palette.

Active design: The "Global Design Settings" editor allows the design of the objects to be specified
globally, i.e. throughout the project. Here, it is possible to choose from preset
designs or to create and activate your own designs. Self-created designs can be
edited as required. The following settings can be specified individually with self-
created designs:
- Global shadow
- Hover effect
- Style of an object group
- Color scheme of an object group

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 Projects and Tags
Computer list The computer list contains all computers assigned to the current project.
A single-user station or server and, if required, one or more WinCC clients. The
computer name entered here must match the settings in Windows.

General In the "General" tab, the computer name: e.g. lecturer and
computer type are specified. With the "Use Local Computer Name" button,
the computer name is entered in the properties of the computer.
The computer type (server or client) is defined for multi-user projects (client-server
configurations). The default is "Server".

Startup See following page


parameters

Graphics Runtime On the Graphics Runtime tab, individual project settings can be made (see the figure
above). Select the online help.

Runtime The settings on this tab apply (as of WinCC V6.0) to all WinCC projects on the
computer being used. The following settings can be made:
- Set debug options for Visual Basic scripts in the Graphics Designer
- Set debug options for Visual Basic scripts in Global Script
- Restrict global design effects
- Use picture cache
- Change mouse pointer
- Enable monitor keyboard

Note The computer name must not contain certain characters. See help under Working
with WinCC/Working with projects/Appendix/Illegal characters

You will find notes on changing the computer name in the FAQ 5708281

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 Projects and Tags
Runtime The settings on this tab apply (as of WinCC V6.0) to all WinCC projects on the
computer being used. The following settings can be made:
- Set debug options for Visual Basic scripts in the Graphics Designer
- Set debug options for Visual Basic scripts in Global Script
- Restrict global design effects
- Use picture cache
- Change mouse pointer
- Enable monitor keyboard

Startup On the "Startup" tab you can select the standard WinCC components to be loaded
when the runtime project is activated. With the "Add" button, external applications
can be started during startup.

Parameters On the "Parameters" tab, the language setting at runtime can be set; a substitute
language can be taken into account. To prevent operator errors in runtime,
Windows-typical key combinations can be blocked. The PLC clock setting takes into
account world time (UTC) or the local time.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Projects and Tags
Task The configuration example shows the communication between WinCC on a
Windows computer and a SIMATIC S7-300/400. Typical settings on the WinCC
station are shown and provide a guide for configuration. Depending on the plant
configuration, it may be necessary to make different settings, for example the slot
number of the CPU. The process flow charts, start picture, motor picture, the filling
plant, trends and message picture need to be configured. Following this, the
configuration needs to undergo a function test.

Start picture When you change to process control, the overview picture (company logo) should
appear. In the start picture, it is possible to call up the Motor picture, the Filling
plant picture, the Trends picture and the Messages picture. The pictures are
displayed in a picture window integrated in the start picture.

Motor picture Input/output of digital values, changing the appearance of the switch setting.

Filling plant Display of digital values in graphic form (bars). Calculations with C actions and
diagnostics of C actions.

Trends Display of digital values in graphic form (trends).

Messages Display of problem and operating statuses.

You navigate between the pictures using buttons in the lower part of the start
picture. The pictures are displayed in a picture window integrated in the start
picture.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 Projects and Tags
Tags Access to data of the controller is strictly via tags. To do this, the addresses from
the controller are linked to symbolic names in the tag management. These
symbolic names are then used in the editors of WinCC such as WinCC Graphics
Designer, Tag Logging, etc. (configuration phase).

Runtime Only when runtime is started (operational phase), the required tags are fetched
from the controllers by the data manager and updated cyclically.
The reading and writing of tags can be performed using various drivers (e.g. S7
driver, S5 driver, third-party driver).

Process image The data manager manages the process image of the tag data of the DB, inputs,
outputs and bit memory.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 Projects and Tags
Read/write Basically all tags can be read and written. If, for example, it should only be
possible to read a tag, this is implemented by suitable configuration in the picture,
for example with an "Output" field.

Note In the online help, you will find a list of the channel drivers for process
communication.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 Projects and Tags
General With the "Set PG/PC Interface" tool, you specify the connection between an
application such as STEP 7 and a module e.g. CP 5711. The tool is called up with
Start --> Settings --> Control Panel.

Access Point Further examples of access points are as follows:


CP_H1_1 for SIMATIC NET (Ethernet)
CP_L2_1 for SIMATIC NET (PROFIBUS)
DPSONLINE for ProTool/Pro DP Slave
Micro/Win for the S7-200 software
MPI (WinCC) for the WinCC software, if there is no STEP 7
installed on the PC

Interface Parameter Assignment Used


Here, select the module being used e.g. CP 5711 and the interface being used e.g.
MPI (CP5711(MPI)). When connecting the PG to PROFIBUS use the setting
CP5711 (PROFIBUS). To avoid having to change over the PG/PC interface, you
can also use the setting CP5711 (Auto). With this setting, the bus parameters are
obtained automatically. However, with this setting it takes longer to establish the
connection.

Properties In this tab you adapt the parameters to the interface. In "Address", you enter the
MPI address of the PG that must be unique in the network. To allow
communication, the parameters "Transmission Rate" and "Highest Station
Address" must be set the same for all nodes. The setting "PG/PC is the only
master on bus" is enabled when only slaves are connected to the PG.
Diagnostics With this you check whether or not a connection can be established to the CP.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 Projects and Tags
In our case, we use the parameters shown in the picture.

The pictures above were made with a PG M4. This has an integrated CP 5711.

With the PG M3 there is a CP 5611 onboard.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 Projects and Tags
Drivers The SIMATIC device drivers are used for communication with SIMATIC S7 via the
SIMATIC S7 Protocol Suite.

Note During WinCC installation, the SIMATIC Device Drivers are selected
in Communication. If this is not done, it can be performed later
with a delta installation.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 Projects and Tags
Mode of operation WinCC tags are managed by the WinCC data manager at runtime. The various
WinCC applications address their tag requirements to the data manager. The data
manager now has the task of fetching the required tag values from the process. It
does this using the communications driver linked into the WinCC project. The
communications driver forms the interface between WinCC and the process via its
Units channel. The hardware connection to the process is implemented in most
cases via a communications processor. Via this, the WinCC communications
driver sends request frames to the automation system. This sends the requested
process values back to WinCC in corresponding response frames.
Data manager The accrued data is managed by the data manager in WinCC. This is, however,
invisible to the user. The data manager works with data created in the WinCC
project and data stored in the project database. It handles the entire management
of WinCC tags while WinCC is operating in runtime. All WinCC applications
request the data from the data manager in the form of WinCC tags. These
applications include Graphics Runtime, Alarm Logging Runtime and Tag Logging
Runtime.
Communications driver
To allow WinCC to communicate with the widest variety of available automation
systems, different communications drivers are used. The communications drivers
of WinCC connect the data manager to the automation system. A communications
driver is a C++ DLL that communicates with the data manager via the interface
specified by the data manager known as the channel API. The WinCC tags are
supplied with process values by the communications drivers.
Hardware drivers The hardware connection to the process is implemented in most cases via a
communications processor. Each Unit channel serves as an interface to exactly
one underlying hardware driver and therefore to exactly one communications
processor in the computer.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 Projects and Tags
Configuration Studio
1. Open the Configuration Studio editor using the shortcut menu of the tag
management.

2. You can then add the suitable driver.

3. The driver for S7 (SIMATIC S7 Protocol Suite) includes the bus systems shown
above (MPI, PROFIBUS, etc.).

Note Prior to WinCC V7.2, the tags were still created directly in the WinCC Explorer.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 Projects and Tags
Configuring a connection
In the shortcut menu of the PROFIBUS unit, a new connection can be created.

In the shortcut menu of the connection, this can be renamed with a suitable name.

The connection parameters can also be entered in the context menu of the
connection:

Station address: 2 (PROFIBUS address of the controller)


Segment ID: 0 (not currently used)
Rack Number: 0 (rack no. of the CPU)
Slot: 2 (slot of the CPU, NOT the slot of the CP)

The rack number and the slot number can be read out of the HW Config editor
(SIMATIC manager).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 Projects and Tags
Setting system parameters
Call up the system properties via the shortcut menu of the PROFIBUS unit.

"SIMATIC S7" tab


"Cycle management by PLC" means that after a request from WinCC, the
controller sends the required tags in the required cycle without WinCC needing to
request this permanently. This reduces the number of frames significantly.
If "Monitoring of CPU stop" is enabled (default setting) the tags are displayed as
being disrupted when the S7 CPU has stopped (I/O field is grayed out).
If this option is not enabled, tags are read and displayed in WinCC Runtime even
when the S7 CPU is in stop.

"Unit" tab
In the "Logical device name:" box, select, for example "CP5711.PROFIBUS.1".

The check mark in "Set automatically" needs to be removed.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 Projects and Tags
Configuring a connection
In the shortcut menu of the TCP/IP unit, a new connection can be created.

In the shortcut menu of the connection, this can be renamed with a suitable name.

The connection parameters can also be entered in the context menu of the
connection:

IP Address: 192.168.111.7 (TCP/IP address of the controller)


Rack Number: 0 (rack no. of the CPU)
Slot: 2 (slot of the CPU, NOT the slot of the CP)

The rack number and the slot number can be read out of the HW Config editor
(SIMATIC manager).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 22 Projects and Tags
Setting system parameters
Call up the system properties via the shortcut menu of the TCP/IP unit.

"SIMATIC S7" tab


Same significance as already described for PROFIBUS.

"Unit" tab
In the "Logical device name" box, select for example "Intel 82579LM Gigabit
Network Connection.TCPIP.1".

The check mark in "Set automatically" needs to be removed.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 23 Projects and Tags
Objective Create a new project with the WinCC Explorer and define the connections and
tags required for the data exchange between the AS and HMI computer. During
the course, the Control Room project will have further pictures and functions
added to it.

Exercise - Open the WinCC Explorer


- With P > File O > New create a new "Single-user project"
Legend: P corresponds to pull-down menu, O corresponds to operation in the
pull-down menu
- In the "Create New Project" window enter
"Control Room" as the project name and "D:\Courses\WINCCS" as the project
path.
- In the "Project Properties" window, specify the creator
of the project. The "Project Properties" window is opened
by right-clicking on the project name displayed in the WinCC Explorer.

- In the "Project Properties" window in the


"Update Cycles" dialog, change the "User cycle 1" to 15 sec
(setting in ms entry 15000).

- In "Computer properties" in the "Graphics Runtime" dialog, set the


window attributes to suit your purpose. The "Computer properties" window is
displayed by double-clicking on the computer name displayed
in the right-hand window of the WinCC Explorer.

Suggestion:
For commissioning select "Minimize", "Maximize" and "Adapt Picture".
After commissioning: "Full Screen"; also "Disable shortcut keys for
operating system access" (Parameters tab)

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 24 Projects and Tags
Continuation of the exercise

- Check the settings of the PG/PC interface for the


CP 5611 (as described in the previous slide "Specifying properties of the CP
5611 card"):
The PROFIBUS address of the PG is for example 0.

When using the PG M3, select the CP5611 and for the PG M4 the CP5711.

- Open the WinCC Configuration Studio and then configure the "SIMATIC S7
PROTOCOL SUITE" as the new driver in tag management.
- Configure the properties of the "PROFIBUS" connection (see picture on
previous slide) with the name "S7_300_PB" and the connection parameters
shown there.
- Open the system parameters of the "PROFIBUS" connection by right-
clicking on the PROFIBUS icon and then clicking
System Parameters in the shortcut menu.
- In the "System Parameter - PROFIBUS" dialog, open the "Unit" tab.
In this dialog, in the "Logical device name" box, select either the
"CP5611.PROFIBUS.1" or the "CP5711.PROFIBUS.1".
Remove the check mark from "Set automatically".

Note Project names are case-sensitive.

Forbidden characters . , ; : ! ? " ' + = / \ @ * [ ] { } < > space

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 25 Projects and Tags
Process tags
Process tags represent the connection between the process and the operator
control and monitoring station. They are configured after setting up an AS
connection.

New group
WinCC provides the option of grouping tags in technological units. This allows
clear structuring of the tags. Before you start to configure the tags (new tags),
create a "New Group".
New tags
Tags can be entered directly in the table. For details, refer to the next page.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 26 Projects and Tags
Creating a new tag
The figure above shows all the steps in configuration.

Address properties
With the S7 driver, the following data areas can be selected:
- DB
- Bit memory
- Input
- Output

With a Modbus connection, for example, registers must be specified as the


address. This box is therefore dependent on the driver being used.

Forbidden characters Tag names name must not contain certain characters. See help under Working
with WinCC/Working with projects/Appendix/Illegal characters

The following restrictions apply when assigning tag names:


- The special character @ should be reserved for WinCC system tags, the
use of this character is, however, basically possible.
- Not permitted: . : ? ' \ * $ % space
- Not case-sensitive.
- The period is used as the separator with structure tags.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 27 Projects and Tags
Pull-down function
If the entire row is selected and pulled down, all columns are filled with the values
of the selected row, the tag name is kept unique by incrementing a number at the
end of the name. The addresses are also incremented. The data type corresponds
to the data type of the selected row.

If only one cell is selected and pulled down, the corresponding value is transferred
to the lower cells. This allows, for example, the data type to be adapted quickly.
With names, once again a unique name is generated.
If the rows below are still empty, default values are entered in the other columns.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 28 Projects and Tags
Columns The columns can be shown or hidden so that all the parameters for a tag can be
entered directly in the table.

Shortcut dialog If a row is selected, the parameters can also be modified in the shortcut menu. The
advantage here is that you need to scroll less to the left or right.

Linear scaling
Display values are converted from the process values.
Example:
Range of values in S7 0 1024
Range of values on the OS: 0 100
(OS = Operator Station)

Limits / Logging
On this page, the limits are specified that the data manager should check. Use
substitute values for connection errors and a start value that the data manager
should use for the first initialization.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 29 Projects and Tags
Displaying process tags
It is important which position in the tree is selected for the tag management.

Tag management -> All tags are displayed in the table

PROFIBUS -> All tags fetched via PROFIBUS. This can also involve tags from
several controllers.

"Connection name" -> Tags only from the relevant controller

"Group name" -> Only tags from the selected group are displayed

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 30 Projects and Tags
Filter
The text entered in the box has the effect of being a filter immediately; in other
words, every further character generally reduces the number of tags displayed

A preselection can be made by appropriate selection in the tree of the tag


management (see previous page).

Find and replace


The dialog for finding and replacing can be opened with the key combination
CTRL + F.
Unfortunately this currently only works when a cell and not a row is selected.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 31 Projects and Tags
Objective Configuration for SIMATIC S7 tag coupling, creating tags
Exercise - Open the WinCC Explorer
- Open the "Control Room" project with P > File O > Recent File
Legend P corresponds to Pull-down menu, O corresponds to operation in the
pull-down menu
- In the open WinCC project open the Configuration Studio by double-clicking on
the
Tag Management.

- With "New Group" (right mouse click on the connection name,


e.g. S7_300_PB) create the tag group "Filling plant"
- In the table create the two tags "P_Tank1_EB0" and
"P_Tank2_AB5". Enter data type and address according to the table above.
- Please also create the four tags for the "Motor Picture" group and the three
tags for the "Message Events" group.

Result The process tags you have configured can now be linked with objects for the
dynamization (action configuration).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 32 Projects and Tags
Objective The system info channel allows the user to define
a variety of system information about tags via one channel.
These tags can then be used later in WinCC pictures e.g. with I/O fields.

The trends were created with the "WinCC Online Trend Control" object and online
tags.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 33 Projects and Tags
Step 1 First the "System Info" driver must be inserted in tag management.

Step 2 Below the "System Info" unit, a new connection can be created.

Connection parameters cannot be entered with this driver.

Step 3 This can be renamed as an option.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 34 Projects and Tags
Step 1 Enter the new tag name in the "Name" column.

Step 2 Please open the box for entering the "Address"

Step 3 In the drop-down list of the function, the required information (e.g. free main
memory, date or CPU utilization) can be selected.

Step 4 Depending on the function various optional formats (e.g. "Free in %" or "Free in
KB" can be selected.
Further down the data type is displayed that WinCC expects for this information.

Step 5 The data type from Step 4 must be identical to the data type of the tags. If
necessary, this must be adapted.

Note In terms of the license, every system info tag counts as an internal tag and is
therefore free of charge.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 35 Projects and Tags
Exercise - Before you create further tags, please note the number of process tags
relevant for the WinCC license. You find this information in the status bar of the
WinCC Explorer if the Tag Management editor is selected.
- In the open WinCC project open the Configuration Studio by double-clicking on
the Tag Management.

- Insert the new driver "System Info".

- Below this driver, create a new connection and then rename this as "PC_Info".

- With "New Group" (right mouse click on the connection name), create the tag
group "PC_Diagnosis".
- In the table create the two tags "S_CPU_Load" and
"S_Free_memory". Enter data type and address according to the table above.

- You will find details on the format on the next page.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 36 Projects and Tags
- After creating these two tags check whether the number of process tags has
increased.

Result The tags you have configured can now be used for example in pictures or trend
archives.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 37 Projects and Tags
Internal tags
WinCC provides the option of defining project-wide tags that do not
put load on the process coupling. Once again, tags can be configured individually
or grouped together.

New group
WinCC provides the option of grouping tags in technological units. This allows
clear structuring of the tags. Before you start to configure the tags (new tags),
create a "New Group".

New tags
Internal tags are created in the same way as process tags. The main difference is
that the Address column is grayed out, in other words, nothing can be entered
here.
Linear scaling is also not possible.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 38 Projects and Tags
Limit values
Limit values can be specified for internal and external tags. This prevents an
operator from writing a value outside these limits to the tag.

Start value
A start value is sensible with internal tags so that they have a defined value after
starting runtime.

Substitute value
The substitute value can be defined for external tags. It is used, for example for
connection errors in runtime.

Options
The three bottom options can only be selected for internal tags. The meaning is
described above.
The "Computer-local" option only applies to clients without their own project.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 39 Projects and Tags
Objective To create tag groups (as shown above) with the corresponding internal tags within
the group.

Exercise - In the open WinCC project open the Configuration Studio


by double-clicking on the Tag Management.

- With "New Group" (right mouse click on internal tags),


create the tag group "I_Messages".
- With "New Tag" (right mouse click on the tag group name
"I_Messages") in the "I_Messages" tag group, create the tag "Messages_1_16"
tag of the data type "Unsigned 16-bit value".
- As an option, you can configure a start value for both tags.

- Also perform the configuration steps for the variable group


"I_Measurement_points" and create the tags listed above there.

Result The internal tags you have configured can now be linked with objects for the
dynamization (action configuration).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 40 Projects and Tags
General A fault or error in establishing a communications connection is generally first
detected in Runtime. Objects dynamized using WinCC tags, which cannot be
supplied with current process values, are displayed in the process picture as
inactive. These could be e.g. I/O fields, slider objects or bar graphs. If the problem
does not affect some of a connection's WinCC tags, this indicates that one of the
WinCC tags is the source of the trouble. In this case, you should for example
check the addressing of the tags as well as their notation when used in Graphics
Designer. If the problem affects all of a connection's WinCC tags, this indicates a
fault on the connection itself.
Diagnostics The diagnostics of the link can be performed in WinCC. This takes place in the
WinCC Explorer. If communication was created by the S7 Protocol Suite, the
diagnostics capabilities of S7 can be accessed.

1. Standard diagnostics with the menu item


P> Tools, O> Status - Connections

If the display of read or write jobs grows continuously and no longer decreases,
there may be overload of the data link.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 41 Projects and Tags
Calling diagnostics "Channel Diagnosis" can be started as an application from the Windows Start
menu. "This means that "Channel Diagnosis" is permanently available. The
Channel Diagnosis tool must be installed from the WinCC DVD.

ActiveX control The status information of a channel can also be displayed in a process picture by
the ActiveX control "WinCC Channel Diagnosis Control". The ActiveX control is
available in the "Controls" object palette in the Graphics Designer and is
permanently inserted in a picture.
The user can therefore create, for example, a diagnostics process picture, in which
the status of the communication and other information can be viewed in Runtime,
without needing to reconfigure this arrangement when necessary.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 42 Projects and Tags
Handling If the mouse is pointed to a tag in the WinCC Runtime in the Tag Management, a
quality code is shown. Apart from the current process value and the time of the last
change, if an error occurs an error code is displayed e.g. Quality 8, - no connection
to the AS. This can be used to check the status and the quality of the tags.

Online help

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 43 Projects and Tags
Objective To be able to test communication with the S7-300, you will configure a picture with
a process tag in your project.

Exercise - In the WinCC Explorer, double-click on


Graphics Designer to open the editor for WinCC pictures.

1. The Graphics Designer displays an empty picture. With "Save As" you can
rename the picture as "Test_connection.pdl".

2. Go to the "Tags" tab and


3. then to WinCC Tags -> SIMATIC S7 Protocol Suite -> PROFIBUS -> "Motor"
group

4. Drag the "P_speed_setpoint" tag into the picture. This automatically creates an
I/O field for input and output of this tag.

5. Save the picture.

6. Start WinCC Runtime.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 44 Projects and Tags
Objective To be able to test communication with the S7-300, you will configure a picture with
a process tag in your project.

Exercise - In the WinCC Explorer, double-click on


Graphics Designer to open the editor for WinCC pictures.
- The Graphics Designer displays an empty picture. With "Save As" you can
rename the picture as "Test_connection.pdl".

Result The internal tags you have configured can now be linked with objects for the
dynamization (action configuration).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 45 Projects and Tags
Adapting buttons
As in Outlook more large or more small buttons can be used. To do this, simply
drag the thick dividing line up or down.
It is also possible to hide buttons (shortcut menu Remove buttons). With Add these
can be made visible again.

Open in new window


With this, editors can also be opened in their own window. However, every editor
can only be opened once; in other words, if for example Alarm Logging is opened
in a new window it is no longer possible to process messages in the Configuration
Studio. Only when the new window has been closed or the "Release" function is
used is it possible to process in the Configuration Studio again.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 46 Projects and Tags
Export With the Edit/Export menu, all data is exported. If the export function is called in
the shortcut menu, only this part (in the figure above the group
I_Measurement_points) is exported.

Following the export, the following box is output:

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 47 Projects and Tags
Sorting Using the shortcut menu or by double-clicking on a column title the order of sorting
can be specified.

Filtering The filter dialog provides the following options:

Selecting rows Individual or multiple rows can be selected. Clicking in the left top corner of the
table selects the entire table.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 48 Projects and Tags
Cross Reference With the "Cross Reference" WinCC editor it is possible:

- to find all points of use of certain objects for example tags,


pictures.

- to display the points of use of an object directly to


change or delete them ("Go To" function).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 49 Projects and Tags
Name If text is entered here, all objects that contain this text are displayed. If for example
"Var" was entered, in the example above only the tags InitVar_01 to InitVar06
would be displayed.

Type
With the settable filters you can search for the following object types and create
the cross-reference list:
- Process tags and Internal tags
- Pictures
- Project and standard functions
- ActiveX controls
etc.

Status There are 3 statuses:


- Not used (example: a tag has already been defined but it is not yet used in the
project)
- Used
- Does not exist (example: A tag was used in a picture that, however, does not
yet exist in tag management)

Places used The filter in the right-hand window works in much the same way. Here, for
example, it is possible to filter according to the editor.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 50 Projects and Tags
Go To A further useful function is "Go To". In the shortcut menu of a place used, it is
possible to jump directly to the corresponding editor. In the example above, the
Graphics Designer was opened and the corresponding object was selected.

Link With this function, for example, a tag in a picture can be replaced directly by
another without needing to open the Graphics Designer editor.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 51 Projects and Tags
C scripts With C scripts, tag names and picture names should be made known in a
declaration section intended for this purpose. If this is not done, the place used is
not displayed in the cross reference. Linking would also not work.

Picture names must be written without the file extension ".PDL".

VB scripts All tags that you address with the standard formulation
HMIRuntime.Tags ("tag name")
are automatically detected by the cross reference of WinCC and listed in the
picture properties.
If you address tags with other formulations in your code, you can make this known
with the following section of the Cross reference:
'WINCC:TAGNAME_SECTION_START
Const TagNameInAction = "TagName"
'WINCC:TAGNAME_SECTION_END

All pictures that you address with the standard formulation


HMIRuntime.BaseScreenName("Screenname")
are automatically detected by the cross reference of WinCC and listed in the
picture properties.
If you address pictures with other formulations in your code, you can make this
known with the following section of the cross reference:
'WINCC:SCREENNAME_SECTION_START
Const ScreenNameInAction = "ScreenName"
'WINCC:SCREENNAME_SECTION_END
Picture names must be written without the file extension ".PDL".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 52 Projects and Tags
Objective An additional WinCC Cross Reference Assistant that ships with the product
generates comment and define rows in C action lists.

WinCC Cross Reference Assistant is a tool that searches scripts for picture names
and
tags and expands the scripts so that the WinCC
component Cross reference finds the picture names and tags and lists them in the
cross reference list.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 53 Projects and Tags
Simulation The simulation software makes 6 different functions available to the configuration /
commissioning engineer.
Each individual tag can be assigned one of these 6 functions.
These functions allow the configured objects to be supplied with realistic values.

Practice-related functions
- Sine (as periodic non-linear function).
- Oscillation (to simulate jumps in a reference variable).
- Random numbers (with the random numbers function, the user has randomly
generated values available).
- Increment (an up counter that starts at the minimum again after reaching the
maximum).
- Decrement (a down counter that starts at the maximum again
after reaching the minimum).
- Slider (a slider allowing the user to set a fixed value).

Note This simulation program can be installed from your WinCC DVD.

To simulate processed tags, the SIMATIC tool "PLCSIM" can also be used,
SIMATIC hardware is not necessary with PLCSIM.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 54 Projects and Tags
Simulation With the supplied simulation program all tags can be simulated in runtime mode.
The application is used for presentations and for testing functions.

Note Process tags can only be simulated if the communications connection to the
controller is established. Since the simulation is not without side effects, suitable
safety measures need to be taken (e.g. disconnecting load circuits).

Simulating tags
Generating tags for the tag table
1. Select P > Edit, O > New Tag
2. Accept the following settings in the properties window e.g. Temperature 1
the function e.g. Inc (increment),
Start value 0
End value 100
and then activate the function.

Note The update time for tag values is 1 second. A change only takes effect when the
function is activated.
A maximum of 300 tags can be configured.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 55 Projects and Tags
Contents Page
Training aims ...................................................................................................................................... 2
TIA functions in WinCC ................................................................................................................ 3
TIA functionality, compiling symbols .............................................................................................. 4
Configuration Creating a SIMATIC PC station ..................................................................................... 5
Configuration HW Config for SIMATIC PC station ............................................................................ 6
Configuration PC - PLC networking is a requirement ...................................................................... 7
Configuration Integrated WinCC projects ........................................................................................ 8
Configuration Creating tags "along the way" (1st option) ........................................................... 9
Configuration Creating tags "along the way" (1st option) ........................................................... 10
Configuration Creating tags "along the way" (1st option) ........................................................... 11
Configuration Creating tags "along the way" (1st option) ........................................................... 12
Configuration (2nd option) Creating multiple tags "along the way" ............................................... 13
Configuration in STEP 7 (3rd option) Marking symbols for HMI ................................. 14
Configuration in STEP 7 (3rd option) Compiling the OS .............................................................. 15
Configuration in STEP 7 (3rd option) Compiling the OS .............................................................. 16
Configuration in STEP 7 (3rd option) Compiling the OS .............................................................. 17
If you would like to know more ................................................................................................. 18
TIA: WinCC "Network entry point" function with "STEP7 editing" right ................................... 19
Generating reference data for network entry point ......................................................................... 20
Network entry point to STEP 7 1/2 ................................................................................................... 21
Network entry point to STEP 7 2/2 ................................................................................................... 22
Call of STEP 7 network from WinCC and return to WinCC .............................................................. 23
TIA functionality, hardware diagnostics from WinCC pictures ........................................................... 24
Configuring an attribute for hardware diagnostics .............................................................................. 25
Configuration of the event for hardware diagnostics ........................................................................... 26

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 TIA
The participant will:

Recognize the advantages of TIA


Be able to work integrated
Be able to create tags simply
Know how to delete compiled tags again

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 TIA
The configuration of SIMATIC WinCC in an integrated environment provides the
following advantages:
- Simple compilation of tags and texts into the WinCC project
- Direct access to STEP 7 symbols during process connection
- End-to-end message configuration
- Loading the configuration data on the runtime OS
- Extended diagnostics support

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 TIA
Requirements - Versions must fit together (please have a look at the FAQ for compatibility).
- For the TIA functions presented on the next pages, you need to expand the
WinCC installation, as shown in the slide below.
-> Communication -> "Object Manager", "AS-OS Engineering" and "STEP7
Symbol Server"

Inputs, outputs, bit memories and elements of data blocks are mapped (compiled).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 TIA
To generate tags and connection data a SIMATIC PC station needs to be created
in the SIMATIC Manager.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 TIA
Here, two objects need to be configured:

a) A network adapter to communicate with the S7. If the communication is to be


implemented for example using TCP/IP, special CPs from Siemens (e.g. CP 1613)
or a standard Ethernet adapter can be used. In this case an "IE General" needs to
be configured.

IE = Industrial Ethernet

b) A WinCC application needs to be configured.

WinCC Appl. = WinCC single user or WinCC server

WinCC Appl. (Stby). = redundant partner server

WinCC Client = WinCC Client with project, also known as a multi-client

Ref. = referenced projects. You want the same project to to run on several PCs.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 TIA
Due to the configuration in the SIMATIC Manager, there must be networking
between the S7 and WinCC.

This can be achieved for example via PROFIBUS or an Ethernet bus.

If there is more than one networking option, a connection can be selected later. In
the example above only a network connection via Ethernet is possible since the
PC does not have a PROFIBUS interface module.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 TIA
Note If the WinCC project is integrated in a STEP 7 project, the WinCC Explorer should
always be started from STEP 7. This is the only way to guarantee that the "correct"
WinCC project is opened and that no changes are made to a further WinCC
project accidentally.

Customer benefits If a STEP 7 project is archived, the WinCC project is also archived along with it

It is very easy to rename the WinCC project. If the project is not integrated a tool
"WinCC Duplicator" must be used.

The communications parameters are configured in STEP 7, e.g. the IP address of


the controller. If these are changed later, these changes can be transferred to the
WinCC project simply by compiling.

Data storage The files of the WinCC project are located in a subfolder of the STEP 7 project
(wincproj) and are therefore part of it.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 TIA
Note Using the STEP 7 symbol server, the configuration engineer can view and use the
data in the STEP 7 project directly.

You simply drag an element of a data block into the picture and an I/O field is
created automatically and this is linked at the same time to the corresponding tag.
Further information on the next pages.

It is also possible to drag an element of a data block directly to a property of a


graphics object. To do this, for example, a Boolean value is dragged from a data
block to the "Display" property of a circle.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 TIA
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 10 TIA
WinCC configuration engineer
If the WinCC configuration engineer creates tags along the way, the data blocks
are automatically selected in the SIMATIC manager. This is stored in the special
object properties of a data block.

S7 programmer On the other hand, the S7 programmer can also decide which tags will be created
later automatically in the HMI system. To achieve this the marking must be set
manually. Further steps are described on the next page.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 TIA
WinCC configuration engineerIf the WinCC configuration engineer creates tags along the way, not only
the data blocks are automatically selected but also the corresponding elements in
the data block. The latter is marked by a red flag.

S7 programmer If the S7 programmer decides which tags will also be created automatically later in
the HMI system, he or she would also need to select the individual elements as
well as selecting the data block.
Following this, the "Compile OS" tool would need to be started from the SIMATIC
Manager. This tool generates the selected tags in the WinCC Tag Management.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 TIA
3 options For generating the connection data and variables there are three options:
Options:

- From WinCC automatically in the background (possible without setting


attributes at the S7 end). Further information on the preceding pages.

- From WinCC automatically in the background (possible without setting


attributes at the S7 end). See above

With this option it is also possible to select several symbols at the same time
to be subsequently transferred (compiled).

- From STEP 7 by starting the "Compile OS" wizard (only if


operator control and monitoring attributes were set for the symbols). This
option is explained in greater detail on the following pages.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 TIA
Symbol Editor Creating symbolic names serves primarily for use in the STEP 7 program.
However, a further option can be used very simply.

By selecting it, a symbolic name including its address is made available for use in
WinCC.

Column O in the symbol table shows the programmer the attribute set for operator
control and monitoring.
Via the shortcut menu and calling "Special Object Properties -> Operator Control
and Monitoring", the attribute can be set for each individual operand.
This is necessary so that when compiling the S7, the tags are created (generated)
in the tag management of WinCC.

Note The operator control and monitoring attributes are also set if the tags are
generated at the WinCC end.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 TIA
Requirement The operator control and monitoring attributes have been set for the
symbols.

The "Compile OS" tool can then be started. This tool is also known under the
names "Mapper" and "AS-OS Engineering".

AS = Automation System
OS = Operator Station

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 TIA
Procedure 1. In "Connection", select the type of connection (e.g. TCP/IP) for the transfer.
As a result of this selection, a TCP/IP connection is generated later in WinCC.

2. After the "Next" step, select "Entire OS" with


"memory reset".

3. In the last screen of the wizard start the compilation with the "Compile" button.

PCS 7 In PCS 7 editing is always integrated. There, further functionalities are possible.
For example the "Picture Tree" and the corresponding pictures are derived
automatically from the plant hierarchy.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 TIA
NoteAfter compilation, all the data selected as tags in STEP 7 have been created in WinCC.

With symbols, the name is made up as follows:


"Program folder name"/"Symbol name from the symbol table"

For data from data blocks as follows:


"Program folder name"/"Data block name"."Element name"

Once the tags have been created in the WinCC Tag Management, these can be
used directly when configuring pictures.

In the tag selection dialog although it is possible to access the STEP 7 Symbol
Server, this takes a little longer (compare slide "Configuration (2nd option)
Creating multiple tags "along the way").

Deleting variables
The "mapped" tags cannot be deleted directly in the WinCC Explorer. This is only
possible if the selection (either for an entire data block or for individual elements of
the data block) is deleted. Following this, the "Compile OS" tool must be started
with the "Memory reset" option. The memory reset initially deletes all mapped tags
and then creates the new tags according to these selections.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 TIA
Note The following pages either provide additional information or serve as reference to
fill out a topic.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 TIA
Objective Define a network entry point with write authorization in STEP7.
In the WinCC User Administrator, a separate level for the STEP7 write
authorization is generated. The system then checks this level that is entered by the
active user before the network entry point is made and passes it as a flag to STEP
7. Depending on the status of this flag, the user has a read-only right or is
authorized to change STEP 7 data.

Configuration - In the User Administrator, create a function "STEP7 Writing Authority".


- Call the Dynamic Wizard at a graphic object and assign parameters for the
"Network Entry Point" function.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 TIA
Reference data is used to update lists such as: Cross reference lists, Assignment
lists, etc. The operand for the network entry point must exist in the CPU's block.
The reference data must be updated.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 TIA
Link a graphic object with an operand from the S7 program.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 TIA
For the network entry point with the Dynamic Wizard, select the event "Press right"
in the Wizard. The Wizard generates the script shown in the slide above. The
function can now be tested in Runtime.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 22 TIA
If the network entry point is triggered in WinCC, the window "Go To Location..." is
then called. If the operand is used in several blocks or networks, you can use the
list to select the block with which the LAD/FBD/STL Editor will be started.
The function "Show Picture..." in WinCC is possible in all three STEP 7
representations.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 23 TIA
The Hardware Diagnostics function allows you to start the STEP 7 diagnostics
directly from WinCC pictures.
Depending on a configurable event, the STEP 7 "Diagnose Hardware" function is
started for the associated controller.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 24 TIA
A process tag needs parameter settings for the attribute.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 25 TIA
Configuration No separate wizard currently exists for the jump to the Hardware Diagnostics. You
can however, use the wizard for the network entry point to configure the jump to
the hardware diagnostics. The jump to the hardware diagnostics can then be
configured in WinCC in an object generated in the Graphics Designer using the
"Network Entry Point" Dynamic Wizard. In a picture, insert, for example, the
Windows object "Button". Start the Dynamic Wizard and select the "Network Entry
Point" from the "Standard Dynamics".
The function call created by the Dynamic Wizard has to be adapted so that it
matches the one in the slide.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 26 TIA
"Report System Error" supports the components of S7-300 stations, S7-400
stations, DP slaves and WinAC, provided that they support functions such as
diagnostic interrupt, insert/remove interrupt and channel-specific diagnostics.
With the function "Report System Error, STEP 7 provides a user-friendly
opportunity to display the diagnostic information provided by the components in
the form of messages.
The blocks and message texts needed for this are automatically generated by
STEP 7. All the user has to do is download the generated blocks to the CPU and
transfer the texts to connected HMI devices.

Configuration In HW Config, select the CPU for which you want to configure the system error
reporting. Then choose the menu commands Options > Report System Error.

FAQ ID: 22727527

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 27 TIA
Contents Page
Training aims ...................................................................................................................................... 3
Preparing for configuration (1) ......................................................................................................... 4
Preparing for configuration (2) ......................................................................................................... 5
Examples of screen layout ................................................................................................. 6
Starting Graphics Designer ................................................................................................................ 7
Configuration user interface of the Graphics Designer ....................................................................... 8
Arranging two or more pictures next to each other ........................................................................... 9
Configuration user interface of the Graphics Designer - Standard palette ......................................... 10
Configuration user interface of the Graphics Designer - Standard palette ....................................... 11
Configuration user interface of the Graphics Designer - Controls palette .......................................... 12
Configuration user interface of the Graphics Designer Styles palette and Auto Hide ........................ 13
Configuration user interface of the Graphics Designer - Process Pictures palette ........................... 14
Selecting Graphics Designer objects .............................................................................................. 15
Positioning Graphics Designer objects .......................................................................................... 16
Aligning multiple Graphics Designer objects ............................................................................... 17
Graphics Designer - working with overlapping objects .......................................................... 18
Graphics Designer - Further important buttons ........................................................................... 19
Graphics Designer - Changing properties of an object ................................................................. 20
Graphics Designer - changing default properties of an object ...................................................... 21
Symbol library 'Siemens HMI Symbol Library' 1/3 ........................................................................ 22
Symbol library 'Siemens HMI Symbol Library' 2/3 ........................................................................ 23
Symbol library 'Siemens HMI Symbol Library' 3/3 ........................................................................ 24
First pictures for the Control Room project ........................................................................................ 25
Defining the start picture ..................................................................................................................... 26
Exercise 1: Creating pictures and changing to another picture 1/3 ................................................... 27

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Graphics Designer
Contents Page
Exercise 1: Creating pictures and changing to another picture 2/3 ................................................... 28
Exercise 1: Creating pictures and changing to another picture 3/3 .................................................... 29
Exercise 2: I/O fields for system info channel and inserting motor data 1/2 ......................... 30
Exercise 2: I/O fields for system info channel and inserting motor data 2/2 ........................ 31
Starting WinCC Runtime ................................................................................................................... 32
Autostart function for WinCC Runtime ............................................................................................. 33
Stopping WinCC Runtime .................................................................................................................. 34

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Graphics Designer
The participant will:
Recognize configuration interrelationships
Be able to start WinCC and create a project
Be able to describe the startup of WinCC
Be familiar with the WinCC Explorer
Be able to create plant flow charts and dynamize them.

Be able to configure graphic pictures with input/output value, bar display, slider
objects, button, mouse operation, function key operation, radio box, check box,
switching actions, value input checks, change to another picture, help dialogs,
display changes with objects and attributes...
Know how a configuration is activated with the runtime module.
Be able to make the necessary settings for the start dialog.
Be able to create a project library for symbols.
Be able to use the objects from the global library.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Graphics Designer
Preparing for configuration (1)

Process coupling
Specifying automation systems (AS) for the data exchange
Specifying the physical layer and protocol for the data transfer (Example: Ethernet
bus with TCP/IP)
Specifying input/output data of the AS communication
The update cycle for tags will be defined later

Visualization (refer to this section)


Division of the process into plant pictures
Specifying the selection options of the plant pictures
Specifying the static display per picture (text, line, circle, rectangle, color...)
Specifying the dynamic parts per picture (input/output value, bar display, switching
action, help box, trends, messages...)
Specifying the tags for dynamization:
. Specifying the file names.
Specifying methods of operation (mouse, function keys, touchscreen, ...)

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Graphics Designer
Preparing for configuration (2)
Measured value acquisition (see section 6)
- Specifying measured values to be archived
(acquisition cycle, update cycle, duration...)
- How measured values are displayed (trends, table...)
Message archiving (see section 5)
- Creating messages (acknowledgment concept, assignment of the
message numbers, text, attributes, archiving concept...)
Logging (see section 8)
- Specifying the plant documentation
- Creating the log layout (static and dynamic part)
- Specifying parts of the log
- Specifying the archives and process values accessed by the log
- Specifying the number of logs
Password (see section 4)
- Groups
- Single user

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Graphics Designer
Screen layout
Basically each individual screen layout can be configured.
The figure above shows four examples of a screen layout.

Overview area (1)


The overview area contains general information such as the date,
time-of-day, messages, area selection operations, system messages ..., and is
displayed in all pictures.

Work area (2)


The work area is used to represent the process activity.

Key set area (3)


The key set area is used to display active buttons, such as changing the work
area, calling up information, changing the key set..., that can be used regardless of
the selected work area.
Operation is possible with the mouse and/or function keys

Menu bar (4)


With the menus and the toolbar editor, operator control known in Windows can be
configured.

Note
The screen layout in the picture above, 2nd row, on the right can be configured
with Basic Process Control. BPC ships with the product and must be installed
separately from the CD. BPC does not require a license.
You will find a configuration example in section 14 "Appendix BPC".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Graphics Designer
Objective The necessary picture creation (static and dynamic parts) will be performed with
the Graphics Editor according to the task

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Graphics Designer
Enabling / disabling toolbars/palette
In the View menu, individual toolbars can be shown or hidden with the Toolbars
command.

Picture size You set the size of the picture which means that it can be adapted to the resolution
of your monitor, e.g. 1280*1024 pixels.

Setting the picture size


1. Click on the background of the picture so that no object is selected in the
picture.
2. You can now change the required properties directly in the "Object Properties"
toolbar.
3. In the Geometry group, you can, among other things, set the picture height and
width.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Graphics Designer
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 9 Graphics Designer
Configuring objects
a) By double-clicking on the required object, the object is inserted at the top left of
the picture with the default sizes.
b) By single-clicking the required object is selected. Afterwards, drag the object to
the required size using the mouse.

Polygon, polyline
With a polygon or polyline, the individual corner points can be set one after the
other by clicking with the mouse The last point is set with a double click.
The individual points can also be moved later.

Connector The connector is a linear object whose ends can be connected with the connection
points of other objects. If an object is moved, the connection is automatically
adjusted.

Windows objects Buttons are used to control process events and to change to another picture.
Check boxes are used for the multiple selection of operations.
Radio boxes are similar to the check box, but only one option can be selected.
Round buttons are used to control process events.
Sliders are used as sliding controls for analog process value adjustment.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 Graphics Designer
Selected I/O fields can be used as an input box, output box or combined input/output box.
Smart objects The data formats binary, hexadecimal, decimal or string
are possible. It is possible to specify limit values, hidden input or acceptance when
entry is complete.

Bars show process values in analog format. The current value is represented by
an area. A typical use of bars is to display the fill level or a temperature. Color
changes can display limit value violations.

Graphics objects are used to be able to include external graphic objects (.wmf,
.emf, .bmp, .gif, .jpg, .jpeg, .dib, .png) in a picture of the Graphics Designer.

The status display is used for dynamic display changes of the graphics objects
(.wmf, .emf, .bmp, .gif, .jpg, .jpeg, .dib, .png), in other words different pictures
are displayed depending on the value of a tag.

The text list provides the option of assigning a text to specific values. The text list
can be defined as an input list, an output list or as a combined input/output list.

The multiple row text object makes it possible to display text over several lines in a
rectangular, scrollable box and to edit it in runtime.

The combo box provides the option of displaying one of several values of a drop-
down list and to use this as input.

The list box provides the option of highlighting one of several values of a scrollable
list and to use this as input.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Graphics Designer
Controls Here, more complex objects often with extensive parameter assignment options
are displayed. Typically, controls have their own parameter assignment dialog that
can be opened by double-clicking on the control.

From the list, other controls can be selected with a red check mark so that these
can be selected directly from the list.

Caution Caution is needed when using "third-party" controls.


These can endanger the stability of WinCC Runtime

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 Graphics Designer
Styles With this, the style of an object can be changed quickly, for example line width of a
circle.

Close This is used to hide palettes that are seldom required. They can only be shown
again using the menu View -> Toolbars.

Auto Hide a) Pin is fixed, in other words, the pin icon is arranged vertically (see picture
above)
Window Position The palette is always displayed and can be operated at any time. In this case, the
window position can be either "Floating" or "Docking". With "Docking", the window
is docked at a fixed position.
With "Floating", the window is released and can be moved with the mouse.

B) Pin is not fixed; in other words the pin symbol is horizontal


This corresponds to the "Auto Hide" mode. Here, the palette is automatically
hidden and only the tabs "Standard", "Controls" and "Styles" are visible. When the
mouse pointer is positioned on these tabs, the corresponding palette is shown.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 Graphics Designer
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 14 Graphics Designer
Selecting objects
- An object is selected with the left mouse button.

- By holding down the left mouse button and dragging over several objects
all objects in the rectangular frame that appears are selected (lasso function).

- By holding down the Shift key, and selecting individual objects with the left
mouse button objects can be "collected".

Further settings in:


P>Tools, O>Settings... -> Options tab
Here, you can choose between "surrounding" or "touching" for the object
selection.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 Graphics Designer
Positioning objects using the mouse
One or more objects are initially selected and can then be moved simply with the
mouse.

Display grid Grid points are displayed. This is a an aid to configuration.


In Runtime, these points are, of course, not displayed.

Snap to grid
If snap to grid is enabled, objects can only be positioned so that the top left corner
is located on a grid point.

Positioning using the arrow keys


When the key is pressed, selected objects are moved by one pixel in the required
direction.
If Shift + arrow left are pressed, the object in the example above is moved by 10
pixels (grid size).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 Graphics Designer
Aligning objects Depending on the number of selected objects, the various options of this toolbar
can be used.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 Graphics Designer
Layer palette To simplify the processing of individual objects in complex process pictures, the
Graphics Designer allows you to work with layers. For example, the content of a
process picture can be distributed across up to 32 layers. These layers can be
shown or hidden individually; in the default setting, all layers are visible; in the
example the active layer is layer 0 and
cannot be turned off. Pressed buttons indicate the visible layers.

Changing the layer assignment


The assignment of an object to a layer can be changed in the "Object Properties"
window.

Toggling a layer in RT
With VBS scripts the layer can be enabled or disabled in Runtime.
This example shows the function (toggle) for layer 2.
If Layers (3).Visible=vbFalse Then
Layers (3).Visible=vbTrue
Else
Layers(3).Visible=vbFalse
End If

Layer hidden in Runtime


In Tools -> Settings -> Visible Layers, layers can also be made visible or hidden
for Runtime. The toolbar shown above allows this only for the configuration.

Active layer In >Tools -> Settings -> Options, the following is possible:
"Copy or insert objects" either "into active layer" or "into previous layer". New
objects are always inserted in the active layer.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 Graphics Designer
Object name In this list, you will find all the objects of your picture.
If the object name is in bold print, this object has at least one dynamization.
If the name is written in italics, this object is the destination of a direct connection
(details to follow).

Flip All selected objects are flipped vertically or horizontally.

Rotate All selected objects are rotated right through 90 degrees.


Some objects, e.g. a polygon, have a rotation angle property. With this, the object
can be rotated by degrees. This property can be made dynamic.

Copying properties
and assigning them The properties, for example of the red rectangle, are first copied then, for example,
the gray rectangle is selected and the properties are assigned to it; in other words
it also becomes red.

Activating runtime Apart from starting runtime in the WinCC Explorer, it can also be started in the
Graphics Designer. When it is started via the WinCC Explorer, the picture defined
as the start picture is always shown first, when it is started from the Graphics
Designer, the open picture is displayed first.

"Online configuration"
To be able to test changes in pictures quickly, runtime needs to be exited
completely and restarted. To do this, only the modified picture needs to be saved
and reselected in runtime (change to another picture). Instead of the change to
another picture, it is also possible to click on the green arrow "Activate Runtime".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 Graphics Designer
Changing object properties using the shortcut menu
After selecting an object, the shortcut menu is called up with the right mouse
button. Many objects (circle, rectangle, etc.) do not have a separate configuration
dialog.
Here, the most important attributes of an object can be changed.

Object properties
As default, the object properties can be seen in the lower area of the Graphics
Designer.
Here, all attributes of an object can be changed.

Properties In the Properties tab, the attributes can be selected and have parameters
assigned using categories. It is possible to make the settings statically or to
dynamize them e.g. with a tag or the Dynamics dialog.
If properties are dynamized, the attribute name and the group name are shown in
bold print.
If the Dynamic column is filled in, this has priority over the value stored in the
Static column.

Event In the Events tab, dynamizations can be configured for preset trigger events (e.g.
pressing the left mouse button).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 Graphics Designer
Changing the default settings of the objects
1. Select an object in the object palette.
2. Change the attributes to the values you require.
3. With all newly configured circles, the new default properties are visible
immediately. Existing circles are no longer adapted later.

Saving the defaults


This gives you your own defaults that can be stored or loaded with
P>Tools, O>Settings, Defaults of the Objects tab in a
file Default.pdd.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 Graphics Designer
Library for symbols
As default, the object properties can be seen in the lower area of the Graphics
Designer.
If this is not displayed, the library function can be called with P> View, O>
Toolbars... -> Library or using the icon.

A distinction is made between the global and project library. User symbols can be
stored in both areas.

The global library contains the standard symbols with 2D display and the
extended library HMI Symbol Library 1.4 with 3-D display.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 22 Graphics Designer
Library Part of the global library is the "HMI Symbol Library". The individual symbols
consist of controls.

Control properties

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 23 Graphics Designer
Adapting a symbol The properties of the symbol can be adapted in Object properties.

Tip Here, for example, the foreground color can also be dynamized. However this
does not work if the foreground mode is set to "Original".

As an alternative, the control's own property box can be opened by double-


clicking.

Global library The global and project library has the file extension *.pxl.
Project library By searching in the Windows Explorer you will find the storage location in the
installation directory or in the project directory.

After installing WinCC, the global library is filled with various objects. Further
objects can, however, be added by the user.

Self-created graphics objects can be saved for re-use in the project library.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 24 Graphics Designer
Objective In this section, you will extend the WinCC project "Control Room" generated in
section 3 by adding several pictures. The pictures contain static picture elements
and the most important dynamization elements. On the following pages, you will
find configuration solutions that take into account the different operator control and
monitoring philosophies that can be adopted in your configuration after adaptation
(e.g. process tags, texts, size) to your requirements.

Structure The configuration solutions can be divided into:


- Digital inputs and outputs
- Color change (attribute change)
- Switching activities
- Value checks
- Help options
- Miscellaneous

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 25 Graphics Designer
General information
For each project a start picture must be defined that defines the picture with which
the Graphics Runtime will start.
The start picture is the root of all pictures from which tree structures for operating
philosophies can be built up.
In every project it must be possible to end the Runtime mode so that configuration
changes can be made in particular when Windows operator input is blocked.

Defining the start picture


See the figure above.

Activating runtime
- Call up the WinCC Explorer.
- P>File, O> activate or using the toolbar (see above).

Starting Runtime automatically


See "WinCC Autostart" - description on the following pages.

Starting WinCC Explorer


Create a link to WinCCExplorer.exe on the desktop.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 26 Graphics Designer
Objective The "Control_Room" project will be expanded with three pictures.
In the picture window of the start picture "Start.PDL", different pictures need to be
displayed. The picture selection will be configured using buttons in the lower area
of the start picture (below the picture window).
Exercise 1. Open the "Control Room" project with the WinCC Explorer.

2. Configure 3 pictures with the WinCC Graphics Designer:


- Start.PDL, picture size 1280x1024 pixels [widescreen: 1600x900]
- Intro.pdl, picture size 1280x840 [widescreen: 1600x710]
- Motor.pdl, picture size 1280x840 [widescreen: 1600x710]

3. In the Start.pdl picture add the following objects:


- picture window (object palette Smart Objects)
- Name: "Work_Pic"
Geometry:
- Picture window position: X=0 and Y=100
- Picture window size: 1280x840 [widescreen 1600x710]
Other:
- Picture name: INTRO.PDL

- Three buttons from the


Global Library Operation Screen Navigation

- Clock (object palette Controls)

- Two buttons below the picture window


- Labeling on the first button: Intro
- Labeling on the second button: Motor

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 27 Graphics Designer
Continuation of the exercise
4. In the start picture, configure picture selection as a mouse click on the
button at the lower end (below the picture window) via a direct connection:

- To do this, in the Graphics Designer select the button labeled


"INTRO",
- open the object properties of this button,
- select the "Events" tab, and select
the "direct connection" for Mouse Click,
- in the Direct Connection window select:
- for the source as "Constant" the picture name: "Intro.pdl" and
- for the target "Object in Picture" the picture window with the name
"Work_Pic as the "Object" and "Picture Name" as the property.

5. Perform the same configuration steps for the button


labeled "Motor":
- however in the Direct Connection window as the source select
as "Constant" the picture name: "Motor.pdl".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 28 Graphics Designer
Exercise continued

6. Change to the picture Intro.PDL and configure the following objects there:
- A graphics object (can be found in the standard palette in the group Smart
Objects). In the configuration dialog that opens you can use the button
"Find..." to search for the following file:
C:\Program Files (x86)\SIEMENS\WinCC\bin\RTSPLASH.bmp
(If necessary, take into account the installation path of your PC).
The BMP has the size 500x300 pixels. To avoid distortion, the graphics object
should be the same size.

- Configure a static text (standard palette in the group Standard Objects) with
the content " Fan control". Adapt the text size etc. to your requirements.

7. Change to the picture Motor.PDL and configure the following


objects there:
- Configure a static text (standard palette in the group Standard Objects) with
the content "Motor".

8. Save the 3 pictures. You can do this picture by picture or using


"File -> Save All".

9. In computer properties, for the Graphics Runtime mode, select


Start.PDL as the start picture

10. Start Runtime and test the whether the changes to other pictures work.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 29 Graphics Designer
Objective The two pictures (Intro, Motor) in the project "Control Room" each need to be
expanded by two input/output boxes (I/O fields). In the Motor picture an additional
switch for starting and stopping the motor needs to be inserted.

Exercise 1. Open the "Control Room" project with the WinCC Explorer.

2. In the WinCC Graphics designer expand the start picture Intro.PDL


with two I/O fields. In the object palette of the Graphics Designer, you will find
the required I/O field object in Smart Objects.
First click on the required object in the object palette and then drag the I/O field
to the required location and the required size with the mouse.

The I/O fields are used to display the system info channel tags
"S_CPU_Load and
"S_Free_memory
with corresponding static text (see the left picture above).

Use the configuration dialog of the I/O field to configure the


tag connection. The configuration dialog appears automatically when
placing objects (e.g. an I/O field) in the picture. The configuration dialog
can be opened by pressing the Shift key and double-clicking on the
object to be configured (e.g. I/O field) or via the shortcut menu.

Set the global properties under the item Display (for I/O
fields and static texts) to "no" if you do not want to use the globally defined
colors. Otherwise, the colors (e.g. foreground, background or font color) cannot
be selected individually for the objects.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 30 Graphics Designer
Continuation of the exercise
3. In the WinCC Graphics designer expand the Motor picture
Motor.PDL with two I/O fields displaying the process tags
"P_speed_setpoint" and "P_speed_actual" with corresponding
static text (see right figure above). Use the
configuration dialog of the I/O field to configure the tag connection.

4. In the WinCC Graphics designer expand the Motor picture


Motor.PDL with a toggle button from the symbol library.
Drag the toggle button "ON_Off_6" to your picture. You will find this
toggle button in the library under "Global Library\Operation\Toggle
Buttons"
5. Connect the toggle button with the tag "P_Motor_on_off"
in the object properties Properties\Process Interfacing\Toggle Bit
(not under Events). The tag "P_Motor_on_off" is connected to the dialog
tag with right mouse click on the "white lamp symbol". This
defines the "P_Motor_on_off" tag as a toggle bit.

6. Save all pictures and test the following points in runtime:

- The speed can also be 4-digit.


- The operator can only enter a value in the box for the speed setpoint.

- The motor can be started and stopped with the toggle button.

-The tags for the free memory and CPU load are showing
practical values.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 31 Graphics Designer
WinCC Explorer By clicking on the triangle icon in the WinCC Explorer, WinCC Runtime is started.
The picture specified as the start picture is selected automatically.

Graphics Designer WinCC Runtime can also be started here. However here, the picture currently
being processed is selected as the first picture.

If WinCC Runtime has already started, the active picture is selected again. This
function can be used for fast tests ("online configuration"):
- Make a change in the picture
- Save the picture
- Press the "Activate Runtime" button in the Graphics Designer
-> The modified picture can be tested immediately.

Windows taskbar As the third option, the runtime of the currently open project can be started here.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 32 Graphics Designer
Autostart When you boot your computer, WinCC Runtime can be started directly with a
selected project. Specify the project to be opened using the "AutoStart
Configuration" tool. The WinCC Explorer is not opened during this.

As an option, an autologon can also be set for Windows. This is done by entries in
the Registry. You will find details quickly using Google.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 33 Graphics Designer
Button in a picture
The usual method is a button, for example in the overview of the start picture. The
creation of the corresponding dynamics is explained later.

WinCC Explorer If the runtime is active this is also displayed with the text "[Active]" in the title line of
the WinCC Explorer. In this case the "Deactivate" button can be used.

Close button If this button is displayed for the WinCC Runtime window (computer properties)
only the Graphics Runtime can be exited with it. Other WinCC tasks such as Tag
Logging RT, Alarm Logging RT, etc. continue to run. This is displayed by the text
"[Active]" in the title line of the WinCC Explorer.

File/Exit Even if runtime is activated, this can be exited in the WinCC Explorer with
File/Exit. If the check mark for "Close project when exiting" is not set, only the
WinCC Explorer is exited, runtime continues.
If the check mark is set, runtime is exited first and then the WinCC Explorer. In this
case, the next time the WinCC Explorer is started, this is opened first and then
runtime is started automatically.

Windows Taskbar As a further option, the runtime of the currently open project can be stopped here.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 34 Graphics Designer
Contents Page
Training aims ...................................................................................................................................... 3
Integration of the OS in STEP 7 1/4 ............................................................................................ 4
Configuration of the WinCC station with PROFIBUS CP 2/4.......................................................... 5
Setting interface properties of the PROFIBUS CP 3/4 ...................................................... 6
Data view of the WinCC station via NetPro 4/4 ............................................................................... 7
Exercise 1: Integration of the OS (with the Control Room project) in STEP 7 .................................... 8
Copying WinCC from STEP (releasing) ........................................................................................ 9
Opening integrated WinCC project .................................................................................................... 10
Creating tags "along the way" and using them directly ...................................................................... 11
Tag connection with drag&drop .............................................................................................. 12
Exercise 2: Gauge control with tag connection via STEP 7 symbol server .................................... 13
Overview of the dynamization options in the Graphics Designer 1/2 ................................................ 14
Overview of the dynamization options in the Graphics Designer 2/2 ................................................ 15
Configuration dialog (fast configuration) ...................................................................................... 16
Dynamic Wizard .............................................................................................................................. 17
Dynamics options in the object properties ............................................................... 18
Overview of the Dynamic dialog ....................................................................................................... 19
Dynamic dialog further examples 1/2 ............................................................................................. 20
Dynamic dialog further examples 2/2 .............................................................................................. 21
Overview of a direct connection ........................................................................................................ 22
Exercise 3: Motor control and color change ............................................................................. 23
I/O field consolidation ........................................................................................................................ 24
Bar display consolidation ................................................................................................................ 25
WinCC Slider control consolidation ................................................................................................... 26
Exercise 4: Inserting a bar for actual value and slider for setpoint ..................................................... 27

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Graphics Designer Consolidation
Contents Page
Status display consolidation ........................................................................................................... 28
Exercise 5: Status display for direction of rotation ...................................................................... 29
Overview of the configuration options for color change with the following examples .................... 30
Linking a tag with the corresponding color property ................................................................ 31
Overview of color change with the Dynamic dialog ............................................................................ 32
Overview of color change with scripts (C script or VBS) .................................................................. 33
Setting a bit in a word with the Dynamic Wizard ................................................................................ 34
Exercise 6: Setting a bit in a byte ................................................................................................... 35
Slider object .................................................................................................................................. 36
Check box and radio box .................................................................................................................. 37
Text list ........................................................................................................................................... 38
List box and combo box .................................................................................................................... 39
Help for the operator ...................................................................................................................... 40
Exercise 7: Help function for the plant operator ................................................................................. 41
Showing a picture name in any picture ............................................................................................ 42
Default trigger for new objects ....................................................................................................... 43

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Graphics Designer Consolidation
The participant will:
Be able to integrate a WinCC project into a STEP 7 project at a later point in
time.
Be able to adapt objects in a configuration dialog
Know how the Dynamic Wizard works.
Be able to make, for example, color changes with the dynamic dialog box:
Be able to use further objects such as sliders and check boxes.
Know options to provide the operator with help functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Graphics Designer Consolidation
The configuration of SIMATIC WinCC in an integrated environment provides the
following advantages:
- Simple compilation of tags and message texts into the
WinCC project
- Direct access to STEP 7 symbols during process connection
- End-to-end message configuration for operator devices and PC stations
- Loading the configuration data on the runtime OS
- Extended diagnostics support

Note Before starting the import function WinCC must be closed

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Graphics Designer Consolidation
1. Start the configuration (HW Config) by double-clicking

2. Take the CP 5611 or CP 5711 from the hardware catalog by


dragging and dropping it on slot 2. If necessary, the "hardware catalog" can be
made visible with View Catalog.

In the following steps, the PROFIBUS interface has parameters assigned.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Graphics Designer Consolidation
1. By double-clicking on the CP 5611 or CP 5711 you start the parameter
assignment of the PROFIBUS CP.

2. Assign the PROFIBUS interface to the CP 5611 or the CP 5711.

3. Open the properties of the PROFIBUS interface.

4./5. Add the PROFIBUS subnet and assign the address 0.

6. Save and compile the configuration.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Graphics Designer Consolidation
By double-clicking on "PlantBus" open the NetPro editor
(prior to this, click "Ventilation").

Here, you can check whether a PROFIBUS connection between the PC and the
S7 exists. The PROFIBUS addresses can also be recognized.

Tip With "View with DP Slaves / IO Devices", these devices can be made visible in
the NetPro view

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Graphics Designer Consolidation
Objective The existing "Control_Room" project will be integrated in the S7 project
"Ventilation. After integration of the WinCC project, you can, for example access
the symbols of the S7 from WinCC.

Exercise 1. Close WinCC Explorer


2. Open S7 project "Ventilation" on drive: D:\Courses\WINCCS with the SIMATIC
manager
3. Integrate the "Control Room" WinCC project in the S7 project
"Ventilation_Step7" with Options OS Import (see figure above)
4. Configure the WinCC station (see slide "Configuration of the WinCC station
with PROFIBUS CP 2/4")
5. Assign parameters to the CP 5711 (refer to the slide "Setting interface
properties of the PROFIBUS CP 3/4")
6. Check the configuration with Netpro ( see slide " Data view of the
WinCC station via NetPro 4/4")

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Graphics Designer Consolidation
If the WinCC project is to be used on a PC without a STEP 7 installation, you use
the WinCC tool Project Duplicator. The integrated project is entered as the source
project and stored as a separate project with "Save As".
The WinCC project integrated in STEP 7 is not automatically deleted.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 Graphics Designer Consolidation
Note If you are working with integration, it is strongly recommended that you always
start the WinCC project from the SIMATIC Manager. This ensures that the correct
WinCC project is opened.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 Graphics Designer Consolidation
Tags When working with integration, in the tags view, not only the WinCC tags but also
the data blocks and the symbols from the S7 controllers are visible.

1. The required tag is simply dragged to a WinCC picture.

2. If no connection has yet been created for the controller and if the interface is
not unique, the dialog "Select the Network Connection" opens automatically, In
this case, please select the WinCC unit "PROFIBUS".

3. After this configuration step, an I/O field with the required tag has been created.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Graphics Designer Consolidation
Tag connection The tag connection can also be made by dragging and dropping on any property of
a graphics object. In the example above, and internal tag is shown at the property
Position X of the object "Circle1".

1. Click on the tag with the mouse and then holding down the mouse button drag it
to the Properties tab. This tab is then shown.
2. Then while still holding down the mouse button, go to the lamp symbol beside
the property to be dynamized and release the mouse button there.
3. The result is shown in the figure above. The tag is used to dynamize Position X.

"Update" column Here, the update time can be adapted. With the procedure above, the default time
(2 s) is entered automatically. The default time can be changed in Tools/Settings -
> "Default Object Settings" tab.

Direct/Indirect To dynamize a graphics object, the indirect addressing of tags can also be used.
To do this a tag (address tag) is defined that contains the tag name of the target
tag.
By changing the content of the "address tag" it is possible to access different tags.
This also changes the link of the tag to the I/O field.
Indirect addressing is indicated by a check mark being entered for "Indir." in
addition to the tag when it is double-clicked.
With indirect addressing, the tag entered there must be a text tag.

Note The dynamization of an object linked to a tag is indicated by a green lamp signal.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 Graphics Designer Consolidation
Objective An indicator instrument (gauge control) needs to be linked to a tag. The tag will be
created by access to the STEP 7 symbol server.
Exercise - In the "Ventilation" S7 project, open the integrated WinCC project
"Control Room" with "Open Object".
1. Place a "WinCC Gauge Control" from the Control palette in your picture.

2. Select the object and go to the object properties. Find the attribute "Value"
there. Open the shortcut menu of this attribute and select "Tag".

3. In the tag box, find the data block "User" and the "P_speed_actual" tag

4. Change the update time to 1 second. Afterwards the row should appear as
follows:

5. You can set the attributes (such as maximum value, tick width, danger,
warning,...) of the gauge control with properties. With controls, it is often easier to
use its own properties dialog. To do this please click on the control.

6. In the start picture (in the overview area) configure the system function "Exit
WinCC Runtime" on an additional button with the Dynamic Wizard of the
Graphics Designer.

7. Save the picture and test the functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 Graphics Designer Consolidation
Configuration dialog
Fast configuration with standard applications e.g. changing to another picture.
Not all objects have such a dialog.
The configuration dialog can be set with
P>Tools, O>Settings, Options tab.

Dynamic Wizard
The Dynamic Wizard makes it easier for you to use and configure complex objects
such as I/O fields and bars because all the required parameters are queried by the
wizard. These are then entered in the object properties and can also be adapted
later individually.
The Dynamic Wizard always generates a C script. The Dynamic Wizard can be
set with P>View, O>Toolbars.

Tag connection
If tags need to be displayed 1 to 1, the direct tag connection of internal and
process tags is available that can also be addressed indirectly.

Dynamic dialog
As a convenient option for dynamizing objects, you can also use the Dynamic
dialog. Here, it is very easy to configure color changes if various limits are
exceeded.
Using the Dynamic dialog results in high performance in
runtime mode.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 Graphics Designer Consolidation
Direct connection A special type of action is the direct connection. With this direct connection, for
example, fixed process variables can be transferred very quickly to a tag. In
addition to this, individual properties of an object can be linked directly to tags (e.g.
a string tag with the property Text of a static text).
Using the direct connection results in high performance in
runtime mode.
Properties actions
To dynamize graphics pictures, various options are available. Actions in C syntax
and VBS can be used on the object. Many properties can be made dynamic such
as the color, object size, position, font size etc. via internal or process tags. These
are triggered by a timer or a tag change.
Event actions For extensive actions to be processed event-triggered, the use of actions in C
syntax and VBS is also possible. In these actions, for example, complex
calculations can be made and the results then displayed by WinCC pictures and
objects.
This is triggered by a change in the object properties, for example color change
or events on an object e.g. mouse click.
VBS With VBScript (VBS) you have access to tags and objects of the graphical runtime
system during runtime. Actions can be executed via objects.
This results in numerous options for dynamizing properties of graphics objects or
for reacting to events in runtime mode. With
the Global Script editor, actions and procedures can be created
independent of pictures. VBS supports access via the Component Object Model.
VBS and C VBS provides internal interfaces to tags and picture objects while the C
environment allows access to other WinCC subsystems (e.g. the report system).
See also WinCC help system: Performance Data, Scripting with VBS and ANSI.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 Graphics Designer Consolidation
Configuration dialog
The configuration dialog is used for fast configuration. Here, the most important
properties of an object are be displayed clearly.
If you want to change a property that does not exist in this dialog, this can be done
in the object properties. Here, all properties are displayed.

Two examples are shown in the figure: Configuration dialog for an I/O field and for
a button. Not all objects have such a dialog.

It appears automatically when generating these objects. The configuration dialog


can be shown or hidden with P>Tools, O>Settings.

For changes: Open the shortcut menu with the right mouse button and start the
configuration dialog.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 Graphics Designer Consolidation
Dynamic Wizard
The Dynamic Wizard is an aid to configuration.

The wizards are distributed on different tabs according to different topics. In the
"System Functions" tab, there are for example wizards for language switchover in
WinCC Runtime or to exit WinCC Runtime.

First, the object to be dynamized must be selected. Then the required wizard is
started by double-clicking on it. Here, one or more screens may be displayed with
questions. On completion of the wizard, this has generated a C script for
dynamization.

Changes can only be made in the generated C script.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 Graphics Designer Consolidation
Properties tab, Events tab
In Properties, (almost) all properties can be dynamized. The dynamics are
updated cyclically and for this reason a cycle time needs to be specified here.
With events, it is possible to react to an event e.g. mouse click or pressing the
keyboard. For this reason, these dynamics are not called cyclically and no cycle
time needs to be configured.

Tag Select an object in the picture --> display the Object Properties --> select the
Properties tab --> open the shortcut menu by right clicking in the Dynamic column
->> select a tag --> select the corresponding tag in the dialog and adopt it.
The tag connection is used when the value of a tag is required to influence the
property of an object directly (example: Tag has the value 120 and is linked to the
X position of the graphics object, this is then displayed at X position 120).

Dynamic dialog The dynamic dialog can be used for more complex dynamics. For details, refer to
the next pages.

Direct connection With events a direct connection can also be used. For details, refer to the next
pages.

C Action
VBS action When a solution is not possible with the Dynamic dialog or a direct connection,
scripts can be programmed in the programming language "ANSI C" or "Visual
Basic Script". Details are discussed in section 5.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 Graphics Designer Consolidation
Dynamic dialog The dynamic dialog can be configured in the "Dynamic" column for every property
for which a lamp symbol is displayed.

Configuration The configuration of the Dynamic dialog is started with the right mouse button on
the lamp symbol. (Shortcut menu for the object property).
The results of the query are therefore linked immediately to the connected
property. In the example above to "Position X".

Changes If changes need to be made, these can be integrated easily in the existing dialog.
(Open the Dynamic dialog again using the shortcut menu).

Note If the attribute was dynamized with a Dynamic dialog, the lamp symbol is replaced
by a red lightning symbol.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 Graphics Designer Consolidation
Analog Several value ranges can be defined. With "Add", a further value range can be
added. The corresponding value for the property to be dynamized is entered in the
right-hand column. In the example above, the background color is dynamized.

Bool If a binary tag is to be evaluated, select the setting "Boolean".

However an unsigned 16-bit value can also be used. If this equals zero, this
corresponds to "False", if it is not equal to zero "True".

An expression such as 'Tag1' < 'Tag2' is also possible.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 Graphics Designer Consolidation
Direct In the "Expression/Formula" box, formulas can also be entered.
If the calculated value is to be output one-to-one the data type needs to be set to
"Direct".

Tag status Dynamizing by using the Dynamic Dialog can also be used to monitor the status of
a WinCC tag in Runtime. With external tags, monitoring the tag status also allows
conclusions to be made about the status of the associated connection.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 Graphics Designer Consolidation
Direct connection Using a direct connection, it is possible to link certain properties and actions
without formulating the action as a C script.
This allows a very fast connection of individual properties and the relevant source.

The picture shows the direct connection between the value of a mouse operation
and the writing of a tag.
It is also just as easy for example to configure a direct change to another picture or
similar. As of WinCC V5, the direct connection is displayed at the target object via
the object properties and is recognizable by the italic font.

Note If a direct connection was configured, the lightning symbol is shown in blue.

Via the properties


of the picture, the
references of the direct
connection are shown.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 22 Graphics Designer Consolidation
Objective For the display of the motor status, the color of the motor will be changed. (You
can take the motor display from the symbol library).
The Dynamic dialog can be used for the color change.
It is possible to change the setpoint speed with the setpoint speed button.
Exercise 1. Select a motor display from the symbol library and place
the selected symbol by dragging it to your picture. You will find
suitable symbols in the category "Blowers" or "Motors".

2. Dynamize the foreground color of the motor display using


the Dynamic dialog depending on the tag
"S7 program/User.Actual_speed".
(up to zero gray; up to 1000 green; up to 1300 yellow, otherwise red)

3. Draw a polyline between the toggle button and the motor. In a Dynamic
dialog, dynamize the line color depending on the S7 program(1)/ user.on_off
(0= black, 1= red)

4. Configure the three setpoint buttons for changing the setpoint speed
400, 900 and 1200 revolutions. Use the direct connection with the tag "S7
program/User.Reference_speed".

6. Save the picture and test the functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 23 Graphics Designer Consolidation
Field type ""I/O field" means input and output field.
"Output" prevents the operator from entering data.
"Input" is used seldom. Here, the last input value is displayed, if, for example, the
value on the controller changes this is not displayed.

Data format Here, the following options are available:


- Binary
- Decimal
- String
- Hexadecimal

Output Format Here you define how many places the number can have before or after the point.
Examples for "Decimal":
- 999.9 3 places before the point, one place after the point
- s9.99 one place before the point, two places after the point, signed, necessary
with negative numbers
- 0999 3 places before the point with leading zeros, 3 is displayed as 003
- 99.9e number is displayed in exponential notation
Examples for Binary:
- 1111 4 places
- 01111 4 places with leading zeros
Tip: By double-clicking on "Output Format" a list with various options is displayed.
Clear on New Input
If you click in the field, the old value is deleted.

Hidden Input Useful when entering a password

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 24 Graphics Designer Consolidation
Example Temperature displays or fill levels can be visualized well with bar objects.

Procedure From the object palette, Smart Objects group, select a bar
and configure this in your graphics picture with the configuration dialog.
You will find the other necessary settings in the figure above.

Scale marks With this, the number of labels on the axis can be specified. Zero means that the
scaling is performed automatically.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 25 Graphics Designer Consolidation
WinCC slider control
Apart from the normal slider object (Standard palette/Windows objects) there is
also a "WinCC Slider Control" (Controls palette/ActiveX controls).

With the first of these, no scaling can be displayed, with the WinCC slider control
this is possible.

As with almost all controls, there is a properties box that can be opened by double-
clicking.

If a tag is to be linked, this is only possible in the Object Properties with the
"Position" attribute.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 26 Graphics Designer Consolidation
Objective Further objects will be inserted in the Motor picture: A WinCC slider control for the
setpoint speed and a bar with limit value monitoring for the actual speed.

Exercise 1. Configure a WinCC slider object (Controls palette/ActiveX controls) and connect
it to the tag "S7 program(1)/ User.Reference_speed
(Object Properties: Control Properties / Position). Also change the scaling
to the value range: 0 to 1400

2. Configure a bar and connect the bar with the tag


"S7 program/User.Actual_speed"
(Object Properties: Miscellaneous/Process Driver Connection)

3. Configure the lower display limit with 00 and the upper limit with 1400.

4. You can set the attributes (such as font size, number of places, color...) of the
bar in the Properties.

5. If the speed exceeds >1000


the bar color should change to yellow
> 1300 to red.

AH = Alarm High
WH = Warning High

6. Change the bar properties in


Miscellaneous/Change Color to
"Segment"

7. Save the picture and test the


functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 27 Graphics Designer Consolidation
Task The representation of a process object (e.g. valve, switch, ...) needs to be
displayed on the screen depending on the process. Depending on the process
tags, different graphics are displayed.

Example The representation of a valve needs to be shown in various colors, in various


positions (horizontal, vertical) and in some situations flashing.

Procedure - You require different graphics files that, for example, represent a valve differently.
These graphics files could also be generated with the Graphics Designer
(File/Export... -> generates an EMF file or with the aid of a hardcopy). Or they can
also be generated with other tools (e.g. Paintshop Pro, ...).

1. From the object palette via the "Smart Objects" node, select the
status display and place it in the picture.
2. In the shortcut menu of the State:, select "Add" (2b), this generates the states 0,
1, 2, 3, 4, ... If you select further states with the "Add" button, these are bit coded:
0, 1, 2, 4, 8,
3. Then drag the graphic file name to the Basic Picture column and possibly a
flashing picture. If the flash attribute is set to "Slow", "Medium" or "Fast", the basic
picture and the flashing picture will be displayed alternately.
4. Select the required tag and your update time.

Note As default for Properties/ State / Basic Picture Referenced: yes


is set. In other words, the individual status files (.emf, .wmf, .bmp) are
loaded if there is a status change. If you now select Basic Picture Referenced:
no, the status files are stored in the picture and are loaded when the picture is
selected. This can reduce the update time. The plant picture .pdl becomes larger
as a result.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 28 Graphics Designer Consolidation
Objective The display of the direction of rotation and a switch for selecting the direction of
rotation are to be configured. The direction of rotation display is configured with the
smart object "Status Display".

Exercise 1. From the global library under Operation/Toggle Buttons select a suitable switch
or copy the existing On/Off toggle switch. Then link the tag
S7 program/User.Direction_reference with the property Tag
Assignment/Toggle Bit. (Check this property to make sure that the check mark
is not set in the "Indir" column.)

2. Place a status display at the required position in the Motor picture.

3. In the configuration dialog of the status display that then appears, the required
graphics files must first be added to the list using the "Browse" button. The two
files "left.emf" and "right.emf" can be found in
D:\Courses\WINCCS\ab_exercise.

4. From the picture selection window, select your files ("left.emf") and
"right.emf" and place these by dragging them to the status table, Basic Picture
column (0=left, 1=right).

5. Connect the status display with the process tag


S7-Program/User.Direction_act.

6. Save the picture and test the function.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 29 Graphics Designer Consolidation
Color change To change the color of objects, various options are available:
1. Tag connection to the corresponding color property
2. Dynamic dialog
3. Scripts (C script or Visual Basic script)

Use The color change of objects is used, for example to indicate


1. Switching status
2. Limit value violation
3. Status of the process interface

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 30 Graphics Designer Consolidation
Connecting a tag directly to a color property
As the simplest option, an internal or an external tag can be connected to a color
property (frame color, background color etc.). In this case, the value of the tag
should include the required color code.

The color code is made up of the three color portions red, green and blue.

Examples Color Color value Color Color value


Dark
red 0x000000FF Red 0x00000080
Green 0x0000FF00 Green 0x00008000
Blue 0x00FF0000 Blue 0x00800000
Cyan 0x00FFFF00 Cyan 0x00808000
Yellow 0x0000FFFF Yellow 0x00008080
Magenta 0x00FF00FF Magenta 0x00800080
Light gray 0x00C0C0C0 Gray 0x00808080

Black 0x00000000 White 0x00FFFFFF

Mixed colors result from intermediate values in the palette.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 31 Graphics Designer Consolidation
Dynamic dialog For the sake of completeness the options of the Dynamic dialog are shown again
here. The examples above relate to color changes for the data types Analog and
Bool.

Analog Several value ranges can be defined. With "Add", a further value range can be
added. The corresponding value for the property to be dynamized is entered in the
right-hand column. In the example above, the background color is dynamized.

Bool If a binary tag is to be evaluated, select the setting "Bool".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 32 Graphics Designer Consolidation
Scripts If the options of the Dynamic dialog are no longer adequate to configure more
complex conditions for color changes, the script languages C and VBS provide
further options.

In the VBS example above, a color change to red is output when the current value
for the tag Direction_actual is one and at the same time the actual speed is higher
than 1200. If this is not the case, the graphics object is colored green.

Detailed information on these options will be discussed in the next section.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 33 Graphics Designer Consolidation
Task Four conveyor lines are to be switched with 2 x 4 buttons via a connecting block.
Each button is assigned the coupling (C1-C4) of a conveyor line that can either be
open or closed.
For the switching action, the same process tag (line) is to be used, so that the
operand addresses are made optimum use of on the controller.

Example Each switching action for a coupling causes a bit to be set and reset in a word. For
this, bit addresses 0-3 are used, the bit addresses 4-15 can be used for other
operations in the control program.

Procedure In the data manager, the tag "Line" is defined as an unsigned 8-bit value.

In the following exercise, the control buttons for lines 1 and 2 are
inserted in the Motor picture. The coupling status is represented by an I/O field
with the bit pattern of the Line tag.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 34 Graphics Designer Consolidation
Objective Two conveyor lines will be turned on or off via four buttons.
The switching action causes a bit to be set and reset in a byte.
The free bit addresses can be used for other operations in the control program.

Exercise 1. Insert the four buttons and the I/O field at the bottom left in the Motor picture.

2. Create the internal tag "Line" as an unsigned 8-bit value.

3. Connect the I/O field with the "Line" tag and select the following
settings:
- Field Type: Output
- Output Value: Line
- Update Cycle: On change
- Data Format: Binary
- Output Format: 011111111

4. Call the Dynamic Wizard for each window button and generate the function
Setting/Resetting a bit for bits 1 and 2.

5. Save the picture and test the functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 35 Graphics Designer Consolidation
Task The entry of a setpoint will be made with the slider object.
The control range lies between the minimum value and the maximum value.

Example The adjustment value (control range) of the slider object will be between 0 and
100.
In the example above, a tag still needs to be specified that will be adjusted using
the slider.

Procedure The slider object is created in the picture using the object palette, the size
can be set using the handles.
It is labeled by the user.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 36 Graphics Designer Consolidation
Task It should be possible to display and change individual bits simply within a byte,
word etc.
The check box allows the operator to select several bits and to enable the
corresponding check boxes.
The radio box allows the operator to set exactly one bit. Example: When the
second bit is set the previously set bit is automatically reset.

Note The number of fields is limited to 32.

The entry of the labeling texts e.g. "1st bit" is sequential; in other words first set the
index to 1 then enter the first text, then set the index to 2 and enter the second text
etc.

The radio box can if necessary also display several set bits if these have been set
by the PLC program. The operator cannot set more than one bit.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 37 Graphics Designer Consolidation
Text list The text list provides the option of assigning specific values to a text.

The text list can be defined as an input list, an output list or as a combined
input/output list.

The following data formats are available: Decimal, binary or bit.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 38 Graphics Designer Consolidation
Combobox The combobox makes it possible to display a drop-down list of several values and
to use the selection as the input.

List box The list box makes it possible to highlight one of several values of a scrollable list
and to use the selection as an input.

Configuration The most important properties are described above.

The entry of the labeling texts (e.g. "1st bit") is sequential; in other words first set
the index to 1 then enter the first text, then set the index to 2 and enter the second
text etc.

Runtime If the value of the connected tag changes, the assigned text is displayed.
If the operator selects one of the texts from the list, the value of the connected tag
also changes.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 39 Graphics Designer Consolidation
Task Help texts should also be available to the operator.

Example The help texts are based on the technological application and inform
the operator for example about adjustment ranges or tank temperature.

Option 1 Individual help texts are shown and hidden by clicking with the mouse. This can be
achieved as shown in the example above with two buttons or using an object with
press mouse/left -> help text visible and release mouse/left -> help text invisible.

Option 2
Tooltip The "Tooltip text" attribute specifies the tooltip text to display in Runtime by
positioning the mouse pointer on the object. The tooltip text can be entered in
several languages.
With the control character \n, the tooltip text can also be shown on several lines.

Option 3 If it should be possible to make several objects visible or invisible at the same
time, this is achieved most easily with a VBS script. With this, all objects for
example on layer 5 can be switched visible or invisible at the same time. Details
follow in the next section.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 40 Graphics Designer Consolidation
Objective The operator will be informed of restrictions to the setpoint speed in two different
ways.

Exercise 1. Call-up the Motor picture and take the object Multiple row text from the Smart
Objects and edit a static text with the information text: "The maximum setpoint
speed is 1350."
Adapt the font size and colors. The object name should be Help text.
The property Miscellaneous/Display must be set to no.

2. Configure a round button and under Events Mouse/Press Left the following
direct connection:
- Source: Constant 1
- Target: Object in picture, Help text , Display

3. For the round button also under Events Release Left the following direct
connection:
- Source: Constant 0
- Target: Object in picture, Help text , Display

4. Configure the tooltip text for the input field for the setpoint speed.

5. Save the picture and test the functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 41 Graphics Designer Consolidation
Task The current file name will be displayed in the picture.

C script:
Procedure Procedure To display the current file name in the picture, it is adequate to
configure a static text with which the text display is dynamized by a small C action.
In the return value, the call parameter lpszPictureName of the C action is simply
returned.
Configuring properties:
Static text / font / text / C action:

return lpszPictureName;

Note Note the following during configuration:


1. 1 hour should be set as the trigger of the action
2. Assign text attributes once
3. Properties/Miscellaneous/Adapt Border: Yes

This static text can be copied into every picture and displays the current name of
the picture in runtime.

When necessary, the visibility can be controlled by a central internal tag so that
picture name output can be suppressed.

Recommendation Copy the object to the project library once it is created.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 42 Graphics Designer Consolidation
Object trigger One way to achieve efficient picture selection and communication is to use the
setting of a default trigger for all objects of a picture. In many cases it makes sense
to set a value for example of 1 second.
Whenever possible, only one trigger per picture should be used. Different
triggers (update cycles) require additional frames for data exchange with the
controller.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 43 Graphics Designer Consolidation
Contents Page
Training aims ....................................................................................................................................... 3
General information about programming languages .......................................................................... 4
Data types in WinCC and in C ......................................................................................................... 5
Important operators ........................................................................................................................ 6
if statement .................................................................................................................................... 7
Opening the C editor in WinCC .......................................................................................................... 8
C editor in the WinCC toolbar ............................................................................................................. 9
Reading and writing WinCC tags ............................................................................................. 10
Dynamizing graphics objects with C ................................................................................................... 11
Diagnostics options for C scripts ................................................................................................... 12
Diagnostics options for C scripts Error message in the diagnostics window ..................................... 13
Tips for writing C scripts ..................................................................................................................... 14
Exercise 1: C script on mouse click with diagnostics ......................................................................... 15
Exercise 2: Cyclic C script ........................................................................................................... 16
C scripts and cross reference ........................................................................................................... 17
C scripts and cross reference ........................................................................................................... 18
Visual Basic and WinCC .................................................................................................................. 19
VBS, VBA data types ...................................................................................................................... 20
VBA in WinCC ................................................................................................................................. 21
Comparison of VBA and VBS .................................................................................................... 22
Where do I find help on VBS?............................................................................................................... 23
Important operators in VBS ............................................................................................................. 24
If statement .................................................................................................................................... 25
Opening the VBS editor in WinCC ...................................................................................................... 26
VBS editor in the WinCC toolbar .......................................................................................................... 27

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Scripts
Contents Page
Reading and writing WinCC tags .................................................................................................... 28
Dynamizing graphics objects with VBS ............................................................................................... 29
Diagnostics options for VB scripts Trace .......................................................................................... 30
Diagnostics options for VB scripts Error message in the diagnostics window .................................... 31
Diagnostics options for VB scripts Debugger ................................................................................... 32
Tips for writing VB scripts 1/4 IntelliSense ....................................................................................... 33
Tips for writing VB scripts 2/4 Ctrl + spacebar .................................................................................. 34
Tips for writing VB scripts 3/4 Extended tag browser ...................................................................... 35
Tips for writing VB scripts 4/4 Code templates .................................................................................. 36
Exercise 3: VB script on mouse click with diagnostics ....................................................................... 37
Exercise 4: Cyclic VB script ............................................................................................................... 38
Configuration rules in VBS actions ..................................................................................................... 39
Examples with VBS actions .............................................................................................................. 40
Configuration notes Target: Good performance ................................................................................ 41

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Scripts
The participant will:
Get to know selected operators and commands of C
Be able to handle dynamization tasks with C
Know options for homing in on errors

Get to know selected operators and commands of VBS


Be able to handle dynamization tasks with VBS
Know options for homing in on errors

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Scripts
Historical At the start of the 70s C was developed by Dennis M. Ritchie at the Bell
Laboratories.
This development is closely associated with the development of the UNIX
operating system with over 95% of it written in C.
Over the course of time, C has developed into a separate programming language
independent of the operating system.
In 1988 the ANSI committee X3J11 published a language description for C and in
December 1989 it was standardized by ANSI.
Advantages C combines the power of an assembler language with the convenience of a
high-level programming language:
- Contains the memory properties and constructs of other
programming languages such as block structures, pointers etc.
- Programming directly for the hardware is possible
- Suitable for time-critical applications
- Suitable for system programming
- Universally usable language
- Small language
- Functionally simple to expand

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Scripts
WinCC The data types for a WinCC tag are specified in the tag management.
See the figure top right

C data types The data types in the C programming language are defined differently.
Some of these definitions originate from the ANSI C programming language:
e.g. char, short, long, etc.
Other data types are additionally defined in WinCC. These are, however, only alias
names for the actual data types.
Examples: BOOL, SHORT, UINT, etc.

Table In the table above, the assignment of WinCC tag types and the C tag types along
with their ranges of values can be seen.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Scripts
Note The list of operators is not complete. Nor is complete help on ANSI C part of the
WinCC documentation.

For beginners, it is therefore recommended that they purchase a specialist book


on ANSI C.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Scripts
Conditional statement
With the if statement an instruction can be executed depending on a condition.

In the example on the left (1), simply the color value for red is returned if the speed
is higher than 1300. If this is not the case, the program continues with the next
line.

In the example (2) an if-else if-else instruction is shown.

In the example (3), two if instructions are nested. If several instructions need to be
executed in the TRUE branch or FALSE branch, this instruction block must be
placed in curly brackets (see else branch).

Global color scheme


If the color of an object needs to be changed statically or dynamically, this works
only if the property "Global color scheme" is turned off. Otherwise the global
settings of the colors are used.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Scripts
C scripts If a task, for example, cannot be solved with a simpler dynamization option (e.g.
Dynamic dialog or direct connection), a C script or a VB script makes sense.

To use this, the object to be dynamized must first be selected. "C Action" can then
be selected in the shortcut menu. In this way the C editor can be started.

Every program begins with "{" and ends with "}". Within the two outer curly
brackets, the required C program code can be inserted.

Comments are automatically shown in green. The comments shown above are
inserted automatically in every new C script. Their significance is explained later.

Event If a C action is configured for an event, the stored action is represented by a green
lightning symbol.
If the C action has not yet been compiled, the lightning symbol is shown yellow.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Scripts
Toolbar The toolbar provides other options apart from the known options such as "Copy".

Compiling Once a program code has been entered, this needs to be compiled. If you attempt
to close the editor without having compiled you will automatically be asked
about it.
An uncompiled C script is ignored in runtime.

Trigger If the C script is linked to a mouse click event (Events tab), no trigger can be
defined. A trigger can only be defined for cyclic C scripts (in the Properties tab).
With a cyclic C script, for example more complex color changes can be made.

Browser With the tag or picture name browser, it is possible to search for a name and to
adopt this text in the program. This helps to avoid typing errors.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 Scripts
Reading/writing WinCC tags
A typical task is to read or write one or more WinCC tags.

For a binary tag, there are the commands GetTagBit() and SetTagBit(). With the
read command only the tag name is transferred as the parameter. As the return
value, the current value of this tag is returned.
When writing, two parameters are required: the tag name and the value to be
written.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 Scripts
Changing graphics objects in runtime
Another typical task is to change graphics objects depending on process tags. In
WinCC almost all properties can be dynamized: e.g. background colors, line color,
X position, visibility, size, fill level, ...

To do this, there are numerous corresponding C functions for reading out the
current status (e.g. GetBackColor()) or for changing the status (e.g. Set
GetBackColor()).

For further examples see above.

Apart from these very concrete functions, there are also functions that are kept
general that can also be used for reading out and changing:
SetPropertyBOOL(), SetPropertyWord(),

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Scripts
Troubleshooting in C scripts
For testing C scripts, WinCC provides an
Application window -> Global Script-> GSC Diagnostics This is inserted in a
picture. As of this point in time, all printf functions from all C scripts are output in
the application window.
The printf command is part of the ANSI C library and has the following syntax e.g.
printf( \r\n Value1: %d, temp);
%d is a placeholder for integral values, this is replaced during runtime by the
current value of temp.

This makes it simple to troubleshoot.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 Scripts
Error message Syntactical errors are automatically reported by the C editor in the Graphics
Designer.
Runtime errors, on the other hand, are only detected during runtime.
Example: The name of a tag has been written incorrectly.
In the example above, a runtime error is found and reported in the diagnostics
window. The precise location of the problem is shown:

szApplicationname: PDLRuntimeSystem => corresponds to Graphics Runtime

bCycle: acycle => acyclic, in other words not cyclic, for example mouse click

lpszPictureName: START.WORK_PIC:SCRIPT => In the Start.pdl there is a


picture window WORK_PIC and there the picture SCRIPT.PDL is shown in which
an error has occurred.

lpszObjectName: Button16 => The graphics object involved is "Button13"

szErrorText: Tag not found => tag was not found

szTagName: "S7 program(1)/User.Speed_set999" => Name of the tag

Tip When the picture has been opened, you can


search for the object directly at the top left:

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 Scripts
Effective writing of C scripts

Copy / Paste As in most editors it is also possible to work here with Copy and Paste.

Calling C functions
To avoid typing errors e.g. with WinCC tag names (these are case sensitive!), an
aid can be used.

1. To do this, first search for the C function in the tree structure. The function
GetTagSWord is located for example in Internal functions/tag/get.

2. By double-clicking on the function name GetTagSWord the parameter


assignment dialog opens. The function above requires only one parameter: the tag
name.

3. So that the tag to be read can be read with the tag browser, first click on the "..."
button and then on "Tag selection".

4. Here, every WinCC tag can be selected. Then close the screens with OK.

5. As the result, you will see the function with the necessary parameters.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 Scripts
Objective Two new buttons need to be added to the Motor picture to adjust the setpoint
speed: "+100" and "-100". The calculation is made with a C action. For
diagnostics, the "printf" command is used.

Exercise 1. Add two buttons with the texts "+100" and "-100"

2. For the button "+100" edit a C script for event/mouse click as shown in the
picture above. Attempt to type in as little text as possible yourself, but rather use
the parameter dialog (see previous page).

3. Add a "Global Script - Diagnose" window:


Go to Smart Objects and select the Application Window object. After you have
placed the object in a suitable size in the Motor picture, a box appears
automatically in which you select "Global Script". A further box then appears in
which you select "GSC - Diagnose". Finally, go to the properties to the
Miscellaneous group and there set all the properties (Sizeable, Movable, Border
etc.) to Yes. As a result a toolbar is shown in runtime.

4. Test the function in runtime.

5. Copy the "+100" button and adapt the labeling and the C script so that the "-
100" function is executed.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 Scripts
Objective
A speed indicator is to be added to the Motor picture. This should be green in the
normal situation, with high speeds (higher than 1300 revolutions per minute) it
should be red. As an exercise, this simple task will be solved with a C script.

Exercise 1. Add a circle to the Motor.pdl picture.

2. Add the C script above to the object properties in the Properties tab under
Colors/ Background Color.

3. Start Runtime and test the functionality. When doing this, note
the output of the printf() commands in the diagnostics window.
How often are these output?

4. Change the trigger to 2 seconds.


How often are the printf() commands output now?

5. Change the trigger to tag trigger with the tag "S7-Program/User.Speed_set" and
a cycle of 1 second.
How often are the printf() commands output now?

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 Scripts
Tags in actions
Tags in actions can only be found and replaced by the Cross Reference if the
predefined configuration rules for tags and picture names are kept to in the C
scripts.

Note The configuration rules are taken into account by the Dynamic Wizards when
the scripts are generated.
When creating C scripts, a comment allows the configuration rule
to be recognized.

You will find further information in the online help of the WinCC Information
system, Index tab, keyword: Cross Reference
.

The configuration rules can also be generated with the WinCC Cross Reference
Assistant. The WinCC Cross Reference Assistant is a tool that searches for scripts
according to picture names and tags and it extends the scripts so that the WinCC
component Cross Reference finds the picture names and tags and enters them in
the cross reference list.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 Scripts
Tags in actions
Tags in actions can only be found and replaced by the Cross Reference if the
predefined configuration rules for tags and picture names are kept to in the C
scripts.

Note The configuration rules are taken into account by the Dynamic Wizards when
the scripts are generated.
When creating C scripts, a comment allows the configuration rule
to be recognized.

You will find further information in the online help of the WinCC Information
system, Index tab, keyword: Cross Reference
.

The configuration rules can also be generated with the WinCC Cross Reference
Assistant. The WinCC Cross Reference Assistant is a tool that searches for scripts
according to picture names and tags and it extends the scripts so that the WinCC
component Cross Reference finds the picture names and tags and enters them in
the cross reference list.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 Scripts
Introduction What is Visual Basic? The "Visual" part of the name refers to the method for
creating graphical user interfaces. Instead of writing innumerable program lines
that specify the appearance and the position of user interface elements, simply
move preassembled objects to the required location by dragging them. The "Basic"
part of the name refers to the language BASIC (Beginners All-Purpose Symbolic
Instruction Code). Visual Basic was developed from the original BASIC and today
contains several hundred instructions, functions and keywords many of which
relate directly to the Windows user interface. By learning a few keywords,
beginners can create practical applications. At the same time due to its
performance, the language allows professionals to implement everything that can
also be developed with all other Windows programming languages.

Application The Visual Basic programming language can not only be used for Visual Basic.
The Visual Basic for Applications (VBA) in Microsoft Excel, Microsoft Access
and in many other Windows applications uses the same language. VBA was
developed to automate software applications.
The Visual Basic programming system Scripting edition (VBScript) for
programming the Internet.
VBA and VBS are a subset of the Visual Basic language.

VB in WinCC In WinCC both VBS and VBA are used. For VBS, a separate editor was
developed.

For VBA scripts, the Microsoft Visual Basic Editor is used.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 Scripts
VBS and VBA in the WinCC environment
VBA is used in WinCC Configuration during the configuration in order to adapt the
Graphics Designer to your individual requirements and to simplify and automate
configuration. VBA programs only run in the configuration environment of WinCC.

In contrast to VBA, VB scripts only run in WinCC Runtime and allow you access to
graphics objects and tags there. Objects and pictures can be neither created nor
modified on a permanent basis in VBS, in contrast to VBA.

The main language-related differences between VBA and VBS are e.g.:
+ VBS was developed for use in the Internet, VBA for the automation of
software applications
+ The data type of VBS tags is always VARIANT. VBA on the other hand
distinguishes the individual data types such as INT, DOUBLE, STRING etc.
+ Certain language constructs from VBA have been removed from or added to
VBS.
+ Errors are handled differently in VBS compared to VBA.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 Scripts
VBA You can use VBA to expand the functionality of the Graphics Designer and to
automate configuration. A VBA editor is available in the Graphics Designer which
you can use to automate the configuration of pictures - and other tasks. The VBA
editor is identical to the products from the Microsoft Office family.

Although an editor for macros was only implemented in the WinCC editor Graphics
Designer, the possibilities extend way beyond the possibilities of the Graphics
Designer, for example in the VBA scripts, new tags can also be created in the
WinCC project.

In VBA, it is also possible to create your own menus in the Graphics Designer.

Unfortunately this topic is not consolidated in the system course, only in the
extended course.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 Scripts
VBA VBA provides the option of automating engineering tasks in the WinCC Graphics
Designer e.g. creating user-defined menus and toolbars. Creating and processing
standard objects, smart objects and Windows objects. Accessing products that
support VBA. Configuring actions for pictures and objects etc.

VBS The VBS scripts are based on the Microsoft Scripting host that is installed in every
Windows 2000, Windows XP and Windows ME system.

e.g. configuring the setting of setpoints for tags with the manipulation of a graphics
object. Making the switchover of the runtime language dependent on the
manipulation of a graphics object. Configuring changes of color, e.g. cyclically
(flashing) or displaying statuses (motor on). Transferring data to other applications
(e.g. Excel, Word, Access). Starting external applications from WinCC etc.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 22 Scripts
Object model The WinCC object model of the graphic runtime system allows, for example,
access to graphics objects and tags in runtime.
The object model is described in the WinCC help.

Objects With the objects and lists you have access to all the objects in the graphic runtime
systems: graphics objects, pictures, layers and tags.

Properties The properties of the individual objects can be used to modify specific graphics
objects and tags at runtime, for example enabling an operating element with a
mouse click or triggering a color change when a tag value changes.

Methods Methods that are applied to individual objects can be used, for example, to read
tag values for further processing or display diagnostics messages at runtime.
e.g.
+ HMIRuntime.Stop
+ HMIRuntime.Trace "Customized error message"
+ Expression.Write [Value]
+ Expression.Read
+ etc.

Examples of VBS Apart from examples directly for WinCC such as reading and writing tags, here
you will find further examples:
+ Access to MS Excel
+ Access to any SQL database
+ etc.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 23 Scripts
Note The list of operators above is not complete. You will find further information in the
WinCC help.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 24 Scripts
Conditional statement
With the if statement an instruction can be executed depending on a condition.

In the example on the left, simply the color value for red is returned if the speed is
higher than 1300. If this is not the case, the color value green is returned.

The right-hand example shows an if-elseif-else statement. If the first condition is


met, the color becomes red. Only if this is not the case is the second condition
queried. This then decides about the color yellow or green.

Global color scheme


If the color of an object needs to be changed statically or dynamically, this works
only if the property "Global color scheme" is turned off. Otherwise the global
settings of the colors are used.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 25 Scripts
VB Scripts If a task, for example, cannot be solved with a simpler dynamization option (e.g.
Dynamic dialog or direct connection), a C script or a VB script makes sense.

To use this, the object to be dynamized must first be selected. "VBS Action" can
then be selected in the shortcut menu. In this way the VBS editor can be started.

Every program must be inserted between the first line (Sub ...) and End Sub.

Comments begin with a single quote at the start of the line and are automatically
displayed green.

Event If a VBS action is configured for an event or a property, the stored action is
represented by a blue lightning symbol.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 26 Scripts
Toolbar The toolbar provides other options apart from the known options such as "Copy".

Syntax check Here, the syntax can be checked manually. When the editor is closed with OK, this
check is made automatically. Only if an error is detected, is it reported and the
editor remains open. This means that no scripts with errors can be saved.
If an error cannot be corrected immediately, temporary commenting out of the
problem area is recommended.

Trigger If the VB script is linked to a mouse click event (Events tab), no trigger can be
defined. A trigger can only be defined for cyclic VB scripts (in the Properties tab).
With a cyclic VB script, for example more complex color changes can be made.

Browser With the tag or picture name browser, it is possible to search for a name and to
adopt this text in the program. This helps to avoid typing errors.
The extended tag browser will be explained later.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 27 Scripts
Reading/writing WinCC tags
A typical task is to read or write one or more WinCC tags.

Above, two options are shown.

In the top example a tag is declared with Dim Speed. With the following line, this
is referenced with an object and therefore linked to a concrete WinCC tag.
Afterwards, all properties and methods (Read and Write) related to this WinCC tag
in other words with Speed.Read the current value of the WinCC tag is read in and
stored in the Speed.Value property.
After the calculations, the value in the Speed.Value property is written to the
WinCC tag with Speed.Write.

The bottom example shows simple writing.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 28 Scripts
Changing graphics objects in runtime
Another typical task is to change graphics objects depending on process tags. In
WinCC almost all properties can be dynamized: e.g. background colors, line color,
X position, visibility, size, fill level, ...

To do this, in VBS an object reference to the required graphics object is created


first. Following this, it is very easy to access all properties e.g. with
oPoly.Backcolor.
For further examples see above.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 29 Scripts
Trace Similar to the printf() command in C scripts, a similar command can also be used
in VBS. HMIRuntime.Trace
The trace output is made in the same object as with the C scripts (Global Script -
Diagnose).

Character strings and also tags are simply linked by a &. The constant vbCrLf
stands for Carriage Return and Line Feed and produces a new line.
This Trace command can, for example, be used to output interim results of an
extensive calculation or to check whether a certain branch in an IF-Then-Else
structure is run through.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 30 Scripts
Error message Syntactical errors are automatically reported by the VBS editor in the Graphics
Designer.

Runtime errors, on the other hand, are only detected during runtime.
Example: The name of a tag has been written incorrectly.
In the example above, a runtime error is found and reported in the diagnostics
window. The precise location of the problem is shown:

Application: PDLRT => corresponds to Graphics Runtime

Picture: Script.pdl_Events => the picture name is script.pdl, Events means that the
problem is with the events (e.g. mouse click). Script.pdl_Triggers would mean that
the problem is at the properties and (cyclic scripts).

Function: Sub Button14_OnLButtonDown => The first part of the name


corresponds to the name of the object in the WinCC picture (here Button_14), the
second part shows the event (OnLButtonDown corresponds to press mouse
click/left).

Line: 3 => line in the VBScript


Error : => brief error description

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 31 Scripts
Microsoft debugger
You can use the "Microsoft Visual Studio 2008" debugger to test your VB scripts in
Runtime.
The debugger is installed during setup of the SQL Server.
It provides options such as the setting of breakpoints and the line by line execution
of VB scripts.
The debugger can be started manually at any time. As an alternative it can also be
started automatically if an error occurs (this does, however, need to be enabled in
the WinCC Explorer in the properties of the computer).
Logical errors are best detected with a debugger.
Example: The condition of an if instruction was incorrectly formulated.
Procedure Start the debugger e.g. manually. Then create a new project in the Visual Studio.
In the menu "Debug/ Attach to Process..." connect either pdlrt.exe (Graphics
Runtime) or gscrt.exe to the required process (with global script actions).
In the Solution Explorer (see above, there are two threads under PDLRT:
Script.pdl_Triggers (here, cyclic VB scripts are executed, e.g. a more complex
color change) and Script.pdl_Events (here the events of the picture Script.pdl are
processed, e.g. a mouse click on a graphics object). By double clicking on one of
these lines, the source codes of all VB scripts of this picture are displayed. In the
example above, a breakpoint (red point at the left margin) was set in the procedure
Circle3_BackColor_Trigger (Circle3 = name of the graphics object, BackColor =
name property, Trigger = cyclic VB script). Via the menu Debug/Step Over or with
F10 the script can be executed line by line. The line with the yellow background
will execute with the next F10 command.

Caution If a VB script is stopped, other VB scripts are not executed but entered in a queue.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 32 Scripts
IntelliSense If an object is given a period, a list with the properties and methods of this object
opens automatically. This is therefore an aid to completing a source code.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 33 Scripts
As can be seen from the example above, it is possible to create a source code
quickly and without typing errors. Further tips follow on the next pages.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 34 Scripts
Tag browser This can insert the tag name in a source code.

Extended tag browser


This dialog adds two lines to the source code. In the first it declares a tag and in
the second it links this tag with an object reference to a WinCC tag.

Other browsers The other browsers can be used to adopt picture names and graphics object
names in the source code free of errors.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 35 Scripts
Code template By double-clicking on one of the code templates, the "framework" of this
construction is inserted. This then needs to be filled in manually or adapted.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 36 Scripts
Objective Two further buttons need to be added to the Motor picture to adjust the setpoint
speed: "+ 20%" and "- 20%". The calculation is made this time with a VB script.
For diagnostics, the "HMIRuntime.Trace" command is used.

Exercise 1. Add two buttons with the texts "+20%" and "-20%"

2. For the button "+20%" edit a C script for event/mouse click as shown in the
picture above. Attempt to type in as little text as possible yourself, but rather use
the aids provided by the VBS editor (see previous pages).

3. The "Global Script - Diagnose" window still exists from the previous exercise
and can also be used for the VB scripts.

4. Test the function in runtime.

5. Copy the "+20%" button and adapt the labeling and the VB script so that the "-
20%" function is executed.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 37 Scripts
Objective
A second speed indicator is to be added to the Motor picture. However this time,
the solution will be achieved with a VB script. This is green in the normal situation,
with high speeds (higher than 1300 revolutions per minute) it should be red.

Exercise 1. Add a circle to the Motor.pdl picture.

2. Add the VB script above to the object properties in the Properties tab under
Colors/ Background Color.
Use the tag trigger.

3. Start Runtime and test the functionality.

OPTIONAL
4. Start the debugger and then set a breakpoint in the line "Speed.Read". Then
have the script executed line by line to check which branch of the if loop is run
through.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 38 Scripts
Tags in VBS actions
The CrossReference from WinCC can be used to quickly find all the places of use
of tags and picture names, even in VBS actions. Tags in actions in the Graphics
Designer can be "linked" using CrossReference, i.e. replaced by other tags at all
or selected points.
Configuration rules for VBS scripts
All tags that you address with the standard formulation
HMIRuntime.Tags("tag name")
are automatically detected by the CrossReference of WinCC and then listed in the
picture properties.
If tags are addressed with different formulations in your code, you can make this
known by the following section of the CrossReference:
' WINCC:TAGNAME_SECTION_START
Const TagNameInAction = "TagName"
' WINCC:TAGNAME_SECTION_END
Note Between the single quote WINCC, there must be a space!
All the pictures which are addressed with the standard formulation
HMIRuntime.BaseScreenName("Screenname")
are automatically detected by the CrossReference of WinCC and then listed in the
picture properties.
If pictures are addressed with different formulations in your code, you can make
this known by the following section of the CrossReference:
' WINCC:SCREENNAME_SECTION_START
Const ScreenNameInAction = "ScreenName"
' WINCC:SCREENNAME_SECTION_END
Note Picture names must be written without the file extension ".PDL".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 39 Scripts
VBS actions
With VBS actions, very extensive actions, checks and queries can be processed.

Configuration
VBS actions can be used where the direct connection to individual tags is not
adequate or several properties need to be changed at the same time.
With the aid of the VBS actions, the user has complete access to all available
object properties and tag contents from WinCC.

Function procedures
To group repeating or often used functions, procedures can be used. Functions
normally have a return value.

Sub procedures
A sub procedure is a code block that is executed as a reaction to an event and
does not supply a return value.

Local script variables


Local script variables must be defined by the Dim, Private or Public statement and
only apply within the VBS action.

Picture-specific script variables


In the declaration area of the action window, picture-specific variables can be
declared.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 40 Scripts
Writing multiple tags
One SetTagMultiWait() for multiple tags is better than many individual
SetTagxxx().
The values of several tags are set in one write job. The function is ended after the
AS has reported back acceptance of the value.

Example BOOL ok;

ok=SetTagMultiWait("%d%d%f",
Setpoint1", 16,
Setpoint2", 500,
Setpoint3", 55.4711);

With the format descriptors, the following type is expected:


%d = DWORD / Int
%f = double
%s = char*

Note When accessing the I/Os a considerably higher reaction time must be expected.
Remedy: Addressing via memory bits or data blocks.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 41 Scripts
Contents Page
Training aims ...................................................................................................................................... 2
Global Script editors ............................................................................................................................ 3
Global Script C editor .......................................................................................................................... 4
Global Script C editor Example of a function ...................................................................................... 5
Global Script C editor Example of an action ....................................................................................... 6
Global Script VBS editor Example of a function .................................................................................. 7
Global Script VBS editor Example of an action ................................................................................... 8
Exercise 1 (optional): Global Script .................................................................................................... 9

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Global Script
The participant will:

Get to know the differences between the various types of function


Be able to create simple functions
Be able to create actions for background processing

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Global Script
General Global Script is a generic term for functions and actions with ANSI-C and VBS.
A separate editor exists for each of the two programming languages.

Actions are scripts that run in the background and that are independent of the
currently selected picture. With actions, a trigger therefore needs to be defined.

Many functions are made available as soon as WinCC is installed. With the
Global Script editors, however, you can write your own functions. Functions
contain tasks that are repeated, for example calculating a mean value. These
functions are then called in other scripts. For this reason, no trigger can be defined
here.
In the figure above, you can see two simple functions for the addition of 2 values.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Global Script
Password Self-created functions or actions can be given a password to protect your own
know-how. The entry of the password is made in the Info/Trigger box (ctrl + I or
click on the clock symbol).

Actions For the actions, there are two subfolders in the figure above. One folder with the
computer name of the single-user station and "Global actions". With WinCC
server-client configurations, there is one folder per computer. This means it is
possible to specify for an action that it should, for example, only run on a specific
computer.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Global Script
Creation In the Global Script C editor, you can create your own functions. The example
above has two parameters "a" and "b", both are of the type integer. The function
has a return value also of the type integer:
int Add_Function(int a, int b)
If the function did not have a return value, the first line would appear as follows:
void FunctionXYZ(int a, int b)
With the return command, the result is returned to the calling location.

Use The function can be called up in pictures or global C actions.

In the example above, the call is at an I/O field in a picture.

Copying functions between WinCC projects


Project functions are stored in the "Library" subfolder of the WinCC project with the
file extension *.fct. Similar to the pictures, they can be copied from one WinCC
project to another. In this case, the function "Options/Regenerate Header" must be
called in the target project in the Global Script C editor. Only after this are the
copied functions visible in the editor.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Global Script
Global action In the example above, a variable is incremented to 100 depending on the WinCC
tag SimOnOff, the value then jumps back to zero.

Since the trigger is fixed at one second, this action is started every second. In this
case this is wanted and a tag trigger cannot be used here.

Computer properties
When global actions need to be started, the component "Global Script Runtime"
must be activated in the computer properties.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Global Script
Project modules
Here, configuration engineers themselves can create new functions.
Several functions can be contained in one module. The module
VBS_Module1.bmo is located in the subfolder "ScriptLib" of the WinCC project.
Standard modules
Once again, the configuration engineer can create new functions here. In contrast
to project functions, cross-project standard procedures are available in all the
projects located on the PC.
Several functions can be contained in one module.

Actions See following page

Code templates As in the VBS editor in the Graphics Designer

Example of a function The function above calculates the sum of the transferred parameters.

With the line "MyAddFunction = value1 + value2 the sum is returned to the calling
location.

Sub or Function Sub name1(Item) Function procedure1



End Sub End Function
-> without return value -> with return value

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Global Script
Actions: VB scripts that can run independently in the background of WinCC Runtime.
The file extension for VB actions is *.bac. These files are located in the subfolder
"ScriptAct" of the WinCC project.

Computer properties
When global actions need to be started, the component "Global Script Runtime"
must be activated in the computer properties.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Global Script
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 9 Global Script
Contents Page
Training aims ...................................................................................................................................... 2
User Administrator Introduction ........................................................................................................... 3
User Administrator Defining authorization levels ........................................................................... 4
User Administrator Defining user groups and their rights (example 1) ............................................. 5
User Administrator Defining user groups and their rights (example 2) .............................................. 6
User Administrator Assigning users and user groups ......................................................................... 7
User Administrator Group rights and user rights ............................................................................... 8
User Administrator Editor Authorization levels ................................................................................ 9
User Administrator Editor Groups ...................................................................................................... 10
User Administrator Editor Users ..................................................................................................... 11
User Administrator Access protection ............................................................................................ 12
User Administrator Logging in and out of operators ........................................................................ 13
User Administrator UserAdminControl - User administration in runtime .......................................... 14
Exercise 1: Adapting authorization levels .......................................................................................... 15
Exercise 2: Defining user groups and their rights ..................................................................... 16
Exercise 2: Defining user groups and their rights ..................................................................... 17
Exercise 3: Creating users ............................................................................................................. 18
Exercise 4: Buttons for logging users in/out ................................................................. 19
User Administrator SilentLogin in runtime ........................................................................................ 20
SIMATIC Logon ............................................................................................................................... 21

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 User Administrator
The participant will:
Be able to create and change authorization levels
Know the relationship between user groups and users
Be able to protect any objects in pictures
Know the options for logging users in and out

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 User Administrator
General information With the User Administrator, the assignment and management of access
rights preventing unauthorized access can be configured; in other words all
operator input to the process, the archives and the WinCC system can be blocked
to prevent unauthorized access.

If no user is logged in or the user does not have adequate rights, the operator input
will not be executed and the box shown above is output.
Examples of operator input are changes to setpoints, recipes, selecting pictures or
calling up the configuration software from process mode.
There are different access levels which allow the setup of a hierarchical
access protection scheme, such as exclusive authorizations for
individual operators.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 User Administrator
Authorization levels
Up to 999 of your own authorization levels can be created. The names of your own
authorization levels can be freely selected.
As of ID 1000, there are system-defined authorization levels that cannot be
changed by the configuration engineer.

As long as no operator control objects are protected by authorization levels, the


authorization levels have no effect in runtime.

Example 1 Here, an example of hierarchical access protection is shown. For more important
operator input, a higher authorization level is required. If the operator logs in with a
"level 3" authorization, he or she also has the authorizations below this level.

Example 2 This example shows different authorization levels assigned independently of each
other. This principle is often used in WinCC projects.

How these two principles are implemented in WinCC is explained on the following
pages.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 User Administrator
Example 1 Here, you can see how hierarchical access protection can be configured.

Four user groups are defined. The lowest group "Operator" only has authorization
for "Level 1". The next group up "shift supervisor" has the authorization for "Level
1" and "Level 2", the "process engineers" have access at "Level 1" to "Level 3" and
the "service" group has all authorization levels and can therefore access all
protected objects.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 User Administrator
Example 2 This shows the second principle with different authorization levels independent of
each other.
The names of the authorization levels are selected so that they describe the
subsequent options.
Once again there are four user groups. The authorization levels can however be
assigned completely freely.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 User Administrator
Procedure After practical user groups have been defined, the operators of the plant need to
be assigned to one of these groups.
A user can only be in one group, a group, on the other hand, can contain several
users.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 User Administrator
Rights With the assignment of a user to a group, the user inherits the group rights. This
allows more effective configuration.

Following this, individual users can be assigned additional rights (in the example
above, the user "A. Schmidt" receives the additional right "Change controller
settings"). It would also be possible to take rights away from individual users.

The question is now whether the group rights of a user or the rights assigned to
the user (user rights) take effect in runtime. In WinCC, the rights assigned to the
user are always crucial.
Exception: When using the option SIMATIC Logon, the group rights are relevant.

If the rights of a group are changed (in the example above the group "process
engineers" has an extra right assigned) this does not affect the existing users of
this group. Only when new users are created do they inherit the current rights.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 User Administrator
Starting the editor The editor is started as usual by double-clicking in the WinCC Explorer.

Depending on the selection of a level in the navigation area, the corresponding


options are displayed in the middle window (table).

If, for example, you select the highest level "User Administrator", the tabs "Groups
[all], "Users [all] and "Authorization levels [all]" are displayed.

New Group A further user group can be created using the shortcut menu (see figure) or in the
"Groups [all]" tab.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 User Administrator
Editor Depending on the selection of a level in the navigation area, the corresponding
options are displayed in the middle window (table).
Here, the "Operator" user group was selected. This allows the authorizations of
this group to be enabled in the Authorizations tab. Changing e.g. the name of the
group is not possible here.
The "Users" tab shows all the users of this group.

New User A further user can be created using the shortcut menu (see figure) or in the "Users
[Operator]" tab.

Properties Here, an automatic logout can be set. This property is inherited by new users of
this group.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 User Administrator
User If a user is selected, only the "Authorizations" tab is shown in the table area. These
relate to the selected user.

Properties Here, for example, an automatic logout after an absolute time or after an inactive
time can be set. In the example above, no password has yet been assigned.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 User Administrator
Assigning authorizations
To prevent manipulation of graphics objects (e.g. button, slider, I/O box, check box
etc.), the relevant graphics object must be protected. This is achieved by setting
one of the configured authorization levels in the property
Miscellaneous/Authorization.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 User Administrator
Configuration Defining hotkeys for logon and logoff, see the example in the figure above.
With the operator input e.g. Ctrl L, you call a system box in the runtime system
via which you can enter the login name and the password so that
as the user, you have password-protected access. With
e.g. Ctrl O, you log off again so that no one can access protected
objects after you. The login name and password
are assigned with the
User Administrator editor.

Note In the example above, no hotkey has yet been defined.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 User Administrator
UserAdminControl This control is available as of WinCC V7.3.

Here, properties of users (e.g. passwords) or the authorization levels can be


changed. New users can also be created.

Depending on whether the logged on users have the right with ID = 1 (the name of
the authorization level is not relevant), they can only change their own properties
or the properties of all users.
In the example above, the user "Klaus" is logged on and has the user right with ID
= 1. This allows him to view and edit the other users.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 User Administrator
Objective The existing project is to be expanded with a user administration.

Exercise 1. If it is running, exit WinCC Runtime.


2. Open the "User Administrator" editor.
3. Go to the "Authorization levels [all]" tab.
4. Create the 5 authorization levels shown in the figure. To do this, you can
rename existing levels or create new ones. The order or the ID (with the exception
of ID = 1) are not relevant for the function in runtime.
5. You can delete unused authorization levels.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 User Administrator
Exercise 1. Create three new groups:
- Operator
- Shift supervisor
- Service

2. Change the following properties for all three groups:


- Logout / Type of automatic logoff: Inactive
- Logout / Period of time before automatic logoff: 10

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 User Administrator
Exercise 3. Select the first group "Operator" and change the group rights as shown in the
figure.

4. Also adapt the group rights for the groups "Shift supervisor" and
"Service".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 User Administrator
Exercise 1. Create a new user in the "Operator" group with the name "Peter". Then assign
a password (to keep things simple in the exercises we select the password
123456 for all users, for real plants, secure and different passwords should
be selected.)

2. Create a new user in the "Shift supervisor" group with the name "Paul". Then
assign a password.

3. Create a new user in the "Service" group with the name "Mary". Then assign a
password.

4. Compare the authorizations of the group with those of the user in this group.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 User Administrator
Objective In the overview area of the start picture, two buttons for logging WinCC users on
and off need to be added. The picture should also show which user is currently
logged on.

Exercise 1. In the Start.pdl, add two buttons and label them with "Login and "Logout".

2. Add the C scripts OnClick shown above to the relevant buttons.

3. Add a static text and connected with the system tag @CurrentUser. This tag is
generated as an internal tag (string tag) when a project is created.

4. Apply an operator authorization to the "Exit runtime" button.


To do this, go to Miscellaneous/Authorization in the properties and then select
the authorization level "Exit Runtime".

5. Test the functions in runtime.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 User Administrator
SilentLogin With a further function (PWRTSilentLogin()) a user can be logged in silently by a C
script.

With this function, a standard user could be logged in automatically when WinCC
Runtime starts. To do this, the C script must be configured for the picture selection
of the start picture event.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 User Administrator
SIMATIC Logon In previous versions "SIMATIC Logon" was a WinCC option that needed to be
purchased. As of WinCC V7.0, this option ships with WinCC.

With this option, it is possible to implement a central user administration for


several WinCC projects. For this reason in the "SIMATIC Logon" logon dialog, a
computer or a domain needs to be specified on which this central user
administration is managed.

Login tag With this function, a user can be logged in very easily via the controller. To do this,
a process tag must be defined. Depending on the value of this tag, different users
can be logged in automatically. This, for example, allows a user to be logged in to
WinCC Runtime via a key switch connected to the controller.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 User Administrator
Contents Page
Training aims ...................................................................................................................................... 2
Faceplate technique with picture window and tag prefix Idea ............................................................ 3
Faceplate technique with picture window and tag prefix 4 steps in configuration ............................... 4
Faceplate technique 1st step: Defining a structure type .................... 5
Faceplate technique 2nd step: Creating a structure tag .............. 6
Faceplate technique 3rd step: Configuring a faceplate for motor .............. 7
Faceplate technique 4th step: Using a faceplate in pictures ............ 8
Exercise 1 Part 1 Faceplate technique with picture window and tag prefix ........................................ 9
Exercise 1 Part 2 Faceplate technique with picture window and tag prefix ........................................ 10
Faceplate technique Titles for picture window ................................................................................ 11
Faceplate technique Automatic titles for picture window .. 12
Faceplate technique A picture window for displaying several structure tags ... 13
Exercise 2 A picture window for displaying several structure tags .................................................. 14
Faceplate technique Example with external tags ............................................................................. 15
Faceplate technique Exception for tag prefix ................................................................................ 16
Faceplate technique Adaptations to a structure type ......................................................................... 17
Faceplate technique with faceplate types Idea .................................................................................. 18
Faceplate technique 4th step in configuration: ................................................................................. 19
Faceplate technique with faceplate types 3rd step New faceplate type 1/3 ..................................... 20
Faceplate technique with faceplate types 3rd step Configuring a faceplate type 2/3 ....................... 21
Faceplate technique with faceplate types 3rd step Configuring a faceplate type 3/3 ....................... 22
Faceplate technique with faceplate types 4th step: Faceplate instance 1/2 ........................................ 23
Faceplate technique with faceplate types 4th step: Dynamizing faceplate instance 2/2 .................. 24
Exercise 3 Part 1 Faceplate technique with faceplate types .............................................................. 25
Exercise 3 Part 2 Faceplate technique with faceplate types .............................................................. 26

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Faceplates
The participant will:
Learn about the benefits of a faceplate technique
Be able to use the technique "picture window with tag prefix"
Know the possibilities of faceplate types

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Faceplates
Faceplate technique
The idea behind a faceplate technique is to create a standard for pictures and then
to be able to use this many times simply. A faceplate for motors, another for valves
and a third for conveyors etc. could be created. The use of a faceplate technique
shortens the configuration times significantly.
Time is also saved later when adaptations are made to a faceplate. The change is
configured once and is effective x times.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Faceplates
1st step: Defining a structure type
All the elements required in HMI are defined. In the example above, 4 elements
were defined.
2nd step: Creating a structure tag
A structure tag is defined for each motor. WinCC then automatically creates the
structure tag elements (Motor1.setpoint_speed, Motor1.actual_speed etc.). This
saves time.
3rd step: Configuring a faceplate
A faceplate is configured like a normal picture only this is typically significantly
smaller. The dynamizations (tag connections, dynamic dialogs, C scripts, VB
scripts, direct connections etc.) are also already configured here.

4th step: Using the faceplate


The faceplate ("small WinCC picture") is inserted in a "large WinCC picture" via
the picture window object. Several and even different faceplates can be inserted.
Only at one point is it defined from which structure tag the values will be displayed.
The individual structure tag elements do not need to be linked (time-saving).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Faceplates
Defining a structure type
In the tag management, in the shortcut menu of "Structure tags" the new structure
types can be defined. After this, elements can be defined in the "Structure type
elements" tab. The properties of an element are, for example, the name, the data
type and external or internal.
External elements If the "External" property is enabled, an "AS offset" must also be entered.
Example: On the controller, there is an FB (function block) for controlling a motor.
In the corresponding instance data block, the data for the relevant motors is
stored.
The value for the setpoint speed is always located at the start of the data block
(e.g. DB1, DBW0), the actual speed is stored starting at byte 18 (e.g. DB1,
DBW18).
According to this structure in the instance data block, the "AS offsets" are then
configured in WinCC:
Element AS offset
Setpoint speed 0
Actual speed 18

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Faceplates
Creating a structure tag
Once the structure has been defined this can be stored in the "Structure tags" tab.
If, for example, there are 10 motors in the plant, the structure tags Motor1, Motor2,
... Motor10 are created.
The structure tag elements are created automatically by WinCC.
External elements The example from the previous page is continued:
According to this structure in the instance data block, the "AS offsets" were
configured in WinCC as follows:
Element AS offset
Setpoint speed 0
Actual speed 18
Now a structure tag for Motor1 is created and the start address needs to be
specified: DB1, DBB0
With the offsets and the start address, WinCC can then automatically calculate the
addresses of the individual elements;
Structure tag elements Address
Motor_1.setpoint_speed DB1, DBW0
Motor1.actual_speed DB1, DBW18

The data for Motor2 is located in DB12:


Structure tag elements Address
Motor_2.setpoint_speed DB12, DBW0
Motor1.actual_speed DB12, DBW18

WinCC license If the elements of the structure are external, each element counts as a powertag
related to the required WinCC license.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Faceplates
Configuring a faceplate
The elements defined in the structure type are to be visualized in a small
"standard" picture (faceplate). The actual speed needs to be displayed with a
gauge control and additionally with an I/O field.
To do this, the I/O field is first connected to the structure tag element (here
"Motor1.actual_speed"). Afterwards the configured tag name is manually
shortened by the name of the structure tag (in this case "Motor1") so that only
".actual_speed" remains.
The same procedure needs to be repeated for the gauge control.
This means that the faceplate can be used later for different motors.

Other dynamizations
All types of dynamization can be used. The procedure above applies analogously
to dynamic dialogs, C scripts etc.
In contrast to the scripts, in the dynamic dialog a check is made to establish
whether the tag used also exists in the tag management. A tag ".actual_speed" will
however not exist so that a box with a corresponding note appears. This box can
be closed with the " Ignore" button.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Faceplates
Using the faceplate
To use the "small standard picture" (faceplate), a picture window with the size of
the small picture is inserted in a larger picture. The "small picture" is then
displayed in runtime in this picture window.
To do this, the "Picture name" property of the picture window must be set (here:
"PB_Motor.pdl").
As a further property, "Tag Prefix" is set. Here the name of the structure tag
"Motor1" is added again. As a result, in runtime every tag within this picture
window has a prefix. ".actual_speed" becomes "Motor1.actual_speed" again.

If the values of Motor2 also need to be displayed, the upper picture window must
be copied and only the tag prefix property changed to "Motor2".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Faceplates
Objective In the picture "Motors_with_PB.pdl, the faceplate "PB_Motor.pdl" should be shown
in two different picture windows. The corresponding structure tags will be
addressed via the tag prefix (Motor1. and Motor2.).
Exercise 1. Define a new structure type "Motor type" with the structure elements
setpoint_speed, actual_speed, direction and on_off Take the data types from
slide "1st step: Defining a structure type". To simplify matters, all elements are
internal.
2. Generate the structure tags "Motor1" and "Motor2" based on the
structure type "Motor type as shown in slide "2nd step:Creating a structure tag".
3. With the Graphics Designer, create a new picture with the name
"PB_Motor.pdl" (picture width: 300, picture height: 450).
To display the actual speed, configure an I/O field and a gauge control.
Connect the two objects to the ".actual_speed" tag.
For the setpoint speed, an I/O field and two buttons "+20%" and "-20%"
will be configured. All objects relate to the ".setpoint_speed" tag. The VB script
for "+20%" appears as follows:
Sub OnClick(ByVal Item)
Dim S7
Set S7 = HMIRuntime.Tags(".setpoint_speed")
S7.Read
S7.Value = S7.Value * 1.2
S7.Write
End Sub
The script for "-20%" is very similar (( *0.8 instead of *1.2)
Save the this picture.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 Faceplates
Exercise continued
4. With the Graphics Designer, create a new picture with the name
"Motors_with_PB.pdl".
5. Add a button for selecting the Motors_with_PB.pdl picture to the
Start.pdl start picture. Save the modified start screen.
6. In the picture "Motors_with_PB.pdl" place two picture windows. The Geometry
properties are as follows: Position X: 20 or 340, Position Y: 20,
Window width: 300, Window height: 450).
The property Miscellaneous/Picture Name is "PB_Motor.pdl". In both picture
windows.
When you double-click on Picture Name, a box appears with a list of all picture
names.
As the tag prefix select "Motor1" or "Motor2".
7. Save the created pictures (File/Save All).
8. Start WinCC Runtime and test the functionality
of the newly created pictures.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 Faceplates
Titles To display a title of a picture window, the property "Title" must be enabled. The
property "Border" is automatically enabled with this, in other words a picture
window with a title and without a border is not possible.
The text that is displayed in the title is stored in the property "Title".
Since the border and the title line require space, the picture is truncated in runtime
at the right and bottom margin. This can be avoided if the "Adapt Picture" property
is enabled. The picture window is then increased in size so that the content can be
displayed 1:1.
With the "Adapt Picture" property, the picture would be displayed smaller and the
picture window would be displayed 1:1. This property can be combined sensibly
with "Sizeable".

Other useful properties are "Movable" (the operator can move the picture window
with the mouse) and "Closable" (an X is displayed at the top right in the picture
window).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Faceplates
Automatic titles
So that after copying picture windows, the title does not need to be adapted
manually, this can be automated.
To do this, the text for the "Title" property is deleted. You then change to the
Events tab. There under Miscellaneous/Object Change, a direct connection is
stored:
Source: this object, property: Tag prefix
Objective: this object, property: Title
With this, at runtime when the picture is being setup, the title is automatically
written with the name of the structure tag stored for the tag prefix.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 Faceplates
One picture window Customers often want the values of several motors to be displayed in one picture
window. To do this, the tag prefix e.g. of "Motor1" must be changed to "Motor2".
So that the tags are reread, a change to another picture is also necessary. This is
achieved in the VB script above by switching to invisible and then back to visible.

Alternative C script A C script could appear as follows:


#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
// Internal Functions/graphics/set/miscs
SetVisible(lpszPictureName,"Picture Window3",0); //Return-Type: BOOL

// Internal Functions/graphics/set/miscs
SetTagPrefix(lpszPictureName,"Picture Window3","Motor2");

SetVisible(lpszPictureName,"Picture Window3",1); //Return-Type: BOOL


}

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 Faceplates
Objective In the picture "Motors_with_PB.pdl", a third picture window will be inserted. With
the "Motor1" and "Motor2" buttons, it will be possible to decide which motor value
will be displayed in this picture window.
Exercise 1. Copy the first picture window in the "Motors_with_PB.pdl" picture and insert it
as picture window3. Adjust the following properties:
BorderYes
Title Yes
Adapt Window Yes
Movable Yes
Closable Yes

2. Add a direct connection to update the title automatically (for details, see the
slide "Automatic titles for picture window").
3. Add a button with the label "Motor1". Configure a VB script OR a C script to
switch the tag prefix to "Motor1" (for details see the slide "One picture window
to display several structure tags").
4. Create a copy of the Motor1 button and adapt it for Motor2.
Change the labeling and the script.
5. Test the required functionality in runtime.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 Faceplates
External tags To simplify matters, the previous example was done with internal tags. In practice,
however, external tags are often required.

Example:
On the controller, there is an FB (function block) for controlling a motor. In the
corresponding instance data block, the data for the relevant motors is stored. The
structure of these instance data blocks can be reproduced in WinCC.

To do this, the "External" property must be enabled for the structure type
elements. In addition to this, an "AS offset" (byte address) and "AS offset bit" need
to be specified.
In the structure tags, the start address of the data needs to be set.
The structure tag elements are created automatically by WinCC and the
addresses are calculated from the start address and the offset.
Note The example above was not created by the configuration engineer but by the tool
"Compile OS". This is only possible with integrated WinCC projects.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 Faceplates
Exception Sometimes it is necessary within a picture window with a tag prefix to access a tag
that is not an element of the structure tag.

Example:
Tag prefix is "Motor1", tag on the I/O field is "@CurrentUser"
In runtime WinCC attempts to access "Motor1@CurrentUser" -> this tag very
probably does not exist

Solution:
Tag prefix is "Motor1", tag at the I/O field is "@NOTP::@CurrentUser"
WinCC displays "@CurrentUser" in runtime because the prefix @NOTP (No Tag
Prefix) turns off the tag prefix.

Other possible system prefixes:


@NOSP:: no server prefix
@NOP:: No tag and no server prefix

Changes to the faceplate


In this example, we see a further advantage of this faceplate technique: Can be
changed centrally. This means that adaptations only need to be made at one
location. This adaptation takes effect at the latest after changing to another picture
at all places of use.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 Faceplates
Changes to a structure type
Up to WinCC version 7.0 it was not possible to make changes to a structure type
as long as structure tags were defined with this structure type. As of WinCC V7.2,
this behavior has been improved.

Now, if for example a further element is added to the structure type, the structure
tags are now automatically adapted and the new element is added to all existing
structure tags.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 Faceplates
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 18 Faceplates
Step 1: Defining a structure type
All the elements required in HMI are defined. In the example above, 4 elements
were defined.
Step 2: Creating a structure tag
A structure tag is defined for each motor. WinCC then automatically creates the
structure tag elements (Motor1.setpoint_speed, Motor1.actual_speed etc.). This
saves time.
Step 3: Configuring a faceplate
A faceplate is configured like a normal picture only this is typically significantly
smaller. The dynamizations (tag connections, dynamic dialogs, C scripts, VB
scripts, direct connections etc.) are also already configured here.

Step 4: Using the faceplate


The faceplate ("small WinCC picture") is inserted in a "large WinCC picture" via
the picture window object. Several and even different faceplates can be inserted.
Only at one point is it defined from which structure tag the values will be displayed.
The individual structure tag elements do not need to be linked (time-saving).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 Faceplates
Creating a new face plate type
Similar to when creating a picture (*.pdl), almost all graphics objects can also be
used in a faceplate type (*.fpt). You cannot use the object types "connector",
"customized object", "application window", "picture window", "OLE object",
"faceplate instance", the symbols of the HMISymbol library and all of the controls.
Step 1 A new file of the type*.fpt is first created.
Step 2 The required graphics objects are inserted in a picture and adapted.
Step 3 It is useful but is not absolutely necessary to give the objects practical names. This
is helpful in the next configuration step.

Additional options
Within a faceplate type, faceplate-internal tags can be created (Edit -> Edit
Faceplate Tags).
It is also possible to create dynamizations within the faceplate type. Direct
connections of tags from tag management, direct connections, dynamic dialogs, C
scripts are not possible. Only VB scripts can be used.
For this reason dynamizations are often made "from the outside" on the faceplate
instance (see the following pages).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 Faceplates
Configuring a faceplate type
Here we define which properties and events will later be available for the faceplate
instance. Tags or for example dynamic dialogs can then later be linked.
Step 1 The configuration screen is opened.
Step 2 Under Objects all the objects existing in this faceplate type are listed. Here, the
practical renaming of these objects that you performed earlier is helpful. After
selecting an object, its properties are displayed in the right-hand window. The
property that will be required later can be dragged to the left-hand window.
Step 3 This is how the result appears after dragging the property.
Step 4 Once again practical renaming here is helpful for later use. Simply click "Rename"
in the shortcut menu.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 Faceplates
Result At the top, you can see which properties were made external. From both I/O fields,
the output value was selected so that later the corresponding tags can be linked.
Also the process value for the bar.
It would, for example, also be possible to select the background color of an object
to configure dynamization with this later.

With the events, the mouse click was selected for both buttons.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 22 Faceplates
Faceplate instance A faceplate type can be used by inserting faceplate instances in pictures. To do
this, the faceplate instance object (under Smart Objects) is positioned in the
picture and the fpt file is queried automatically. The fpt file defines the appearance
of the instance (for a motor, for a valve etc.).
Scaling mode One property of the instance is the Scaling mode. This can be "proportional, "1:1"
or "not proportional".
If "1:1" is selected, the size of the instance should be at least as large as the type,
otherwise objects may be clipped.
With "proportional", the height and width of an instance are adapted with an
increase or reduction in the same ratio. There is no distortion.
With "not proportional", the height and width of the type are adapted so that it
completely fills the size of the instance. In this case, objects may be distorted.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 23 Faceplates
Dynamic In the last step, the faceplate instances are dynamized. For both I/O fields and for
the bar, elements of the structure tag Motor1 are linked.
Then two VB scripts were added to increase or reduce the setpoint speed via the
two buttons.
All the types of dynamization are possible for a faceplate instance (also dynamic
dialogs, direct connections, ...).

Effective configuration
If an instance for a second motor now needs to be dynamized, it would not be
effective if several individual tags needed to be linked again and VB scripts
needed to be written.
It is easier simply to copy the instance with dynamizations and then use the "Link"
function to adapt the tag names from Motor1... to Motor2... This also works for tags
used, for example, in C or VB scripts (keep to the rules for cross reference).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 24 Faceplates
Objective In the picture "Motors_with_FPT.pdl", two faceplate instances will be inserted and
dynamized.
Exercise 1. Create a new faceplate type with the name "FPT_Motor.fpt".
2. Add the objects shown on the slide "3rd step: New faceplate type 1/3" and
rename these practically (suggestion see the slide mentioned above:
Bar_actual_speed etc.).
3. Open the configuration dialog (Edit/Configure Faceplate Type) and select the
following properties:
- "Process" property from the bar for the actual value
- the "OutputValue" property of the two I/O fields
Select the following events:
- Click the "+20%" button
- Click the "-20%" button
Rename the selected properties practically. A suggestion can be found on slide
"3rd step: Configuring a faceplate type 3/3"
4. Create a new picture with the name "Motors_with FPT.pdl".
5. Add a button to the start picture to select this picture.
6. Insert the Smart Objects/Faceplate Instance object in the picture
"Motors_with_FPT.pdl". As template select "FPT_Motor.fpt". Set the Scaling
mode property to "1:1" and adapt the size of the instance so that all objects can
be seen.
7. Dynamize the faceplate instance by linking 3 tags and with two VB scripts. For
details see slide "4th step: Dynamizing faceplate instance 2/2"
8. Test the functionality in runtime.

Continued on next page

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 25 Faceplates
Exercise continued
9. Return to the Graphics Designer and create a copy of the
existing faceplate instance.
10. Then in the shortcut menu of the copied instance, open the
Linking dialog (Linking -> Tag connections).
11. Go to the "Find and Replace" tab.
12. The connected tags must be relinked from Motor1 to Motor2.
a) Enter the original search text
b) enter the replacement text
c) Since all displayed tags need to be linked, click "Select all". Afterwards, the
two lines are selected.
d) By clicking "Preview", the changed names are displayed in
the Preview column and can be checked.
e) Finally click "Replace". This links the tags.

13. Check the linked tags (also in the VB scripts).


14. Change to WinCC Runtime. After changing pictures, you will see the changed
picture and can test it.

Effective configuration
With this linking function, entire pictures with many objects can be linked. This also
works for tags used in dynamic dialogs, C or VBS scripts (keep to the rules for
cross reference) or in direct connections.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 26 Faceplates
Combination The two options shown of faceplate technique (tag prefix and faceplate types) can
also be combined well. A faceplate instance can be used to display the most
important information for example of a motor in the picture. If all information and
operator input options need to be displayed, the operator clicks on the motor
symbol and a picture window opens showing the data of this motor.
Advantages With the faceplate technique with a tag prefix, there is a disadvantage. If many
small visible picture windows are used in a picture, when a picture is selected, the
tags are first requested from the controller for the first picture window, then from
the second, then from the third etc. This can lead to long picture build times. This
disadvantage does not occur with faceplate instances.
Both the picture shown in the picture window and the faceplate types can be
changed centrally. Only the dynamics linked to the faceplate instance must be
adapted each time. Here, however, the "Linking" function is very helpful.
The faceplate instance also has the advantage that the format can not only be
rectangular but also, for example, round.
The spaces between the objects within the faceplate instance are also transparent
(see Motor4). A picture window cannot be transparent.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 27 Faceplates
Contents Page
Training aims ....................................................................................................................................... 2
Preparing for configuration .............................................................................................................. 3
Overview .......................................................................................................................................... 4
Process value archive Principle .......................................................................................................... 5
Process value archive Data storage ................................................................................................... 6
Measured value archiving and processing ........................................................................................ 7
Tag Logging editor Overview ........................................................................................................... 8
Tag Logging editor Cycle times and time series ............................................................................... 9
Tag Logging editor Archives .............................................................................................................. 10
Tag Logging editor Archive configuration ........................................................................................... 11
Tag Logging editor Archive configuration ........................................................................................... 12
Tag Logging editor Archive configuration ........................................................................................... 13
Tag Logging Editor Properties of archive tags 1/2 .............................................................................. 14
Tag Logging Editor Properties of archive tags 2/2 .............................................................................. 15
Tag Logging editor Type of archiving ................................................................................................. 16
TagLogging Runtime OnlineTrendControl and RulerControl ............................................................. 17
TagLogging Runtime OnlineTableControl ......................................................................................... 18
TagLogging Runtime Data storage .................................................................................................. 19
Exercise 1: Creating a new cycle time and new archive ..................................................................... 20
Exercise 2: Creating new archive tags ........................................................................................... 21
Exercise 3: Archive configuration ....................................................................................................... 22
Exercise 4: Creating a trend picture .................................................................................................... 23
Exercise 4: Creating a trend picture .................................................................................................... 24
Exercise 5: Function test in runtime .................................................................................................... 25

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Tag Logging
The participant will:

Get to know the advantages of Tag Logging


Be able to create cycles and archives
Be able to create new archive tags
Be able to configure archives
Be able to create trend pictures

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Tag Logging
Preparing for configuration
Process coupling
Defining tags for archiving

Measured value acquisition


Grouping of all measuring points and their archiving cycles
Specifying the time period for archiving
Defining the content and appearance of the trend window
Specifying trend pictures

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Tag Logging
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 4 Tag Logging
General With Tag Logging, tags from the PLC are displayed in WinCC in the form of trends
and tables, possibly also archived and logged.

To allow the history to be followed as well, the measured values are stored on the
hard disk in a cyclic buffer.

Measured value WinCC fetches values from the controller cyclically. The shortest cycle for
acquisition and archiving is 500 ms. The time stamp with the PC time is added by
WinCC.

Measured value frame


Here, the cycle can be shorter than 500 ms. The values to be archived are first
collected on the controller and then sent to WinCC in a measured value frame.
The time stamps are also included in this frame.

License The basic software WinCC includes 512 free archive tags. For extensive
configurations, an extension is available with powerpacks (at a charge).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Tag Logging
Archiving To archive measured values, WinCC uses a circular archive with a configurable
size that you can configure with or without backup.
Storage of the archive files is always on the local computer in the corresponding
project.
The WinCC measured value archive consists of multiple individual segments. You
can configure both the size of the measured value archive and the size/time of the
individual segments in WinCC:
Example: The measured value archive archives all measured values that occur
within one week (1), each individual segment records the measured values that
occur within one day (2).
You can always configure both conditions at the same time. If either of the two
criteria (time or size) is exceeded, the following happens:
Criterion for measured value archive (DB) is exceeded (1)-> the oldest measured
values (in other words the oldest single segment) are deleted.
Criterion for single segment exceeded (2)-> A new single segment (SS) is created.
A new single segment is also created when you configure TagLogging data online
(when downloading changes online).

Connectivity Pack is a WinCC option that must be purchased.


With OLE-DB, it is possible to directly access archive data saved in the MS SQL
Server database by WinCC. The OPC HDA (Historical Data Access) and OPC
A&E (Alarms & Events) servers allow access to historical data of the WinCC
archive system or for forwarding / acknowledging messages.

IndustrialDataBridge is also a WinCC option that must be purchased.


Configurable connection to databases and IT systems. For the connection of
WinCC, the WinCC OLE-DB Provider is available.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Tag Logging
General Measured values are acquired in the acquisition cycle by the WinCC system and
saved on hard disk in the archiving cycle. Note that only the values for the
archiving cycle are written. Values that were acquired in the acquisition cycle are
used only for the calculations mentioned above but are not stored in the archive.

Processing WinCC Tag Logging makes the following processing available for measured
values:
- Sum
- Mean value
- Minimum value
- Maximum value
- Free arithmetic with C scripts
- Difference

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Tag Logging
Configuration user interface
After calling Tag Logging, the layout shown in the figure above is displayed on the
monitor:
- On the left in the navigation area, times and archives are displayed in a tree
structure. In the example above, 4 archives have already been created.
- In the middle section (table area), depending on the selection the lower-level
elements are displayed in the navigation area. Changes to properties can be
made directly in the table.
- In the right-hand window, properties can also be changed. In the
example above an archive tag was selected, so that its properties are now
displayed on the right. If, for example, the archive itself is selected, its
properties can be changed.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Tag Logging
Cycle times If the existing cycles are not adequate, additional cycles can also be defined. In the
figure above, the cycle "5 seconds" was added.

Time series Time series can be daily, weekly, monthly or annually.

Examples:
- Daily, every 2 days
- Weekly every Monday
- Weekly every 2nd Monday
- Monthly, on the 5th day
- Monthly, every 2nd month, on the 5th day
- Annually on October 18

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 Tag Logging
Process value archives
Here, internal or external tags are written to the TagLogging runtime database
typically cyclically. Later, these archived values will be made available to the
operator in a trend display over the time or in a table display.
The storage location is typically the hard disk. As an alternative, main memory
would also be possible.

Creating several archives serves mainly to group the archive tags. The size
CANNOT be set in the properties of a process value archive.

Compressed archives
In compressed archives, values from existing process value archives are stored in
a further archive and the values are compressed. The compression time can be 1
minute, 1 hour or 1 day.
Example:
Values are archived in the process value archive every second. In the compressed
archive one value is archived per minute that is calculated, for example, from the
maximum value of the 60 second values from the process value archive.
The following functions can be used:
Mean value, sum, minimum value, maximum value, difference and weighted
average value

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 Tag Logging
Archive configuration
The data for TagLogging Runtime is saved either in the "TagLogging Fast" or in
the "TagLogging Slow" database. The settings relating to the size of the database
etc can be made in the properties. For details, refer to the next page.

Resetting This function is possible only when runtime has not started. With this, all the
corresponding database segments are irretrievably deleted after a warning box
has been confirmed. If all TagLogging databases need to be deleted, TagLogging
Fast and TagLogging Slow need to be reset.

Connecting an archive
If values from database segments that are no longer connected to the SQL Server,
need to be viewed in WinCC Runtime, these segments must exist on the local
hard disk. Following this, the function "Link archive" can be used.
Disconnect from archive
Only the database segments you have connected yourself can be disconnected
again with this function. The file is not deleted on the hard disk.

Functions in WinCC Runtime


Corresponding functions for linking and disconnecting are also available in WinCC
Runtime. The advantage of this is that the operator does not need to change to the
configuration. In the figure above, for example, the OnlineTrendControl is shown.
This is also possible in the AlarmControl.
After linking a segment, the data is immediately available and can be viewed, for
example, by paging in the archive.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Tag Logging
Here, you specify the period for which the data is archived and as of when the data
will be overwritten. Depending on the archiving cycle a fast and slow archive are
created. The data is stored in both archives compressed.

Archive configuration
The "time period of all segments" or "Maximum size of all segments" relates to the
entire archive. If one or other limit is exceeded, old segments are deleted.

The "Time period covered by a single segment or "Max. size of a single


segment" relates to archive slices. This means that the archive can be distributed
in several database files. If one of the limits is exceeded, a new segment is
created.

The "Time of the segment change": Here, a defined start time can be entered, for
example if there is daily segmentation, each segment will start at midnight. If the
project is started the first time at 4 p.m., the first segment covers the period from 4
p.m. to midnight. Following this, each segment covers the time from midnight to
midnight.

The archive configuration can be specified separately for TagLogging Slow and
TagLogging Fast.

Note Each time there is a change in the configuration, a new segment is started in RT.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 Tag Logging
Backup configuration
As an option, an automatic backup can be set here. When this has been enabled,
15 minutes after a segment change, the old segment is copied to the destination
path (not shifted).
The destination path can also be a network drive.

Alternative destination path


The "Alternative destination path" setting is used when, for example the network
path for the backup is not available, for example due to network failure.

Deleting backup files


WinCC does not delete files on the backup path (destination path or alternative
destination path). Here, the user is responsible for deleting these files in good time
or archiving them. Database segments in the backup path can, for example, be
deleted with the Windows Explorer if they are not connected to the SQL Server.
Signing If signing and backup are activated, each archive backup file is signed off when it
is swapped out. If the file is then reconnected to WinCC, it is possible to recognize
whether or not the file has been changed since it was swapped out.
If you use signing of archives, the maximum size of a single segment may not
exceed 200 MB.
For archiving of signed data, the configuration limits are reduced.

Archive Contents This tab exists only with TagLogging Fast. All archive values that meet the
conditions above are archived in the TagLogging Fast database, all others in the
TagLogging Slow database.
Process-controlled measured values: The controller connects values e.g. every 50
ms and sends these with a special measured value frame to WinCC. To do this,
for example, the block AR_SEND is called on the S7-400.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 Tag Logging
Properties of an archive tag
Further properties are explained on the next page.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 Tag Logging
Properties of an archive tag
The relationship between the acquisition type (archiving type) and other properties
such as "Start tag" is explained on the next page.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 Tag Logging
Archiving type WinCC Tag Logging makes the following types of archiving available for measured
values:
- Cyclic - continuous
Data acquisition is started at the system start (runtime) and performed in constant
time cycles until the system is turned off. This type of archiving is used very often.

- Acyclic
In acyclic archiving, a tag is always archived when the tag stored in "Start tag"
changes or when the return value of the C function stored in "Start event" changes.
The factor for the archiving cycle can be changed.

- Cyclic-selective
Archiving is started depending on the occurrence of an event and is performed in
constant time cycles until the occurrence of a second event. With the stop signal,
the last acquired value is also saved.
This method is selected when, for example, archiving should only be active when a
machine is running (e.g. only for three hours a day).
As an option, a fixed number of leader or trailer values can be set.

- only upon change


The process values are read every 500 ms and written to the database only if a
change has occurred.
The archiving cycle can now be set.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 Tag Logging
Trend display in runtime
A trend display of archive tags (or also of online tags) is possible with "WinCC
OnlineTrendControl".

In the properties of this control, the following settings can be made:


- Color, line weight and if applicable dot width of the trends
- One or more time axes
- One or more value axes
- Selection of the buttons for the toolbar
- Status bar
- One or more trend windows
- etc.

To be able to display values for the read ruler or results for statistics functions, a
"WinCC RulerControl" needs to be configured. This is permanently assigned to
exactly one "WinCC Online Trend Control".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 Tag Logging
Table display in runtime
A table display of archive tags is possible with the "WinCC OnlineTableControl".

In the properties of this control, the following settings can be made:


- One or more time columns
- One or more value columns
- Selection of the buttons for the toolbar
- Status bar
- etc.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 Tag Logging
Name RT-DB The runtime data is distributed over the master database and several runtime
databases.
The master database manages the runtime databases and references the
individual runtime databases. The master database is created in the project
directory. The name of the master database is as follows: ProjectnameRT.ldf and
ProjectnameRT.mdf
The runtime databases (also known as single segments) each contain the
archived data related to a specific period of time.

The segments of the database are located either in the subfolder of the project
ArchiveManager\TagLoggingFast or in the subfolder
ArchiveManager\TagLoggingSlow.

A database segment always consists of two files (*.ldf and *.mdf).


ldf = Database Transaction Log File (organizational file)
mdf = Database Primary Data File (File with the user data)

The file name is made up as follows:


WINCC30_CONTROL#ROOM_TLG_F_201407290727_201407290927.ldf
PCname_Projectname_TLG_F_YYYYMMDDHHMM_YYYYMMDDHHMM.ldf

TLG_F = TagLoggingFast
TLG_S = TagLoggingSlow

The time stamps show the start time and if there are two time stamps present also
the end time.

Note The time stamps indicate UTC time.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 Tag Logging
Objective The existing Control_Room project will be expanded with a process value archive.
The measured value archive will be visualized with an additional
picture with an Online Trend Control as a trend display.

Exercise 1. Open the Tag Logging editor.

2. In the navigation panel, select "Cycle times". In the table then add a new time
with the name "5 seconds". Define the time base as "1 second" and the time
factor as 5.

3. Then select the "Process Value Archive". Then write the name of the new
archive in the table column Archive name "Temperatures_Station1". In the
properties of the new archive, check that "Hard disk" is selected as the storage
location.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 Tag Logging
Exercise 1. First select the name of the new archive "Temperatures_Station1".

2. As process tags select "Temperature_R1" and "Temperature_R2". Both are


internal tags.

3. Adapt the properties (Acquisition cycle, Archiving cycle, ...) as shown above.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 Tag Logging
Exercise 1. Open the archive configuration of TagLogging Fast (shortcut menu of
Archive -> Archive configuration -> TagLogging Fast -> Properties) and
TagLogging Slow.

2. Adapt the settings as shown above.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 22 Tag Logging
Exercise 1. Open the Graphics Designer and create a new picture with the name
"Curves.pdl" and with the same size as your previous pictures.

2. Add a button to the start picture for selecting the picture "Curves.pdl".

3. In the trends picture, select the control "WinCC OnlineTrendControl in the


Controls palette and then drag it to the required size in the new picture.

4. In the configuration dialog of the control, make the following


settings:
Value axes tab:
- Add the New button to a second value axis
- Value axis1: Value range from 0 to 100
- Value axis2: Value range from 0 to 500
Time axes tab:
- Time axis1: Time range 5 x 1 minute
Trends tab:
- Add a second trend with the New button
-Trend1: Trend window1, Time axis1, Value axis 1, color blue,
Archive tag: Temperatures_Station1\Temperature_R1
- Trend2: Trend window1, Time axis1, Value axis 2, color gray
Archive tag: Temperatures_Station1\Temperature_R2
Toolbar tab:
- Select all key functions

5. Add two slider objects to change the process tags "Temperature_R1 (0 to 100)
and "Temperature_R2" (0 to 500).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 23 Tag Logging
Objective The existing OnlineTrendControl has an additional window added for the output of
values (read ruler and statistics).

Exercise 5. Add a RulerControl below the OnlineTrendControl.

6. Configure the following settings in the configuration dialog of this control:


General tab:
- Source: Control1
7. Save the all open pictures (File/Save All).

Note With controls a correct preview is only shown when the zoom level for the graphics
picture is set to 100%.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 24 Tag Logging
Exercise 1. Before you start WinCC Runtime, enable "Tag Logging Runtime" in the
computer properties.

2. Start WinCC Runtime.


Do the following in the process control in the OnlineTrendControl:

Change the values for the two process tags with the slider objects.
Stop and start the updating of the trends
Show the read line with the "Ruler" button and move this to its rough
position with the mouse. Pixel-precise movement can be achieved with
the left and right cursor keys.
When is for example "29.0 i" shown in the Y value column and when for
example is "30.0" displayed?
Zoom a window area with the "Zoom area" button.At the end, restore the
original view with "Original view".
Selection according to time period
Hide trends
Test the statistics functions. Start by clicking on the "Set statistics range"
button. Position the left and right limit line and then click on "Calculate
statistics".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 25 Tag Logging
Contents Page
Training aims ...................................................................................................................................... 3
Preparing for configuration .............................................................................................................. 4
Overview of the message system ....................................................................................................... 5
Project planning notes ................................................................................................................... 6
Message system (2/3) ......................................................................................................................... 7
Message blocks, message line ............................................................................................................ 8
Message blocks .................................................................................................................................. 9
Structuring messages with message classes and types .................................................................... 10
Alarm Logging editor Configuring message classes and types ........................................................... 11
Alarm Logging editor Configuring message types ............................................................................... 12
Alarm Logging editor Archive configuration ........................................................................................ 13
Alarm Logging editor Creating individual messages ............................................................................ 14
Alarm Logging editor Properties of individual messages .................................................................... 15
Alarm Logging Runtime Alarm Control ............................................................................................. 16
Alarm Logging Runtime Data storage ............................................................................................... 17
Exercise 1: Message blocks ................................................................................................................ 18
Exercise 2: Message class, message types ........................................................................................ 19
Exercise 3: Archive configuration ........................................................................................................ 20
Exercise 4: Single messages ............................................................................................................. 21
Exercise 5: System messages ............................................................................................................ 22
Exercise 6: Creating a message picture .............................................................................................. 23
Exercise 7: Function test message picture ......................................................................................... 24
Exercise 8 (optional): Process value block .......................................................................................... 25
Exercise 9 (optional): Loop in Alarm ................................................................................................... 26
Status tags with message groups .................................................................................................... 27

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Alarm Logging
Contents Page
Status tags with message types and message classes ..................................................................... 28
Configuration of status tags e.g. message types ............................................................................... 29

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Alarm Logging
The participant will:
Get to know the advantages of the message system
Be able to adapt the message system to the plant requirements
Be able to configure messages
Be able to create message lines (formats)
Be able to define message classes
Be able to define message types
Be able to set up message archives
Know group messages
Know export/import functions
Get to know Loop in Alarm
Know message selections
Be able to show messages in a picture
Be able to archive messages

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Alarm Logging
Preparing for configuration
Process coupling
Defining tags with message bits (bit message procedure)
Message archiving
Grouping all messages
Specifying message blocks
Defining the content and appearance of the message format
Specifying an acknowledgement concept
Specifying the time period for archiving
Specifying process values (optional)
Assigning alarm classes
Specifying a message picture

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Alarm Logging
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 5 Alarm Logging
Data type
With the bit message procedure, the largest data type that can be used is an
unsigned 32-bit tag from which up to 32 messages can be derived. This allows the
number of powertags to be kept low.

Limit value messages


If limit value messages (analog alarms) are configured in WinCC, these values are
also requested cyclically.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Alarm Logging
Archiving To archive messages, WinCC uses a circular archive with a configurable size that
you can configure with or without backup.
Storage of the archive files is always on the local computer in the corresponding
project.
The WinCC message archive consists of multiple individual segments. You can
configure both the size/time of the message archive and the size/time of the
individual segments in WinCC: Example: The message archive records all
messages that occur within one week (1), each individual segment records the
messages that occur within one day (2). You can always configure both conditions
at the same time. If either of the two criteria (time or size) is exceeded, the
following happens:
Criterion for message archive (DB) is exceeded (-1)> the oldest messages (in
other words the oldest single segment) are deleted.
Criterion for single segment exceeded (2)-> a new single segment (SS) is created.
A new single segment is also created if message data is configured online (when
downloading changes online).
DataMonitor For visualization and evaluation, WinCC/DataMonitor provides a range of tools for
viewing (view only) and online analysis, for example using Excel, that can be used
via the Internet and that support all the common security mechanisms such as
login/password, firewalls, encryption, etc.
Connectivity Pack Access to WinCC via OPC and OLE-DB With OLE-DB, it is possible to directly
access archive data saved in the MS SQL Server database by WinCC. The OPC
HDA (Historical Data Access) and OPC A&E (Alarms & Events) servers allow
access to historical data of the WinCC archive system or for forwarding /
acknowledging messages.
Connectivity station Access from external computers to archive data without WinCC installation
via standard interfaces OPC and OLE-DB
IndustrialDataBridge Configurable connection to databases and IT systems

Note Without associated values and comments, a message requires approximately 172
bytes of memory (RT database), see FAQ 16619980.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Alarm Logging
General
Messages are represented as tables within an ActiveX (message window). Which
columns these tables can have, you specify from the system, process value and
user text blocks.

System blocks
The system blocks output system information, e.g. the time of day or the status of
the message

User text blocks


User text blocks (max. 10) output message texts edited by the user.

Process value blocks


The process value blocks (max. 10) display the value of a tag.

Note The message list resulting from the message blocks can be freely designed and is
created in the WinCC Alarm Control window.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Alarm Logging
System blocks With the system blocks, the configuration engineer can select the blocks from a
predefined list that will be saved in the database for each message. Adaptations
for example of the number of characters or the alignment (left, centered, right) are
also possible. With some blocks for example the time and date, the format can be
specified.
Example Date:

User blocks Up to 10 user blocks can be selected. Here, it is primarily the number of
characters and the name of the block that is specified. As with other blocks, this
can be translated into the selected runtime languages. Which runtime languages
are available in a WinCC project is specified in the Text Library editor.

Process value blocks


Up to 10 process value blocks can be activated.
When configuring a single message, a WinCC tag can be defined later for every
process value block. When the message then arrives in runtime, the current value
of the WinCC tag is saved in the database along with the message. When the
message goes, the current value is saved again, not however when the message
is acknowledged.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 Alarm Logging
General
The message system is used to chronologically signal and archive events that
occur sporadically during the process via messages at a central location. A
message can be caused by an event or a message frame.
Division All messages can be divided into message classes according to self-defined
criteria. These in turn can be further divided into message types.

Message class The following message classes are preconfigured in Alarm Logging: "Error",
"System, Requires Acknowledgment", and "System, Without Acknowledgment". In
addition to the two system message classes, you can define up to 16 further
message classes.

Message type
Message types are subgroups of message classes. You can create up to 16
message types in WinCC for each message class.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 Alarm Logging
Alarm Logging editor
The message classes can be found in the navigation panel under "Messages".
Under the message classes, there are the message types.

Properties of a message class


As of WinCC V7.3, the message class has almost no properties any longer. Only
the name and tags (will be explained later).

Prior to V7.3, for example, the acknowledgment philosophy was also defined in the
message class.

Note The "Messages" tab is visible if you select one of the message classes or one of
the message types in Messages in the navigation panel.
If "Messages" is selected, all messages are displayed. In the shortcut menu of
"Messages", you have the option of selecting that all system messages and/or all
"AS messages" and/or all messages from the area "Analog alarms" should also be
visible.
If a message class is selected, all messages of this message class are displayed
in the "Messages" tab.
If a message type is selected, all messages of this message type are displayed in
the "Messages" tab.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Alarm Logging
Properties of the message type
Practically all properties such as the acknowledgment philosophy, colors etc. are
set in the message type parameters since WinCC V7.3.
Below, you will find most important properties of a message type:
Acknowledgement Here, no acknowledgement for a message class, acknowledgement when a
message came in or acknowledgement when it came in and went out can be set.
Flash On With this, the flashing of individual message blocks can be activated. These
message blocks are shown flashing in the message list (not for example in the
short-term archive list) as long as the message has not been acknowledged.

This requires flashing to also be selected in the properties of the relevant message
block.
Without status "went out"
This is typically selected with system messages combined with no
acknowledgment. This means that no entry is made in the message list, but only
an entry in the archive lists (short or long-term archive).
Status texts Here, self-defined texts for the statuses can also be stored, e.g. c for "came in", w
for "went out", etc.
Note: If these texts should also be displayed in runtime, in the settings of the
"WinCC AlarmControl", in the Message Blocks tab, for the message block
"Status", "Content as text" shuold be selected.
Tags Will be explained later
Colors Here, the font color and the background color can be set for different message
statuses.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 Alarm Logging
Archive configuration
Here, you have exactly the same options in the shortcut menu as in the "Archive
Configuration" and "Backup Configuration" tabs as shown in the section Tag
Logging.

The only difference is that the "Archive Contents" tab is missing. The reason for
this is that in Tag Logging the runtime data is either saved in "TagLogging Fast" or
in "TagLogging Slow". With the messages, on the other hand, there is only one
database "AlarmLogging".

Note Later in WinCC Runtime, the "Short-term archive list" and the "Long-term archive
list" can be displayed in WinCC AlarmControl. In earlier WinCC versions there
were actually 2 different archives. Since WinCC V6.0, these archives were put
together and therefore the "Short-term archive list" and the "Long-term archive list"
are today simply two views of the same database.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 Alarm Logging
"Messages" tab
The "Messages" tab is visible if you select one of the message classes or one of
the message types in Messages in the navigation panel.
If "Messages" is selected, all messages are displayed.
If a message class is selected, all messages of this message class are displayed
in the "Messages" tab.
If a message type is selected, all messages of this message type are displayed in
the "Messages" tab.

In these tabs, for example with auto filling further messages can be created simply.
The properties of a message can be adapted in the table view or in the properties.

Number Every message receives a unique message number.


System messages start with message number 1,000,000.

Message group, status tag, acknowledgment tag


Details to follow later

Message tag Here, WinCC tags of the type "binary tag", "unsigned 8-bit value", "signed 16-bit
value" or "unsigned 32-bit value" can be selected. If a "binary tag" is involved, the
message bit must also be specified.

Priority Specifies the priority of the message. Messages can be selected and sorted based
on their priority. The range of values is "0" to "16". WinCC does not specify which
value corresponds to the highest priority.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 Alarm Logging
Central signaling device
For every message type, you can set a "tag for a central signaling device". To do
this, you can select any tag of the type "binary tag". If the check mark "Central
signaling device" is set in the Properties dialog of the message, the horn tag is set
when the message is triggered. You can reset this horn tag with the "Horn
acknowledgement" button in the Alarm Control or by acknowledging the message.

Archived The default for "Archived" is active. If this parameter is disabled, an incoming
message is not written to the database; in other words, this message is only in the
message window in runtime but is not visible in the short-term archive list or long-
term archive list.

Falling edge If this is enabled, the message will be displayed as having come on a falling edge
(1 -> 0).

Triggers action
The message triggers the standard function GMsgFunction.fct that can be
changed with the "Global Script" editor. In the function itself, the message number
is then queried and a there is a suitable reaction. The function is available under
"Standard Functions/Alarm" in the function browser of Global Script.

Loop in Alarm, Function name, Function parameters


If "Loop in Alarm" is enabled, in runtime after selecting this message the operator
can click the "Loop in Alarm" button. This calls the C function stored in Function
name possibly with the value stored for the function parameter. The typical
example is calling the relevant process picture.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 Alarm Logging
Display in Runtime
A table display of messages is possible with the "WinCC AlarmControl".

In the properties of this control, the following settings can be made:


- Font
- Which message blocks should be displayed in which order?
- Which buttons should be displayed in the toolbar?
- Which information should be displayed in the status bar?
- Settings for online configuration

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 Alarm Logging
Name RT-DB The runtime data is distributed over the master database and several runtime
databases.
The master database manages the runtime databases and references the
individual runtime databases. The master database is created in the project
directory. The name of the master database is as follows: ProjectnameRT.ldf and
ProjectnameRT.mdf
The runtime databases (also known as single segments) each contain the
archived data related to a specific period of time.

The segments of the database are located in the subfolder


ArchiveManager\AlarmLogging

A database segment always consists of two files (*.ldf and *.mdf).


ldf = Database Transaction Log File (organizational file)
mdf = Database Primary Data File (File with the user data)

The file name is made up as follows:


WINCC30_Control#Room_ALG_201407290727_201407290927.ldf
PCname_Projectname_ALG_YYYYMMDDHHMM_YYYYMMDDHHMM.ldf
ALG = AlarmLogging

The time stamps show the starting time and if two time stamps are present, also
the end time.

Note 1 The time stamps indicate UTC time.


Note 2 The "Short-term archive list" and "Long-term archive list" buttons of the
AlarmControl show the same archive data in runtime. There are only functional
differences, the short-term archive list is, for example updated when a new
message arrives, the long-term archive list on the other hand is not.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 Alarm Logging
Objective The Control_Room project needs to be expanded with messages. In the first step,
the individual message blocks are created/edited.

Exercise 1. In the WinCC Explorer open the "Alarm Logging" editor

- 2. In the open "Alarm Logging" editor, click on the


"Message blocks" icon and then on System blocks. In the column
"Used", select Date, Time, Status, Number, Class and Type. Adapt the number
of characters and format according to the figure above.

- 4. In the navigation panel change to "User text blocks" and adapt these
according to the figure above.

5. In the navigation panel change to "Process value blocks" and adapt these
according to the figure above.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 Alarm Logging
Objective In the next steps, a message class and two message types will be created and
edited.

Exercise 1. In the shortcut menu of the "Messages" navigation item, you can create the
message class "Blast furnace".
2. In the shortcut menu of "blast furnace", you create the message types "Alarm"
and "Failure".
3. For both message types, enable the acknowledgement philosophy
"Acknowledgement came in".
4. Set the colors according to the figures above.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 Alarm Logging
Exercise 1. In the shortcut menu of the "Messages" navigation item, you can open Archive
Configuration/Properties.
2. The entire message archive should be 2 weeks in size. Every day a new
segment should be created.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 Alarm Logging
Objective In the next steps, messages will be created/edited. Messages 1 to 4 will be
triggered in Runtime mode by bits 0-3 of the message tag "Messages_1_16".

Exercise 1. Navigate to the message type "Alarm" of the message class "Blast furnace".
2. Initially create only the first message (see the figure above).
3. Using auto filling, create messages 2 to 3. Then adapt the texts and message
type (see the lower figure).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 Alarm Logging
Objective In the next steps, all system messages will be enabled.

Exercise 1. Go to "System messages".


2. Select all system messages. You can do this by mouse clicking in the left top
corner of the table or with the key combination Ctrl + a.
3. In the shortcut menu of the selected messages you can then select "Select
all".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 22 Alarm Logging
Exercise 1. Open the Graphics Designer and create a new picture with the name
"Messages.pdl" and with the same size as your previous pictures.
2. Add a button to the start picture for selecting the picture
"Messages.pdl".
3. In the messages picture, add a check box (Object palette/Windows
Objects). Connect the check box to the tag "Messagebits_1_16"
(Properties: Output/input -> Selected Boxes).
Change "Number of Boxes" (Properties/Geometry) to 4.
As an option, you can also adapt the texts for message 1 to message 4.
4. In the Messages picture, select the control "WinCC AlarmControl in the
Controls palette and then drag it to the required size in the new picture.
5. In the configuration dialog of the control, make the following
settings:
Message lists tab: Also select the message blocks, Class, Type,
Message text, Point of error, Reason of error and Process value 1.

Toolbar tab: For test purposes, select all key functions.


6. Save the all open pictures (File/Save All).

Note With controls a correct preview is only shown when the zoom level for the graphics
picture is set to 100%.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 23 Alarm Logging
Exercise 1. Before you start WinCC Runtime, please enable "Alarm Login Runtime" in the
computer properties.

2. Start WinCC Runtime.


Perform the following operations and tests:
Change to the message list. Have Message 1 come in,
acknowledge this message and then have it go out.
Have 3 messages come in, Acknowledge these 3 messages with
a mouse click (Group acknowledgement button, first enable AutoScroll
button).
Change to the short-term archive list. Have a message come in, go out
and come in again. Note the system acknowledgement.
Lock message 4. Then by setting and resetting the corresponding
message bit, test whether this message is still generated. Note the
status bar as well. Unlock Message 4
Call up the statistics "Hit list".
Change to the short-term archive list. Open the Selection dialog. Create
a new selection with the name "Only system messages" with the
condition:
Message number >= 1000000
Enable this selection. Only system messages should now be shown.
Deactivate this selection.
Find a functional difference between the short-term archive list and the
long-term archive list.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 24 Alarm Logging
Exercise 1. Stop WinCC Runtime.
2. Start the Alarm Logging editor.
3. For message 4, select the internal tag "Temperature_R1" in the properties in
the section "Process values" for "Process value: 1".
4. For test purposes, add an IO field in the messages picture and also link the
internal tag "Temperature_R1".
5. Start runtime.
6. Have Message 4 come in. Change the value for the tag "Temperature_R1" and
have message 4 go out again. Note the entries in the column
"Process value: 1".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 25 Alarm Logging
Exercise 1. Stop WinCC Runtime.
2. Start the "Global Script C" editor.
3. Create a new project function " Change picture" as shown in the figure above.
You will find the function SetPictureName in Internal Functions /graphics
/set/miscs".
"Start.pdl = name of the background picture
"Work_pic = name of the picture window in the background picture
PictureName = name of the parameter transferred with the function
4. Save the project function with the name ChangePictureWorkPic.fct.
5. Change to the Alarm Logging editor.
6. Go to the properties of message 4. There, enable the property Loop in Alarm,
under Function name select the function "Change picture" you just created and
as the function parameter transfer the picture name "Motor.pdl" (see lower
figure).
7. Start runtime.
8. Have message 4 come in and click on the button "Loop in
Alarm".

Note with Loop in Alarm" only C functions are possible.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 26 Alarm Logging
General Message groups serve to collect events (OR logic operation). They are not
displayed in WinCC Alarm Control as a further message.

In the example above, some messages (10, 11, 12 and 13) are grouped together
in message group A. If at least one of the messages is active, the bit for active is
also set in the status tag of message group A. If at least one of the messages is
unacknowledged, this information is also stored in the status tag in binary format.

A second status tag shows the status (Active? Unacknowledged?) of message


group B which are derived from the messages 19, 21, 22 and 24.

It is also possible to configure message groups at different levels (tree structure).


The higher-level message group (in the figure message group A_B) selects the
lower-level message groups.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 27 Alarm Logging
General Status tags can also be configured for message types and message classes.
In the example above, messages 10 to 13 belong to the message type Alarm and
the message class Messages 19, 21, 22 and 24 belong to the message type
Warning and also to the message type
If at least one of the messages of a message type is active, the bit for active is
also set in the status tag of the message type. If at least one of the messages is
unacknowledged, this information is also stored in the status tag in binary format.

The status information of the message types is automatically collected in the


status tag of the higher-level message class.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 28 Alarm Logging
Status tag As status tags, only unsigned 8-, 16- or 32-bit tags can be configured.

In the example above, the message class "Alarm" contains the messages 1 and 2
and as the status tag has "Status_tag_furnace_alarm" with status bit 0.
The message class "Warning" contains the messages 3 and 4 and as the status
tag has the tag "Status_tag_furnace_warning". Here, however, status bit 2 has
been selected.
Runtime The status tags are automatically supplied with the collected status information.
Each tag is divided logically in the middle. In the left part there is the
acknowledgement information (1 = unacknowledged) and in the right part the
status (1 = at least one message is pending).

The status tag "Status_tag_furnace_alarm" for example has the following value in
runtime:
0000 0001 0000 0001 -> Status bit 0 shows the status, bit (0+8) shows the
acknowledgement status.

The status tag "Status_tag_furnace_warning" for example has the following value
in runtime:
0000 0100 0000 0100 -> Status bit 2 shows the status, bit (2+8) shows the
acknowledgement status.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 29 Alarm Logging
Contents Page
Training aims ...................................................................................................................................... 2
Report Designer Possible reports ................................................................................................... 3
Report Designer Layouts and print jobs ............................................................................................. 4
Print jobs ............................................................................................................................................. 5
Automatic print jobs Example ........................................................................................................... 6
Report Designer Creating a layout ..................................................................................................... 7
Layout Static part ............................................................................................................................... 8
Layout Dynamic part .......................................................................................................................... 9
Cover sheet and last page .................................................................................................................. 10
Report content with multiple pages .................................................................................................... 11
Predefined layouts e.g. messages .................................................................................................. 12

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Report Designer
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 2 Report Designer
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 3 Report Designer
Report Designer The Report Designer is included in the basic package of WinCC (not a WinCC
option, no additional costs).

Layouts In a layout file, you define which elements should be included in the report.

Layout and language


The layout and language layout files can be created in different languages. To do
this, different variants of a layout can be saved in the corresponding folders
("German", "English", etc.). Further languages can be added in the shortcut menu
of "Layouts".
If this is not wanted, the layout file is stored in the folder "Language neutral".

Print jobs In a print job, for example, you specify the printer on which the report will be
printed. Precisely one layout file is also assigned.

Line layouts Calls the editor variant for line layouts. This allows messages to be printed out line
by line immediately (message sequence report).
Printer used:
Typically connect dot matrix printers or ink-jet printers to the
parallel interface, no laser printers.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Report Designer
Print jobs
General Every print job receives a name and is linked to a layout. This specifies how the
report will appear.

Selection Here, the number of pages can be restricted. With some reports a time restriction
makes sense, for example all the messages from the last two hours should be
printed.

Specifying the printer


Here, up to 3 printers can be specified. As an alternative, you can print to an EMF
file. The files in the format *.emf can be viewed with the WinCC Documentation
Viewer and also printed out. You will find the WinCC Documentation Viewer on the
WinCC installation CD under Tools.

PDF files can also be generated but only if the WinCC option DataMonitor exists.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Report Designer
Start Parameters If only a start time is specified, the report is printed only once.

If a cycle is also specified, the report is printed at the start time and then in the
required cycle. Possible cycles are:
- Hourly
- Daily
- Weekly
- Monthly

This allows reports to be printed out automatically. As an alternative reports can


also be started by a operator input (operator input in Alarm Control) or for example
by a C script:
RPTJobPrint("PJ_cold store");

Startup list "Report runtime" only needs to be activated for automatic reports. Otherwise these
will not be started.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Report Designer
Report Designer With this editor, new layouts can be created or existing layouts adapted similar to
with the Graphics Designer. The file extension of layouts is *.RPL

Object palette The object palette provides the following tabs:


- Standard Objects (see figure)
- Runtime Documentation (objects e.g. to print out messages or trends)
- COM Server (Here programmers could create and link their own objects.)
- Project Documentation (objects with which e.g. a WinCC picture could be
documented)

Static and dynamic part


During configuration, objects can be configured either in the static or in the
dynamic part. The meaning is explained on the following pages.

Cover Sheet, Contents of Report and Last Page


Every layout consists of at least the report part. As an option, a cover sheet and/or
a last page can be configured.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Report Designer
Static part Typically page numbers or the name of the layout are configured here. Here, a
company logo could also be configured (the object for inserting a graphic can be
found in Static objects/Static metafile).
If, for example the content of a report consists of several pages, this information is
printed on every page.

If the number of pages is configured in the contents of the report, this is not printed
on the cover sheet. If this is required, a number of pages must be added to the
cover sheet.

In this view in the editor, no objects are displayed that were configured in the
"Dynamic part".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Report Designer
Dynamic part Here typically all other objects are configured. In the example above, these are
static texts and tags.

With the Hardcopy object, the entire current content of the screen or part of it can
be inserted in the report.

In this view, all objects, both those configured in the "Dynamic part" as well as
those from the "Static part" are displayed.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 Report Designer
Cover Sheet, Contents of Report and Last Page
Every layout consists of at least the report part. As an option, a cover sheet and/or
a last page can be configured.

Note Whether or not the cover sheet or the last page are printed, can be set in the
properties of the layout (do not select an object, but click on the background):

The default settings are "Cover sheet Yes" and "Last page No".
As a result, with new reports an empty page is often printed at the beginning. This
can be prevented with the setting "Cover sheet No".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 Report Designer
Multiple pages If a user report is to be created that has more than 3 pages (cover sheet, contents
of the report and last page), you need to work with "Embedded Layouts".
To do this, for example 3 further layouts are created: Cold store_page1.rpl, Cold
store_page2.rpl and Cold store_page3.rpl
These layouts are then inserted in the actual layout 5pages_ENU.rpl.

If the "Page Break" property was enabled for the second and third embedded
layouts, 5 pages in total will be printed out.
If this property was not enabled, the contents of the 3 embedded layouts will be
printed one after the other. As a result, the report could be shorter than 5 pages.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Report Designer
Predefined layouts
You can use the supplied system layouts directly (all system files always begin
with the @ character) or adapt them to your needs. This, for example allows the
company logo to be added to a message archive report.

The system layouts can also be adapted easily for the project documentation.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 Report Designer
Contents Page
Training aims ...................................................................................................................................... 2
WinCC Option "User Archive" ............................................................................................................. 3
User archives ..................................................................................................................................... 4
User archives editor Structure (fields) .............................................................................................. 5
User Archive editor Archive data ....................................................................................................... 6
User Archive runtime WinCC User Archive Control .......................................................................... 7
User Archive runtime Data exchange with S7 controlled by the operator ....................................... 8
User Archive runtime Data exchange with S7 controlled by the S7 program ........................... 9
User Archive Views ....................................................................................................................... 10

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 User Archive
The participant will:

Get to know the advantages of User Archive.


Get to know the table view.
Get to know the access options.
Get to know the communications options.
Get to know the possible applications.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 User Archive
General The User Archive package is available as a WinCC optional package.
It consists of
- User documentation
- Internal functions
- Key disk for enabling the software.
The User Archive software is already on the WinCC CD.

Applications User archives can be used for a wide variety of applications (see figure above).

Basics WinCC User Archive is a database system that users can configure themselves for
their own purposes.
WinCC User Archives provides two type of database tables:

Archive Archives are database tables in which users can create their own data fields.
Archives are used for the storage of data and provide database access to this
data.

Views Views take data from the archives and are used to put data together for example
to obtain an overview of product groups.
The data of a view can also be edited in runtime; the modified data is then entered
in the original archive.
Access to user archives with:
Table window
Internal functions
API functions (described in the ODK package)
ODBC / SQL
Communication with the controller via tags
Communication with the controller via raw data

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 User Archive
Definitions In the example above User Archive is used to display a recipe. The components of
a recipe consist of recipe elements reflecting the individual components of the
recipe. With a table, this corresponds to column titles.
A single recipe with its different recipe values is put together in a data record. A
data record corresponds to a row in a table, a recipe value corresponds to a cell in
the table.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 User Archive
Archives In the figure above, two user archives have been created. In the properties of a
user archive, the following settings can be made:
- Name
- Number of data records: unlimited or with max. number
- Communication type: none, data manager tags or raw data tags
- Restriction of read and write rights is optional
- "Last Access" field and "Last User" field can be added as options

Fields For the selected user archive, the fields of this archive are shown on the right.
The most important properties of a field are:
- Name
- Type (character string, number (integer), number (float), number (double) or
date/time)
- With a character string, the length can be defined.
- With numbers an optional minimum value and a maximum value can be added.
- The following option can also be enabled:
Value required = field cannot be empty
Unique value = WinCC monitors the uniqueness of entries
With index = database is given indexes

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 User Archive
Archive data The previously defined fields can now be filled with content. The number of data
records depends on the configuration of the archive (unlimited or with max.
number).

If "unlimited" was configured, and upper limit is set by WinCC. These system limits
are described in WinCC help in Performance data -> User archives.

Maximum of 300,000 entries:


- 10 fields with 30,000 data records
- 500 fields with 600 data records

The archive data is stored in the runtime database. This means that both during
the configuration (see above) and during WinCC runtime data can be entered,
deleted or changed by the relevant control.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 User Archive
Runtime In runtime, the archive data can be accessed using the User Archive control. This
is only possible if the component "User Archive" was enabled in the startup list.

Delete, copy,...
Deleting always involves one or more rows (data records).
Read/write tags
Data exchange with the controller is explained on the following pages.
Import or export archive
All displayed data records (filter) are exported to the UA directory within the
WinCC project. The name of the CSV file can be changed in a dialog.
When importing, a CSV file is also read in from the UA directory.
Export With this button, you export all or selected runtime data to a CSV file. If the option
"Display dialog" is active, a dialog opens in which you can view the settings for
exporting and can start the export. With the suitable authorization, you are also
allowed to select the file and the directory for the export. If no dialog is displayed,
the export of the data to the preset file starts immediately.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 User Archive
Data exchange Data exchange with the controller can either be started by the operator or by the
controller. The first option is considered initially.
Step 1 The operator selects a data record.
Step 2 With the "Write Tags" button, the current data record is written to the controller.
Each value is written to the tag stored in the properties of the field.
Step 3 The selected data record has been written to the corresponding tags. The
controller can now continue working with these values.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 User Archive
Data exchange Data exchange can also be controlled by the controller program. To do this, the
control tags "ID" and "Job" are used.
ID The identifier (corresponds to the record number) of the user archive
Job Three jobs are possible: Read, write and delete:
Simatic to archive =6
Archive to Simatic =7
Delete =8
After the job has been carried out, there is an error ID in this control tag:
No errorN =0
Error = -1

As an alternative the addressing can be via the control tags "Field" and "Value".
Field The archive field (column label e.g. Ingredients).
Value The archive field value (e.g. 'Flour')
For the example above, the following values would need to be written to the
control tags:
ID = 0 Field = product name Value = KolaMix
and afterwards Job = 7

Additional combinations of the control tags "ID" and "Job":


ID Job = "6" Job = "7" Job = "8"
-1 Append data record (DR) - Delete DR with the
lowest ID
-6 Read DR with the lowest ID Write DR with the lowest ID Delete DR with the
lowest ID
-9 Read DR with the highest ID Write DR with the highest ID Delete DR with the
highest ID

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 User Archive
Views In the User Archive editor, it is also possible to configure views.
A view groups data from various user archives. For example, you can create links
via the fields of various user archives with SQL to display relationships in runtime
in a single view. The linked user archives must have at least one common data
field.
In the example above there are two user archives. Both have a field "Product
number" (the ID column is not suitable since this column is managed by the
system and cannot be freely assigned). In the view
"~Tanks_Softdrink.Productnumber = ~Recipes_Softdrink.Productnumber is
configured as the relation. This has the effect that only the combinations are
displayed in which the product number is the same in both archives.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 User Archive
Contents Page
Basic Process Control (BPC) Functions 1/2 ................................................................................. 2
Basic Process Control (BPC) Functions 2/2 ................................................................................. 3
Basic Process Control Runtime .................................................................................................... 4
BPC: OS Project Editor .................................................................................................................. 5
BPC: Result RT .............................................................................................................................. 6
BPC: Picture Tree Manager ........................................................................................................... 7
BPC: Result RT .............................................................................................................................. 8
BPC: Shifting, Removing Areas .................................................................................................... 9
BPC: Lifebeat monitoring .............................................................................................................. 10
BPC: Lifebeat monitoring runtime ............................................................................................... 11

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Appendix BPC
General Information
The "Basic Process Control" package comprises, among other things, the
components :

OS-ProjectEditor This Wizard is used to configure and initialize the monitor settings and screen
settings for the current WinCC project.
You should do this initialization immediately after you create a project, since other
applications (Runtime, Group Display etc.) also access this data.
The Wizard defines the newly created picture (@Screen.PDL) as the Start screen.
There is also a simple way of configuring the message system with fixed default
settings (configuration of the message window, messages, message classes and
creation of the process control messages).

Picture Tree Manager


The Picture Tree Manager is used to manage a hierarchy of application pictures,
parts of application pictures, function names and pictures from the Graphics
Designer.

Group Display The Group Display is an additional element of the Graphics Editor (Smart Objects)
that is used to collect messages and events in individual pictures and / or in the
picture hierarchy and to display them in the application (overview) picture.
With the help of the Group Display, a malfunction or an alarm can be displayed in
the overview picture. This allows the operator to switch directly to the
malfunctioning system section by simply selecting it. See FAQ 17778440.

Lifebeat monitoring Lifebeat Monitoring takes over the permanent monitoring of the individual systems
(OS and AS) and generates the process control messages.
After startup, the monitoring begins automatically for the configured (selected)
components and is executed cyclically. A message is generated when one of the
participants repeatedly fails to answer (after three successive cycles).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Appendix BPC
Basic Process Control Functions
- Basic data with screen subdivisions of overview, desktop and button areas
- Process mimic hierarchy with graphic configuration of the picture hierarchy.
(Picture Tree Manager).
- Scrolling through the picture hierarchy in process control.
- Storing and recalling the screen layout.
- Group displays for user guidance through the graphics hierarchy
- Selecting process mimics using names (in process control).
- Lifebeat monitoring with system configuration diagram.
- Message Configuration provides you with a simple way of configuring the
message system with fixed default settings (configuration of the message
window, messages, message classes and creation of the process control
messages).
- Using external signaling device.
- Enhanced graphics objects: 3D Bar graphs,Group Display.
- OS-ProjectEditor for adjusting screen resolution and multi-channel
operation with Multi-VGA cards and up to four monitors.
Time Synchronization
With the time synchronization function, it is possible to synchronize all the clocks
in the system using special clock masters such as Siclock or DCF77.
Horn (Editor) For use of a signal module or sound card. The signal module has relay outputs for
a horn (acoustic) or signal lamp (optic).
Note You will require the Multi-VGA card from IGS for multi-channel operation. For
activating (using) the signaling device, you will also require the signal module.
Chipcard Reader With the chipcard reader option, a WinCC user can log on with a chipcard using a
reading device that is connected to a serial interface.
Note For detailed information, you will find PCS7 courses on the Internet under:
www.siemens.de/sitrain

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Appendix BPC
Overview Area Here, the up to 16 plant areas are displayed according to the technological view of
the project. The Group Display indicates whether a fault exists in the respective
area. Using the arrow symbol next to the area name you can show the part of the
Picture Tree that belongs to this area and from there you can directly select the
subarea. The overview area is always visible in Runtime.

Work Area Here, depending on the selection, the process pictures are represented.

Toolbar The PCS 7 prefabricated toolbar enables you to select typical process information
(message system, measuring point info) or system conditions (log on, RT
deactivation).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Appendix BPC
General The following pages can also be used for exercise purposes. Requirement: BPC is
installed on the computer. The settings are selected in such a way that you can
assess the difference between the project for manufacturing automation and
process automation.

Note Before you carry out the exercise you should save your WinCC project, since
access to the "old" project is no longer possible after the compilation with BPC.
The OS Project Editor is used for the configuration and initialization of the monitor
and picture settings for the current WinCC project.

Configuring 1. Start the OS Project Editor

2. Adopt the settings specified in the slide

3. Further settings are not necessary (default settings)

4. Start Runtime and test the result

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Appendix BPC
Result This is what the generated project looks like in Runtime. Operator control in the
toolbar is already possible.

If you want to define your own start screen, open the screen @welcome.pdl and
edit the content. Via Geometry you can adapt the screen size.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Appendix BPC
The Picture Tree Manager Editor is used to manage a hierarchy of plants,
subplants and pictures of the Graphics Designer.

Configuring 1. Call all of your pictures via the Graphics Designer and adjust each picture to
the picture size of 1280x825 pixels. This corresponds to the size of the picture
window

2. Start the Picture Tree Manager

3. Via the Projectname.MCP, activate the shortcut menu and add a container.
After changing the name of the container, drag & drop a picture onto the
container. Operator hierarchies can be edited any way you like.

3. Further settings are not necessary (default settings)

4. Start Runtime and test the result

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Appendix BPC
Result This is what the generated project looks like in Runtime.

Picture Navigation Using the arrow symbol next to the area name you can show the part of the
Picture Tree that belongs to this area and from there you can directly select the
subarea.

Picture by Name The pictures can also be called via the picture name. As a result, it is possible to
display the picture in the work area or via a process window.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Appendix BPC
Configuring If areas were already defined with the OS Project Editor, you can now rearrange or
remove the areas. The Preview button shows the areas arranged with the "up" and
"down" button in a preview window.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 Appendix BPC
The "Lifebeat Monitoring" Editor is used to monitor the connection of all server and
client computers and the PLCs.

Configuring 1. Start the Lifebeat Monitoring Editor

2. With a double-click, select the column Device Name and define the device
name

3. With a double-click, select the column Device Type and select a name from
the list that appears

4. With a double-click, select the column Connection and select your connection
name from the list that appears

5. If "user-defined" was selected as the device positioning, you can call the
picture "@config.pdl" via "Edit Screen" and edit it.

6. Start Runtime and test the result

You can add further device names by pressing "Add".


The time for the connection monitoring has a default value of 10 sec.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 Appendix BPC
Result This is what the generated project looks like in Runtime. In the toolbar, the "plant
network configuration" button was selected through which you can call the picture
for monitoring the connections. A symbol crossed-out in red indicates the
connection error.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Appendix BPC
Contents Page
Any Questions Regarding our Training Courses Offered? ................................................................... 2
www.siemens.de/sitrain .................................................................................................................... 3
Learning Path........................................................................................................................................ 4
Do You Need Service & Support? ........................................................................................................ 5
Expertise Available in the Service & Support Portal ......................................................................... 6
Communication in the Service & Support Portal ........................................................................... 7
The Required Information - Just a Few Clicks Away 1/2 .................................................................... 8
The Required Information - Just a Few Clicks Away 2/2 .................................................................... 9

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Training and Support
General Information Well be glad to help you regarding any questions on our training courses offered.

... on the Internet www.siemens.com/sitrain

or e-mail to info@sitrain.com

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Training and Support
The complete range of courses offered can be accessed via the following links:
www.siemens.de/sitrain or
www.siemens.com/sitrain

Course Search The course search permits the user to find the required courses by applying
different search filters such as keyword, target group, etc. The filters can also be
combined.

Top Links Various courses, e.g. SIMATIC S7, SINUMERIK solution line, etc., can be reached
directly via the top links

Course Catalog The course catalog permits you to find the required course via learning paths or
via the Siemens Mall structure.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Training and Support
ST-BWINOND Introduction to Visual Basic Script (VBS actions and VBS object structures)
Introduction to ANSI-C
Presentation of the WinCC database (archiving of measured values)
Introduction to networks (network categories and subnetting)
WinCC Server, WinCC Client with and without project
WinCC redundancy option
Time synchronization (client/server, redundancy)
Presentation of the Central Archive Server (CAS)
WinCC Web option Web Navigator
WinCC Web option DataMonitor
System-spanning communication, OPC, WinCC options Connectivity Pack/Station,
IndustrialDataBridge
Effective configuration: Configuration Tool, CrossReference, diagnostics tools,
Engineering Station
VBA for automatic configuration in Graphics Designer
Overview of WinCC options for meeting FDA requirements
Overview of WinCC options: SIMATIC Maintenance Station, ProAgent,
DownTimeMonitor, ProcessMonitor, SIMATIC Batch (for WinCC), ODK,
IndustrialX

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Training and Support
The Service & Support portal offers you at
www.siemens.com/automation/service&support online access whenever
required to comprehensive information and services for the product range of
Industry Automation and Drive Technology.

The online support is divided into two main topics:

Expertise Product Support:


Technical information and downloads for products
(manuals, FAQ, software updates, ...)
Applications & Tools:
Automation solutions
(solution examples, system descriptions, demos, calculators, tools, etc.)
Services:
Information on our comprehensive range of Service & Support
(contacts, repairs, ...)

Communication Forum:
Direct customer customer communication in case of technical questions
Support request:
Technical inquiries are sent direct to an expert

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Training and Support
General Information Online Support is a comprehensive information system with a wide range of
services which is available to you whenever required. From product support to
information on services all the way to interactive services, Online Support is
always your first step to getting help fast.

Product Support Consolidated specialist knowledge with current information on every aspect of our
products and systems is the basis for the expertise of Product Support in the form
of Frequently Asked Questions, downloads of, for example, updates/upgrades,
current product information from Marketing/Sales, electronic manuals in PDF
format, test certificates and characteristics.

Applications & Tools


Applications & Tools is the new platform for solutions and system descriptions in
the Service & Support portal. Applications & Tools support you in implementing
your automation tasks. This support is provided in the form of programming
examples and tools, background knowledge, function descriptions, operating
instructions, performance data, etc. The focus here is not on the individual product
but rather on the interaction of the individual products.
Services Information
Shows you the complete range of services offered as well as detailed information
on our Service & Support processes and contacts database.
Search for the latest Service & Support publications - or do you want to know at
which trade fair you can meet us personally? All this and more is available under
"Information".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Training and Support
Technical Forum In order to supplement our comprehensive range of services and support, we
promote the direct dialog between experts with the help of modern web
technology. The new Technical Forum is an attractive discussion platform in
German and English where users and experts can exchange information and
ideas.
Support Request Use the online Support Request to always get a direct answer to your questions.
You enter your inquiries in online screen forms. You immediately receive suitable
solution options from the Knowledge Base. If the suggested solution does not
solve your problem, send the web form direct to our team of experts at Technical
Support (hotline).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Training and Support
An intelligent Search function and user-friendly Navigation function are available
for finding the required information:
Search An intelligent and comprehensive search function is offered for finding relevant
results.

Automatic recognition of keywords


Automatic spell-check
Automatic sorting of the hit list entries according to up-to-dateness
Navigation You can also navigate via the product tree to the specific required information. An
index is available to facilitate the selection of a product.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Training and Support
SITRAIN Training for ST-BWINCCS
Automation and Industrial Solutions Page 9 Training and Support