Anda di halaman 1dari 70

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

SITRAIN
ST-BWINCCS /Project Creation Page 1 Siemens AG © 2007

Contents Page
Creating a Project, Connecting a PLC, Tag Simulation 2...................................................................... 2
Creating a Project, Connecting a PLC, Tag Simulation 3...................................................................... 3
Objectives .......................................................................................................................................... 4
Configuration Preparation .....……....................................................................................................... 5
Creating a Project ................................................................................................................................ 6
WinCC Project Structure and Files …................................................................................................. 7
Interchanging between Projects ......................................................................................................... 8
Specifying Project Properties(1/2) ……............................................................................................... 9
Specifying Project Properties (Interface and Design) (2/2) ....…..................................................... 10
Computer Properties 1/2 ..……........................................................................................................... 11
Computer Properties 2/2 ....……......................................................................................................... 12
Task Definition ......……….................................................................................................................... 13
Tags for the Process Connection ....……............................................................................................ 14
Data Exchange with SIMATIC S7 ....…............................................................................................... 15
Setting the PG/PC Interface for CP5611 .…........................................................................................ 16
Specifying Properties of CP5611 Card .….......................................................................................... 17
Installation of SIMATIC Device Drivers (S7-DOS) ........…................................................................... 18
Communication Structure ..….............................................................................................................. 19
Selecting Communication Drivers for the Connection 1/2 .................................................................. 20
Selecting Communication Drivers for the Connection 2/2 .................................................................. 21
Exercise 1: Creation of Project „Control_Room“, Engineering of PLC Connection 1/2........................ 22
Exercise 1: Creation of Project „Control_Room“, Engineering of PLC Connection 2/2........................ 23
Configuring Process Tags for SIMATIC S7………............................................................................... 24
Exercise 2: Configuring Process Tags and Tag Groups ..................................................................... 25
Data Storage in SIMATIC S7: Motorola Format (Big-Endian) ..…....................................................... 26

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Project Creation
Creating a Project, Connecting a PLC, and Tag Simulation 2

SITRAIN
ST-BWINCCS /Project Creation Page 2 Siemens AG © 2007

Contents Page
System Info Channel ......................................................................................................................... 27
Editing System Info Channel Tag ............................................................................................ 28
Exercise 3: Configuring System Info Channel Tags and Groups 1/3 ………...................................... 29
Exercise 3: Configuring System Info Channel Tags and Groups 2/3 ………...................................... 30
Exercise 3: Configuring System Info Channel Tags and Groups 3/3 ………...................................... 31
Configuring Internal Tags .................……......................................................................................... 32
Exercise 4: Configuring Internal Tags and Tag Groups .………….................................................... 33
Status of the Connection .................................................................................................................. 34
Connection Diagnostic with SIMATIC S7 (*.LOG) ............................................................................ 35
Channel Diagnostics with Channel Diagnosis .................................................................................. 36
Quality Code .................................................................................................................................... 37
"CrossReference" (Cross Reference List 1/3) .................................................................................. 38
"CrossReference" (Cross Reference List 2/3) .................................................................................. 39
"CrossReference" (Cross Reference List 3/3) .................................................................................. 40
Tools: CrossReferenceAssistant ....................................................................................................... 41
Tag Simulation 1/2 ........…………….................................................................................................. 42
Tag Simulation 2/2 ......…………….................................................................................................... 43
Connection Status ............................................................................................................................ 44
Documentation for Communication ................................................................................................... 45
TIA Functions in WinCC ...…….......................................................................................................... 46
TIA Functionality, Compiling Symbols ....…….................................................................................... 47
Creating an OS (Operator Station) .................................................................................................... 48
Parameterizing an MPI Subnet via HW Config ................................................................................. 49

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Project Creation
Creating a Project, Connecting a PLC, and Tag Simulation 3

SITRAIN
ST-BWINCCS /Project Creation Page 3 Siemens AG © 2007

Contents Page
Symbol Table, Setting The Attribute Operator Control and Monitoring 1/2 ....................................... 50
DB1, Setting The Attribute Operator Control and Monitoring 2/2 ...................................................... 51
Creating an S7 Program ................................................................................................................... 52
Generating WinCC Tags ............……............................................................................................... 53
Selecting the Subnet for Compiling ..........……................................................................................. 54
Compiling Step7 Data to WinCC 1/2 ......………................................................................................ 55
Compiling Step7 Data to WinCC 2/2 ......………................................................................................ 56
Generated Connection and Tags in the WinCC Explorer .........…..................................................... 57
Generated Tags Linked to the Object ..............………...................................................................... 58
Tag Generation using Drag & Drop (Implicit Compiling) ....……….................................................... 59
If You Want to Know More ................................................................................................. 60
TIA: Network Entry Point with Writing Authority in STEP7 .…........................................................... 61
Generating Reference Data for Network Entry Point ....................................................................... 62
Network Entry Point to STEP 7 1/2 .........……................................................................................... 63
Network Entry Point to STEP 7 2/2 ........…….................................................................................... 64
Calling the Go To Location from WinCC and Return to WinCC .…………........................................ 65
TIA Functionality, Hardware Diagnosis from WinCC Pictures ......................................................... 66
Configuring an Attribute for Hardware Diagnosis …………............................................................... 67
Configuring an Event for Hardware Diagnosis ….............................................................................. 68
TIA Functionality, SIMATIC "Report System Error" in WinCC Graphic Pictures .............................. 69

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Project Creation
Objectives

- Creating a Project

- Installing Communication Drivers

- Configuring Tags

- Tag Simulation

- Cross Reference

SITRAIN
ST-BWINCCS /Project Creation Page 4 Siemens AG © 2007

Upon completion of this chapter, the participant should be able to:

ƒ recognize configuration relationships


ƒ start WinCC and create a project
ƒ describe the start procedure for WinCC
ƒ work with the WinCC Explorer
ƒ use the function modules for WinCC
ƒ describe a data exchange
ƒ use the computer features
ƒ install the communication driver for his connection
ƒ carry out the necessary parameter settings for the communication
connection
ƒ configure tags and tag groups
ƒ install the auxiliary (help) program for tag simulation
ƒ operate the auxiliary program for tag simulation
ƒ use the result of the Cross Reference List

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Project Creation
Configuration Preparation

- Programmable Logic Controllers

- Type of Coupling

- Process Tags

- Internal Tags

SITRAIN
ST-BWINCCS /Project Creation Page 5 Siemens AG © 2007

Configuration Preparation
ƒ Process coupling
- Specifying the programmable logic controllers (PLCs) for the data
exchange
- Specifying the physical level for the data transmission
- Specifying the number of input data and output data for PLC
communication
- Specifying data areas for the individual send cycles

ƒ Visualization
- see Chapter 3.

ƒ Password Protection
- see Chapter 3.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Project Creation
Creating a Project

- Context help
Office PC or
Industrial PC - one operator control
station
- one server, several clients
without their own project

- distributed systems, several


