0% found this document useful (0 votes)
153 views248 pages

Win CC Training

The document outlines the process of creating a project, coupling a PLC, and simulating tags using SIMATIC HMI and WinCC. It covers objectives such as configuring tags, installing communication drivers, and preparing configurations for various PLC types. Additionally, it details the project structure, data exchange methods, and exercises for practical application.

Uploaded by

diemtrieu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views248 pages

Win CC Training

The document outlines the process of creating a project, coupling a PLC, and simulating tags using SIMATIC HMI and WinCC. It covers objectives such as configuring tags, installing communication drivers, and preparing configurations for various PLC types. Additionally, it details the project structure, data exchange methods, and exercises for practical application.

Uploaded by

diemtrieu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 248

Creating a Project, Coupling a PLC, and Tag Simulation 1

Taïo moät döï aùn, keát noái vôùi PLC vaø moâ phoûng moät nhaõn

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.1
Creating a Project, Coupling a PLC, Variable Simulation 2
Taïo moät döï aùn, keát noái vôùi PLC vaø moâ phoûng bieán 2

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.2
Objectives
Muïc tieâu

- Creating a Project

- Installing Communication Drivers

- Configuring Tags

- Tag Simulation

- Cross Reference
Tham chieáu cheùo

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.3
Configuration Preparation
Chuaån bò caáu hình

- Programmable Logic Controllers

- Type of Coupling

- Process Tags
PLC + Loaïi keát noái + Nhaõn quaù trình

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.4
Creating a Project

Office PC or
Industrial PC -one Single-User
-one Server, several Clients
without their own project

-Distributed Systems, several


Clients with their own
project

SIMATIC NET

PLC

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.5
WinCC Project Structure and Files

-Tag Logging RT-Data


-Alarm Logging RT-Data
see Text
-Imported RT-Data -Database Logfile
-Cross Reference List (.xfc)
-Main File of the Project
-Computer Name
-Database with
-Configured Screens (.pdl, .sav) Configuration Data
-Screen Files (.bmp, .emf, .wmf)
-Action Lists (.act) -Cross Reference
Main File
-Project Functions (.fct)
-Projekt Library (.pxl) -Log File to Database
-Funktion Declarations (.h)
-Function Library (.dll) -Master-DB with link to the
RT-Files +
-Project Actions (.pas) User Archive-Database

-Report Layouts (.rpl)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.6
Interchanging between Projects
Chuyeån ñoåi giöõa hai döï aùn

Project name. MCP

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.7
Specifying Project Properties
Ñaêc tính ñaëc bieät cuûa döï aùn

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.8
Computer Properties (1/2)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.9
Computer Properties (2/2)

.cur
.ani

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.10
Ñaëc tröng cuûa caùc Module trong WinCC

Function Modules within WinCC 1/2


Teân döï aùn
- Maùy tính
- Quaûn lyù nhaõn
- Loaïi caáu truùc

Project(name) with Editors

- Computer - Graphics system


- Tag Management - Message system
- Structure Types - Measured value
acquisition and
archiving
- Report system
- C-Programs, VBS and
actions
Transfer edited
data to the - Text library
Operator Station - Password protection
- Cross Reference

WinCC hierarchical tree structure

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.11
Function Modules within WinCC 2/2
Deactivate
Activate

Editors
- Graphics system
- Message system
- Measured value
acquisition and
archiving
- Report system
- C-Programs, VBS and
actions
- Text library
- Password protection
- Cross Reference
-Option

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.12
Task Definition
Ñònh nghóa task

17.02.96 11:15:45

SIMATIC WinCC Start picture

Alarm Logging -
Motor picture Bottling plant Trends Messages

Setpoint speed
Actual speed

Data Management

Reports

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.13
Tags for the Process Connection

Process Coupling Process Image Function


such as, DB,DW for SIMATIC Setpoint speed
Actual speed
10
11
12
M
13.0

20
SIMATIC S5

SIMATIC S7

30
SIMATIC 505
Archive
Other drivers 35

Message events Motor 1 defective


40.0
40.1 Valve 3 sticks
...

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.14
Data Exchange with SIMATIC S7
Trao ñoåi döõ lieäu vôùi SIMATIC S7

Programmable Logic Controller WinCC Station

Actual value 190

Setpoint value 95
DB20

DBW 6 Int=190
DBW 8 Int=95 Image
Actual speed Setpoint speed
DB20.DBW6 DB20.DBW8

Digital output
LAN

Digital input MPI

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.15
Data Exchange with SIMATIC 505

Programmable Logic Controller WinCC Station

Actual value 190

Setpoint value 95
V010

=190
=95 Image
Actual speed Setpoint speed
V010, V010,

Digital output
LAN
Digital input MPI

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.16
Installation of the SIMATIC Device Drivers (S7-DOS)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.17
Communication Structure
Moâ hình truyeàn thoâng

WinCC Application (Graphics RT,


Alarm Logging RT, Tag Logging RT, etc.)

WinCC Data Manager

Lab Station:
WinCC communication drivers
(e.g. SIMATIC S/-Protocol Suite)

MPI Channel unit


(e.g. PROFIBUS)

Hardware driver
S7-DOS Driver (e.g. S7-CP 5613)

CP5611 Communication processor


(e.g. CP 5613)

PLC
S7-300 (e.g. SIMATIC S7-300 withCP 342)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.18
Selecting Communication Drivers for the Connection

A)

B)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.19
Exercise: Creating a Project, Configuring the PLC Connection 1
Name of the
communication
connection

Always 0 for
integrated MPI
interface.

- We will configure the tags for this connection in the next exercise.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.20
Status of the Connection

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.21
Connection Diagnostic with SIMATIC S7 (*.LOG)

C:\Siemens\WinCC\Diagnose\SIMATIC_S7_PROTOCOL_SUITE_01.LOG

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.22
Quality Code

WinCC in RT

WinCC has to be in Runtime in order to display the Quality Code.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.23
Exercise: Creating a Project, Configuring the PLC Connection 2

Project name

SIMATIC TI driver

Name of the
communication
connection

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.24
Configuring Process Tags for SIMATIC S5/S7

Note
Use of S7 symbols (TIA)
is possible as of WinCC V5.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.25
Configuring Tags for SIMATIC 505

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.26
Exercise: Configuring Process Tags and Tag Groups
Configuring Tag Groups

Name of the 1st. group: motor_picture


Name of the 2nd. group: bottling_plant
Name of the 3rd. group: measurement_points
Name of the 4th. group: message_events

Configuring Tags For SIMATIC S7

Name Data Type Address

P_signal0 binary tag DB20.DBX16.0


