You are on page 1of 22

https://support.automation.siemens.com/WW/llisapi.dll?func=cslib.

csinfo&objId=23425423&nodeid0=
10805577&load=treecontent&lang=en&siteid=cseus&aktprim=0&objaction=csview&extranet=standard
&viewreg=WW

How do you integrate structures into faceplates?


Display part number

Instructions:
Faceplates enable users to customize the compilation of existing objects (e.g. rectangle, IO field,
button, etc.). These faceplates can be saved in a library and be used in other projects so as to
reduce the configuration workload.
Since every faceplate is a user-defined object, you can define the properties which are
permanently saved in the Properties window for an IO field, for example, yourself.

In the case of faceplates with a more complex interface, structures offer the benefit of reducing
the configuration workload. If, for example, there are twenty tags transferred to the faceplate, the
user simply has to link a structure which contains this number of tags (structural elements). It is
particularly advantageous to use structures if this faceplate is used repeatedly in a project.

Fig. 01
The static interface and internal tags

• Objects (A)
Objects are graphical elements which are used to design the process pictures for your
faceplate, such as text fields, graphics and interfaces.
• Properties - static (B)
The static properties can be linked to the properties of the individual objects in the
faceplate. The link and the declaration take place in the configuration window of the
faceplate. All the static properties are constant throughout the WinCC flexible runtime.
• Static interface (C)
Constant parameters (E) and user rights (F) can be transferred individually as properties
to the faceplate via the static interface. These properties must be configured beforehand
within the faceplate in order to ensure that they are available outside the faceplate as well.
The static properties are defined via the static interface in the Properties dialog of the
faceplate under the entry "General".

Property of the static interface


Note:
Structures cannot be configured at the static interface (Fig. 01). More information about
the static interface is available in Entry ID 24233458.
• Tags (D) - as from WinCC flexible 2005 SP1
These internal faceplate tags are only valid within the faceplate. Due to system
constraints, they cannot be accessed outside the faceplate.

The dynamic interface


Fig. 02

• Properties - dynamic (1)


The dynamic properties are declared in the configuration editor and can be linked
individually to the properties of the various objects. The properties of the dynamic
interface are "variable" in runtime.
• Dynamic interface (2)
All the tags which have been created in the WinCC flexible project can be transferred to
the faceplate via the dynamic interface. The dynamic interface supports bi-directional
data exchange

Property of the dynamic interface


• Tags (3) - as from WinCC flexible 2005 SP1
The external tags for the faceplate are configured in the Properties dialog of the faceplate
under "Properties > Dynamic Interface". Only tags of the same data type can be
configured on the property in question.
• Structures (4)
Structures are configured precisely like tags. The structure configuration must also be
identical on either side of the interface.

Use of structures
Structures can only be used in:
• faceplates
• S7 connections or in internal tags
• the dynamic interface.

Note:
There is a sample project available to Download at the end of this entry. It contains a link to a
structure within a faceplate.

Configuration in WinCC flexible


Only the creation of the faceplate is described in the following table. The sample project which is
available to download at the end of the entry is explained in greater detail. The pump-operation
procedure is described on the basis of a dialog window which can be shown.

N Procedure
o.
1 Creating a dialog box

• Create a "self-designed dialog box" by adding two rectangles of different sizes


which are contained in the basic objects.
• Specify the height and width of the rectangle. The smaller rectangle is used as a
"title bar", and the larger one is used as a "dialog box".
• Place one rectangle on top of the other (see Fig. 03).
• Change the fill color of the two rectangles to blue and gray.

Fig. 03

Note:
Alternatively, you can also create a screenshot of a Windows dialog box, for example, and
integrate it as a graphics object.
2 Add buttons

• Add five buttons from the WinCC flexible basic objects.


• Label the buttons as follows:
o "Auto"
o "Manual"
o "Manual ON"
o "Manual OFF"
o "X".

o

Fig. 04
3 Adding text fields and rectangles

• Create two smaller rectangles for the status display.


• Position these two rectangles on top of one another in the middle of the "dialog"
rectangle.
• Then add three text fields and position them as shown in Fig. 05.
• Label the text fields as follows:
o "Pump"
o "Fault"
o "Ready for use"
• Then change the color of the text in the "title bar" that you created to white.

Fig. 05
4 Adding a graphics display

• Open the "Graphics" entry in the WinCC flexible toolbar.


• Select the graphic "Horizontal pump (right).wmf" from the directory "WinCC
flexible graphics folder > Symbol Factory Graphics > SymbolFactory 256
Colors > Pumps".
• Place the graphic in the large rectangle (see Fig. 05).

Fig. 06
5 Adding a structure

• Create a new structure by double-clicking a structure in the project tree under


"Project > Structures > Add Structure".
• Create 16 "BOOL"-type structural elements, as well as one "INT"-type.

Fig. 07

Note:
In the "PLC" selection field, declare whether it is an internal structure or a structure with an
interface to an S7-300/400 controller. In the Tag Editor, the structure is only available for
the connection selected here.
6 Creating faceplates

• Select all the objects in the picture by left-clicking them.


• Then create a faceplate via the "Faceplates > Create Faceplate" menu.
Fig. 08
7 Adding properties and tags
You can add properties and tags in the "faceplate configuration" and "property
interface" tag. Tags (internal faceplate tags) are only valid within the faceplate and can be
configured only as from WinCC flexible 2005 SP1. All parameters which are used outside
the faceplate must be defined as a property.