clients with their own project

SIMATIC NET

PLC

SITRAIN
ST-BWINCCS /Project Creation Page 6 Siemens AG © 2007

Starting WinCC from Windows


After you start WinCC, you are prompted to create a project. WinCC independently
creates a project folder for each project created (use Control_Room, for example).
Then the MS SQL Server 2005 database is set up. After configuration is started
again, the project last edited is called up. If a new project is to be created, then
select the following in the WinCC Explorer:
M>File, O>New...

Legend M equals Menu


O equals Operation in drop-down menu

Selection Possibilities in the Start Dialog


The Explorer dialog box offers 3 configuration selections for creating a new
project. You can open an existing project in a further dialog box.

Use the Context Help. Open the context help by clicking on the question mark
icon in the WinCC Explorer dialog shown above. After clicking on the question
mark icon, move it to the different texts in the dialog window to obtain further
information.

Note You can use both lower case and upper case characters in a project name.

Characters Not Allowed


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

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Project Creation
WinCC Project Structure and Files

-Tag Logging RT data


-Alarm Logging RT data
see text
-Database Logfile
-Imported RT data

-Saved Cross Reference List (.xfc) -Database with


configuration data
-Configured screens (.pdl, .sav)
-Faceplate types (.fpt)
-Main file of the project
-Screen files (.bmp, .emf, .wmf)
-Action lists (.act)
-Cross Reference
-Computer name
main file
-Project functions (.fct)
-Project library (.pxl) -Logfile to database
-Function declarationsn (.h)
-Function library (.dll)
-Master DB with link to
-Project actions (.pas) the RT files +
user archive database
-Report Layouts (.rpl)

SITRAIN
ST-BWINCCS /Project Creation Page 7 Siemens AG © 2007

Note The directory structure is dynamic and is dependent on the software tools
installed and on the use of WinCC applications (on the WinCC CD).

ldf, mdf Database files always have two files.

ArchiveManager
AlarmLogging File Name Structure:
ComputerName_ProjectName_ALG_FromTime_ToTime.mdf

ArchiveManager
TagLogging Fast File name structure:
ComputerName_ProjectName_TLG_F_FromTime_ToTime.mdf
Acquisition cycle <1min.
ArchiveManager
TagLogging Slow File name structure:
ComputerName_ProjectName_TLG_S_FromTime_ToTime.mdf
Acquisition cycle >1min.

Empty RT-DB An empty RT-Database is located in the installation directory:


WinCC_SQL.mdf Siemens\\WinCC\\bin\\ WinCC_SQL.mdf, that can be
renamed after a copy is made. When an new project is created, the database is
automatically generated.

*.Log File Log Files *.log contain setup data, system status and error messages for the
application engineer and service technician.
Installation directory: Siemens\\WinCC\\Diagnose.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Project Creation
Interchanging between Projects

Start Runtime
Stop Runtime

Project name. MCP

SITRAIN
ST-BWINCCS /Project Creation Page 8 Siemens AG © 2007

Switching Projects You can switch between existing projects :

1. In the WinCC Explorer menu bar, click on M>File, O>Open.

2. In the "Open" window, search for your project.

3. Click on your file name, as illustrated in the slide above (File name :
Example.MCP).

Note If a third-party WinCC project (that was copied onto the hard drive from a data
storage medium) is started in Runtime, you must replace the existing computer
name with the local computer name before you start. You do this in "Computer"
Properties, "General" tab. Then you must exit WinCC and restart it. Now, Runtime
can be restarted.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Project Creation
Specifying Project Properties (1/2)

SITRAIN
ST-BWINCCS /Project Creation Page 9 Siemens AG © 2007

Specifying Project Properties