P_signal1 binary tag DB20.DBX16.1
P_event1 unsigned 16-bit value DB20.DBW12

P_trend_1 signed 16-bit value DB20.DBW6


P_IVar_Mess signed 16-bit value DB20.DBW8

P_Tank1_IB0 unsigned 8-bit value IB0


P_Tank2_QB0 unsigned 8-bit value QB0

P_setpoint_speed signed 16-bit value DB20.DBW10


P_actual_speed signed 16-bit value DB20.DBW14
P_switch1 binary tag DB20.DBX16.2
P_motor1 binary tag DB20.DBX16.3

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.27
Configuring Internal Tags

Shortcut menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.28
Exercise: Configuring Internal Tags and Tag Groups 1
Configuring Tag Groups

Name of the 1st. group: I_motor_picture


Name of the 2nd. group: I_bottling_plant
Name of the 3rd. group: I_measurement_points
Name of the 4th. group: I_message_events

Configuring Tags For SIMATIC S7

Name Data type

event1 unsigned 16-bit value


...
...

trend_1 signed 16-bit value


IVar_Mess signed 16-bit value

...
...

setpoint_speed signed 16-bit value


actual_speed signed 16-bit value
switch1 binary tag
motor1 binary tag

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.29
Exercise: Configuring Internal Tags and Tag Groups 2
Configuring Tag Groups

Name of the 1st. group: TI_motor_picture


Name of the 2nd. group: TI_bottling_plant
Name of the 3rd. group: TI_measurement_points
Name of the 4th. group: TI_message events

Configuring Tags For SIMATIC505

Name Data type

TI_event1 binary tag


...
...

TI_trend_1 signed 16-bit value


TI_IVar_Mess signed 16-bit value

...
...

TI_setpoint_speed signed 16-bit value


TI_actual_speed signed 16-bit value
TI_switch1 binary tag
TI_motor1 binary tag

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.30
"Cross Reference" (Cross Reference List 1/3)

.
.. .XFC
Cross Reference Lists
Editor
Filter

Internal Data Management .XFS

WinCC Data

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.31
"Cross Reference" (Cross Reference List 2/3)

Call Update Data Management and View


Update Place of Use
Export *.CSV Filter
Linking
Update Data
Management

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.32
"Cross Reference" (Cross Reference List 3/3)

Tag Actual_Value is automatically


listed in der Cross Reference.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.33
Tools: CrossReferenceAssistant

Call

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.34
Tag Simulation 1/2

Simulation software on WinCC CD


- Sine
- Oscillation
- Random numbers
- Increment
- Decrement
- Slider

Testing functions with internal and process tags.


Process tags can only be simulated if the communication
connection to the PLC has been made. Since the tag value in
the PLC can be changed by the simulation, you have to
take the necessary precautions (such as separating the load
current circuits).

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.35
Tag Simulation 2/2

Call

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.36
WinCC Communication with S7 Protocol using MPI to S7- 300/400
Programmable Logic Controller WinCC Station

Actual value 190

Setpoint value 95
DB20

DBW 6 Int=190
DBW 8 Int=95 Image
Actual speed Setpoint speed
DB20.DBW6 DB20.DBW8

Digital output
MPI
Digital input

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.37
Communication Components

On the PLC side

CP CP Software
MPI interface of the CPU -

On the PG/PC side

CP CP
Software
CP 5611 (S7 DOS from WinCC)
SIMATIC Device Drivers

On the WinCC side

WinCC Channel DLL Core / Option


S7 Protocol Suite - MPI Core

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.38
Procedure

1) Installation of the CP5511 card according to the product


information

2) Configuration on the WinCC side, see Page 19.

3) Configuration in the SIMATIC CPU.


No communication programs are necessary here.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.39
Installation of the CP5511 Card in the PC

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.40
Installing Modules

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.41
Specifying Properties of the CP5611 Card

Local Station Address

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.42
S7 Variable Table for Monitoring and Modifying

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.43
Connection Status

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.44
Documentation for Communication

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.45
TIA Functionality, Mapping Tags

Step7 WinCC

Database Database

Communication (Mapping)

STEP 7
Symbol Table WinCC Tag Management

Data Block

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.46
Creating an OS (Operator Station)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.47
Creating a Symbol Table, Generating a Data Block 1/2

set

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.48
Creating a Symbol Table, Generating a Data Block 2/2

Object
Properties

set

Short-cut menu->Special Object Properties, O C&M

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.49
Creating an S7 Program

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.50
Generating PLC/OS Connection Data (Mapping)

Error Log after mapping

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.51
Transferring (Mapping) Data from Step7 to WinCC 1/2

2.

Q
Q
I
I
1. Select

Symbols from the S7 Symbol Table

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.52
Transferring (Mapping) Data from STEP 7 to WinCC 2/2

Symbols from the data block

Select

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.53
Mapped Symbols in the WinCC Explorer

1
S7-Programm(3)/Motor_Area1.Slip_Speed1 Signed 16-bit Value DB11,DW10

2 3

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.54
Mapped Symbols for Tag Connection

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.55
Automatic Mapping in the Background

Drag&Drop

Drag&Drop

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.56
TIA: Ladder Rung Jump with Writing Authority in STEP7

WinCC:
Block call from
WinCC pictures
directly to STEP7
program

STEP7:
Create User with the function Linking STEP7 block.
“STEP7 Writing Authority“ WinCC call from STEP7

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.57
Generating Reference Data for Ladder Rung Jump

Necessary for
ladder rung jump
from WinCC

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.58
Ladder Rung Jump to STEP 7

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.59
"Show Picture" Return to WinCC

Shortcut
menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.60
TIA Functionality, Hardware Diagnosis from WinCC Pictures

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.61
Configuration of an Attribute for Hardware Diagnosis

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.62
Configuration of the Event for Hardware Diagnosis

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.63
TIA Functionality, SIMATIC “Report System Error“ in
WinCC Graphic Pictures

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.64
Graphic Screens (1)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.65
Graphic Screens (2)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.66
Graphic Screens (3)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.67
Graphic Screens (4)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.68
Graphic Screens (5)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.69
Objectives

- Configuration Interface
- Creating Pictures

- Making Dynamic

- Library

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.70
Preparation for Configuration (1)

- Process Pictures
- Static Part

- Dynamic Part

- Action Configuration

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.71
Preparation for Configuration (2)

- Archiving Messages
- Acquiring Measurement
Values

- Reporting

- Passwords

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.72
Operating and Monitoring Terms

- Graphic screens
aphic screens
- Notes for creating gr
hic screens
- Elements in the grap
- Digital value

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.73
Examples of Dividing a Screen

(1)
(2)
(2)

