Upload
emerson-kleem
View
218
Download
0
Embed Size (px)
Citation preview
7/25/2019 04_PictureBlocks
1/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 1
SITRAIN
ST-BWINCCS /PictureBlocks Page 1 Siemens AG 2007
Block Technology (1)
Contents Page
Block Technology (2) .................................................................................................................. 2
Objectives ........................................................................................................................................ 3
Preparation for Configuration ............................................................................................................ 4
Block Technology Overview ................................................................................................................ 5
Indirect Addressing .................................................................................................................. 6
Customized Object with Process-Relevant Attributes ......................................................................... 7
Exercise 1: Customized Object with Process-Relevant Attributes ...................................................... 8
Block Technology in General .............................................................................................................. 9
Task: Show Three Faceplates when Displaying a Screen ............................................................ 10
Creating a Structure Type in the Project ............................................................................................. 11
Creating Internal Tags and/ or Process Tags fitting to the Structure .............................................. 12
Configure Template, Output Value 1/4 ............................................................................................ 13
Configure Template, Background color for Limit Values 2/4 .................................................... 14
Configure Template, Field Type 3/4 .................................................................................................... 15
Configure Template, Background Color for Speed Setpoint Value 4/4 ............................................... 16
Configure Motor_Picture, Attributes for Picture Window ..................................................................... 17
Exercise 2: Show Three Faceplates when Displaying a Screen ........................................................ 18
Task: Display Picture Window using Button ................................................................................ 19
Configure Motor_Picture, Call Picture Window, 1/2 ........................................................................... 20
Configure Motor_Picture, Title for Picture Window, 2/2 .................................................................. 21
Exercise 3: Display Picture Window using Button .............................................................................. 22
Task: A Picture Window with Selectable Tag Prefix ................................................................... 23
Sequence in Instance Formation ........................................................................................................ 24
7/25/2019 04_PictureBlocks
2/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 2
SITRAIN
ST-BWINCCS /PictureBlocks Page 2 Siemens AG 2007
Block Technology (2)
Contents Page
Configure Motor_Picture, Attributes for Picture Window .................................................................... 25
Configure Motor_Picture, Title for Picture Window ......................................................................... 26
Configure Motor_Picture, Button for Connecting Tag Prefix .................................................... 27
DB101 DB103, Setting the Operator Control and Monitoring Attribute (1/2) ................................... 28DB101 DB103, Setting the Operator Control and Monitoring Attribute (2/2) ................................... 29
Compiling the OS: Start (1/2) ........................................................................................................ 30
Compiling the OS: Result (2/2) ........................................................................................................ 31
Exercise 4: Picture Window with Selectable Tag Prefix (1/2) .......................................................... 32
Exercise 4: Picture Window with Selectable Tag Prefix (2/2) .......................................................... 33
Faceplate with Process-Relevant Attributes and Central Changeability ............................................ 34
Faceplate with Process-Relevant Attributes and Central Changeability ............................................ 35
Creating and Configuring a Faceplate Type with Individual Objects 1/3 ............................................ 36
Creating a Faceplate Instance 2/3 .................................................................................................. 37
Dynamizing and Duplicating a Faceplate Instance 3/3 ................................................................... 38Exercise 5: Display of Three Faceplate Instances in a Screen ......................................................... 39
Exercise 5: Creating a Faceplate Instance / Scaling Mode ............................................................... 40
Exercise 5: Dynamizing a Faceplate Instance / Properties ................................................................ 41
Exercise 5: Dynamizing a Faceplate Instance / Event ....................................................................... 42
Exercise 5: Display of Three Faceplate Instances in a Screen ........................................................... 43
Exercise 6: Expanding the Faceplate Type ...................................................................................... 44
Exercise 6: Expanding the Faceplate Type .................................................................................... 45
Block Technology with ActiveX Controls (Option with IndustrialX) ..................................................... 46
7/25/2019 04_PictureBlocks
3/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 3
SITRAIN
ST-BWINCCS /PictureBlocks Page 3 Siemens AG 2007
- Block technology through:
- Indirect addressing
- Customized objects
- Faceplates with tag prefix
- Faceplate types
- ActiveX objects (via option)
Objectives
Upon completion of this chapter, the participant should be able to:
Know different solutions for the use of WinCC blocks in WinCC
graphic displays
Use indirect addressing
Create and change user objects
Configure blocks that can be changed centrally using a tag prefix
Know faceplate types that can be changed centrally
Obtain information about the IndustrialX option
7/25/2019 04_PictureBlocks
4/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 4
SITRAIN
ST-BWINCCS /PictureBlocks Page 4 Siemens AG 2007
- Blocks
- Static Part
- Dynamic Part
- Action Configuration
Preparation for Configuration
Configuration Preparation
Use of the block technology
- Definition of block type (indirect addressing, customized object, picture in
picture, faceplate type, ActiveX Control)- Definition of the block functionality
- Definition of the display of blocks (selectable or always visible)
- Specifying the static display per picture (text, line, circle, rectangle, color,
etc.)
- Specifying the active (dynamic) parts per picture (input/output value, bar
graph output, switching operation, trends, messages, etc.)
- Specifying tags/structure tags for the dynamics
- Specifying the file name
- Specifying operator devices (mouse, function keys, etc.)
7/25/2019 04_PictureBlocks
5/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 5
SITRAIN
ST-BWINCCS /PictureBlocks Page 5 Siemens AG 2007
- Indirect addressing
- Customized objects
- Faceplates with tag prefix (picture in picture)
- Faceplate types
- ActiveX Controls (SIMATIC HMI option with IndustrialX)(additionally with Visual Basic configuration tool)
Block Technology Overview
Block Technology Picture block technology allows the engineer to create functions (such as motor
blocks, drive blocks, open-loop controller blocks etc.) that are used many times,
whereby every call of the function works with its own data.
The overview shows you two configuration possibilities. The tag prefix method is
created with the WinCC tools.
ActiveX Controls can be made with the option package Industrial X and Visual
Basic Version 6.
Tag Prefix Simple creation of picture modules. The template can be changed from a central
location. All possibilities for making dynamic can be used:
+ Configuration Dialog
+ Dynamic Wizard
+ Tag Connection
+ Dynamic Dialog
+ Direct Connection
+ Property Actions according to ANSI C Syntax or VBScript
+ Event Actions according to ANSI C Syntax or VBScript
ActiveX Controls To use this you need to have knowledge of an additional editor, such as, Visual
Basic.
User-application blocks with high performance (templates, faceplates) and with
know-how protection.
7/25/2019 04_PictureBlocks
6/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 6
SITRAIN
ST-BWINCCS /PictureBlocks Page 6 Siemens AG 2007
The tag TagName must be created as an internal tag of the Text tag 8-bit character set data type.
Enable
I_Value_1
Indirect Addressing
Objective With the indirect addressing of attributes, the number of objects and the dynamics
(performance profile) associated with it can be reduced.
At the same time, the picture content is easier to read.
Task The level of several containers is to be represented by an output field.
Procedure 1. Create the internal tag " TagName " of the "Text tag 8-bit character set" data
type.
2. Create the operating and output objects as shown in the graphic slide above.
3. The assignment of the internal tag TagName" takes place through the direct
connection by mouse click. The source parameter is passed to the target
variable.
4. So that the value of the tag "I_Value_1" is output at the IOField using the
attribute "Output Value", the "TagName" must be enabled through the
checkbox in the Indirect column.
Note If the container name is also to be output using an object "Static Text", you have to
use the following script by mouse click.
char szText[20]=Container 1;
SetTagChar("TagName","I_Value_1");
SetPropChar(lpszPictureName,"StaticText1","Text",szText);
7/25/2019 04_PictureBlocks
7/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 7
SITRAIN
ST-BWINCCS /PictureBlocks Page 7 Siemens AG 2007
2.
Pos. X
Drag & Drop
create
Customized Object with Process-Relevant At tributes
Result
1. Context menu
3. Context menu
Customized Object The customized object allows you to make a hidden configuration of object
properties. This makes it possible to display only those properties that are
important for the process visualization. Also, the names of the properties can be
changed by the designer of the Customized Object, even in multiple languages.
The Customized Object can be copied into the library by means of Drag and Drop.
Then in the reverse way, the Customized Object can be copied into any WinCCpicture.
Note The Global Library contains a whole series of such Customized Objects (e.g.
measuring instruments). These objects can be extended any time with your own
objects.
Task The position of a rectangle is to be dynamically changed with the help of a
Customized Object.
Only this one property is to be shown to the final user.
Procedure The rounded rectangle (or all objects, belonging to this Customized Object) are
positioned in the graphic picture. Next all objects are selected and the
1. Shortcut menu is created with the Customized Object setting.
2. Activate "Customized Object" --> "Create...".
A Configuration Dialog Customized object will appear where "Selected
Properties" (see screen in slide) can be deleted, added and renamed.
3. The process tags can be connected via the properties of the Customized
Object.
7/25/2019 04_PictureBlocks
8/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 8
SITRAIN
ST-BWINCCS /PictureBlocks Page 8 Siemens AG 2007
Tooltip text
Exercise 1: Customized Object with Process-Relevant At tributes
Objective A help text is to be displayed on the two toggle buttons. The help text is to be
configured as a tooltip text. Through the Object Properties, you can see that the
toggle button exists as a customized object. This customized object is now to be
expanded with the attribute Tooltip text using the customized object configuration
dialog.
Exercise 1. Through double click while shift key is pressed, activate the editing of the
"Configuration Dialog Customized object" and expand the list of properties by
adding the property "Tooltip Text" and adopt (copy) the texts shown in the
slide above.
2. Save the picture and test the function.
7/25/2019 04_PictureBlocks
9/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 9
SITRAIN
ST-BWINCCS /PictureBlocks Page 9 Siemens AG 2007
Appl ication
picture
Data records
in the
SIMATIC PLCStructure Type
Editor
M M M
Template .pdl with
type objects
Tags (instances)generated from
structure tag
Smart Object:Connect faceplateto type graphic
Block Technology in General
General To reduce the costs of configuration and management of simular process objects,
WinCC offers you the opportunity of using picture block technology.
Based on similarly structured data records in the PLC (interface description for
function blocks), the Structure Tag (template) is created (for example motor
blocks, drive blocks, open-loop controller blocks etc.) with the Structure TypeEditor in the WinCC Explorerand the tags (instances).
This structure tag represents the interface used to read and write data to the PLC
for one specific object type.
Then, the type objects are created in the template and these are connected to the
Struct-Membername in the structure tag. For example, when a type object is
called, this object is connected to the relevant addresses from the PLC (tag prefix=
instance name).
Tag name: [instance name] .[member name]
7/25/2019 04_PictureBlocks
10/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 10
SITRAIN
ST-BWINCCS /PictureBlocks Page 10 Siemens AG 2007
Runtime view of the screen Motor_picture.pdl
Task: Show Three Faceplates when Displaying a Screen
Task The faceplate for a motor shows the typical elements for operating and
displaying. You can perform a switching operation with the left switch. With the
right switch, you can set the manual mode for adjusting the setpoint. In addition,
the logged-on user is to be shown (prerequisite: the User Administrator is
configured and a user is logged on).
7/25/2019 04_PictureBlocks
11/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 11
SITRAIN
ST-BWINCCS /PictureBlocks Page 11 Siemens AG 2007
Creating a Structure Type in the Project
Create Structure Type
As member names (names of the individual structure elements), the same names
as in data block DB1 "User" are used: "Speed_SP, Speed_ACT, Temperature,
On_Off and Direction_SP". This permits that during the exercise the faceplate to
be created can be operated with this structure, with the transferred data block DB1
"User", and with the data blocks DB 101 to DB 103 (which still need to betransferred; compile via OS).
FAQ 16504646 Question: How can I edit a WinCC structure type without having to delete existing
structure tags for this type?
Characters Not AllowedNames of structure types, structure elements, structure instances:? ' \ @ * % Blank
7/25/2019 04_PictureBlocks
12/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 12
SITRAIN
ST-BWINCCS /PictureBlocks Page 12 Siemens AG 2007
Tags for
instance:Motor_3
Motor_3
Creating Internal Tags and/or Process Tags Fitting to the Structure
Structuretype Motor
Tags for Instances
In the slide you can see the structure tags for two of three motors. The structure
tags are located in the "motor_prefix" group. "Motor_1." to "Motor_3." were
selected as instance names. As member names (names of the individual structure
elements), the same names as in the "User" data block were used: Speed_SP,
Speed_ACT, Temperature, On_Off and Direction_SP.
Character Length Length of tag names: [Instancename] .[ Membername]
is a maximum of 128 characters.
- a maximum of 31 instances of the same template can be used in one system
picture.
7/25/2019 04_PictureBlocks
13/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 13
SITRAIN
ST-BWINCCS /PictureBlocks Page 13 Siemens AG 2007
Member-Name:Speed_ACT
from library
IOField with tag connection @NOTP::@CurrentUser
Configure Template, Output Value 1/4
Task With the template shown in the slide, you are to be able to change the setpoint
speed of a motor. At the same time, the input value is to be monitored by a
dynamic dialog at the I/O field for the setpoint input. The setpoint speed and actual
speed are also to be displayed as bars. The motor is to be switched on and off via
the left change-over switch. The right change-over switch is to be used for
selecting the direction of rotation of the motor. In addition, the logged on user is tobe displayed (this requires configuration by the User Administrator and a logged
on user).
The system tag @CurrentUser is generated when a project is created. The system
tag reads the name of the logged on user from the database. However, this tag
cannot be displayed in the faceplate just like that, since it is not an element in the
structure used in this exercise. In this case, a tag add-on must be used to be able
to request tags without tag prefix in a faceplate.
If the tag add-on @NOTP::tag_name (NO Tag Prefix) is entered before a tag, the
tag prefix is ignored in the picture window. This permits that also tags can be
displayed which are not instantiated, i.e. tags that are not located in a structure
such as "Motor".
Further tag add-ons:
- @NOSP:: tag name (NO Server Prefix) deactivates the server prefix
- @NOP:: tag name (NO Prefix deactivates the tag prefix and the server prefix).
7/25/2019 04_PictureBlocks
14/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 14
SITRAIN
ST-BWINCCS /PictureBlocks Page 14 Siemens AG 2007
Configure Template, Background Color for Limit Values 2/4
Member name:Speed_ACT
Dynamic Dialog Internal tags are needed so that the Dynamic Dialog can be closed without an
error message appearing (a reference to open tag references appears). For this
purpose, create the tags Setpoint and Actual value as internal tags (dummies)
in the tag group Motor_Prefix. At runtime, WinCC will then only access the
structure tags. Addressing is implemented via the tag prefix of the picture window
(instance name) and the tag names used at the object in the faceplate (member
name) --> [instance name] .[member name].
Note If you work without dummy tag, you must perform the following steps since the
Dynamic Dialog checks the existence of the tag in the Tag Management:
1st step: In the Dynamic Dialog, press the "Apply" button.
2nd step: Then select "Ignore in order to complete the configuration.
7/25/2019 04_PictureBlocks
15/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 15
SITRAIN
ST-BWINCCS /PictureBlocks Page 15 Siemens AG 2007
Configure Template, Field Type 3/4
Member name:Speed_SP
7/25/2019 04_PictureBlocks
16/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 16
SITRAIN
ST-BWINCCS /PictureBlocks Page 16 Siemens AG 2007
Configure Template, Background Color for Speed Setpoint Value4/4
7/25/2019 04_PictureBlocks
17/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 17
SITRAIN
ST-BWINCCS /PictureBlocks Page 17 Siemens AG 2007
1
3
2
4
Picture window for Motor_1
Configure Motor_picture, Attributes for Picture Window
Picture Name (1) The name of the picture that is to be displayed in the picture window is entered in
this attribute. In this case, Motor_Box.pdl must be selected.
Tag Prefix (2) The tag prefix of the structure that is to be displayed in the picture window is
entered in this attribute. A maximum of 31 picture windows with the same structurecan be connected in one picture. In this example, the variable prefixes Motor_1 3
are used for the picture windows 1 3.
Heading (3) The text that is to appear in the title of the picture window is entered in this
attribute. Later during the exercise, this attribute will be set with the current tag
prefix via a direct connection.
Display (4) The Static is set to "yes" in this attribute so that the window appears immediately
when the system picture is called.
7/25/2019 04_PictureBlocks
18/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 18
SITRAIN
ST-BWINCCS /PictureBlocks Page 18 Siemens AG 2007
Runtime view of the screen Motor_picture.pdl
Exercise 2: Show Three Faceplates when Displaying a Screen
Objective In the Motor_picture.pdl, the faceplate "Motor_Box.pdl" is to be displayed in three
different picture windows. The associated structure tags are to be addressed via
the tag prefix (Motor_1. Motor_3.).
Exercise 1. Define the structure elements of the "Motor" structure as shown in the slide
"Creating a Structure Type in the Project".2. Create the structure tags for the structures "Motor_1" to "Motor_3"
as shown in the slide "Creating Internal Tags and/ or Process Tags fitting to the
Structure".
3. Use the Graphics Designer to create a new picture named "Motor_Box.pdl"
(picture height: 280, picture width: 190).
4. Configure the steps for the faceplate design as described in the slides
Configure Template, Output Value 1/4" to "Configure Template,
Background Color for Speed Setpont Value 4/4".
5. Use the Graphics Designer to create a new picture designated
"Motor_picture.pdl".
6. Add a button for selecting the picture "Motor_picture.pdl" to the start screen"Start.pdl". Make a backup copy of the changed start screen
7. Place three picture windows in "Motor_picture.pdl" (position Y: 140,
window width: 200, window height: 350. Select the following values
for position X: 250, 530 and 810). The free space to the left of picture window1
is required for further buttons in the next exercise.
8. Configure the properties of the picture windows as described in the slide
"Configure Motor_picture, Attributes for Picture Window".
9. Back up the created pictures. Start WinCC Runtime and test the
functionality of the newly created pictures.
7/25/2019 04_PictureBlocks
19/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 19
SITRAIN
ST-BWINCCS /PictureBlocks Page 19 Siemens AG 2007
Task: Display Picture Window using Button
Task The buttons in "Motor_picture.pdl" labeled Motor 1 Motor 3 can be used to
display or hide the associated picture window. The tag prefix is shown in the
header line.
7/25/2019 04_PictureBlocks
20/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 20
SITRAIN
ST-BWINCCS /PictureBlocks Page 20 Siemens AG 2007
Configure Motor_Picture, Display Picture Window, 1/2
Action The C-Script describes the toggle function Show/Hide for the picture window.
Note Set the attribute Display of the picture window to no so that the picture window
does not appear when you select the screen.
7/25/2019 04_PictureBlocks
21/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 21
SITRAIN
ST-BWINCCS /PictureBlocks Page 21 Siemens AG 2007
Configure Motor_Picture, Display Picture Window, 2/2
Action When the picture window is opened, the tag prefix is read out and copied to the
Heading attribute. Since the object "this object" was used in the direct connection,
the picture window can be copied as often as you like without having to change the
direct connection.
SetPropChar You can create a specific picture window title (heading) with
SetPropChar(lpszPictureName,Bildfenster6,CaptionText, Hydraulikpumpe1).
7/25/2019 04_PictureBlocks
22/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 22
SITRAIN
ST-BWINCCS /PictureBlocks Page 22 Siemens AG 2007
Exercise 3: Display Picture Window using Button
Objective The buttons in "Motor_picture.pdl" labeled Motor 1 Motor 3 are to show or hide
the associated picture window. The tag prefix (Motor_1. to Motor_3. is to be shown
in the header line.
Exercise 1. Open the picture "Motor_picture.pdl" in the Graphics Designer.
2. Add three buttons labeled Motor_1, Motor_2, Motor_3 to the
"Motor_picture.pdl" picture as shown in the figure above.
3. For selecting the picture windows 1 - 3, configure the required C actions at the
buttons for the event "mouse click" as shown in the slide "Configure
Motor_Picture, Display Picture Window, 2/2".
4. Configure the properties of the picture windows for displaying the current tag
prefix as described in the slide "Configure Motor_picture, Title for Picture
Window, 2/2".
5. Back up the picture. Start WinCC Runtime and test the
functionality of the changed picture.
7/25/2019 04_PictureBlocks
23/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 23
SITRAIN
ST-BWINCCS /PictureBlocks Page 23 Siemens AG 2007
Task: A Picture Window with Selectable Tag Prefix
Task Via the buttons in "Motor_picture.pdl" labeled Motor 1 Motor 3, User, Machine 1
3, the associated picture window can be linked to different data structures. The
data structures contain internal tags and PowerTags from the data blocks DB1 and
DB101-103. The current tag prefix is shown in the header line.
7/25/2019 04_PictureBlocks
24/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 24
SITRAIN
ST-BWINCCS /PictureBlocks Page 24 Siemens AG 2007
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 namePictureName.
SetTagPrefix();
SetPictureName();
SetTagPrefix();
SetPictureName();
Sequence in Instance Formation
Tag prefix:Motor_2.
Tag prefix:Motor_1.
Tag prefix:Motor_1.
SetTagPrefix SetTagPrefix(lpszPictureName,PictWin1", "Motor_1.");
This function sets the tag prefix of a picture window (e.g. PictWin1).
In one picture window, the tag Actual value is called in an object. If a tag prefix
"Motor_1." is assigned to the picture window, then the tag "Motor_1. Actual value "
is called. The setting of the tag prefix only becomes effective when the picture
name is reassigned, thus the picture change is omitted.
SetPictureName SetPictureName(lpszPictureName," PictWin1 1",Motor_Box.pdl");
You have to set the tag prefix before you select the picture and reassign the
picture name, if the picture is not to be changed.
7/25/2019 04_PictureBlocks
25/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 25
SITRAIN
ST-BWINCCS /PictureBlocks Page 25 Siemens AG 2007
1
2
3
4
Configure Motor_Picture, Attributes for Picture Window
Picture Name (1) No name of the picture is entered in this attribute. The dynamics occurs through
SetPictureName();.
Tag Prefix (2) No tag prefix is entered in this attribute. The tag prefix is assigned using the
function: SetTagPrefix(); (or) with a mouse click on the button Motor1 to the left ofthe picture window.
Heading (3) The assignment of this attribute is made using the Direct Connection. The Direct
Connection can be seen on the following pages.
Display (4) The Static is set to "no" in this attribute so that the window does not immediately
appear when the system picture is called.
7/25/2019 04_PictureBlocks
26/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 26
SITRAIN
ST-BWINCCS /PictureBlocks Page 26 Siemens AG 2007
Configure Motor_Picture, Title for Picture Window
7/25/2019 04_PictureBlocks
27/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 27
SITRAIN
ST-BWINCCS /PictureBlocks Page 27 Siemens AG 2007
SetVisible(lpszPictureName, PictWin1,0);SetTagPrefix(lpszPictureName, PictWin1,Motor_1.);
SetPictureName(lpszPictureName, PictWin1,Motor_Box.pdl);
SetVisible(lpszPictureName, PictWin1,1);
Configure Motor_Picture, Button for Selecting the Tag Prefix
SetVisible(lpszPictureName, PictWin1,0);SetTagPrefix(lpszPictureName, PictWin1,S7-Program/User.);
SetPictureName(lpszPictureName, PictWin1,Motor_Box.pdl);SetVisible(lpszPictureName, PictWin1,1);
SetVisible(lpszPictureName,PictWin1,0);SetTagPrefix(lpszPictureName,PictWin1,S7-Program/Machine3.);
SetPictureName(lpszPictureName,PictWin1,Motor_Box.pdl);SetVisible(lpszPictureName,PictWin1,1);
C Actions Edit the C actions at the buttons as shown in the figure above. Adapt
the tag prefix in the C actions accordingly so that all structure
tags can be displayed in the faceplate.
VBScript Alternatively, the same task can be solved by means of a VBScript instead of a Caction at the action mouse click:
Sub OnClick(Byval Item)
Dim objScrWindow
Set objScrWindow = ScreenItems(PictWin1")
objScrWindow.Visible =vbFalse
objScrWindow.TagPrefix = "S7-Programm/Maschine1."
objScrWindow.ScreenName = "Motor_Box"
objScrWindow.Visible =vbTrue
End Sub
7/25/2019 04_PictureBlocks
28/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 28
SITRAIN
ST-BWINCCS /PictureBlocks Page 28 Siemens AG 2007
Context menu -> Special Object Properties, OperatorControl and Monitoring
Set (at DB101, DB102,DB103)
DB101 DB103, Setting the Operator Control and MonitoringAttribute (1/2)
Setting the Properties of the DBs
The property "Operator Control and Monitoring" must be set at all three data
blocks (DB101 DB103). For this purpose, you must open the Operator Control
and Monitoring dialog. This dialog box is opened by right-clicking on the data block
icon and then clicking on the entry "Special Object Properties Operator Control
and Monitoring" in the context menu.Exit the dialog box by clicking on the "Save" button.
Note The Operator Control and Monitoring attributes are also set if the symbols are
selected from WinCC.
7/25/2019 04_PictureBlocks
29/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 29
SITRAIN
ST-BWINCCS /PictureBlocks Page 29 Siemens AG 2007
Objectproperties
View: F>View, O>Declaration View
DB101 DB103, Setting the Operator Control and MonitoringAttribute (2/2)
The flag (only for DBs) shows the user that the Operator Control and Monitoring
attribute is set. This is necessary to ensure that the tags are created in the tag
management of WinCC when compiling the symbols.
S7_m_c true This attribute ("S7_m_c"
m: monitoring, c: control) and value ("true") is assignedif the symbol is to be used for generating the tag.
You can open the dialog box "Properties Parameters" by right-clicking on the
symbol to be edited (e.g. Speed_ACT) and then clicking on the entry "Object
Properties" in the context menu. The flag becomes visible after exiting the edited
row. The following symbols are used in this exercise:
- Speed_SP
- On_Off
- Direction_SP
- Speed_ACT
- Temperature
Do not forget to save the data block!
Note The Operator Control and Monitoring attributes are also set if the symbols are
selected from WinCC .
7/25/2019 04_PictureBlocks
30/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 30
SITRAIN
ST-BWINCCS /PictureBlocks Page 30 Siemens AG 2007
Compil ing the OS: Start (1/2)
Compile The "Compile" function must be initiated to create the selected symbols as tags in
the WinCC tag management. It suffices if only the changes are transferred when
compiling.
7/25/2019 04_PictureBlocks
31/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 31
SITRAIN
ST-BWINCCS /PictureBlocks Page 31 Siemens AG 2007
Tags of data blocksDB101 DB103
Structures ofDB 101 - 103
Compil ing the OS: Resul t (2/2)
Result of the "Compile" function
All symbols with the set attribute for Operator Control and Monitoring (flag) have
been generated during the compilation in the WinCC tag management. The three
DBs DB101 to DB103 were created as structure types with their names
"Machine1" to "Machine3". The transferred data blocks can now be displayed inthe left picture window in the motor screen with the faceplate. The tag prefix for the
data of DB 101 is: S7-Program/Machine1.
7/25/2019 04_PictureBlocks
32/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 32
SITRAIN
ST-BWINCCS /PictureBlocks Page 32 Siemens AG 2007
Exercise 4: A Picture Window with Selectable Tag Prefix (1/2)
Objective Via the buttons in "Motor_picture.pdl" labeled Motor 1 Motor 3, User, Machine 1
3, the associated picture window is to be linked to different data structures. The
data structures are to contain internal tags and PowerTags from the data blocks
DB1 and DB101-103.
The current tag prefix is to be shown in the header line .
Exercise 1. Insert seven buttons to the left of the first picture window as shown in the slide
"Configure Motor_picture, Attributes for Picture Window".
2. Select the attributes for the picture window as shown in the slide
"Configure Motor_picture, Attributes for Picture Window".
3. Configure the display of the current tag prefix in the title of the picture window
as shown in the slide "Configure Motor_picture, Title for Picture Window".
4. Edit the C actions at the buttons as shown in the slide
"Configure Motor_picture, Button for Selecting the Tag Prefix". Adapt
the tag prefix in the C actions accordingly so that all structure
tags can be displayed in the faceplate.
5. Set the "Operator Control and Monitoring" attribute at the data blocks
DB101 to DB 103 as shown in the slide
DB101 DB103, Setting the Operator Control and Monitoring Attribute (1/2)".
Without this setting, the data blocks will not be transferred .
6. Set the "Operator Control and Monitoring" attribute (flag) at the symbols
in the data blocks DB101 to DB 103 as shown in the slide
DB101 DB103, Setting the Operator Control and Monitoring Attribute (2/2).
7/25/2019 04_PictureBlocks
33/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 33
SITRAIN
ST-BWINCCS /PictureBlocks Page 33 Siemens AG 2007
Exercise 4: A Picture Window with Selectable Tag Prefix (2/2)
Continuation of Exercise 4
7. Start the compile function as shown in the slide "Compiling the OS: Start (1/2)"
In the following slide you can see the newly created tags and structure types.
8. Now start WinCC Runtime and test the function of the seven added buttons forswitching the tag prefix.
7/25/2019 04_PictureBlocks
34/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 34
SITRAIN
ST-BWINCCS /PictureBlocks Page 34 Siemens AG 2007
Appl ication
picture
Data records in
the SIMATIC PLC
Structure Type
Editor
Faceplate type graphic
.fpt with type objects
Tags (instances)generated from
structure tag
Smart Object:Connect faceplateinstance to typegraphic
Faceplate with Process-Relevant Attributes and CentralChangeability
General Faceplates can be used to reduce configuration and administration costs for
similarly structured process objects.
Based on similarly structured data sets in the control (interface description for
function blocks), structure types (e.g. motor, drive, controller block, etc.) are
created once and the tags (instances) are created with the Editor in the WinCCExplorer.
These tags thus constitute a transfer interface for data from the control for the
faceplate instance in the plant display.
7/25/2019 04_PictureBlocks
35/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 35
SITRAIN
ST-BWINCCS /PictureBlocks Page 35 Siemens AG 2007
Runtime view of the graphic Stirring_unit.pdlConfiguring of faceplates
+Create the faceplate templateusing Graphics Designer
+Configure the faceplate templatewith the required attributes
+VBScript interface
+Edit the local faceplate tags
+Create and dynamize a faceplateinstance
+Central changeability
Faceplate with Process-Relevant Attributes and CentralChangeability
Configuring of Faceplates
+ Create the faceplate template using Graphics Designer
+ Configure the faceplate template with the required attributes
+ VBScript interface
+ Edit the local faceplate tags
+ Create and dynamize a faceplate instance
+ Central changeability
7/25/2019 04_PictureBlocks
36/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 36
SITRAIN
ST-BWINCCS /PictureBlocks Page 36 Siemens AG 2007
Drag & Drop
F>Edit, O>Configure Faceplate Type
Edit F>Edit, O>Edit Faceplate Tags
Important: adapt picture size in x+y
X
Y
Creating and Configuring a Faceplate Type with Individual Objects1/3
Create the fpt type Add individual objects from the object palette of the Graphics Designer. The object
types connector, user object, application window, picture window, and faceplates
cannot be used in the faceplate
Configure the fpt typeConfigure the individual objects; i.e. the required properties and events
Create the fpt type "Tags"
Create and edit the required local tags
Dynamization with VBScripts
- With fpt-internal VBScripts, you cannot access data outside of the faceplate
type.
- Therefore there is no access to "HMIRuntime" within a faceplate type
- Debugging is not possible for fpt-internal scripts.
- Fpt-internal tags are accessed in the faceplate type via "SmartTags".
- With "SmartTags" you can access fpt-internal tags and the properties of thefaceplate type.
- See also in WinCC help in the VBS reference chapter SmartTags object
Dynamization through Tag Linking
- Only faceplate tags can be used for tag linking.
- Procedure same as for normal tag linking
- Parameters of the local tag: name, data type, start value, low limit,
upper limit
7/25/2019 04_PictureBlocks
37/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 37
SITRAIN
ST-BWINCCS /PictureBlocks Page 37 Siemens AG 2007
Link faceplate instance to .fpt file
Creating a Faceplate Instance 2/3
Create the Smart Object Faceplate instance and link it to the created .fpt file.
7/25/2019 04_PictureBlocks
38/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 38
SITRAIN
ST-BWINCCS /PictureBlocks Page 38 Siemens AG 2007
Dynamizing and Duplicating a Faceplate Instance 3/3
Dynamization
All dynamization options can be used
Note
If you select no faceplate type or an invalid faceplate type, the faceplate object is
deleted from the picture.
Changing of Faceplate Types
Changes to type-specific properties in the faceplate type are not updated in the
faceplate instances if the associated process screen of the faceplate instance is
open. Changes are adopted in the instances by closing and reloading the
associated process screen.
7/25/2019 04_PictureBlocks
39/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 39
SITRAIN
ST-BWINCCS /PictureBlocks Page 39 Siemens AG 2007
Runtime view of the graphic Stirring_unit.pdl
Exercise 5: Display Three Faceplate Instances in a Screen
Objective In the Stirring_unit.pdl, three faceplate instances of the faceplate type
"TypFpt1.fpt" are to be displayed. Dynamization of the faceplate instances is to be
implemented through structure tags (Motor_1. Motor_3.).
Exercise
1. Copy the picture Stirring_unit.pdl" from the catalog "ab_exercise"into the subdirectory GraCS from your project "Control_Room" integrated in
the S7 project (D:\Kurse\WINCCS\Ventilation\wincproj\.....\GraCS).
2. From the catalog ab_exercise, copy the faceplate object "TypFpt1.fpt" into the
subdirectory GraCS from your project "Control_Room"
(D:\Training\WINCCS\Ventilation\wincproj\.....\GraCS) integrated in the
S7 project).
Further configuration steps are described on the following pages.
7/25/2019 04_PictureBlocks
40/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 40
SITRAIN
ST-BWINCCS /PictureBlocks Page 40 Siemens AG 2007
Link faceplate instance to .fpt file
Exercise 5: Creating a Faceplate Instance / Scaling Mode
Continuation of Exercise 5
3. Create the Smart Object Faceplate instance and link this object to the file
TypeFpt1.fpt.
Set the property Other\Scaling mode of the faceplate instance to 1:1.
7/25/2019 04_PictureBlocks
41/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 41
SITRAIN
ST-BWINCCS /PictureBlocks Page 41 Siemens AG 2007
Exercise 5: Dynamizing a Faceplate Instance / Properties
Continuation of Exercise 5
4. Connect the three properties to be dynamized as follows:
- ActTemperature -> Motor_1.Temperature
- StateStirringUnit -> Dynamic dialog with tag: Motor_1.Temperature,
as shown in the figure above.
- ActSpeed -> Motor_1.Speed_ACT
7/25/2019 04_PictureBlocks
42/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 42
SITRAIN
ST-BWINCCS /PictureBlocks Page 42 Siemens AG 2007
Exercise 5: Dynamizing a Faceplate Instance / Event
Continuation of Exercise 5
5. For the two events to be dynamized, use two direct connections with the
following data:
- For MotorOn Source/constant: "1", target/tag Motor_1.On_Off
as shown in the figure above.
- For MotorOff Source/constant: "0", target/tag Motor_1.On_Off
7/25/2019 04_PictureBlocks
43/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 43
SITRAIN
ST-BWINCCS /PictureBlocks Page 43 Siemens AG 2007
Runtime view of the graphic Stirring_unit.pdl
Exercise 5: Display Three Faceplate Instances in a Screen
Continuation of Exercise 5
6. Duplicate the faceplate instance twice and place the faceplate instances as
shown in the figure above
7. Change the tag link so that the three faceplate instances operate with the tags
of the motors 1 3. Use the function Linking/Tag Connections" to adapt the
tag link. You can open the required dialog box by right-clicking on the faceplate
instance and then by clicking on " Linking/Tag Connections ". For rewiring, use
the function Find and Replace" (replace "_1." by "_2." or "_3." to change the
tag names from Motor_1.to Motor_2. or Motor_3.).
In the Find and Replace" dialog, do not forget to click the button "Select all".
Otherwise, the buttons "Preview" and "Replace" will be deactivated. The
rewiring process is implemented and concluded by clicking the "OK" button.
8. Insert an additional button for selecting the stirring unit picture in the start
screen Start.pdl. Save the changed start screen.
9. Save the edited picture "Stirring_unit.pdl". Start WinCC Runtime and test the
functionality of the faceplate instances.
7/25/2019 04_PictureBlocks
44/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 44
SITRAIN
ST-BWINCCS /PictureBlocks Page 44 Siemens AG 2007
Runtime view of the graphic Stirring_unit.pdl
Exercise 6: Expanding the Faceplate Type
Objective A static text is to be added to the faceplate instances in Stirring_unit.pdl, three
faceplate instances of the faceplate type "TypFpt1.fpt" are to be displayed. The
static text "Motor running" is to be hidden and shown via the buttons "Motor on"
and "Motor off". This function is to be implemented by means of a faceplate-
internal (fpt-internal) tag and VBSript actions at the buttons.
Exercise 1. In Graphics Designer, open the faceplate type "TypFpt1.fpt".
2. Open the dialog box for editing the fpt-internal tag
via: F>Edit, O>Edit Faceplate Tags
3. In the dialog box "Faceplate Tags" create the tag "On_Off" of the data type
"Binary Tag" with the start value "0" . Exit the dialog box by clicking on the
"OK" button.
Further configuration steps are described on the following page.
7/25/2019 04_PictureBlocks
45/46
SITRAIN Training forAutomation and Industrial Solutions
ST-BWINCCS
PictureBlocksPage 45
SITRAIN
ST-BWINCCS /PictureBlocks Page 45 Siemens AG 2007
Exercise 6: Expanding the Faceplate Type
VBScript at Button Motor on , Event Mouse Action
VBScript at Button Motor off , Event Mouse Action
Continuation of Exercise 6
4. Insert a "Static Text" object in the faceplate type "TypFpt1.fpt". In the properties
of the static text, enter the text "Motor running" under Font/text.
5. Dynamize the visibility of the static text object with the fpt-internal tag "Off_On"
as shown above (property: Miscellaneous/Display).
6. Enter the upper VBScript (see figure above) at the button "Motor on" at the
event "Mouse Action".
7. Enter the lower VBScript (see figure above) at the button "Motor off" at the
event "Mouse Action".
8. Back up the changed faceplate type "TypFpt1.fpt". After a picture change in
WinCC Runtime mode from the "Stirring unit" picture to another picture andback, you can test the expanded functionality of the changed faceplate
instances (centrally via the faceplate type).
7/25/2019 04_PictureBlocks
46/46
SITRAIN
ST-BWINCCS /PictureBlocks Page 46 Siemens AG 2007
IndustrialX
Basic and WinCC Controls Service Controls
V6
Block Technology with Act iveX Controls(Option with IndustrialX)
Configuration toolset to develop picture modules.
The IndustrialX-CD consists of:
- Configuration toolset with Basic and Service Controls
for example, Basic Controls with operator interfaceBar (Graphs)
I/O fields
List Box
etc. (depending of the version)
for example, Service Controls without operator interface
for process connections
for handling messages
for password handling
etc. (depending of the version)
- WinCC Controls and Controls of Others (Demo)