By means of the shortcut menu for your project name (Control_Room), you enter
the creator, the version, and comments in the "General" tab of the Project
properties dialog box that appears.
Update Cycle
By means of the "Update Cycles" tab, you can observe the 15 update cycles for
the project; Of these update cycles, you can change five settings (update:
acyclical, 250 ms to 1 hr). The update type is used for output objects in Graphic
Designer.
Hot Keys Hot keys are key combinations that trigger certain actions within WinCC, such as
hardcopy, log on, and log off.
Additional project options
- Allow activation RT on ES (for integrated WinCC projects in the
Simatic Manager “Start OS simulation”)
- Help available during run time (e.g. via Online Trend Control)
Operation Mode Here you define if the project is implemented as standard project or as service
project. As service project, the server is placed, for example, in a room similar to a
bunker with halon or CO2 extinguishing system, etc., since important data such as
FDA-relevant data is stored there. No user should be able to change anything.
Therefore, nobody is logged in and WinCC even runs without Graphics Runtime
as service.
User Interface and Design
Settings for interface and design (central color palette, hover, shadow and
transparency effects (see next page).
Find Function The shortcut menu calls up the WinCC Find... function.
Use the right mouse button to click on the Project Name icon, Computer icon or
the Tag Management icon.
The following Find... functions are available:
Name
Date of change
Individual object types or all object types: Tag, tag group, computer name, type of
coupling, channel unit, and logical connection.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 Project Creation
Specifying Project Properties (Interface and Design) (2/2)

SITRAIN
ST-BWINCCS /Project Creation Page 10 Siemens AG © 2007

Defining the Project Properties for Interface and Design


Via the tab "User Interface and Design", the operator can use the central color
management and implement user interface and design settings (central color
palette, hover, shadow and transparency effects).
Central Color Palette:
In the "Color Selection" editor, the colors used in the project can be managed and
changed in a central color palette.
Active Design: In the "Global Design Settings" editor, the user can globally define the design of
the objects, i.e. for the entire project. The user can select from a range of
predefined designs or create and activate own designs. Own designs can be
edited as required. The following settings can be defined individually for 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 10 Project Creation
Computer Properties 1/2

SITRAIN
ST-BWINCCS /Project Creation Page 11 Siemens AG © 2007

Computer List The computer list contains all computers assigned to the current project.

General The computer name, e.g. Instructor, and the computer type are specified in the
"General" tab. Via the button “Assume local computer name" the computer name is
accepted in the computer properties.
The computer type (Server or Client) is defined for multi-user projects (client-server
configurations). "Server" is the presetting”.

Startup You use the "Startup" tab to select standard WinCC programs that are to be loaded
when the Runtime project is activated. You can start other applications during
startup by using the "Add" button.

Parameters You use the "Parameters" tab to specify the language setting at runtime, whereby a
spare (replacement) language can be taken into account. In order to avoid incorrect
operator handling in Runtime, typical Windows key combinations can be inhibited.
The PLC‘s time-of-day setting allows for universal time (UTC) or local time. The
Date/Time-of-Day selection possibilities allows you to display the RT time for
WinCC data in the valid local time zone or in the coordinated time zone (UTC
Universal Time Coordinated). In addition, the time format can be displayed
according to ISO 8601.

Graphics Runtime You can make individual project settings (see slide above) in the Graphics Runtime
tab. Select the Online Help.

Note The computer name may not contain a blank, a hyphen or an underscore. The first
character must be a letter. All characters must be capitalized. It is recommended
that you only use the characters a to z, A to Z, 0 to 9. Information on changing a
computer name can be found in FAQ 5708 281

Characters Not Allowed


.,;:!?"'^´`~-+=/\¦@*#$%&§° ( ) [ ] { } < > Blank

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Project Creation
Computer Properties 2/2

.cur
.ani

SITRAIN
ST-BWINCCS /Project Creation Page 12 Siemens AG © 2007

Runtime The settings in this tab are valid (as of WinCC V6.0) for all WinCC projects on the
computer used. The following settings are possible :
- 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

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 Project Creation
Task Definition

Start screen (Start.pdl) 17.02.09 11:15:45

SIMATIC WinCC Overview picture (Intro.pdl),


Display in the picture window in
the start screen (Start.pdl)

Motor Filling plant Trends Alarms

Speed setpoint
Actual speed

Data Manager

Protocols
SITRAIN
ST-BWINCCS /Project Creation Page 13 Siemens AG © 2007

Task Definition The configuration example shows the communication between WinCC on a
Windows computer and a SIMATIC S7 300/400. The settings on the WinCC are
shown by means of examples, thus producing a guide for the configuration.
Depending on the system configuration, it may be necessary to use different
settings, such as for the slot number of the CPU. You are to configure the plant
simulation diagrams depicting the start picture, motor picture, bottling plant picture,
trends and message (alarm logging) picture. The configuration must then undergo
a function test.

Start Picture When you switch to runtime, the overview picture (company logo) is to appear. In
the start picture you can call the motor picture, the bottling plant picture, the trends
picture and the message picture. The pictures are displayed in a picture window
integrated in the start screen.

Motor Picture Input and output of digital values, display change of the switch setting.

Bottling Plant Display of digital values in graphic form (bar graph). Calculations with C actions
and diagnostics of C actions.

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

Messages Display of error states and operating states.

The user navigates between the pictures by using the buttons at the bottom of the
start screen. The pictures are displayed in a picture window integrated in the start
screen.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 Project Creation
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 TI505
Archive
Other drivers 35

Message events
40.0 Motor 1 defective
40.1 Valve 3 sticks
...
SITRAIN
ST-BWINCCS /Project Creation Page 14 Siemens AG © 2007

Process For example, bottling plant, automatic assembly equipment etc.

Coupling The WinCC coupling can take place with SIMATIC drivers or other drivers.

Process Image The data manager manages the process image from the tag data from DBs, DXs,
inputs, outputs, and bit memories (flags).

Function You use the editors to configure the view and control functions made available in
WinCC and to connect the functions with the process by means of the tags.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 Project Creation
Data Exchange with SIMATIC S7

Programmable Logic Controller WinCC Station

Setpoint value 95

Actual value 190


DB1

DBW 0 Int =95


DBW 18 Int =190
Image Setpoint speed Actual speed
DB1 DB1
DBW0 DBW18

Digital output
SIMATIC NET

Digital input
SITRAIN
ST-BWINCCS /Project Creation Page 15 Siemens AG © 2007

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

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 Project Creation
Setting the PG/PC Interface for CP5611

STEP 7+WinCC Only WinCC


Access point of Access point of
the application: the application:
S7ONLINE WinCC

Interface parameter
CP5611 assignment used:
CP5611 (MPI)

CPU

SITRAIN
ST-BWINCCS /Project Creation Page 16 Siemens AG © 2007

General You use the "Set PG/PC Interface" tool to define the connection between an
application such as STEP 7 and a module such as CP 5611. The tool is activated
with Start --> Settings --> Control Panel.

Access Point Other examples of access points are:


• 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 no STEP 7 is installed on the PC

Interface Parameter Assignment Used


Here, enter the module used, such as, CP5611 and the interface used, such as,
MPI Æ (CP5611(MPI)). If you connect the PG to the Profibus, use the setting
CP5611 (PROFIBUS). To save a switch-over of the PG/PC interface, you can also
use the setting CP5611 (Auto). The bus parameters are then automatically
determined. With this setting, however, the connection takes longer.

Properties In this tab, you adapt the parameters of the interface. For "Address", enter the MPI
address of the PG. This must be unique in the network. To make communication
possible, the "Transmission Rate" and "Highest Node Address" parameters must
be the same for all nodes (stations). The "PG/PC is the only master on the bus"
setting is only activated if only slaves are connected to the PG.
Diagnostics With this, you can check whether a connection can be made.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 Project Creation
Specifying the Properties of the CP5611 Card

Local station address

SITRAIN
ST-BWINCCS /Project Creation Page 17 Siemens AG © 2007

In our case we will adopt the parameters shown in the slide

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 Project Creation
Installation of the SIMATIC Device Drivers (S7-DOS)

SITRAIN
ST-BWINCCS /Project Creation Page 18 Siemens AG © 2007

Driver The SIMATIC Device Drivers is required for the communication to the SIMATIC S7
via the SIMATIC S7 protocol suite.

Note The SIMATIC Device Drivers is to be selected under Communication for the
WinCC installation. If this has not taken place, it can be made later on with a Delta
Installation.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 Project Creation
Communication Structure

SITRAIN
ST-BWINCCS /Project Creation Page 19 Siemens AG © 2007

The Way it Works The WinCC data manager manages the WinCC tags during Runtime execution.
The various WinCC applications address their tag requirements to the data
manager. The data manager then has the task of fetching the demanded tag
values from the process by using the communication driver integrated into each
WinCC project. The communication driver makes the interface between WinCC
and the process using one of its channel units. The hardware connection to the
process is usually made using a communications processor. The WinCC
communication driver then sends request telegrams to the programmable logic
controller using this communications processor. The programmable logic controller
sends the requested process values back to the WinCC in corresponding reply
telegrams.
Data Manager The data manager takes over the administration of the data in WinCC. This is not
visible to the user. The data manager works with the data created in the WinCC
project and stored in the project database. It takes over the complete management
of the WinCC tags while WinCC is running in Runtime. All WinCC applications
have to request the data from the data manager in the form of WinCC tags. These
applications are, among others, Graphics Runtime, Alarm Logging Runtime and
Tag Logging Runtime.
Communication Driver
Various communication drivers are used so that WinCC can communicate with the
different types of available programmable logic controllers. The WinCC
communication drivers link the data manager to the programmable logic controller.
The communication driver is a C++ DLL which communicates with the data
manager through the interface specified by the data manager. This interface is a
so-called Channel API. The WinCC tags are supplied with process values through
this communication driver.
Hardware Driver The hardware connection to the process is usually made using a communications
processor. Every channel unit forms the interface to exactly one subordinate
hardware driver and therefore to exactly one communication module in the
computer.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 Project Creation
Selecting Communication Drivers for the Connection 1/2
A)

Context menu

B)

SITRAIN
ST-BWINCCS /Project Creation Page 20 Siemens AG © 2007