(3) (3)

(2)
(2)

(3)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.74
Graphics Editor Configuration Interface

Menu bar Toolbar


Screen name
Frame color
Text color
Object palette
Color palette

Style palette

Graphic objects from


the object palette
Zoom
Alignment palette
Layer bar Position Screen size

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.75
Graphic Object Palette (1)

Shortcut Menu
Standard Objects

Smart Objects

Windows Objects

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.76
Graphic Object Palette (2)

Windows Objects

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.77
Graphic Objects (1)

- aligning
- selecting
- changing of attributes
- background grid

Shortcut Menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.78
Graphic Objectes (2)

-deleting
- changing

- shifting

- duplicating

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.79
Graphic Objects (3)

- rotate
- mirror

- arrange

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.80
Symbol Library ´Siemens HMI Symbol Library 1.3´ 1/2

‰ New symbol library ´Siemens HMI Symbol Library 1.3´

‰ They are not purely graphic objects

‰ rather Controls with dynamic Properties:


€ Appearance
€ Flashing mode, speed
€ Position, colors

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.81
Symbol Library ´Siemens HMI Symbol Library 1.3´ 2/2

As of V5+SP2

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.82
Alignment Palette and Layer Palette

Left Right

Top Bottom

Align space horizontally Align space vertically

Divide horizontally Divide vertically

Same width Same height

Same width and height


Change active layers

1 - Tank

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.83
Style and Tag Palette

Line Style

Line Width

Line Ends

Fill Pattern

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.84
My First Project

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.85
Defining a Start Picture
Alternative 1

Activate Runtime

Alternative 2

Shortcut
menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.86
Autostart Function

Switch on PC

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.87
Exit WinCC Explorer

2)
1)

2)
1)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.88
Default Trigger for Objects

Note: User Cycle is suitable for


central changability!

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.89
Overview of Possibilities to make Graphic Screens Dynamic with
Accessory Examples 1/2

‰ Configuration Dialog (fast configuration) Type I/O


‰ Dynamic Wizard (configuration assistant) Type I/O
‰ Tag Connection Type O
‰ Dynamic Dialog Type O
‰ Direct Connection Type I
‰ Property actions on the object Type O
corresponding to the ANSI C Syntax
‰ Event actions on the object Type I
corresponding to the ANSI C Syntax
‰ VBS Visual Basic Script Properties Type O
‰ VBS Visual Basic Script Event Type I/O

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.90
Overview of Possibilities to make Graphic Screens Dynamic with
Accessory Examples 2/2

‰Configurationdialog (fast configuration) Type I/O


‰ Dynamic Wizard (configuration assistant) Type I/O
‰ Tag Connection Type O
‰ Dynamic Dialog Type O
‰ Direct Connection Type I/O
‰ Property actions on the object Type O
corresponding to the ANSI C Syntax
‰ Event actions on the object Type I
corresponding to the ANSI C Syntax
‰ VBS Visual Basic Script Properties Type O
‰ VBS Visual Basic Script Event Type I/O

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.91
Call of Dialogs for Dynamics 1/2

Shortcut menu

Shortcut menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.92
Call of Dialogs for Dynamics 2/2

Shortcut menu

Shortcut menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.93
Dynamic Wizard Overview 1/2

The Wizard generates a C-script in the background that can be used for further applications.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.94
Dynamic Wizard Overview 2/2

The Wizard generates a C-script in the background that can be used for further applications.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.95
Tag Connecting Overview
Decimal Display

Menu bar > View,


Drop-down >Toolbars
->Tags

Drag & Drop


>=V5

green

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.96
Dynamic Dialog Overview
Color Attribute Change

Shortcut menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.97
Dynamic Dialog Overview
Status Evaluation for Process Tags

Object: Static Text

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.98
Direct Connection Overview

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.99
The Programming Language C in General

From the Program Text to the Executable Program

Source Text

‰ Editing (With a compiler that contains a text editor)

‰ Compiling (The C compiler creates an object file with a machine code.)

‰ Linking (The Linker connects several objects into an executable program.)

‰ Executing (The compiled and fully connected program can then be executed.)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.100
Configuration Rules in C Actions

// WINCC:TAGNAME_SECTION_START
// syntax: #define TagNameInAction "DMTagName"
// next TagID : 1
#define TAG_ I_ Setpoint1 “Setpoint1 "
// WINCC:TAGNAME_SECTION_END

// WINCC:PICNAME_SECTION_START
// syntax: #define PicNameInAction "PictureName"
// next PicID : 1
// WINCC:PICNAME_SECTION_END
.
.
SetTagDWord(TAG_ I_ Setpoint1 ,100);

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.101
Overview of Property Actions with C Syntax
Calculation of an Output Value

Create Action Export Action *.act


Import Action *.act

green or
yellow
lightning
bolt
Note: You will find a C-Operators list in Chapter 15

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.102
Diagnostic Means for C-Scripts

1) {
WORD back;
back=GetTagWord("wert");
printf(“Outputfield \r\n");
return back;
}
1)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.103
Overview of Event Actions with C Syntax
Increment/ Decrement

Note: Ready-made objects from


the symbol library can be used for
these functions

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.104
Visual Basic

V6.3

Note: From the WinCC V6 CD “Additional Software“, install the Microsoft Script Debugger

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.105
VBS, VBA Data Types
VBS Data type: VBS uses the Variant data type. The Variant data type automatically adapts itself to
the assigned value.

VBA Data types


Name Type Value Range Memory

Byte Integer 0-255 1 Byte


Boolean Integer 0,1 2 Byte
Integer Integer -32,768 to 32767 2 Byte
Long Integer -2,147,483,648 to 2,147,483,647 2 Byte
Single Floating point -3,37E38, to 3,37E38 (7 digits) 4 Byte
Double Floating point -1.7...E308, 1.7...E308 (15 digits) 8 Byte
Date Date 1.1.1000 (-657434) to
31.12.9999 (+2958465) 8 Byte
String String 0 to 65535 characters Number of characters
Variant any Depends on the assigned
data type at least 16 Byte

Example: Dim Setpoint As Integer


You will find a VB Operator list in Chapter 15.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.106
Configuration Rules in VBS Actions

‘set a tag with the setpoint


‘creator: W.Meissner

Tag Soll1 is automatically included


in the Cross Reference.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.107
VBScript Object Model in WinCC

Example: Set my_Soll1=HMIRuntime.Tags("Soll1")


Example: Set Rect = ScreenItems("RoundedRectangle1")

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.108
Overview of Property Actions with VBS
Show/Hide Declaration area Tag dialog
Syntax check(F7)
+create picture specific procedures Tag dialog with extended
+declare picture specific tags return parameter
Comment/Uncomment Object selection dialog
Picture selection dialog