Category Interface
Properties Internal and external data
Tags Internal data
Table 01

• Create a new property in the "Property interface" tab by right-clicking


"MyProperties" and then selecting "Add Property" in the pop-up menu.
Alternatively, you can click the icon on the toolbar (Fig. 09).
Add category
Add property
Add tag (available in WinCC flexible 2005 SP1 onwards)
Note:
Up to and including WinCC flexible 2005, you can only create dynamic properties
when you add the process value of an object, for example of an IO field, via drag-
and-drop to a property category.
As from WinCC flexible 2005 SP1, you can also add static properties of the
dynamic interface by double-clicking the properties concerned and then activating
the option box that is shown.
• Select the structure created beforehand, "Structure_1", as a data type.
• Define another "BOOL"-type property and rename the property
"Faceplate_visible".
• Optionally, the "MyProperties" category can be renamed "Dialog Pump".
Fig. 09
8 Activating visibility

• Select all the objects (multi-selection) which are contained in the faceplate editor
(keeping the mouse button pressed in, drag the cursor over all the objects).
• Enable the "Visibility" property in the faceplate under "Animations".
• Link the "faceplate_visible" property, with the "Hidden" attributes, from "0" to "0".

Fig. 10
9 Defining the design of buttons

• Paste the property "Properties.CB_0_Auto_On" for the "Auto" button under


"Animations > Appearance".
• Select "Integer" as the type, and enter the values "0" and "1". Under the value "1",
select "Green" as the background color.

Perform the same steps for the following buttons:

Background
Button Value Property
color
(Auto) (1) (green)
Properties.CB_0_Auto_On
Manual 0 yellow
Manual
1 blue
ON
Properties.CB_1_Manual_On
Manual
0 red
OFF

Table 02
Fig. 11
10 Defining the design of the rectangles

• Activate the "Appearance" animation for the two small rectangles "Fault" and
"Ready for use".
• Link the two properties "Properties.SB_5_Fault" and
"Properties.SB_6_Ready_for_use" to the "Appearance" animation.
• Select "Integer" as the type in each case, and enter the values "0" and "1".
• Under the value "1", configure the color "RED" for Fault and "GREEN" for Ready
for use.
• Optionally, the attribute "Flashing" can also be enabled under the value "1".
Fig. 12
11 Defining events

• Incorporate the function "ResetBit" with the property


"Properties.CB_1_Manual_on" for the "Auto" button under the event "Press".
• Additionally, paste the "SetBit" function with the property
"Properties.CB_0_Auto_on".

Complete the following functions for each of the buttons:

Button Function Property


Manual Reset bit Properties.CB_0_Auto_On
Manual
Set bit Properties.CB_1_Manual_On
On
Manual
Reset bit
Off
Inverted
X Faceplate_visible
bit

Table 03

Fig. 13
12 Adding an IO field

• Add an IO field and insert it in the "title bar" (blue rectangle).


• Link the "Pump_No" property to the IO field.
• Adapt the background color of the IO field to the "title bar" and change the text
color to white.
• The "Faceplate_visible" property must be added to the "Design" animation.

Fig. 14
13 Closing a faceplate
Close the faceplate or the faceplate tab.
14 Creating a connection and tags

• Switch to the "Connections" tab and click on the menu "Insert > New Object -
Connection".
• Configure the connection which you are using.
• Create two tags, one with "Structure_1" and one with the "BOOL" data type.
• Rename "Variable_1" "ST_Faceplate" and "Variable_2" "bFaceplate_visible".

Note:
If a connection has already been assigned to the Structure, (see tab "Structure_1"),
the data type "Internal tag" is not available.

Fig. 15
15 Linking tags to the faceplate

• Switch to the picture containing the faceplate.


• Open the Properties window and go to "Properties > Dynamic Interface".
• Link the two tags, which you had created under point 14, to the faceplate.
Fig. 16
16 Adding a graphic and a button
Faceplate "visibility" must be enabled in order for it to be called. In order to do this,
configure the following objects outside the faceplate with the following properties and
events:

• Add a graphics view and link the "Horizontal pump (right)" graphic.
• Enable "Transparent color" under "Properties > Appearance" and resize it, if
necessary.
• Add a button to the picture which contains the faceplate. Select "Invisible" as the
type in the "General" properties.
• Link the function "SetBit" with the variable "Faceplate_visible" to the event
"Press".
• Place the "invisible" button over the graphic.
Fig. 17
17 Verifying the project

• Start WinCC flexible runtime with the simulator and then click the "invisible"
button.
• Click the "Manual" button.

Note:
In order to verify the project with an S7 controller, create a data block in the
SIMATIC Manager containing the "structure_1" setup.
Fig. 18

Download:
Attachment 1 contains a sample project containing the faceplate described above including the
structure and a sample application.

Attachment 1: WinCC_flexible_Strukturen.zip ( 6086 KB )

Runnability and test environment:


The following table lists the components that have been used to create this entry and verify the
functions described.

Components Product and version designation


PC operating system Microsoft Windows XP SP2
Standard tools -
Engineering tool STEP 7 V5.4 SP1
HMI software WinCC flexible 2005 SP1
HMI system -

Keywords:
Faceplates, Module

You might also like