A) Selecting Communication Drivers


1. Use the "Tag Management" icon in picture A) to call the shortcut menu.

2. Select "Add New Driver..." in the shortcut menu.

3. In the window, search for the communication driver and then choose the driver
for your procedure (for example, for SIMATIC S7Protocol Suite.CHN).

B) Configuring the Connection


In picture B) you see the updated WinCC Explorer.

1. Use the "MPI" icon to call the shortcut menu.

2. Choose "New Driver Connection..." from the shortcut menu.

3. In the "Connection Properties" window, enter a name for the connection.

4. In the "Connection" tab, enter the connection parameters for the S7 network
address :
Station address: 2 (MPI address)
Segment ID: 0 (not currently in use)
Rack Number: 0 (Rack number of the CPU)
Slot No.: 0 (CPU Slot)

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 Project Creation
Selecting Communication Drivers for the Connection 2/2

C)

Context menu

SITRAIN
ST-BWINCCS /Project Creation Page 21 Siemens AG © 2007

C) Setting the System Parameters


1. Select the “MPI” icon in figure C) to open the context menu.

2. In the context menu, select “System Parameter”

3. In the “System Parameter - MPI” dialog box, open the “Unit” tab.

4. Select CP5611(MPI) in the field “Logical device name”

5. Exit the “System Parameter - MPI” dialog box by clicking on the “OK” button

Note For operation with other types of connection (e.g. PROFIBUS):


The following must be noted for communication via Profibus:
- PG/PC interface: Select CP5611(PROFIBUS)
- Connection: Select Profibus
- System parameters of the PROFIBUS connection:
In the “Unit” tab in the “Logical device name” field:
Select CP5611(PROFIBUS)

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 Project Creation
Exercise 1: Creation of Project „Control_Room“,
Engineering of PLC Connection 1/2

Name of
driver
connection

Context menu

Always 0 for integrated


Interface.

SITRAIN
ST-BWINCCS /Project Creation Page 22 Siemens AG © 2007

Objective Create a new project with the WinCC Explorer and define the connections and
tags required for data exchange between AS and HMI computer. Further pictures
and functions will be added to the ControlRoom project during the course.

Exercise - Open the WinCC Explorer


- Create a new "Single-user station project" via M> File Æ O> New
Legend: M equals Menu, O equals operation in drop-down menu
- Enter "Control_Room" as project name and D:\Training\WINCCS" as project
path in the window "Create new project".
- Specify the project manager in the "Project properties" window . Right-click the
project name displayed in WinCC Explorer to open the window "Project
properties".
- In the "Project properties" window, change "User cycle 1" to 15 seconds
(setting in ms Æ enter 15,000) in the "Update cycles" dialog.
- Check the settings of the PG/PC interface for the
CP5611 (as described in the preceding slides "Setting the PG/PC interface
for CP5611" and "Specifying the Properties of the CP5611 Card).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 22 Project Creation
Exercise 1: Creation of Project „Control_Room“,
Engineering of PLC Connection 2/2

Name of
driver
connection

Context menu

Always 0 for integrated


Interface.

SITRAIN
ST-BWINCCS /Project Creation Page 23 Siemens AG © 2007

Continuation of the Exercise


- Select the communication driver for the connection
(SIMATIC S7 PROTOCOL SUITE)
- Configure the properties of the "MPI" connection (see figure above
with the name "S7_300_to_WinCC" and the connection parameters shown
there.
- Open the system parameters of the "MPI" connection by right-clicking on the
MPI icon and then clicking on "System Parameter" in the context menu.
- In the dialog "System Parameter – MPI", open the tab "Unit".
In this dialog box, select CP5611(MPI) in the field "Logical device name". The
details on these configuration steps can be found on the preceding slides
“Selecting Communication Drivers for the Connection 1/2 and 2/2”
- Configure the full-screen mode under "Computer properties" in the dialog
"Graphics Runtime". Right-click the computer name displayed in the right
window of the WinCC Explorer to display the "Computer properties" window.

Note You can use both lower case and upper case characters in a project name.

Characters Not Allowed


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

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 23 Project Creation
Configuring Process Tags for SIMATIC S7

Note:
Use of S7 symbols (TIA)
is possible as of WinCC V5.
SITRAIN
ST-BWINCCS /Project Creation Page 24 Siemens AG © 2007

Process Tags
Process tags establish the connection between the process and the HMI station.
They are configured after a PLC connection is setup.
New Group
WinCC allows you to combine tags in technological units. This results in a tag
structure that is easy to read. Before you begin with tag configuration (New Tag)
create a "New Group...".
New (Process) Tag
The slide above illustrates all the configuration steps.
Linear Scaling
The process values are scaled before they are displayed.
Internal Tags
WinCC makes it possible to define tags, which do not affect process coupling, for
an entire project. Tags can also be configured here either individually, or combined
in groups.
Limits/Reporting
On this page, the limits to be checked by the data manager are specified.
Substitute values to used in the case of connection errors and a start value to be
used by the data manager for the initial initialization.
Note
With integrated WinCC projects, access to the S7 symbols (TIA) is possible. The
tags are generated by WinCC.
Characters Not Allowed
When you give a tag a name, you have the following restrictions:
The @ character should be reserved for WinCC system tags; it is, however,
possible to use this character.
. : ? „ ' \ * $ % Blank
Capital / small letters is irrelevant.
The period is used as a separator in structure tags.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 24 Project Creation
Exercise 2: Configuring Process Tags and Tag Groups
Configuring Tag Groups

Name of 1st group: motor_picture


Name of 2nd group : filling_plant
Name of 3rd group : measurement_points
Name of 4th group : message_events

Configuring Process (Power) Tags

Name Data Type Address

P_message0 binary tag DB1.DBX16.2


P_message1 binary tag DB1.DBX20.2
P_message_analog unsigned 16-bit value DB1.DBW22

S_CPU_load floating-point number 32-bit Systeminfo Channel


S_free_RAM floating-point number 32-bit Systeminfo Channel

P_Tank1_IB0 unsigned 8-bit value DB100.DBB0


P_Tank2_QB5 unsigned 8-bit value DB100.DBB5

P_setpoint_speed signed 16-bit value DB1.DBW0


P_actual_speed signed 16-bit value DB1.DBW18
P_motor_on_off binary tag DB1.DBX14.0
P_setpoint_direction binary tag DB1.DBX14.1
SITRAIN
ST-BWINCCS /Project Creation Page 25 Siemens AG © 2007

Objective Configuration for SIMATIC S7 tag coupling, create tags


Exercise - Open the WinCC Explorer
- Open the "ControlRoom" project via M> File Æ O> Last file
Legend M equals Drop-down menu, O equals Operation in drop-down menu
- In the opened WinCC project, open the SIMATIC S7 Protocol Suite in Tag
Management
- Open the connection "S7 program" under "MPI”
- Create the tag group "Filling Plant" via "New Group" (right-click on connection
name)
- Create the two tags P_Tank1_IB0 and P_Tank2_QB5 in the tag group "Filling
Plant" via "New Tag" (right-click on tag group name). Also create the four tags
for the "Motor picture" group and the three tags for the "Message events" group
.
Result The internal tags you configured can now be linked with objects to make them
dynamic (action configuration).
Excel You can create and maintain large amounts of tags very effectively and easily with
Excel, for example. You get a fixed structure in the design of the tag name in
Excel, if you use the Export via the WinCC -> Tools -> "Tag Export Import". You
can then reimport this tag list created in Excel into WinCC with same the program.
The tool is located on your WinCC DVD and must first be installed.
Excel 2000, Excel XP, Excel 2003 SP3
In addition, you can install a Configuration Tool (Add-In for Excel) from the WinCC
DVD. With this tool you can configure mass data in Excel for connections, tags,
structures, messages, archive tags etc.
The Excel spreadsheet can also be executed on computers without WinCC
installed.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 25 Project Creation
Data Storage in SIMATIC S7: Motorola Format (Big-Endian)

In the Motorola format (Big-Endian (“Big End”)), the byte with the
most significant bits (i.e. most significant digits) is saved first, i.e. at
the smallest memory address.
Example: addressing of binary tag: P_message0 Æ DB1.DBX16.2

SITRAIN
ST-BWINCCS /Project Creation Page 26 Siemens AG © 2007

Storage of process tags on the SIMATIC page

Process tags establish the connection between the process and the operator
control and monitoring station. On the SIMATIC page, storage is always organized
byte-by-byte. If, however, two bytes are combined in one word, e.g. DB1.DBW16
(byte 16, byte 17), the data is stored in Motorola format on the SIMATIC page. In
this format, the byte with the most significant bits (i.e. the most significant digits) is
stored first, i.e. at the smallest memory address (in the example above in byte 16
of the DB1 data block). The bit pattern shown in the figure corresponds to the
decimal value 1024. When individual bits are addressed, the address is specified
byte-oriented. In the figure above, bit 10 in the data word 16 is addressed with the
address "DB1.DBX16.2". The right byte of the data word 16 (DB1.DBW16) has the
address 17.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 26 Project Creation
System Info Channel

SITRAIN
ST-BWINCCS /Project Creation Page 27 Siemens AG © 2007

Objective The system information channel permits the user to define different system
information about internal tags and to link it to input/output objects via a channel.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 27 Project Creation
Calling the System Info Channel

A)