There is: Check the limit


+Syntax Highlighting
+Intellisense Support
+Code Templates
+Debugging

Set bookmark with


right mouse

Note: Only syntax error-free Scripts can be adopted-> take out faulty lines

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.109
Troubleshooting in VBS Actions 1/3

Runtime

error

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.110
Troubleshooting in VBS Actions 2/3

Breakpoint
Script Editing

Menu: Debug
Drop-down menu: Step Into F(8)

Testing individual tags

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.111
Troubleshooting in VBS Actions 3/3
RT

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.112
Overview of Property Actions with VBS

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.113
Overview of Event Actions with VBS

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.114
Examples with VBS Actions
Example deactivate RT
Dim my_Soll1
Set my_Soll1=HMIRuntime.Tags("Soll1") Read a tag from the Process Image
my_Soll1.READ Dim myTag
If (my_Soll1.Value >= 50) Then Set myTag = HMIRuntime.Tags(“istwert")
HMIRuntime.Stop value = myTag.Read
End If
End Sub write
myTag.Write
Example to display a Helptext
Dim Recht
Set Recht = ScreenItems("StaticText2") In this example a value is written in Soll1
If Recht.Visible=0 Then Dim my_Soll1
Recht.Visible=1 ‘Visibile Set my_Soll1=HMIRuntime.Tags("Soll1")
Else my_Soll1.Value = 0
Recht.Visible=0 ‘Invisible my_Soll1.Write (vbFalse)
End if
End Sub or

Examle for collecting Status Istwert_1 Dim my_Soll1


Dim myTag,last_err my_Soll1.Write (5, vbFalse)
Set myTag = HMIRuntime.Tags(“Istwert_1")
last_err = myTag.LastError The Parameter "vbFalse" means, that the tag is written
If (last_err > 0) Then synchron, this is directly in the process.
Msgbox myTag.QualityCode
End If

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.115
Activating the VBA Editor (Development Environment)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.116
Overview VBA
'In this example, a short message is to be displayed when a picture is opened. The "Opened” event is
used for this, after that a circle is to be created:

Private Sub Document_Opened(CancelForwarding As Boolean)

Dim objVariableTrigger As HMIVariableTrigger


Dim objCircle As HMICircle
MsgBox ("Bild wurde geöffnet!")

Set objCircle = ActiveDocument.HMIObjects.AddHMIObject("Circle1", "HMICircle")


'Create dynamic with type "direct Variableconnection" at the
'property "Radius":

Set objVariableTrigger =
objCircle.Radius.CreateDynamic(hmiDynamicCreationTypeVariableDirect, "'Soll1'")

'To complete dynamic, e.g. define cycle:

With objVariableTrigger
.CycleType = hmiVariableCycleType_2s
End With

End Sub

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.117
Comparison of VBA and VBS

-Standard Microsoft VBA 6.3 development environment


-VBScript is a subset of Visual Basic for Applications (VBA)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.118
The Way GetTagxxx Works with the Event Name Default Trigger

SIEMENS

SICOMP
IPC RI 20
zzz.pdl

CS
yyy.pdl
RT Properties
OPEN Default tr. e.g. 2 sec
<81> I1=GetTagxxx(Ist_Temp1); 2sec

return();

Application
GraphicsRT
Announce Data manager with image
all tags
* 1 sec
Ist_Temp1
.
.
.
81

* 1/2 cycle of 2 sec., for example

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.119
The Way GetTagxxx Works with the Event Name Tag Trigger

SIEMENS

SICOMP
IPC RI 20
zzz.pdl

CS
yyy.pdl
RT Properties
OPEN Tag trigger 2 sec
<81> I1=GetTagxxx(Ist_Temp1); ><Ist_Temp1

return();

Application
GraphicsRT
Announce Data manager with image
all tags 2 sec
Ist_Temp1
.
.
.
81

Note: You will find additional ‘The Way GetTag Works‘ in Chapter 15

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.120
Configuration Notes

Making things dynamic with


Performance high -Properties
>tag connection
>faster dynamic dialog with tag trigger and a tag that is assigned parameters
>slower dynamic dialog with tag trigger and several tags that are assigned parameters or
C-actions that are called (Global Script Function)
Performance low >C-actions, VBS actions
-Event
>a mouse click or object change (C-action or direct connection) has no effect on the
picture selection time

Type of Update
-tag trigger (use the same cycle for all tags)
-select a uniform update of a picture
-avoid using Change

Functions
-SetTagMultiWait for several tags is better than many SetTagxxx
-GetTagxxx ( tag is cyclically introduced to the data manager) ,SetTagxxx

Providing PLC Data


-For optimized communication, the data areas of the PLC are to be supplied for specific
pictures.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.121
Setting and Displaying Date and Time

Set Clock

The ProgramExecute function is created with


Dynamic Wizard, System Functions tab, Call:
Start another application.

ProgramExecute("C:\\WINNT\\System32\\Control.exe timedate.cpl");

Note: The directory where Control.exe is located depends on the installation of the
Windows operating system.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.122
System-info Channel 1/3

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.123
Call System-info Channel 2/3

A)

B)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.124
System-Info - Edit Variable 3/3

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.125
Configuring Picture Change (Configuration Dialog)

start.pdl schalt.pdl

Configuration with Configuration Dialog

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.126
Configuring Function Keys (Configuration Dialog)
start.pdl schalt.pdl
schalt.pdl

F9
F3

Configuration with Configuration Dialog

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.127
Digital Input/Output (Configuration Dialog)

Setpoint

kg 20
Type I
Actual value

kg 128
Type O

Speed

rpm 500
Type I/O

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.128
Bar Graph Output (Configuration Dialog)

Configuring additional properties


- Properties/Miscellaneous/Process Driver Connection: temp1
/ Maximum Value: 100
/ Minimum Value: 0
/ Trend: no
- Properties / Color / Bar Background Color: green
/ Trend Color: yellow
- Properties / Font / Font: Arial
/ Font Size: 12
- Properties / Axis / Alignment: right
/ Bar Scaling: linear
/ Digits Left of Decimal Point: 3
/ Digits Right of Decimal Point: 0

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.129
Status Display with Files

Runtime

Drag&Drop

Closed Open

Formats used:
.wmf, .emf, .bmp, .gif, .jpg, .jpeg, .dib).
Menu -> File,
Drop-down ->Export

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.130
AutoCAD and EPLAN

1.)

2.)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.131
Overview of Configuration Possibilities for Color Changes with
Accessory Examples

‰ Wizard, Color Dynamics with Table