B)

SITRAIN
ST-BWINCCS /Project Creation Page 28 Siemens AG © 2007

Step A Step A shows the selection of the driver system Info.chn

Step B Step B shows the generated object SYSTEM INFO in the project tree. The
generated tags are shown in the right window.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 28 Project Creation
Editing the System Info Channel Tag

SITRAIN
ST-BWINCCS /Project Creation Page 29 Siemens AG © 2007

Note All edited tags are internal tags.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 29 Project Creation
Exercise 3: Configuring System Info Channel Tags and Groups 1/3
Configuring Tag Groups

Name of 1st group: motor_picture


Name of 2nd group: filling_plant
Name of 3rd group: measurement_points
Name of 4th group: message_events

Configuring System Info Channel Tags

Name Data Type Address

P_message0 binary tag DB1.DBX16.2


P_message1 binary tag DB1.DBX20.2
P_message_analog unsigned 16-bit value DB1.DBW22

S_CPU_load floating-point number 32-bit System Info Channel


S_free_RAM floating-point number 32-bit System Info Channel

P_Tank1_IB0 unsigned 8-bit value DB100.DBB0


P_Tank2_QB5 unsigned 8-bit value DB100.DBB5

P_setpoint_speed signed 16-bit value DB1.DBW0


P_actual_speed signed 16-bit value DB1.DBW18
P_motor_on_off binary DB1.DBX14.0
P_setpoint_direction binary tag DB1.DBX14.1
SITRAIN
ST-BWINCCS /Project Creation Page 30 Siemens AG © 2007

Objective Configuration for SIMATIC S7 tag coupling, create tags


Exercise - Open the WinCC Explorer
- Open the "ControlRoom" project via M> File ◊ O> Last file
Legend: M equals Drop-down menu, O equals Operation in drop-down menu
- In the opened WinCC project, open the SIMATIC S7 Protocol Suite in Tag
Management
- Open the connection "S7 program" under "MPI"
- Create the tag group "Filling Plant" via "New Group" (right-click on connection
name)
- Create the two tags P_Tank1_IB0 and P_Tank2_QB5 in the tag group "Filling
Plant" via "New Tag" (right-click on tag group name). Also create the four tags
for the "Motor picture" group and the three tags for the "Message events" group

Result The internal tags you configured can now be linked with objects to make them
dynamic (action configuration).
Excel You can create and maintain large amounts of tags very effectively and easily with
Excel, for example. You get a fixed structure in the design of the tag name in
Excel, if you use the Export via the WinCC -> Tools -> "Tag Export Import". You
can then reimport this tag list created in Excel into WinCC with same the program.
The tool is located on your WinCC DVD and must first be installed.
Excel 2000, Excel XP, Excel 2003 SP3
In addition, you can install a Configuration Tool (Add-In for Excel) from the WinCC
DVD. With this tool you can configure mass data in Excel for connections, tags,
structures, messages, archive tags etc.
The Excel spreadsheet can also be executed on computers without WinCC
installed.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 30 Project Creation
Exercise 3: Configuring System Info Channel Tags and Groups 2/3

SITRAIN
ST-BWINCCS /Project Creation Page 31 Siemens AG © 2007

Note All edited tags are internal tags.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 31 Project Creation
Exercise 3: Configuring System Info Channel Tags and Groups 3/3

SITRAIN
ST-BWINCCS /Project Creation Page 32 Siemens AG © 2007

Note All edited tags are internal tags.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 32 Project Creation
Configuring Internal Tags

SITRAIN
ST-BWINCCS /Project Creation Page 33 Siemens AG © 2007

Internal Tags
WinCC makes it possible to define tags, which do not affect process coupling, for
an entire project. Tags can also be configured here either individually, or combined
in groups.

New Group
WinCC allows you to combine tags in technological units. This results in a tag
structure that is easy to read. Before you begin with tag configuration (New Tag)
create a "New Group...".

New (Internal) Tag


The slide above illustrates all the configuration steps.

Limits/Reporting
The limits to be checked by the data manager are specified on this page. A start
value to be used by the data manager for an initial initialization and runtime
persistency so that the data of the tag will not be deleted after a runtime restart.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 33 Project Creation
Exercise 4: Configuring Internal Tags and Tag Groups
Configuring Tag Groups

Name of 1st group: I_measurement_points


Name of 2nd group: I_message_events

Configuring Tags

Name Data type

Event1 unsigned 8-bit value

Trend_1 signed 16-bit value


IVar_Meas signed 16-bit value