‰ Dynamic Dialog
‰ C-Action
‰ VBS
‰ Tag Connection to the corresponding
color property

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.132
Wizard Overview, Color Dynamics with Table

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.133
Overview of Color Change with the Dynamic Dialog

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.134
Overview of Color Change with a C Action

+0 Type I/O

In order to give emphasis to the new


function, we dispensed with the
comment and define lines.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.135
Overview of Color Change with VBS Action

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.136
Philosophy for On/Off Operations
Task Solution

C-action
Toggle function with mouse-click
with acknowledgement Direct Connection
Dynamic Wizard
C-action

Toggle function with mouse-click C-action


without acknowledgement

Set Bit in var1 C-action


Reset Bit in var2
Set Bit in var2 C-action
Reset Bit in var1

Set Toggle with mouse-click On Direct Connection


Reset Toggle with mouse-click Off Dynamic Wizard
C-action

Left / right mouse button for toggle Direct Connection


Dynamic Wizard
C-action

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.137
Tag Input and Output in a C Routine for a Process Value
Adjustment

P_tag memory from WinCC (CPU) T_tag memory from C

4.Set
1 1

PA13A 0 1 T_Value1
1.Get 0 1

BOOL T_Value1;
1.Get T_Value1=GetTagBit("PA13A");
T_Value1=! T_Value1;
2.Set
SetTagBit("I_Value2",T_Value1);
I_tag memory from WinCC

2.Set

I_Value2 1 3.Get
3.Get BOOL T_Value1;
T_Value1=GetTagBit("I_Value2");
4.Set SetTagBit("PA13A",T_Value1);

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.138
Binary Switching Operation (Two-Step Operation)
with Acknowledgement

Configuring with C-action:


Events/Mouse/Press Left/Action
BOOL T_value1; pbo.pdl
T_value1=GetTagBit("PA13A"); Operating picture Dialog box2
T_value1=!T_value1; Diapa13A.pdl
SetTagBit("I_value2",T_value1);

Configuration with Direct Connection:


Source: Tag I_Value2
Target: Tag PA13A

Configuration with Direct Connection:


Source: Constant 0
Target: Current Window -> Display

Configuration with Dynamic Wizard:


Picture function
Display WCCDialog Box with Diapa13A.PDL

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.139
Binary Switching Operation without Acknowledgement
(Two-Step Operation)
Picture Change in Window
Configuration with Dynamic Wizard:
Configuring with C action: -Picture function
Events/Mouse/Press Left/Action Operating picture -Picture change in window with Diapa14A.pdl
BOOL T_Value1; Diapa13B.pdl
T_Value1=GetTagBit("PA13B"); pbo.pdl
T_Value1= !T_Value1; PA 13B
PA 13B
Picture window1
SetTagBit("PA13A",T_Value1);

Diapa 13B,pdl
PA 13B

Diapa14A.pdl
PA 14A

Configuration with Dynamic Wizard:


-Picture function
-Picture change in window with Diapa13B.pdl
Picture window1 Attributes

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.140
Bit Setting in a Word with the Dynamic Wizard

conveyer 4 conveyer 3 conveyer 2 conveyer 1

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.141
Slider Object for Adjustments

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.142
Check Box (Events at the Object)
Configuring with tag connection:
-Properties/ Output-input/ Selected Fields/ Dynamics:
Tangram(signed 32-bit value)

Deleting the display with:


Direct Connection:
-Source: Constant 0
-Target: Tag Tangram

Making the Display Dynamic with:


Dynamic Dialog.
Bit address
0 //Head
1 //Left Arm
2 //Right Arm
3 //Left Leg
4 //Right Leg
5 //Left Foot
6 //Right Foot

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.143
1. Operator Help per Operation
2. ToolTip Text

help.pdl Configuring
-Properties/Static Text/ Object Name: helpText1
/ Layer: 2
/ Font/ Text: boiler temperature
0 to 100
/ Font/ X Alignment: centered
/ Font/ Y Alignment: centered
/ Miscellaneous/Display: no

Configuration with Direct Connection:


- Source: Constant 1
- Target: Object in Picture, helpText1, Display
Configuring with Direct Connection:
- Source: Constant 0
- Target: Object in Picture, helpText1, Display

Configuring ToolTip text:


- Properties / Miscs/ ToolTip text: Boiler 10

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.144
Customized Object

Pos. X

Drag & Drop


create
1. Shortcut menu

2.

3. Shortcut menu

Result

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.145
Indirect Addressing
I_Wert_1

Enable

The tag “namevariable“ must be created as an internal tag of the “Text tag 8-bit character set“ data type.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.146
Block Technology Overview

-Tag Prefix
(>=V5.0)

-Indirect Addressing
(regardless of the version)

-Picture in Picture Technology with Dynamic


Wizard
(Picture blocks: 1. TypeWizard, 2. InstanceWizard, >=V4.02)

-ActiveX Controls (SIMATIC HMI Option with


IndustrialX)
(additional with VB 5 configuration tool)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.147
Block Technology in General

Template with
type objects
Tags (instances)
generated from
structure tag Application
picture

Data records
in the
SIMATIC PLC
Structure
Type
Editor
M M M

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.148
Task: Project in Runtime, One Picture Window for Each Button Call
Tag Prefix

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.149
Create Structure Tag in the Project

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.150
Create Internal Tags and/or Process Tags fitting to the Structure

Motor_3

Tags for
Instance Formation

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.151
Configure Template, Output Value 1/4

y:190

x:280 member name

limits:0 -100 from library

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.152
Configure Template, Background Color for Limit Values 2/4

Additionally
create as internal
tag

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.153
Configure Template, Field Type 3/4

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.154
Configure Template, Background Color for Switch Condition 4/4

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.155
Configure Motor Picture, Attributes for Picture Window, 1/4

2
3

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.156
Configure Motor Picture, Title for Picture Window, 2/4

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.157
Configure Motor Picture, Call Picture Window, 3/4

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.158
Result: Project in Runtime 4/4

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.159
Task: Project in Runtime, One Picture Window for Several Motors

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.160
Sequence in Instance Formation

SetTagPrefix(); SetTagPrefix();
SetPictureName(); SetPictureName();

Note: SetTagPrefix(); The “Tag Prefix“ attribute can be made dynamic with the name “TagPrefix“.
SetPictureName(); The “Picture Name“ attribute can be made dynamic with the name “PictureName“.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.161
Configure Motor Picture, Attributes for Picture Window

2
3

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.162
Configure Motor Picture, Title for Picture Window

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.163
Configure Motor Picture, Button for Connecting the Tag Prefix