SITRAIN
ST-BWINCCS /Project Creation Page 34 Siemens AG © 2007

Objective Create a tag group (as shown above) with the associated internal tags within the
group.

Exercise - Open the WinCC Explorer


- Open the "ControlRoom" project via M> File Æ O> Last file
- In the opened WinCC project, open Tag Management
- Create the tag group "I_measuring_points" via "New Group" (right-click on
internal variable)
- Create the tag "Trend_1" of the data type "signed 16-bit value" and the tag
"IVar_Meas" of the data type "signed 16-bit value" via "New Tag" (right-click on
tag group name "I_measuring_points) in the tag group "I_measuring_points".
- Implement the configuration steps also for the tag group "I_message_events"
and create the tag "Event1" there.

Result The internal tags you configured can now be linked with objects to make them
dynamic (action configuration).

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 34 Project Creation
Status of the Connection

Please note: Runtime must be


started for this test function

SITRAIN
ST-BWINCCS /Project Creation Page 35 Siemens AG © 2007

General A fault or an error when building up a communication connection is generally only


detected during Runtime. Objects that are made dynamic via WinCC tags and
cannot be supplied with current process values are displayed as inactive in the
process screen. These can be I/O fields, slider objects or trend displays, for
example. If a fault doesn‘t exist for all WinCC tags of a connection this indicates an
error source of a single WinCC tag. In this case you should check the tag
addressing as well as its notation in Graphics Designer, for example. If a fault
exists for all WinCC tags of a connection, this indicates that there is an error with
the connection itself.
Diagnosing You can diagnose the coupling from the WinCC side. It is done in the WinCC
Explorer. If a communication link is created using the S7 Protocol Suite, you can
access the diagnostic capabilities of the S7.

1. You reach the Standard Diagnosis by clicking on


M>Tools, O> Status of Driver Connections

If the number of read-only and/or write-only tasks that are displayed increase
continually and no reduction takes place, it can lead to an overload of the data link.

2. Expanded Diagnosis, for example,


C:\Siemens\WinCC\Diagnose\SIMATIC_S7_PROTOCOL_SUITE_01.LOG
whereby an exact error diagnosis is created.

You will find an explanation for the Error No. that is displayed in the Online Help.
You will find an example on the next page.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 35 Project Creation
Connection Diagnostics with SIMATIC S7 (*.LOG)

C:\Siemens\WinCC\Diagnose\SIMATIC_S7_PROTOCOL_SUITE_01.LOG
SITRAIN
ST-BWINCCS /Project Creation Page 36 Siemens AG © 2007

When you have a connection error, you can read out the file
"SIMATIC_S7_PROTOCOL_SUITE_01.LOG“. The LOG file records date, time-of-
day, and the events with error code. In the Online help, you will find the necessary
reference (cause of error) for the error code.

You will find further important *.LOG files in the WinCC diagnostic directory.
Storage of the *.LOG file depends on the installation path.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 36 Project Creation
Channel Diagnostics with Channel Diagnosis

Call

WinCC Runtime must be activated in order to display the diagnosis.


SITRAIN
ST-BWINCCS /Project Creation Page 37 Siemens AG © 2007

Diagnosis Call "Channel Diagnosis" can be started as an application via the Windows Start menu.
That way, "Channel Diagnosis" is always available. The Channel Diagnosis Tool
must be installed from the WinCC DVD.
The advantage compared to the Log file
SIMATIC_S7_PROTOCOL_SUITE_01.LOG,
is that the status information of the connection is displayed directly.

ActiveX Control The status information for a channel can also be displayed in a process screen
through the ActiveX Control "WinCC Channel Diagnosis Control". The ActiveX
Control is available in the "Controls" object pallet of the Graphics Designer and is
inserted in a picture. That way, you can, for example, create a diagnosis process
screen in which you can call the status of communication and other information
while in runtime without having to reconfigure this combination as required.

Protocol In addition, you can analyze the events also recorded in a *.log and *.trc.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 37 Project Creation
Quality Code

WinCC Runtime must be activated in order to display the Quality Code.

SITRAIN
ST-BWINCCS /Project Creation Page 38 Siemens AG © 2007

Handling If you point to a tag with the mouse while in Tag Management during WinCC
Runtime, a Quality Code appears. In addition to the current process value and the
time of the last change, an error code is displayed, e.g. Quality:8, - no connection
to PLC. This error code can be used to check the status and the quality of the tag.

Online Help

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 38 Project Creation
"CrossReference" (Cross Reference List 1/3)

.
.. .XFC
Cross reference lists

Editor Filter

Internal data management .XFS

WinCC data

SITRAIN
ST-BWINCCS /Project Creation Page 39 Siemens AG © 2007

Cross Reference With the WinCC component "Cross Reference" (Cross Reference List) it is
possible :

- to find all the application locations of specific objects, such as tags, screens,
etc.

- to directly display the application location of an object in order to change it


or delete it (Function: "Place of Use ").

- for tags, to change the tag name using the function "Linking..." without
causing inconsistencies in the configuration.

Filter
You can use an adjustable filter to search for the following object types and create
a cross reference list :
- process tags and internal tags
- screens and screen windows
- archives
- project functions and standard functions
- OLE Objects
- ActiveX Controls

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 39 Project Creation
"CrossReference" (Cross Reference List 2/3)

Aufruf Update Data


Management and View
Export *.CSV
Update Data
Management

SITRAIN
ST-BWINCCS /Project Creation Page 40 Siemens AG © 2007

Tags in C-Actions
Tags in actions can only then be found and replaced by the Cross Reference if the
configuration rules for tags and screen names predefined in the C-Scripts are
adhered to.

Configuration Rules for C-Scripts


// WINCC:TAGNAME_SECTION_START
// syntax: #define TagNameInAction "DMTagName„
// next TagID : 1
#define TAG_ SetM1 “SetM1„
// WINCC:TAGNAME_SECTION_END
// WINCC:PICNAME_SECTION_START
// syntax: #define PicNameInAction "PictureName„
// next PicID : 1
// WINCC:PICNAME_SECTION_END
SetTagDWord(TAG_ SetM1,100);

Note The configuration rules are already taken into consideration by the Dynamic
Wizards during generation of the scripts.
When you set up C-Scripts, a comment recognizes the configuration rules.
Screen names are to be written without the file extension ".PDL".

You can find further information in the WinCC Online Help under Contents,
Editors, Cross Reference.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 40 Project Creation
"CrossReference" (Cross Reference List 3/3)

Tag “P_setpoint_speed“ is automatically


listed in the Cross Reference.

SITRAIN
ST-BWINCCS /Project Creation Page 41 Siemens AG © 2007

Tags in VBS Actions


With the WinCC CrossReference, you can also quickly find all Places of Use of
tags and screen names in VBS Actions. You can "rewire" tag triggers from actions
in the Graphics Designer with CrossReference; in other words, replace them with
other tags in all or in selected positions.

Configuration Rules for VBScripts


All tags that you address with the standard format
HMIRuntime.Tags("Tagname")
are automatically recorded by the WinCC CrossReference and are listed in the
screen properties.
Should you address tags with other formats in your code, you can access them
through the following section of the CrossReference:
'WINCC:TAGNAME_SECTION_START
'Const TagNameInAction = "TagName„
'WINCC:TAGNAME_SECTION_END

All screens that you address with the standard format


HMIRuntime.BaseScreenName("Screenname")
are automatically recorded by the WinCC CrossReference and are listed in the
screen properties.
Should you address screens with other formats in your code, you can access them
through the following section of the CrossReference:
'WINCC:SCREENNAME_SECTION_START
'Const ScreenNameInAction = "ScreenName„
'WINCC:SCREENNAME_SECTION_END

Note Screen names are to be written without the file extension ".PDL".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 41 Project Creation
Tools: CrossReferenceAssistant
Call

SITRAIN
ST-BWINCCS /Project Creation Page 42 Siemens AG © 2007

Objective A WinCC CrossReferenceAssistant, also included in the package, generates


comment and define lines in C-Action lists.

WinCC CrossReferenceAssistant is a tool which searches through scripts to find


screen (picture) names and tags and then modifies the associated scripts so that
the WinCC component, CrossReference, can find the screen (picture) names and
tags and list them in the Cross Reference List.

Note The Tool is installed from the WinCC DVD.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 42 Project Creation
Tag Simulation 1/2

Simulation software on WinCC DVD


- 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).

SITRAIN
ST-BWINCCS /Project Creation Page 43 Siemens AG © 2007

Simulation The simulation software provides the person configuring the system or the installer
with six different functions.
You can assign one of these six functions to each individual tag.
You can use these functions to supply the configured objects with realistic values.

Practical Functions
- Sine (as periodic, non-linear function).
- Oscillation (for simulating jumps of a reference input variable).
- Random numbers (provides you with randomly generated values).
- Increment (an up counter that begins again at the minimum value when it
reaches the maximum value).
- Decrement (a down counter that begins again at the maximum value when it
reaches the minimum value).
- Slider (a linear regulator that you can use to set a fixed value).

Note For installation, you can find this simulation program on your WinCC DVD.

To simulate process tags, you can also use the SIMATIC tool "PLCSIM", you do
not require SIMATIC hardware for PLCSIM.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 43 Project Creation
Tag Simulation 2/2
Call

WinCC TAG Simulator

SITRAIN
ST-BWINCCS /Project Creation Page 44 Siemens AG © 2007

Simulation All tags can be simulated during Runtime-mode with the simulation program
provided. The application is used for presentations and for testing functions.

Note Process tags can only be simulated if the communication connection to the PLC is
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).

Simulating Tags
Creating tags for the tag table
1. Select M> Edit, O> New Tag

2. Enter the following settings in the properties window that is displayed


for example, Temperature 1,
the function, for example, Random,
Low Limit 0
High Limit 100
and then click (check mark) the ‘active’ check box.

Note The update time for tag values is 1 second. A change does not go into effect until
the function is activated.
A maximum of 300 tags can be configured.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 44 Project Creation
Connection Status

SITRAIN
ST-BWINCCS /Project Creation Page 45 Siemens AG © 2007

General Information If process tags or even internal tags are to be used in actions, you must read the
values via GetTag actions.
Permanent monitoring of the process connection from the PLC to WinCC can be
implemented with the GetTagState action (for example, a warning box pops up in
case of a fault or output a message).
Set Tag actions are made available for assigning the results of calculations.
The SetTagState action is available if the result of the SetTag action is to be
checked.
The success of a value change can be queried with the SetTagState action
(writing from WinCC to the PLC). This is especially important for process tags
because the most varied coupling faults can occur there.
The status is transferred as a bit register and can be either evaluated by the
Dynamic Dialog or by the status’ own actions.

Evaluation - available as a system function via display inactive. No configuration is required.

- definition of a substitute value for a process tag that pops up when there is a
connection error. The setting is made in the Limits/Reporting tab (see slide
above).