SetTagPrefix(lpszPictureName,"Bildfenster6",“Motor_1.");
SetPictureName(lpszPictureName,"Bildfenster6",“Motor_Box.pdl");

SetTagPrefix(lpszPictureName,"Bildfenster6",“Motor_2.");
SetPictureName(lpszPictureName,"Bildfenster6",“Motor_Box.pdl");

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.164
Indirect Addressing Overview

3) sbb_ind_Adr_grafik.PDL sbb_ind_Adr.PDL
2)
Internal tags I_Setpoint
Unter-
Value objekt_1 Picturewindow1
I_Setpoint Value
I_Actual Value I_Actual Unter-
Value Unter-
objekt_2
I_Setpoint objekt_1
... Value
I_Manual
Value I_Actual
Unter- Value Unter-
Process tags objekt_n objekt_2

(Structure tag) I_Manual


Value
Unter-
objekt_n
Drive1.Setpoint v. Ind. Addressing
4)
Drive1.Actual val.
...
Drive2.Setpoint Connect when
Drive2.Actual picture is selected
...
Drive 1 Drive 2
1) Create structure type e.g.
Drive. 5) 5)

SetPictureName(lpszPictureName,“PictureWindow1","sbb_ind_Adr_grafik.PDL");
SetVisible(lpszPictureName,“PictureWindow1",1);
SetTagMultiWait("%s%s%s",
"I_Setpoint",“Drive1.Setpoint",
"I_Actual",“Drive1.Actual",
"I_Manual",“Drive1.Manual");

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.165
Picture in Picture Technology with Dynamic Wizard Overview 1/2
1) Create structure type 2) Template (LC.PDL) with @TYPE_LC.pdl
e.g. Antrieb (drive).
Setpoint
Value Object_1

Create process tags Actual


Drive1.Setpoint Value

Drive1.Actual 3) Template Wizard Object_2


Manual
Value
...
Drive2.Setpoint Object_n

Drive2.Actual
...
4) Call graphic picture
Drive 1 Drive 2
xyz.PDL
5) Instance Wizard 5)

Fixed module in picture

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.166
Picture in Picture Technology with Dynamic Wizard Overview 2/2

Performance Profile

Instance Type 1: fixed (picture) module in picture

Instance Type 2: one module that can be displayed and that can be called
using one button (per tag)

Instance Type 3: several modules that can be displayed and that each can be
called using one button (tag)

Instance Type 4: fixed module with selectable name

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.167
Block Technology with ActiveX- Controls
(Option with IndustrialX)

IndustrialX

Basic and WinCC Controls Service Controls

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.168
Display Picture Name in any Picture

-With the key combination Shift+Ctrl+Alt


(In Runtime, point with the mouse on an object in the picture. After a short time a
ToolTip text is displayed).

-Display status line at the bottom


(In the WinCC Explorer, using Computer properties, select the window attribute
"Status-Line ". After Deactivate - Activate Runtime the picture name of every
picture is displayed in the Status-Line at the bottom).

-Updating a static text per C-Script


(Solution is dislayed in the text below).

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.169
User Administrator (Password Protection) 1/3

Shortcut menu:
Open

Group Electrician Locksmith


User Login Otto Willi
Password Otto_WB Willi_B

No Function Enable No Function Enable

1 Value input 1 Value input -


~
2 Picture change ~ 2 Picture change ~

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.170
User Administrator (Password Protection) 2/3

Group

Mouse
double-click
Create a
window for
a group or
user

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.171
User Administrator (Password Protection) 3/3

Setpoint

Shortcut menu:
Properties

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.172
Exercise 1: Creating a Picture

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.173
Exercise 2: I/O Fields for Setpoints and Actual Values

I/O field for the


setpoint speed
Output field for the
actual speed

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.174
Exercise 3: Motor Operation and Motor Color Change

Motor operation

setpoint speed
operation

Motor symbol with


color animation

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.175
Exercise 4: Calculation of an Output Value with C
Aktionen.pdl

In Object Properties ->Miscellaneous set


the attribute Sizeable to yes.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.176
Exercise 5: Calculation of an Output Value with VBS
and Troubleshooting
Aktionen.pdl

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.177
Exercise 6: Bar Graphs for Setpoints and Actual Values

Bar graph for


setpoint speed

Bar graph for


actual speed

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.178
Exercise 7: Status Display

Zustandsanzeige.pdl
close
open

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.179
Exercise 8: Two-Step Operation

Motor.pdl
Operating picture: Mot1.pdl

Configuration with Direct Connection:


-Source: Constant 0
-Target: Current Window-> Display
Configuration with Dynamic Wizard:
-Picture Function
-Display WinCC Dialog Box with Mot1.pdl

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.180
Exercise 9: Setting a Bit in a Byte

Conveyer 2

Q0.1

Bandanlage.pdl

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.181
Exercise 10: Help Function

H
Object name: Help Text

Press right mouse button:


display help text
Release right mouse button:
hide help text

Tooltip text

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.182
Exercise 11: Customized Object

Customized object

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.183
Exercise 12: Indirect Addressing

textvariable with indirect addressing

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.184
Message Display and Message Archiving 1/2

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.185
Message Display and Message Archiving 2/2

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.186
Objectives

- Edit Message Line

- Edit Messages

- WinCC Alarm Control

- Message Classes

- Message Archives

- Group Messages

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.187
Configuration Preparation

- Message Archive Structure

- Acknowledgement Concept

- Evaluation

- Links

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.188
Message System 1/3
Message
sequence
report
Internal tag

Binary tag old /


Main Memory
new
Limit values
Ring buffer main memory SIEMENS

New page
Prepare message SICOMP
IPC RI 20

Message WinCC Control


Process frame Inter-
pre- Selection in archive
tation

- Shiftreporting
- Daily reporting
Integrated backup function - Monthy reporting

Message system API


.mdf

Central WinCC Add-On ODK


Options
Archive Server
User -SIMATIC IT PPA
applications -Dat@Monitor (Web-Client
for Historian display and
analysis )

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.189
Message System 2/3
Swap in/swap out
Depends on the
Requirement->Backup
Archives (.mdb)

RT Database (cyclic archive)

RT Master database

ALG Master
Database

Analysis / Evaluation
Data acquistion
• WinCC Standard Tool (Control)
• WinCC Data Manager Long-term archiving • Protocols (Report Designer)
• OPC Server • High performance archiving • WinBDE (recording operating data)
• WinCC Server-Server • Swap data in - swap data out
Communication
• Dat@Monitor + Excel
• Connectivity Pack + External Appl.
• IndustrialDataBridge + Ext. Appl.

Note: ES=Single segment

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.190
Message System 3/3