- the status of a process tag can also be evaluated with the Dynamic Dialog
(see the Chapter on Graphics Screens.

- available as a standard function in the Basic Process Control Package.

- configuration with Toggle in the Simatic program and output in WinCC,


for example.

- configuration using C-Scripts.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 45 Project Creation
Documentation for Communication

SITRAIN
ST-BWINCCS /Project Creation Page 46 Siemens AG © 2007

You will find further documentation on the DVD and, after installation, on the hard
drive (see slide above); also on the Internet www.siemens.de/wincc using the link
"Support" -> Manuals.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 46 Project Creation
TIA Functions in WinCC

‰ Compiling WinCC tags from the symbols


‰ Jump from WinCC pictures into the LAD/FBD/STL
Editor
‰ Starting S7 hardware diagnosis from WinCC pictures
‰ Displaying S7 system error messages in WinCC

TIA= Part of Totally Integrated Automation

SITRAIN
ST-BWINCCS /Project Creation Page 47 Siemens AG © 2007

In the configuration of SIMATIC WinCC in an integrated environment, you can


make use of the following advantages :
- Simple compiling of tags and texts in the WinCC project
- Direct access to STEP 7 symbols during process interfacing
- Consistent message configuration
- Loading the configuration data on the Runtime OS
- Expanded diagnostic support

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 47 Project Creation
TIA Functionality, Compiling Symbols

Step7
WinCC
- Process tags in tag management
Database - User texts in the text library
- Messages in Alarm Logging Database

Communication (Compile)
STEP 7
symbol table

WinCC tag management


Data block

SITRAIN
ST-BWINCCS /Project Creation Page 48 Siemens AG © 2007

Requirements - Versions must fit together (Step7 V5.4 SP3.1 and WinCC V7.0).
- For the TIA functions presented on the next pages, you have 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 48 Project Creation
Creating an OS Station

OS=Operator Station
SITRAIN
ST-BWINCCS /Project Creation Page 49 Siemens AG © 2007

In order to generate connection data, it is necessary to create an OS station


(operator station) in the SIMATIC Manager.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 49 Project Creation
Parameterizing an MPI Subnet via HW Config

SITRAIN
ST-BWINCCS /Project Creation Page 50 Siemens AG © 2007

By selecting the subnet "MPI", an MPI connection is generated in WinCC after the
OS has been compiled. Check the setting.

OS = Operator Station

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 50 Project Creation
Symbol Table, Setting the Attribute Operator Control and
Monitoring 1/2

set

SITRAIN
ST-BWINCCS /Project Creation Page 51 Siemens AG © 2007

Column B in the Symbol Table tells the program designer whether or not the
attribute has been set for operator control and monitoring.
Through the shortcut menu and the call of "Special Object Properties -> Operator
Control and Monitoring", the attribute can be set for every individual address.
This is necessary so that during compiling from S7, the tags in the Tag
Management of WinCC are created (generated).
The various possibilities of tag generation in WinCC are explained on the following
pages.

Note The Operator Control and Monitoring attributes are also set when tag generation
takes place from the WinCC side.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 51 Project Creation
DB1, Setting the Attribute Operator Control and Monitoring 2/2
C>View, O>Declaration view

Objekteigen- Context menu > Special Object Properties >


schaften Operator Control and Monitoring

setzen

SITRAIN
ST-BWINCCS /Project Creation Page 52 Siemens AG © 2007

The flag (only for DBs) tells the program designer whether or not the attribute
has been set for operator control and monitoring. This is necessary so that during
the compiling of symbols, the tags in the Tag Management of WinCC are created.
S7_m_c true You assign this attribute and value when the symbol is to be used for tag
generation.

The various possibilities of tag generation in WinCC are explained on the following
pages.

Note The operator control and monitoring attributes are also set when the symbol
selection takes place from the WinCC side.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 52 Project Creation
Creating an S7 Program

SITRAIN
ST-BWINCCS /Project Creation Page 53 Siemens AG © 2007

Using the symbols in the SIMATIC program.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 53 Project Creation
Generating WinCC Tags

Compile Symbols

SITRAIN
ST-BWINCCS /Project Creation Page 54 Siemens AG © 2007

There are three ways of generating connection data and tags. These are
presented on the fowling pages.

- from Step7 via the Wizard "Compile Multiple OSs" -> Start... (only if operator
control and monitoring attributes were set for the symbols)

- trigger from WinCC via "Transfer Data" (possible without setting attributes on
the S7 side manually)

- from WinCC automatically in the background (possible without setting attributes


on the S7 side manually)

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 54 Project Creation
Selecting the Subnet for Compiling

SITRAIN
ST-BWINCCS /Project Creation Page 55 Siemens AG © 2007

Prerequisite: Operator control and monitoring attributes for symbols have been
set.

1. Via "Connection...", select MPI as your subnet for the transmission.


This selection causes the MPI connection to be generated in WinCC.

2. After pressing the "Next" button, select "Entire OS" and "With memory reset" in
the "Scope" area.

3. In the last Wizard screen, you start the compiling (transfer) function by pressing
the "Compile" button.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 55 Project Creation
Compiling Step7 Data to WinCC 1/2

2.
1. Select symbols
from the
Symbol Table

Symbols from
the Symbol Table

SITRAIN
ST-BWINCCS /Project Creation Page 56 Siemens AG © 2007

With this option, you can select several symbols simultaneously in order to then
compile (transfer) them.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 56 Project Creation
Compiling Step7 Data to WinCC 2/2

2.

1. Select symbols
from the Data block

Symbols from
Data blocks

SITRAIN
ST-BWINCCS /Project Creation Page 57 Siemens AG © 2007

Symbol names from DBs with the definition of arrays and structures can only be
transferred individual.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 57 Project Creation
Generated Connection and Tags in the WinCC Explorer

2 3 1

SITRAIN
ST-BWINCCS /Project Creation Page 58 Siemens AG © 2007

A connection is required for generating. This is automatically created in WinCC.

to 1 Symbol names from the symbol table for I (Input), Q (Output),


M (Memory byte)
to 2 Symbol names from the symbol table for data blocks
to 3 Tag names from the data block

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 58 Project Creation
Generated Tags Linked to the Object

SITRAIN
ST-BWINCCS /Project Creation Page 59 Siemens AG © 2007

Now you can use the tags from the tag list as usual for linking the objects. In the
example use the tag S7_Program_TIA/User.SetPointSpeed for the I/O field.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 59 Project Creation
Tag Generation using Drag & Drop (Implicit Compiling)

Drag&Drop

SITRAIN
ST-BWINCCS /Project Creation Page 60 Siemens AG © 2007

With this option, you open the Tags palette and Object Properties window and
drag&drop the icon onto an attribute name in the Dynamic column. Then the tag
will be generated.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 60 Project Creation
If You Want to Know More

SITRAIN
ST-BWINCCS /Project Creation Page 61 Siemens AG © 2007

Note The following pages are either for further information or for looking up more details
on a specific topic.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 61 Project Creation
TIA: WinCC „Network Entry Point“ Function
with “STEP7 Editing” right

Inside WinCC:
PC Einschalten call of STEP7 block from
WinCC picture

In STEP7:
Link in STEP7 block:
call of WinCC picture from
Create user with right: STEP7
„STEP7 Editing“
SITRAIN
ST-BWINCCS /Project Creation Page 62 Siemens AG © 2007

Objective Define a network entry point with writing authority in STEP7.


In the WinCC User Administrator, a separate level for the STEP7 writing authority
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 STEP7.
Depending on the status of this flag, the user has a read-only right or the authority
to change STEP7 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
function "Network Entry Point“.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 62 Project Creation
Generating Reference Data for Network Entry Point

Actual reference data is needed


for WinCC „Network Entry Point“
function

SITRAIN
ST-BWINCCS /Project Creation Page 63 Siemens AG © 2007

Reference data are 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 63 Project Creation
Network Entry Point to STEP 7 1/2

SITRAIN
ST-BWINCCS /Project Creation Page 64 Siemens AG © 2007

Link a graphic object with an operand from the S7 program.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 64 Project Creation
Network Entry Point to STEP 7 2/2

Script generated by
Dynamic Wizard

SITRAIN
ST-BWINCCS /Project Creation Page 65 Siemens AG © 2007

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 65 Project Creation
Call of STEP7 Network from WinCC and Return to WinCC

Context
menu

SITRAIN
ST-BWINCCS /Project Creation Page 66 Siemens AG © 2007

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 is to be started.
The function "Show Picture..." in WinCC is possible in all three STEP7
representations.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 66 Project Creation
TIA Functionality, Hardware Diagnosis from WinCC Pictures

SITRAIN
ST-BWINCCS /Project Creation Page 67 Siemens AG © 2007

The Hardware Diagnosis function enables you to start the STEP 7 Diagnosis
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 67 Project Creation
Configuring an Attribute for Hardware Diagnosis

SITRAIN
ST-BWINCCS /Project Creation Page 68 Siemens AG © 2007

A process tag has to be parameterized for the attribute.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 68 Project Creation
Configuration of the Event for Hardware Diagnosis

Script generated by Dynamic Wizard

Script has to be
changed to:
GetHWDiag

SITRAIN
ST-BWINCCS /Project Creation Page 69 Siemens AG © 2007

Configuration No separate wizard currently exists for the jump to the Hardware Diagnosis. You
can however, use the wizard for the network entry point to configure the jump to
the hardware diagnosis. The jump to the hardware diagnosis 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 the Windows object
"Button", for example. 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 adjusted so that it
matches the one in the slide.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 69 Project Creation
TIA Functionality, SIMATIC "Report System Error" in
WinCC Graphic Pictures

SITRAIN
ST-BWINCCS /Project Creation Page 70 Siemens AG © 2007

"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 diagnosis.
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 into 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 70 Project Creation

Anda mungkin juga menyukai