Runtime-Data Alarm Logging Segment:


Data acquisition COMPUTER_PROJECT_ALG_<Time_from>_<Time_to>.LDF
+WinCC Data Manager
+OPC Server COMPUTER_PROJECT_ALG_<Time_from>_<Time_to>.MDF
+WinCC Server-Server COMPUTER_PROJECT_ALG_YYYYMMDDHHMM.LDF
Communication(max.11)
Example: DOZENT_Generatorhaus_ALG_200304300901.mdf

Message list
Long-term archive

Short-term archive

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.191
Message Blocks and Message Line

System blocks User blocks Process value blocks

Clock time Error cause Process value 2

Date Error location Process value 1

Number
max. 10 max. 10

Message
line

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.192
Message System Call-Up

1. Call the shortcut menu.


2. Click on the mouse to select “Open.”
Result: Alarm Logging starts.
3. Maximize the window and set up the interface
as you want it.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.193
Message System Configuration Interface

Select Wizard

Editing window
Analog Alarm
Menu Bar: Options, drop-down menu: Add Ins ...
Table window
Navigation window

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.194
Wizard Overview

Wizard

Configuration
dialogs

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.195
Editing Message Blocks

Shortcut menu

Shortcut menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.196
Structure of Messages with Message Classes and
Message Types
1) Technological Division
1... 1... 16 Message Classes

Types 1... 16

2) Priority Division
1... 16 Message Classes

Types 1... 16

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.197
Editing and Configuring Message Classes
- Acknowledgement theory - Status texts
- Acknowledgement of central for the message
signaling devices

Max. 16

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.198
Editing the Message Types

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.199
Setting Up a Message Archive

Shortcut menu

OR

OR

Ring buffer archive

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.200
Setting Up Messages for Reloading

Shortcut menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.201
Backup Configuration

Shortcut menu

RT Data

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.202
Resetting the Archive and Evaluating Old Archives

Shortcut menu for WinCC in CS mode Shortcut menu for WinCC in RT mode

Reset: Connect:
All Database files in the Necessary when old archive files
long-term archive are deleted are to be evaluated
after check back.
In the first RT mode, DB files Disconnect:
are automatically recreated. “Opposite” of Connect

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.203
Editing a Single Message

- Infotext - Tags for


- Text for process value
user blocks blocks
- Loop in Alarm
picture

Shortcut menu
"Properties"

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.204
WinCC Alarm Control in Graphics Designer

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.205
Window Properties for WinCC Alarm Control

- Status bar on/off - Separation lines - Edit Message - Toolbar on/off


- Elements of - Selection blocks - Keyboard functions
status bar enabled - Auto Scrolling - Alignment
- Line properties - Edit - Hotkeys
- Alignment
- Column properties Message line
- Shorten Title

Toolbar
Double-click

Preview
Message line

Status bar

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.206
Message Line for WinCC Alarm Control

Double-click

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.207
Configuration Notes

Bit Message Procedure “Reporting in the Correct Chronological Order“

- WinCC polls the message bits every 500ms + message telegrams are only sent when events occur
+ exact time-stamp for messages
+ easy to configure (length of the CPU cycle; e.g. 50ms)
- with PMC “central acknowledgement“ without
- “central acknowledgement“ through additional work
acknowledgement tags - S5-PMC: higher capital expenditure (PMC channel;
PMCPRO and special FBs)

- S5-PMC: higher CPU scan cycle time and higher


memory usage

+ Advantage with S5 communication: S5-PMC


does ‘Blocking‘

+ S7 blocks integrated in the operating system

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.208
Message Blocks Exercise
System blocks

Properties -Sequence -Time format -Length -6 digits -Length -Length


-Two-digit year 8 characters -With leading 8 characters 15 characters
zeros

User blocks

Properties -10 characters -14 characters -12 characters

Process value blocks

Properties -4 characters

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.209
Message Class, Message Types, and Archives Exercise

Configuring message classes Message types

Blast furnace
Alarm Failure

General - Name: blast furnace - Arrived: red Properties


- Message types - Departed: green
Alarm, error - Acknowledged: yellow

Acknowledgement -Acknowledgement
came in
Archive

Status texts - ARR


Properties
- DEP
- ACK
- A/D

-100 messages -See screenshot in text


for reloading

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.210
Single Message Exercise

Table window

Or process tag IB0

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.211
WinCC Alarm Control Exercise

-Date
-Time
-Number
General Window Title: Blast furnace-W. -Status
Window Type: Message Window -Message text
Message Line -Point of error
-Cause
Parameters -Class
-Type
Status Bar -Display
-Alignment down
-Select all
elements
of the status bar -Separation lines horizontal and vertical
"activated"
Toolbar -Display -Selection: Cell "activated"
-Alignment up -Auto Scrolling not activated
-All key functions (for Window Type: Message Window)
-Line Title "activated"
-Column Title "activated"
-Change Column Width "activated"

Copy (if present) the picture melden.pdl into your project from the catalog ab_uebung.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.212
Message Screen Exercise

WinCC Alarm Control

In the start up list 1.) Alarm Logging RunTime and 2.) Text Library Runtime must be selected.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.213
Group Messages

1) From message classes:


Message class A Message class B ..... ... Message class P

Message type 1 ....message type 16 ...... ... ..... Mess. type 1 .... mess. type 16

2) From user-defined messages:


Message numbers x to (x+2n) ........... Message numbers y to (y+2m)

Messages .... ....messages Messages .... ....messages


x to x+n .... .... x to x+2n y to y+m .... .... y to y+2m

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.214
Creating the Tag for a Group Message

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.215
Connect Tag with the Group Message (Message Class)

in Alarm - Logging

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.216
Evaluating the Status Tag for a Text Object

Bit 0: 0- there is no malfunction


1- there is a malfunction

Bit 8: 0- message is acknowledged


1- message is not acknowledged

15... 8... 0
00000001 00000001 incoming not ackn.

00000000 00000001 incoming ackn.

outgoing not ackn.


00000001 00000000
00000000 00000000 outgoing ackn.
(finished)

Incoming not acknowledged


Outgoing not acknowledged

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.217
Evaluating the Status Tag for a Text Object

Bit 0: 0- there is no malfunction


1- there is a malfunction

Bit 8: 0- message is acknowledged


1- message is not acknowledged

15... 8... 0
00000001 00000001 incoming not ackn.

00000000 00000001 incoming ackn.

outgoing not ackn.


00000001 00000000
00000000 00000000 outgoing ackn.
(finished)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.218
Exercise: Group Messages

Group message with message classes

Blast furnace Loading blast furnace

Incoming Incoming

Alarm Error Alarm Error

Incoming Incoming Incoming Incoming

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.219
New: Database Tools 1/2

Display only in RT

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.220
New: Database Tools 2/2

Open Table->Return all rows

Archive segments

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.221
Trend Display and Measured Value Archiving

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.222
Objectives

- Measurement Point

- Trend Display

- Trend Archive

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.223
Configuration Preparation

- Archive Description

- Archiving Time Period

- Trend Analysis

- Displaying Measured Values

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.224
Tag Logging 1/3

Int. Tag Trend and


table display

Measured Value Calcu-


lation
0 n<HD
Ring buffer RAM
Measured Value(s) SIEMENS

SICOMP
IPC RI 20

Process Measured values Fast Archive Slow Archive


frame Inter- <=1min >1min
pre-
tation

- Shiftreport
- Daily report
Integrated backup function - Monthly report

Archive system API


.ldf
.mdf
Central WinCC
Archive Server AddOn ODK Options
PM User applications, -SIMATIC IT PPA
Analysis such as diagnostics -Dat@Monitor
(Web-Clients
for display and analysis )

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.225
Tag Logging 2/3
Swap out
Depends on the
Request->Backup
Archives (.mdb)

RT Master Database

RT-DB (Fast cyclic archives with compressed data)


TLG Master
Database RT-DB (Slow cyclic archives with uncompressed data)

Data acquistion
• WinCC Data Manager
• OPC Server
• WinCC Server-Server Analysis / Evaluation
Communication • WinCC Standard Tool (Control)
• Protocols (Report Designer)
• WinBDE (recording operating data)
Long-term archiving
• High performance archiving • Dat@Monitor + Excel
• Swap data in and swap data out • Connectivity Pack + External Appl.
• IndustrialDataBridge + Ext. Appl.

Note: ES=Single segment

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.226
Tag Logging 3/3

Data acquisition
+WinCC Data Manager
+OPC Server Runtime Data Tag Logging Fast Segment:
+WinCC Server-Server COMPUTER_PROJECT_TLG_Fast_<Time_from>_<Time_to>.LDF
Communication(max.11) COMPUTER_PROJECT_TLG_Fast_<Time_from>_<Time_to>.MDF
COMPUTER_PROJECT_TLG_Fast_YYYYMMDDHHMM.MDF
Example: DOZENT_ab#graf#V5.1_TLG_F_200306020629.mdf
DOZENT_ab#graf#V5.1_TLG_F_200306020901_200306021000.mdf

Runtime Data Tag Logging Slow Segment:


COMPUTER_PROJECT_TLG_Slow_<Time_from>_<Time_to>.LDF
COMPUTER_PROJECT_TLG_Slow_<Time_from>_<Time_to>.MDF
COMPUTER_PROJECT_TLG_Slow_YYYYMMDDHHMM.MDF
Example: DOZENT_ab#graf#V5.1_TLG_S_200306020629.mdf
DOZENT_ab#graf#V5.1_TLG_S_200306020901_200306021000.mdf

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.227
Measured Value Archiving and Processing

Calculations
Sum
Archiving 1)
Mean Value

Minimum

Maximum

Action

Last acquired
value
Acquisiton Cycle Time

Archiving/Display Cycle
1) 1)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.228
Tag Logging Call-Up

1. Call the shortcut menu.


2. Use the mouse to click on “Open.”
Result: Tag Logging starts.
3. Maximize the window and set up the interface as
you want it.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.229
Tag Logging Configuration Interface

(1)

Data window
Navigation window

Table window

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.230
Archive Wizard

(1) Shortcut
menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.231
Process Value Archive Properties
-Main memory or hard disk memory location
-For main memory, size in data records
Shortcut menu:
-Properties

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.232
Editing Measurement Points
-Editing mean value, max…etc. -Configured directly
-Unit (currently not usable) -No display limitation
-Saving during an error -Start Event
-Archive only upon change -Stop Event

Shortcut menu:
-Properties

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.233
Archive Configuration

OR

OR

Cyclic archive

Cyclic archive

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.234
Backup Configuration Fast and Slow Archive

RT Data

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.235
Resetting the Archive and Evaluating Old Archives

Shortcut menu for WinCC in CS mode Shortcut menu for WinCC in RT mode

Reset: Connect:
All Database files in the Necessary when old archive files
long-term archive are deleted are to be evaluated
after check back.
In the first RT mode, DB files Disconnect:
are automatically recreated. “Opposite” of Connect

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.236
WinCC Online Trend Control in the
Graphics Designer

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.237
Window Properties for WinCC Online Trend Control
-Window Title -Label -Label - Limit Values
-Background Color -Coarse/Fine Scaling -Coarse/Fine Scaling -Time Overlap
-Display Status/Toolbar -Update (factor, range) -Range Selection -Time Jump
-Writer Orientation -Time selection automatic or fixed -Value with un-
-Staggered trends -Time range certain status
-Common Axis
-Print job
-Data supply
Toolbar:
-Keyboard functions
-Hotkeys

Double-click

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.238
Configuration Notes 1/2
Acquisition: 5 sec
Archiving/Display: 5 sec

This setting results in an optimized


communication load

Acquisition: 1 sec
Archiving/Display: 5 sec

This setting results in an unnecessary


communication load

Acquisition: 1 sec
Archiving/Display: 1 sec

Archive becomes very large,


unnecessary communication load

Acquisition: 2 sec
Archiving/Display: 10 sec
Note: You have to take into
consideration that the acquisition cycle
Makes sense for arithmetic, e.g. mean
is a permanent load in the background
value
(communication)

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.239
Configuration Notes 2/2

Start Events and Stop Events are functions that are called every 500 ms for every trend!
Better: Global Script Action (*.pas) with TLGLockArchiv

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.240
Exercise Step 1/5 Archive Wizard

(1) Shortcut
menu

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.241
Exercise Step 2/5 Archive Configuration

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.242
Exercise Step 3/5 WinCC Online Trend Control in the
Graphics Designer

Copy the picture "kurven.pdl" from the catalog "ab_uebung" into your project.

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.243
Exercise Step 4/5 Window Properties for
WinCC Online Trend Control

Double-click

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.244
Exercise Step 5/5 Function Test

"TagLoggingRuntime" must be selected in the start-up list!

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.245
New: Database Tools 1/3

Display only in RT

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.246
New: Database Tools 2/3

Archive segments

Open Table->Return all rows

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.247
New: Database Tools 3/3

Archive segments
Open Table->Return all rows

SIMATIC HMI Date: 20.04.2005


SITRAIN Training for
Automation and Drives
Siemens AG 2003. All rights reserved. File: a_dSwincc03e.248

You might also like