0% found this document useful (0 votes)
439 views352 pages

3BSE030335-510 en System 800xa Engineering 5.1 Process Graphics Based On Visual Basic

Uploaded by

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

3BSE030335-510 en System 800xa Engineering 5.1 Process Graphics Based On Visual Basic

Uploaded by

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

System 800xA Engineering

Process Graphics based on Visual Basic

System Version 5.1

Power and productivity


TM
for a better world
System 800xA Engineering
Process Graphics based on Visual Basic

System Version 5.1


NOTICE
This document contains information about one or more ABB products and may include a
description of or a reference to one or more standards that may be generally relevant to
the ABB products. The presence of any such description of a standard or reference to a
standard is not a representation that all of the ABB products referenced in this document
support all of the features of the described or referenced standard. In order to determine
the specific features supported by a particular ABB product, the reader should consult the
product specifications for the particular ABB product.

ABB may have one or more patents or pending patent applications protecting the intel-
lectual property in the ABB products described in this document.

The information in this document is subject to change without notice and should not be
construed as a commitment by ABB. ABB assumes no responsibility for any errors that
may appear in this document.

In no event shall ABB be liable for direct, indirect, special, incidental or consequential
damages of any nature or kind arising from the use of this document, nor shall ABB be
liable for incidental or consequential damages arising from use of any software or hard-
ware described in this document.

This document and parts thereof must not be reproduced or copied without written per-
mission from ABB, and the contents thereof must not be imparted to a third party nor used
for any unauthorized purpose.

The software or hardware described in this document is furnished under a license and
may be used, copied, or disclosed only in accordance with the terms of such license. This
product meets the requirements specified in EMC Directive 2004/108/EEC and in Low
Voltage Directive 2006/95/EEC.

TRADEMARKS
All rights to copyrights, registered trademarks, and trademarks reside with their respec-
tive owners.

Copyright © 2003-2010 by ABB.


All rights reserved.

Release: June 2010


Document number: 3BSE030335-510
TABLE OF CONTENTS

About This Book


General ............................................................................................................................13
Document Conventions ...................................................................................................13
Warning, Caution, Information, and Tip Icons................................................................13
Terminology.....................................................................................................................14
Related Documentation ...................................................................................................15

Section 1 - Introduction
Product Overview ............................................................................................................17
What You Can Do with Graphics.........................................................................17
Prerequisites and Requirements ......................................................................................18

Section 2 - Graphics Builder


Adding Graphic Aspect to an Object and Open Graphic Builder ...................................19
Graphics Builder ..................................................................................................21
Features .............................................................................................................22
Starting Graphics Builder ................................................................................................22
Setting Options in Graphics Builder................................................................................23
Working with Generic Elements......................................................................................24
Toolbox Window ..................................................................................................24
Select Generic Elements From the Toolbox.........................................................27
Adding Graphic Libraries to the Toolbox ............................................................29
Extending the Graphic Libraries Window............................................................32
External ActiveX Controls ...................................................................................33
Expression Builder ..........................................................................................................34
The Top Half of the Expression Builder ..............................................................35

3BSE030335-510 5
Table of Contents

The Bottom Half of the Expression Builder ........................................................ 39


Assign Expressions to Properties......................................................................... 45
Copy, Paste, and Paste All ................................................................................... 45
Object List ....................................................................................................................... 46
Populate the Object List....................................................................................... 47
Element Browser ............................................................................................................. 49
Saving, Deploying and Deleting Graphic Aspects.......................................................... 51
Saving ............................................................................................................ 51
Deploying ............................................................................................................ 51
Deleting ............................................................................................................ 52
Properties Window .......................................................................................................... 53

Section 3 - Graphic Aspects


The Graphics Aspect System .......................................................................................... 55
Creating a New Graphic Aspect .......................................................................... 56
Relevance of Structures for Graphic Aspects ...................................................... 57
Object Aware and Generic Graphic Aspects........................................................ 58
Built in Graphic Aspect Categories ..................................................................... 59
Subsets of Elements ............................................................................................. 60
Building Blocks Used in Graphic Aspects .......................................................... 61
Expressions ..................................................................................................................... 62
Direct References to Aspect Object Properties.................................................... 63
Sub Properties of Object Properties..................................................................... 64
Examples of Expressions ..................................................................................... 65
Input Properties.................................................................................................... 66
Implementing Sub Elements With Input Properties ............................................ 66
ObjectPropertyRef Properties .............................................................................. 67
Object References in Graphic Aspects............................................................................ 70
Presentation of Object References ....................................................................... 70
Using Relative and Absolute References............................................................. 70
The Anatomy of Absolute References................................................................. 71
Support for Composite Object Types .............................................................................. 72
Standard Input Handling for Graphic Aspects ................................................................ 76

6 3BSE030335-510
Table of Contents

Standard Input Handling in Object Aware Graphic Aspects................................76


Click Transparency...............................................................................................78
The EnableInput Property ....................................................................................79
Click Transparency in Graphic Aspects...............................................................80
Object Highlight...................................................................................................81
Auto Configured Trend Displays .........................................................................83
Security............................................................................................................................83
Miscellaneous ..................................................................................................................85
Setting the Background Color of Graphic Aspects ..............................................85
Controlling the Update Rate of Data Subscriptions .............................................88
Enable/Disable Blinking Colors...........................................................................88
Precautions When Importing/Exporting Aspects.................................................89
Precautions When Copying Graphic Aspects ......................................................90
Precautions When using Multiple Monitors and Quad Displays .........................90
Bad Data Presentation ..........................................................................................91
Graphic Aspect Priority........................................................................................91
Display Exchange Time .......................................................................................92
The PgSubscriptionControl Object ......................................................................92
The IPgCompositeObjectList interface................................................................97
NLS Handling of Far East Languages in Graphics ..............................................98
Resizing Code ......................................................................................................98

Section 4 - Faceplate Framework


Faceplate Overview .......................................................................................................104
Header Area .......................................................................................................106
Lock Control ......................................................................................................106
Alarm Control ....................................................................................................110
Indicators and Aspect Links Area ......................................................................110
Faceplate Element Area .....................................................................................110
Buttons Area.......................................................................................................111
View Selection Buttons ......................................................................................112
Pin Button...........................................................................................................112
Support for Composite Object Types in Faceplates ......................................................113

3BSE030335-510 7
Table of Contents

Create a New Faceplate................................................................................................. 114


Configuring the Faceplate ............................................................................................. 116
Layout Tab ......................................................................................................... 118
Header Tab ......................................................................................................... 120
Indicators Tab..................................................................................................... 122
Buttons Tab ........................................................................................................ 127
Elements Tab...................................................................................................... 129
On-Line Help Tab .............................................................................................. 134
Internationalization of Faceplates ...................................................................... 135
Expression Syntax in Faceplates........................................................................ 136
Security ......................................................................................................................... 137
Operations .......................................................................................................... 137
Operation/Permission Mapping on Faceplate a Aspect Category ..................... 138

Section 5 - Configuring Property Elements


How to Write to the Properties of an Aspect Object .................................................... 142
Configuring Direct Entry Windows .............................................................................. 143
Positioning of the Direct Entry Window............................................................ 144
Controlling the Lifetime of the Direct Entry Window....................................... 146
Creating a Direct Entry Window from Visual Basic Code ................................ 146
The OnChange Event......................................................................................... 147
Controlling a Direct Entry Window via Graphic Primitives.............................. 147
Stepsize and limits in the PgNumericDew Direct Entry Window ..................... 148
Changing Font Size in Direct Entry Windows................................................... 149
Automatically Invoked Direct Entry Windows.................................................. 151
Visual Basic Error Handling ......................................................................................... 152
Input Session Handling ................................................................................................. 152
Starting an Input Session ................................................................................... 153
The DoApply Event ........................................................................................... 154
The DoCancelSession Event.............................................................................. 154
Responding to Data Entry Operations ............................................................... 155
Ending an Input Session When Performing an Apply Operation ...................... 156
The DoEnableApplyButton Event ..................................................................... 156

8 3BSE030335-510
Table of Contents

Broadcasting to Sibling Elements ......................................................................156

Section 6 - Configuring Faceplate Elements


Built in Property Elements ............................................................................................158
Property Reference Properties .......................................................................................158
Assigning an Override Expression to the ObjectPropertyRef Property.............160
Supplying Data Quality Information to Property Elements...............................161
Error Presentation ..........................................................................................................161
Direct and Applied Action.............................................................................................162
Apply Operation.................................................................................................162
Cancel Operation................................................................................................163
Distinction Between Current and Entered Value...........................................................163
Input Operations Independent of Subscribed Data........................................................164
Validation of Input .........................................................................................................164
Local Data Entry............................................................................................................165
Enabling Write Operations ............................................................................................165
Option (Radio) Button Behavior ...................................................................................166
Configuring Faceplate and Property Elements Using Basic Mechanisms ....................166
Support in the Faceplate Aspect Category .........................................................166
How to Write to the Properties of an Object In Faceplate Elements .................167

Section 7 - Maintenance
The Display Tool ...........................................................................................................169
Diagnostics Window......................................................................................................174
Frequently Asked Questions (FAQ) ..............................................................................183
Edit is Dimmed or Missing in the Context menu...............................................183
Edit Imported Graphics Aspect with 3rd party ActiveXs ..................................183
Edit a Graphic Display in a Remote Desktop Session .......................................183
Limit of 256 Element Instances in VB...............................................................184
“Out of Memory” in Graphics Builder...............................................................185
Far East Languages are not Correctly Presented................................................185
Problems with Elements in Frame Control ........................................................185
How to Avoid Allocating GDI Objects ..............................................................185

3BSE030335-510 9
Table of Contents

“Run Time Error 13” in Graphics Builder ......................................................... 186


Problems with Resizing of Graphic Aspects ..................................................... 186

Section 8 - Tutorial
Tutorial 1 - Building a Graphic Display........................................................................ 190
How to Build a Graphic Display........................................................................ 191
Adding Graphic Elements to the Graphic Display ............................................ 192
Using Logical Colors ......................................................................................... 193
Tutorial 2 - Creating a Graphic Display without an Existing Application.................... 195
Tutorial 3 - Building a Graphic Element....................................................................... 199
Creating a Graphic Element............................................................................... 200
Building a Graphic Element .............................................................................. 201
Changing Properties for the Generic Element ................................................... 202
Assigning Expressions to Properties.................................................................. 203
Deploying a Graphic Element............................................................................ 204
Tutorial 4 - Creating and Configuring Faceplates ......................................................... 205

Appendix A - Standard Building Blocks


Graphic Primitives......................................................................................................... 213
Common Properties ........................................................................................... 213
Event Declarations ............................................................................................. 224
AdvantArc.......................................................................................................... 227
PgBar .......................................................................................................... 228
AdvantBezier ..................................................................................................... 235
AdvantChord...................................................................................................... 236
AdvantCone ....................................................................................................... 238
AdvantEllipse..................................................................................................... 239
AdvantHscale ..................................................................................................... 240
AdvantLimit (only valid for AdvantBar) ........................................................... 243
AdvantNumeric.................................................................................................. 245
AdvantObjectTrim ............................................................................................. 249
PgErrorIndic....................................................................................................... 251
AdvantPie .......................................................................................................... 252

10 3BSE030335-510
Table of Contents

AdvantPipe .........................................................................................................253
AdvantPolygon...................................................................................................255
AdvantPolyline...................................................................................................256
AdvantRectangle ................................................................................................258
AdvantBar ..........................................................................................................259
AdvantText .........................................................................................................261
AdvantVscale .....................................................................................................263
Special Elements ...........................................................................................................266
Aspect Link ........................................................................................................266
PgEventTunnel ...................................................................................................268
AlarmControl .....................................................................................................270
Lock Control ......................................................................................................272
AspectViewCtl ...................................................................................................272
TrendViewCtl .....................................................................................................273
Size Display .......................................................................................................274
Composite Object List........................................................................................276
Resource Tools ...................................................................................................277
ABB Subelements .........................................................................................................278
Bar ...........................................................................................................278
Property Elements .........................................................................................................284
Indicator ...........................................................................................................286
Push Button ........................................................................................................289
Toggle Button.....................................................................................................291
IBar ...........................................................................................................295
Input Field ..........................................................................................................299
CheckBox ...........................................................................................................303
Option Button.....................................................................................................307
Apply Button ......................................................................................................309
Cancel Button.....................................................................................................309
Direct Entry Windows ...................................................................................................309
PgDEW ...........................................................................................................310
PgNumericDEW ................................................................................................311

3BSE030335-510 11
Table of Contents

PgIntegerDEW ................................................................................................... 312


PgStringDEW .................................................................................................... 314
PgBoolDEW ...................................................................................................... 315
PgTimeDEW...................................................................................................... 316
PgDateDEW....................................................................................................... 319
Symbol Factory Control ................................................................................................ 321
Usage of GDI and USER objects .................................................................................. 322

Appendix B - Sizes of Faceplates


Default Faceplate Element ............................................................................................ 331
Default Faceplate........................................................................................................... 332
Sizes of Each Default Component in a Faceplate .............................................. 332
Non-default Faceplate ................................................................................................... 333
Size of Each Part of the Components ................................................................ 333
Example .......................................................................................................... 335

Appendix C - Create New Aspect Categories with Templates


Create a New Aspect Category ..................................................................................... 337

Appendix D - Adding Members


Add Member Window................................................................................................... 339
Adding Methods/Events................................................................................................ 342
Adding Properties.......................................................................................................... 343

INDEX

12 3BSE030335-510
About This Book

General
This instruction contains information about IndustrialIT 800xA System Graphics.

Document Conventions
Microsoft Windows conventions are normally used for the standard presentation of
material when entering text, key sequences, prompts, messages, menu items, screen
elements, etc.

Warning, Caution, Information, and Tip Icons


This publication includes Warning, Caution, and Information where appropriate
to point out safety related or other important information. It also includes Tip to
point out useful hints to the reader. The corresponding symbols should be
interpreted as follows:

Electrical warning icon indicates the presence of a hazard which could result in
electrical shock.

Warning icon indicates the presence of a hazard which could result in personal
injury.

Caution icon indicates important information or warning related to the concept


discussed in the text. It might indicate the presence of a hazard which could
result in corruption of software or damage to equipment/property.

3BSE030335-510 13
Terminology About This Book

Information icon alerts the reader to pertinent facts and conditions.

Tip icon indicates advice on, for example, how to design your project or how to
use a certain function
Although Warning hazards are related to personal injury, and Caution hazards are
associated with equipment or property damage, it should be understood that
operation of damaged equipment could, under certain operational conditions, result
in degraded process performance leading to personal injury or death. Therefore,
fully comply with all Warning and Caution notices.

Terminology
A complete and comprehensive list of Terms is included in the IndustrialIT
Extended Automation System 800xA, Engineering Concepts instruction
(3BDS100972*). The listing included in Engineering Concepts includes terms and
definitions as they that apply to the 800xA system where the usage is different from
commonly accepted industry standard definitions and definitions given in standard
dictionaries such as Webster’s Dictionary of Computer Terms.

Term Description
Faceplate A faceplate is an aspect that provides a graphical
representation of a certain aspect object, with
presentation of certain properties related to the object,
and mechanism for operator interaction such as on/off,
increase/decrease, etc. Aspect Object types often
include several faceplate aspects, providing different
presentation and interaction possibilities.
Graphic Display A graphic display is an aspect that provides a visual
presentation. It consists of static graphics representing
for example tanks, pipes etc., and graphic elements that
present dynamic information. Graphic displays are often
used to present the state of a process or a part of a
process, but are useful in any context where dynamic
graphical information is needed.

14 3BSE030335-510
About This Book Related Documentation

Term Description
Process Object A process concept/equipment e.g. valve, motor,
conveyor or tank.
Property A data field on an aspect of an Aspect Object that can be
accessed through OPC using the standard Aspect
Object reference syntax.
A data field on an ActiveX control accessible from the
Visual Basic editor.
IDE Integrated Development Environment.

Related Documentation
A complete list of all documents applicable to the 800xA IndustrialIT Extended
Automation System is provided in Released User Documents, 3BUA000263*. This
document lists applicable Release Notes and User Instructions. It is provided in
PDF format and is included on the Release Notes/Documentation media provided
with your system. Released User Documents are updated with each release and a
new file is provided that contains all user documents applicable for that release with
their applicable document number. Whenever a reference to a specific instruction is
made, the instruction number is included in the reference.

3BSE030335-510 15
Related Documentation About This Book

16 3BSE030335-510
Section 1 Introduction

Product Overview
Process Graphics consists of a graphic run-time viewer included in the 800xA
System. It also includes Graphics Builder which is based on Microsoft Visual
Basic. Visual Basic skills are by no means required to use Graphics Builder, but it
could very well extend its possibilities.
Throughout this manual the term Visual Basic refers to Visual Basic 6.0.

What You Can Do with Graphics


You can do the following with Graphics:
• Build graphic elements
• Configure faceplates
• Configure graphic displays
• View graphics
• Use faceplates for information and control
You can also find the following information in this instruction:
• A tutorial
• Detailed information about the basic building blocks provided by ABB

3BSE030335-510 17
Prerequisites and Requirements Section 1 Introduction

Prerequisites and Requirements


IndustrialIT 800xA System, Graphics can be executed on the Microsoft Windows
platforms.
All hardware and software requirements are listed in IndustrialIT 800xA, System,
System Installation (3BSE034678*). Install Visual Basic 6.0 on the node to build
graphics.
The user should be familiar with the graphical user interface and the common terms
(for example, buttons, and drag/drop) of Microsoft Windows platforms.
To deploy graphics, the user should belong to the IndustrialIT user group
Application Engineer and Windows Local Administrators.

In Windows 7, using the Aero theme will lead to screen latency issues in the VB
Graphics Builder because the Aero theme uses advance rendering schemes. To
use VB Graphics, turn off the Windows Aero theme and switch to None or
Windows Classic. The behavior of VB IDE in Windows 7 will then be the same
as that in Windows XP.

18 3BSE030335-510
Section 2 Graphics Builder

Graphics Builder is a tool, which enables configuration of graphic aspects, for


example graphic displays, graphic elements and faceplate elements. It is a tool built
on Visual Basic.
This section gives you a description of the tools added to standard Visual Basic.
Graphics Builder provides several powerful features for configuring graphic
aspects, and writing expressions.
Even though the Visual Basic environment is a full-fledged programming
environment, the configurator of graphic displays or graphic elements is not
required to be a programmer or have a Visual Basic background.
Graphics Builder allows the full power of Visual Basic if needed. The Visual Basic
code panes are available and the environment is accessible.

Adding Graphic Aspect to an Object and Open Graphic


Builder
You start your work by adding a graphic aspect to an Aspect Object or by choosing
Edit mode for an existing graphic aspect.
To add a graphic aspect:
1. Select the object to which you want to add a graphic aspect in Plant Explorer
and open the context menu.
2. Select New Aspect.
3. Select for example Graphic Element from the dialog box and give the aspect a
proper name.

3BSE030335-510 19
Adding Graphic Aspect to an Object and Open Graphic Builder Section 2 Graphics Builder

4. Go to the aspect in the aspect list and select it. Open the context menu for the
aspect and select Edit or click on Edit in the Preview Area.
5. The Graphic Builder opens up and you can edit your graphic aspect.

Aspect Object Graphic Aspect (Graphic Element)

Preview Area with Edit Button

Figure 1. Graphic Element Aspect added to an Aspect Object in Plant Explorer

20 3BSE030335-510
Section 2 Graphics Builder Graphics Builder

Graphics Builder
Figure 2 shows the interface of the Graphics Builder.

Property
Toolbox Window

Expression
Builder

User
Window

Element
Browser

Working
Area

Figure 2. Graphics Builder

When you are working with graphic aspects the main objectives of Graphics Builder
are to:
• Configure graphic aspects.
• Deploy graphic aspects. The graphic is distributed and saved in the deploy
action.

3BSE030335-510 21
Features Section 2 Graphics Builder

Features
Graphics Builder has a lot of Visual Basic features. The following features are
specific for Graphics Builder:
• An Expression Builder that allows you to assign expressions, that is to specify
subscriptions and specify the relationship between the process data and the data
that is to be displayed.
• A Graphic Libraries dialog that allows you to add Primitives and
Subelements to your toolbox.
• An Element Browser in which you can select appropriate graphic elements.
• A Deploy function that stores the graphic aspects and enables viewing of
process displays by process operators. Before a graphic element is deployed, it
can only be seen in the Graphics Builder.
• A help function that offers you access to on-line help and on-line
documentation for the Graphics Builder.
• Ability to define input properties using the Expression Builder.
These features are accessed through the pull-down menu in the menu bar or through
tool buttons.

Starting Graphics Builder


There are a few different ways to start the Graphics Builder
• Right-click on a graphic aspect; select Edit, from the context menu.
• Click the Edit button, which is displayed when aspects have not been
previously deployed.
• Right-click on a graphic background in an actual runtime view, and select Edit.

How to exit the Graphics Builder. After deploy and exit from Graphics Builder
you get a popup window saying, “Do you want to save the changes?”. Press No to
avoid another popup window next time you edit the same graphic aspect (saying that
a later version exists).

22 3BSE030335-510
Section 2 Graphics Builder Setting Options in Graphics Builder

Setting Options in Graphics Builder


There are some optional preferences that you can set for Graphics Builder. You can
decide to use live data in design mode, to have additional Visual Basic functionality
and to have access to a debug menu. There is also an option to show the Element
Browser and Expression Builder at startup or not. Select Graphics Builder
Options in the Tools menu.

Figure 3. Graphics Builder Options

Live Data in Design mode. The Live Data option enables you to display dynamic
data in graphic elements when you are using graphic aspects in design mode. Mark
the check box to select live data in design mode.
Note that live data results in a higher CPU usage, which in turn leads to slower
operation of Graphics Builder.

Advanced User Mode. The Advanced User Mode option gives you access to
more menus and functions in Visual Basic. If you have not selected Advanced User
Mode, some menus or menu items are dimmed, which means that they are
unavailable. Click in the check box to select Advanced User Mode.

3BSE030335-510 23
Working with Generic Elements Section 2 Graphics Builder

Debug. Click the Debug check box to get access to an additional debug menu.

Element Browser. Click the check box to show Element Browser at startup.

Expression Builder. Click the check box to show Expression Builder at startup.

Enable Autopopulate. Check the Enable Autopopulate check box to enable


autopopulation of object list in expression builder and element browser, see
Populate the Object List on page 48.

Working with Generic Elements


Toolbox Window
Click on Tool in the menu line and then click on the Graphic Libraries line in the
drop-down menu. You can then choose the libraries you want to use by just clicking
in the selection boxes according to Figure 4.

Figure 4. The Graphic Libraries Dialog Box

24 3BSE030335-510
Section 2 Graphics Builder Toolbox Window

The main objectives of the toolbox window are:


• Provide primitive elements and subelements. More information is found in
Select Generic Elements From the Toolbox on page 27.
• Provide third party ActiveX Controls. Refer to Adding Graphic Libraries to the
Toolbox on page 29 for further information.

Subelements +
General Special Extended Primitives Graphic Primitives Property elements

Figure 5. Standard Toolboxes in Graphics Builder

The available libraries you can access through the Tool menu are:

General. This is Visual Basic’s own built in controls (Graphic libraries). They are
always included in the toolbox. Click on the General button to display them.

Special. The Special section contains five additional graphic elements. Aspect Link
displays an aspect when pressed. PgEventTunnel is used to tunnel events, see Click
Transparency on page 78. AlarmControl is a template object for an alarm button for
faceplates and AspectViewCtl shows a view of an aspect on the graphic display. The
TrendViewCtl element is used for showing a mini-view of a trend display in a
graphic aspect. CompositeObj displays a list of objects in a composite object.
All Special elements are described thoroughly in Special Elements on page 266.

3BSE030335-510 25
Toolbox Window Section 2 Graphics Builder

Extended Primitives. These are additional primitive elements provided by ABB.


Extended Primitives in the toolbox display these additional primitive elements.
See Figure 5.

Graphic Primitives. Click on the button Graphic Primitives in the toolbox to


display the set of available primitive elements. The primitive elements provided by
ABB are described in Graphic Primitives on page 213.

Subelements (and Property Elements). These are subelements from the Graphics
structure. Click on the button Subelements in the toolbox to display the set of
available subelements and property elements. Property elements can be used to
build faceplate elements.
The subelements provided by ABB are described in ABB Subelements on page 278.

Symbol elements. The symbol library is found in the Tool->Graphic Libraries


menu of the Graphic Builder. This library contains symbols according to Figure 6.

Figure 6. The Symbol Library

26 3BSE030335-510
Section 2 Graphics Builder Select Generic Elements From the Toolbox

Symbol Factory Controls. The library Symbol Factory Controls (Figure 7)


contains a large set of ActiveX Controls which can be used in graphics. Drag and
drop either the “SFStandard” control (the “Cool Pump”) or the “SFCutaway” (the
bargraph) control into the graphics. In the property dialog of “SFStandard”, it is also
possible to select between many different basic shapes for presentation of that
control.

Figure 7.The Symbol Factory Controls Library

Select Generic Elements From the Toolbox


The toolbox provides the chosen generic elements used to build graphics.
1. Click the icon for the desired generic element (ActiveX control) in the toolbox.
The cursor changes to cross hairs in the Graphic Builder workspace.
2. Place the cursor at any point in Graphics Builder’s workspace.
3. Click and hold the left mouse button.
4. Drag the cursor diagonally to the opposite corner of the bounding rectangle.
5. Release the mouse button. The selected element now appears inside a bounding
rectangle in the workspace.

VB only allows 256 different graphic elements/Active X controls in a graphic


display.
The use of Control arrays solves this problem. See How to Allow More Than 256
Elements in VB on page 28.

3BSE030335-510 27
Select Generic Elements From the Toolbox Section 2 Graphics Builder

Project Property Expression Object Element Toolbox Deploy


Explorer Window Builder Browser Browser

Figure 8. Some of the Buttons of the Graphic Builder

How to Allow More Than 256 Elements in VB


When creating (dragging or otherwise) graphic elements or ActiveX controls into
the graphic display, an error message indicating “Only 256 different elements are
allowed in VB” is displayed.
When the graphic element or ActiveX control is added from the Toolbox, the error
message: Reached limit: cannot create any more controls for this form is
displayed.
When the graphic element or ActiveX control is added from the Element Browser,
the error message: AddControlToDisplay Failed to add control is displayed.

28 3BSE030335-510
Section 2 Graphics Builder Adding Graphic Libraries to the Toolbox

The solution to this problem is the use of control arrays.


If you create for example five buttons and give them all the same name, they can
count as one.
Simply give every new button the same name as the first button. (This is done in the
Name field in VB Properties window.)
The “Do you wish to create a control array” dialog box is displayed once.
Click Yes to confirm. Now all buttons will count as one, they will work properly due
to the fact that they have their own index.

Adding Graphic Libraries to the Toolbox


Subelements and Primitives are grouped together in different Graphic Libraries.
To add libraries to the toolbox:
1. Open the Graphic Libraries window in the Tools menu.
2. Select by checking one or more of the listed Libraries.
3. Click on the Apply or OK button. The selected libraries are presented under
their respective button in the toolbox.

3BSE030335-510 29
Adding Graphic Libraries to the Toolbox Section 2 Graphics Builder

Figure 9. Graphic Libraries Window

Deleting Graphic Libraries From the Toolbox. You delete tools by clicking on the
Aspect menu in the menu line of the Graphic Builder and then selecting
Components. See Figure 10.

Figure 10. Open Components Dialog Box

A dialog box opens, where you uncheck the tools you want to delete. Then you click
on the Apply or OK button.

30 3BSE030335-510
Section 2 Graphics Builder Adding Graphic Libraries to the Toolbox

The Graphic Libraries


Extended Primitives Type
and Primitives Type.
Delete by uncheck them
and click on the Apply or
OK button.

Figure 11. The Component Dialog Box

Deleting tools from the toolbox is also described in Visual Basic’s on-line help file.

3BSE030335-510 31
Extending the Graphic Libraries Window Section 2 Graphics Builder

Extending the Graphic Libraries Window


The toolbox tabs reflects the objects created in the Graphics Structure. Each tab in
the toolbox corresponds to an object in the Graphics Structure.
There are two categories of objects that can be created in the Graphics Structure,
Graphic Subelements object type and Graphic Primitive object type.
For each object of Graphic Primitive object type one or several aspects of category
Graphic Primitive are created. Each of those will refer to a .dll file with external
ActiveX controls.
For each object of Graphic Subelements object type, one or several generic
graphic aspects are created.
The generic graphic aspects and the external ActiveX controls from the .dll file will
appear in the toolbox in the Graphics Builder in the tab corresponding with the
Graphic Library that is checked in the Graphic Library Window, see Adding
Graphic Libraries to the Toolbox on page 29.
The objects in the Graphics Structure are configured as follows below.

Generic Graphic Aspects:


a. Select Graphics Structure in Plant Explorer. Select the Graphics Tools
object.
b. Select an existing object of category Graphic Subelements object type,
or create a new object by selecting New Object from the context menu
and select Graphic Subelements object type, enter a name and click
Create.
c. Create a new graphic aspect, see Adding Graphic Aspect to an Object and
Open Graphic Builder on page 19. Edit the graphics aspect and deploy it.

External ActiveX Controls:


a. Select Graphics Structure in Plant Explorer. Select the Graphics Tools
object.
b. Select an existing object of category Graphic Primitive object type, or
create a new object by selecting New Object from the context menu and
select Graphic Primitive object type, enter a name and click Create.

32 3BSE030335-510
Section 2 Graphics Builder External ActiveX Controls

c. Select the Graphic Primitive aspect and in the Main View type in the
path to the .dll file you want to add and click Apply.
Environment variables can be used in the path definition, for example if
the file myDll.dll exists in ...\OperateIT\ProcessPortalA\bin directory,
the path can be written: $PRODUCT$\bin\myDll.dll.

External ActiveX Controls


For information about how to install external (3rd party) ActiveX controls
(not provided by ABB) please read the suppliers documentation.
ActiveX components need to be installed on all operator workplaces where they
will be used. If not, they will not be shown.
External ActiveX Controls are NOT described in this manual or any other related
document delivered by ABB.
Licenses for external/third party ActiveX controls, are not included in the 800xA
System. For information about how to obtain these licenses, see the instructions
from each supplier. See also External ActiveX Controls with Design Time Licenses
on page 34.
External ActiveX controls are added to the toolbox by using the Graphic Libraries
window:
1. Add the library to the Graphic Libraries window, see Extending the Graphic
Libraries Window on page 32. To create a new object, see Step b under
Extending the Graphic Libraries Window on page 32 and enter the name you
want to appear on the button in the toolbox.
2. Add to toolbox, see Adding Graphic Libraries to the Toolbox on page 29.
External ActiveX controls can also be added to the toolbox using Visual Basic’s
Components window. This approach has several drawbacks. The controls have to
be found in a usually very long list of libraries, and the names of the libraries are
often not very self-explanatory. The ActiveX controls will be added to the currently
selected toolbox. This has to be repeated for each graphic aspect that will use the
external ActiveX control.

3BSE030335-510 33
Expression Builder Section 2 Graphics Builder

External ActiveX Controls with Design Time Licenses


Some third party ActiveX controls has design time licenses but not run time
licenses.
Configuration of graphic aspects, using ActiveX controls with design time licenses,
can only be done on nodes on which design time licenses for used ActiveX controls
are installed. Graphic displays, which use graphic elements containing design time
licensed controls, must be configured on the same node as the one on which the
display element was configured.
Therefore, if a design time license for an ActiveX control is installed on a single
node, then configuration of graphic aspects that uses this control directly, or
indirectly, must be performed on this node.
Note that this applies also to running tools such as import/export, configuration
wizard and backup/restore. These tools may implicitly cause deploy of handled
graphic aspects. These tools therefore must be executed on machines on which
design time licenses are installed.
Graphic aspects can then be used on nodes, on which design time licenses are not
installed. Run time versions of the ActiveX controls must be made available on
these nodes though, i.e. controls must be registered on these nodes.
Licensing must be activated for graphics aspects that need to contain licensed 3d
party ActiveX controls. This is done by selecting Require License Key in the Tools
menu.

Expression Builder
Properties of elements in the configured graphic aspect can be assigned.
• Constant values. Assigned using the Properties window.
• Expressions. Assigned using Expression Builder.

Avoid assigning constant values using Expression Builder.


It unnecessarily increases the CPU load and in many cases it does not work at all.

34 3BSE030335-510
Section 2 Graphics Builder The Top Half of the Expression Builder

The Expression Builder can be opened from the View menu. To set properties for
a certain element, it needs to be selected first.
The Expression Builder is used to subscribe for and calculate data, which will be
presented in graphic aspects. Subscribe for data, is to trigger the influx of data to the
graphic aspect. A relationship between object properties and properties of generic
elements is specified.
The Expression Builder supports the use of object property references, logical
colors, expression variables, input properties and NLS text through simple click and
browse operations. This functionality combined with Visual Basic expression
features makes a powerful tool.
You have to browse to select entities from the bottom half of the Expression Builder,
for example object property references or logical colors. They cannot be written
directly in the expressions. The expression language is based on standard Visual
Basic.
The Expression Builder does not have full Unicode support and requires the
correct language setting when using Far East languages, see NLS Handling of Far
East Languages in Graphics on page 98.

The Top Half of the Expression Builder


The top half shows all the names of the properties of the selected element in the left
column. In the right column, the expressions assigned to those properties are
displayed.
The following tabs represent different ways to sort properties of the selected
element.
• The Alphabetic tab. The properties are sorted in alphabetic order, same as in
the Visual Basic properties window.
• The Categorized tab. The property categories are listed as a tree structure. By
default all categories are expanded. The available categories depend on the
properties exposed by the element.
• The Assigned Tab. The properties with assigned values are displayed first.
Defined expression variables are displayed in the Edit Variables tab.

3BSE030335-510 35
The Top Half of the Expression Builder Section 2 Graphics Builder

• The Edit Variables tab. All expression variables defined in the graphic element
are listed here.

Figure 12. Edit Variables Tab

You can also create a new expression variable via this tab. Click on the Add button,
enter the name of the new expression variable and assign the variable an expression.
The expression variable function enables reuse of frequently used expressions.
Expression variables store intermediate results from expressions and make
expressions shorter and more readable.
Expression variables can be used as means for Visual Basic code, for example in
faceplate elements to read values produced by the expression. It is therefore possible
to set up a subscription for an object property to an expression variable and enter
Visual Basic code, for example in the OnPostDataChange event.
It is also possible to use expression variables to “input” values to expressions from
Visual Basic code. Perform the following steps.
1. Define an expression variable without an expression connected to it, and refer
to it from expressions.
2. Set the value of the expression variable from Visual Basic.

36 3BSE030335-510
Section 2 Graphics Builder The Top Half of the Expression Builder

3. Force execution of expressions by calling m_sc.ExecuteExpressions.


Expression variables in contrast to object properties do not possess quality
attributes. An expression variable will have the vtEmpty value when some variable
referenced by the expression, has an empty value. One example is when data has not
been received for a referenced object property.
See Bad Data Presentation on page 91 for more information.
You can edit an expression assigned to a property or an expression variable via Edit
Expression tab. Select the property or expression variable that has been assigned an
expression. The Edit Expression tab and Copy button becomes enabled, see
Figure 13.

Figure 13. Selecting an Expression assigned to a property or an Expression


Variable

3BSE030335-510 37
The Top Half of the Expression Builder Section 2 Graphics Builder

Select the Edit Expression tab. The expression is displayed in tokenized format as
shown in Figure 14. You can edit a token by using the keyboard or by using the
bottom half of the expression builder. Note that Color and NLS Text tokens can be
edited only via the bottom half of the expression builder. Click Update to confirm
the changes.

Figure 14. Edit Expression Tab

38 3BSE030335-510
Section 2 Graphics Builder The Bottom Half of the Expression Builder

The Bottom Half of the Expression Builder


The bottom half of the Expression Builder contains five tabs.

ObjectProperty Tab. It allows you to get dynamic data from an object and connect
it to the selected graphic element.

Figure 15.Object Property Tab

For a generic graphic aspect the ObjectProperty tab is not shown. The Expression
Builder determines if the tab should be shown by checking the existence of the
ObjectPath property.
The ObjectProperty tab contains three lists:
• The object list, which displays object references. See Object List on page 46
for more information.
• The object property list, which displays the properties of the selected object.
To add a property to the expression, select it and press the Insert button, or just
double-click the property. You can also write a path and property name directly
in the Property field. If the property doesn’t exist, a failure message will
appear.

3BSE030335-510 39
The Bottom Half of the Expression Builder Section 2 Graphics Builder

• The Subproperty list, which displays subproperties of the selected object


property. The list allows you to define which subproperty is relevant for the
expression.

Figure 16.Subproperty List

The selected subproperty is Value by default. The other subproperties all return
data quality information regarding the transfer of data. Note that Value is not
displayed in the expression entry field. More information on quality attributes
can be found in Sub Properties of Object Properties on page 64.

40 3BSE030335-510
Section 2 Graphics Builder The Bottom Half of the Expression Builder

Color Tab. It enables you to choose colors from a logical color set. Select the drop
down list and choose a color set and then select a color from the list below.

Figure 17. Color Tab

Variables Tab. It displays the expression variables, you previously created, in the
Edit Variables tab, in the top half of the Expression Builder. To add a reference to
an expression variable to an expression, simply click on the variable you want to
add.
Select Variables tab and highlight the expression variable you want to add, then
click Insert.
Now the variable should be visible in the expression entry field in the top half of the
Expression Builder.

Input Properties Tab. Defining input properties is useful for subelements, property
elements and graphic elements. By defining them, it is possible to implement the
presentation part of the subelement using Expression Builder. Therefore, it is
unnecessary to use the VB code pane.

3BSE030335-510 41
The Bottom Half of the Expression Builder Section 2 Graphics Builder

The Input Properties tab is displayed below.

Figure 18. Sub Property Selector

This tab allows you to add, modify and insert a reference to the selected input
property in the selected expression.
The SubProperty selector list is only visible when you select an input property of
the Type ObjectPropertyRef.
The list contains alternatives, which helps you establish if the quality of data is ok,
and if it is writable. For more information about the alternatives in the Sub
Property Selector refer to Sub Properties of Object Properties on page 64.
In many cases the Input Properties tab supersedes the use of the Add Members
tool.
The Add button opens up the AddProperty dialog, which allows you to define a
new input property.

42 3BSE030335-510
Section 2 Graphics Builder The Bottom Half of the Expression Builder

Figure 19. The Add Property Dialog

If you select an input property and press the Insert button, a reference to the
selected input property is inserted in the expression (That is the entry field of the
selected expression in the top half of the Expression Builder).
The Modify button allows you to modify existing input properties. Name and Type
cannot be modified.

Figure 20. Modify Dialog

3BSE030335-510 43
The Bottom Half of the Expression Builder Section 2 Graphics Builder

NLS Text Tab. This tab allows you to internationalize your text strings.
Select the aspect containing the text for your graphics. See Figure 22.

If you select language in runtime, you can see the text from the Resource
Manager Aspect. If the text is %NLS%, the text is missing in the Resource
Manager aspect or the addressed Resource Manager aspect does not exist.
Click on the Insert button at the bottom of the Expression Builder and a reference to
the NLS string is inserted to the property (see Figure 21).

Figure 21. Text row in Expression Builder

Select Resource Text from the Resource Manager Select language in the text string
Manager Aspect aspect in the selected language

Figure 22. The National Language Support Tab

44 3BSE030335-510
Section 2 Graphics Builder Assign Expressions to Properties

Assign Expressions to Properties


Element properties can be assigned an expression. To assign an expression to a
property, do the following.
1. Select an element.
2. Select Expression Builder in the View menu.
3. From the list of properties in the top left column, select the name of the
property you want to assign an expression.
4. Assign an expression to the property via the ObjectProperty tab, the Color
tab, the Variables tab, the Input Properties tab, the NLS Text tab and/or the
keyboard. Each tab contains items. Highlight the item of choice and click
Insert.
For more information about the syntax for expressions, see Section 3, Graphic
Aspects.

Expressions for an element are not included when you copy it. You must enter the
same expressions for the copy

Copy, Paste, and Paste All


You can copy an expression and paste (assign) it to another property or expression
variable.
Select an element property or an expression variable that has been assigned an
expression, and then click on the Copy button to copy the expression.
Select another element property or expression variable and then click on Paste
button to paste (assign) the copied expression. The paste operation will replace
(delete) any expression assigned to that property or expression variable.
You can also select multiple elements in the graphic aspect and click on Paste All
button to paste (assign) the copied expression to a property of all the selected
elements.

3BSE030335-510 45
Object List Section 2 Graphics Builder

Object List
The object list in the Expression Builder is the same as in Element Browser.
Therefore, changes take immediate effect both in Expression Builder and Element
Browser. In Expression Builder, the list is visible when the Object property tab is
selected. Note that the object list contains object references that can be either
absolute or relative.
If you right-click on one of the object references, you created in the object list, a
context menu with the following options appears.
• Properties, see explanation below.
• Delete, deletes the selected object reference.
• Delete all, deletes all object references in the object list that not are used in the
currently edited graphic aspect.
• Autopopulate adds all child objects (the other objects below the selected
object in the tree structure), to the object list.
Properties, opens an Object reference dialog. It contains the following options:

Figure 23. Object Reference Dialog

46 3BSE030335-510
Section 2 Graphics Builder Populate the Object List

• Reference type drop down list, where you can choose either Absolute or
Relative reference type.
The functional difference between absolute and relative references
Object references in graphic aspects can be either relative or absolute.
The difference is when the aspect is copied from one object to another.
If the reference is absolute, the new aspect will show data from the same
object as before, but if the reference is relative, the aspect will always
show data of the object it resides on, or underlying objects. In the object
type structure, the only choice is relative references while it is possible
to use either relative or absolute references in the functional or location
structure. See Expressions on page 62.
• Detailed, contains information about relative and resolved absolute references.
– For relative references, the exact definition of the relative path.
Can be a bit complex. The default representation of a relative reference
uses full path and structure qualification.
– For a resolved absolute reference the name is shown (aspect category
Name).
• Object Proxy Name, at the bottom you can add a proxy name (default name:
m_Object) that enables you to change values for objects. This gives you a
representation of the object in the Visual Basic code pane.
The object proxy concept is part of “Aspect Object Automation”.
Note, there are situations when the object proxy is null, for example when there is
a broken reference. Remember to always check this before use!
• Browse button (...), when you click at the browse button a dialog box is shown
where you can choose another object that will replace the old object reference.

Populate the Object List


A prerequisite before assigning expressions to properties is that the
ObjectProperty tab in the object list contains objects. To add an object reference:
Either click on the Browse button to open a dialog box, which allows you to choose
an object, or drag an object from Plant Explorer.

3BSE030335-510 47
Populate the Object List Section 2 Graphics Builder

Figure 24. Add an Object.

Autopopulate the Object List.


Object type structure:
If you create a graphic aspect on an object type, the object list, in the Element
Browser or Object Property list, will automatically contain all the objects on that
object type.
Other structures:
Right-click on the object in the object list and select Autopopulate in the drop down
menu.
All child objects (the other objects below the selected object in the tree structure)
are added to the object list. Now we have objects to work with.

48 3BSE030335-510
Section 2 Graphics Builder Element Browser

Element Browser
The main objective of the Element Browser window is to select and add graphic
elements to a graphic aspect.
The Element Browser does not have full Unicode support and requires the correct
language setting when using Far East languages, see NLS Handling of Far East
Languages in Graphics on page 98.
To select a graphic element and adding it to a graphic, follow the steps below.
1. Open the Element Browser in the Tools menu.
2. Populate the object list, see Populate the Object List on page 47.
3. Select the graphic element you want to add to the graphic aspect.
4. Press the Add Element button.
You can also add elements by dragging them from Plant Explorer into the Graphic
display.

Object list Graphic Element list Add Element button

Figure 25. Element Browser

3BSE030335-510 49
Element Browser Section 2 Graphics Builder

The Graphics Element Browser specific fields and buttons are:


Browse button
Brings up the object browser, used to populate the object list.
Object list
The list displays object references. The object list is common for Expression
Builder and Element Browser.
Graphic Element list
This list shows the graphic element aspects, associated with the selected Object.
Add Element button
Click on this button when you want to add a selected graphic element to your
graphic.

When you instantiate a graphic element it is automatically added to the list in the
Toolbox window and remains there even if it is deleted in Plant Explorer. Do not
try to fix a graphic display by creating a new graphic element with the same name
as the one you have deleted. It won’t work. Instead, delete the graphic element
instance from the graphic display, also remove it from the components window.
Then, you create a new graphic element aspect, and let it replace the old (deleted)
graphic element instance in the graphic display.

50 3BSE030335-510
Section 2 Graphics Builder Saving, Deploying and Deleting Graphic Aspects

Saving, Deploying and Deleting Graphic Aspects


Saving
To save a graphic aspect, you either click the Save button in the toolbar, or choose
Save from the File menu.

Deploying
To deploy a graphic aspect, you either click the Deploy button in the toolbar, or
choose Deploy from the File menu. Deploy means the graphic aspects are saved,
distributed and made viewable in the workplace. They are now launched for real
operation. If a graphic aspect is not deployed, it is only visible in the Graphics
Builder.
To deploy graphics, the user should belong to the IndustrialIT group Application
Engineer.

When you deploy a graphic aspect the following message appears in Audit trail:
Graphic aspect deployed: <object name> : <aspect name>
For more information about Audit trail see IndustrialIT 800xA, System,
Administration and Security (3BSE037410*).

In a Multi System Integration environment, the Visual Basic application does not
respond while deploying a graphic aspect. This occurs if there are many files in
the default temporary folder.
Execute the following steps to delete all files from the default temporary folder.
1) Select Run from Start.
2) Type %TEMP% in the Run dialog box and click OK. This opens the default
temporary folder.
3) Select the temporary files to be deleted and press DELETE. This prompts for a
confirmation. Click Yes to delete. Otherwise, click No.
A warning message appears if any other program is currently using the temporary
file selected to be deleted.

3BSE030335-510 51
Saving, Deploying and Deleting Graphic Aspects Section 2 Graphics Builder

Deleting
To delete a graphic aspect, right-click it in Plant Explorer and choose Delete from
the context menu.

52 3BSE030335-510
Section 2 Graphics Builder Properties Window

Properties Window
The Properties window is one of the standard windows in Visual Basic. It shows all
the properties belonging to the currently active ActiveX control. The properties can
either be sorted in alphabetic order (with the Alphabetic tab) or in categories (with
the Categorized tab). The categories are presented as a tree structure. By default, all
categories are expanded. The available categories depend on the categories exposed
by the control.
Open the properties window by choosing Properties Window in the View menu.

Figure 26. Properties Window

Choosing colors and fonts for a graphic element is done through color and font
dialog boxes, which you open by clicking on the down-arrow buttons at the far right
of the Properties window.
A value entered in the Properties window is ignored at runtime if an expression
has been entered for the same property in Expressions Builder.
You can find more details about the Properties window in the Visual Basic’s on-line
help file.

3BSE030335-510 53
Properties Window Section 2 Graphics Builder

54 3BSE030335-510
Section 3 Graphic Aspects

This section describes aspects defined by the Graphics aspect system, commonly
called Graphic Aspects. For each graphic aspect, an ActiveX control is
implemented using Visual Basic. To some extent, the user is assumed to be familiar
terms like UserControl relating to the implementation of ActiveX controls using
Visual Basic.
Graphic aspects are described in this section, Section 6, Configuring Faceplate
Elements and in Section 5, Configuring Property Elements. The separation is
somewhat arbitrary, but this chapter mainly describes mechanism that are common
for all graphic aspects. Section 6, Configuring Faceplate Elements describes
additional mechanisms and methods that are used for elements implemented to
support input operations, typically faceplate and property elements.
Nothing prevents input operations from being performed in any graphic aspect.
That is, Graphics does not require a clear separation between ordinary graphic
displays and faceplates.

The Graphics Aspect System


The Graphics aspect system defines two aspect types:
• Graphic Display
• Graphic Element
Aspects created from each aspect type are in most respects the same. They are
configured using the same tool, the Graphics Builder, and the same mechanisms can
be used in each of them.
The major difference is that graphic displays are intended to be handled and invoked
directly by the process operator, the person that uses graphics for monitoring and
control in the run time situation.

3BSE030335-510 55
Creating a New Graphic Aspect Section 3 Graphic Aspects

Graphic elements on the other hand are building blocks that are used when
configuring graphic displays, or other graphic elements, but also faceplates, see
Section 4, Faceplate Framework.
The user reference manual refers to graphic aspect(s) when the distinction between
Graphic Display and Graphic Element aspects is of no importance. Otherwise, it
refers to graphic displays or graphic elements.

Creating a New Graphic Aspect


Below follows a description of how to create a graphic aspect using Plant Explorer.
The example is a graphic element but could might as well have been a faceplate
element, Subelement or Graphic Display.
1. Select a structure in the Plant Explorer.
2. Browse to an object in that structure.
3. Add an aspect by right-clicking in the aspect area and choose New Aspect
from the context menu. The New Aspect window is presented.
4. Select the Process Graphics aspect system and then the Graphic Element of
the Graphic Element aspect type in the aspect category browser and then
select the desired aspect category.

Figure 27. New Aspect Window - Graphic Element Selected

56 3BSE030335-510
Section 3 Graphic Aspects Relevance of Structures for Graphic Aspects

5. Enter an aspect name and click Create. The created aspect is added to the
object’s aspect list.
6. Right-click it and choose Edit from the context menu. The Graphics Builder is
launched.

Relevance of Structures for Graphic Aspects


Graphic aspects may be created on objects found in various structures. The structure
used reflects the purpose of the graphic aspect. Structures used and the
corresponding purpose of the aspect is described in Table 1.

Table 1. Relevance of Structures for Graphic Aspects

Structure Purpose of aspect


Object Type Structure A graphic aspect placed on an object type object is
inherited by all instances created from the object type.
Built in aspect categories suitable for object type objects
are Graphic Element, Faceplate Element and
Object Display.
Graphics Structure Aspects placed in the Graphics structure shall be generic.
See Object Aware and Generic Graphic Aspects on page
58 for a description of generic elements.
The graphic structure is used to create toolboxes in the
Graphics builder. An object placed in the Graphics
structure corresponds to a toolbox tab.
Built in aspect categories suitable for the Graphics
structure are Property Element, Subelement and
Symbol Element.
Any other structure Graphic aspects placed in other structures are typically
(typically the Functional aspects of the Graphic Display aspect category. Graphic
Structure) aspects placed for example in the functional structure are
sometimes called “instance graphics”.

3BSE030335-510 57
Object Aware and Generic Graphic Aspects Section 3 Graphic Aspects

Object Aware and Generic Graphic Aspects


A major characterization of graphic aspects is to divide them into one of the
following subsets:
• Generic Graphic Aspects
Generic graphic aspects are characterized by being applicable regardless of
object type and even of the controller family connected to. Generic graphic
aspects are therefore quite versatile creatures. Yet, they require more
configuration, as every property that requires dynamic data must be connected
individually.
Generic graphic aspects are entered, using Graphics Builder, by selecting them
from the toolbox, see Toolbox Window on page 24.

• Object Aware Graphic Aspects


In object aware graphic aspects there is in contrast to generic graphic aspects,
support for object references. The main feature is that there is always an
invocation object available in each instance of object aware aspects. The
invocation object makes it possible to use relative references to aspect objects,
aspects and aspect object properties within the graphic aspect.
For more information about graphic aspects dividing into different subsets, see
Subsets of Elements on page 60.
Object type libraries cannot include generic graphic aspects. It can include only
object aware graphic aspects (for example, graphic element or faceplate element).

The invocation object is set up differently for graphic displays and for instances of
graphic elements:
• Graphic Element aspects has a property named ObjectPath. This allows object
aware graphic element instances to be parameterized with a reference to an
object. This parameterization takes place automatically when using the
Element Browser, see Element Browser on page 49.
• For graphic displays the invocation object is set up in runtime by the runtime
system.

58 3BSE030335-510
Section 3 Graphic Aspects Built in Graphic Aspect Categories

Built in Graphic Aspect Categories


For each of the Graphic Display and Graphic Element aspect types, there are a
number of built in (predefined) aspect categories, see Table 2 and Table 3. It is also
possible for users of graphics to create custom aspect categories with templates, for
more information see Appendix C, Create New Aspect Categories with Templates.
By selecting a certain aspect category when you create a graphic aspect, you select a
number of predefined quantities like:
• The default size of the graphic aspect
• The background color of the graphic aspect
• A set of properties available
• Some Visual Basic code that fits with the intention of the aspect category
Table 2 describes built in aspect categories used to configure object aware graphic
aspects.

Table 2. Built in Aspect Categories Used for Object Aware Graphic Aspects

Aspect category Description


Graphic Display The aspect category is intended for “instance graphics” i.e.
graphic displays that are built and placed in a concrete
structure, typically the functional structure.
Object Display The aspect category is intended to be used on object
types to be general presentations for all objects of the type
Faceplate Element The category of graphic aspects used by faceplates to
perform monitoring and control of the process
Graphic Element Aspects of the Graphic Element aspect category typically
represents objects of a certain object type. For example a
valve.

ABB provides libraries of object aware graphic aspects as part of the OCS
Integration packages for various controllers, while others may be built by you, or
purchased from other sources in the form of graphic libraries.

3BSE030335-510 59
Subsets of Elements Section 3 Graphic Aspects

Table 3 describes built in aspect categories to configure generic aspect aspects.

Table 3. Built in Aspect Categories Used for Generic Graphic Aspects

Aspect category Description


Subelement Aspects of the Subelement aspect category are generic
aspects intended for presentation purposes, i.e. elements
with properties to which data can be provided using
expressions.
Property Element Aspects of this category are intended to be used when
configuring Faceplate elements. The usage is not limited
to faceplate elements though.
Symbol Elements The Symbol Element aspect category is prepared to
create elements of “icon” type, shapes. The symbol
element, by default, contains an Image Control to which a
picture (icon, windows metafile, gif-file etc.) can be
assigned.

ABB provides libraries of generic elements, see Appendix A, Standard Building


Blocks.
The system defined aspects that exist in the Graphics Structure, cannot be
modified. If you want to create a similar aspect, make a copy of one of the
existing protected graphic aspects and use it as a starting point for the new aspect.

Subsets of Elements
There are a number of terms that are used to define different subsets of elements
used by and produced by Graphics. In some cases these terms are equivalent with
names of aspect categories. This section tries to clarify these terms.
Factors that control if an element belongs to a certain subset are the following:
• Object awareness. Whether the element is object aware or not.
• Implementation. Whether implemented as a graphics aspect using the Graphics
builder or if implemented in any other way
• Usage. Whether the element is used directly by the process operator in the run
time situation or if it is a building block.

60 3BSE030335-510
Section 3 Graphic Aspects Building Blocks Used in Graphic Aspects

Table 4 defines a number of these subsets. The columns describes values of


controlling factors. An “X” means that the factor is not relevant for the subset.

Table 4. Subsets of Graphics Elements

Implemented
using
Subset Object aware Usage
Graphics
Builder
Element X X X
Graphic aspect X Yes X
Graphic Display Yes Yes By operator
Graphic Element Yes Yes Building block
Generic graphic aspect No Yes Building block
Generic Element No X Building block
Object aware graphic Yes Yes X
aspect (So far always)

Generic graphic aspects constitutes, as can be seen from Table 4, the subset of the
graphic aspects that are implemented using the Graphic Builder. Other generic
elements are Graphic Primitives, Extended Graphic Primitives, standard Visual
Basic components and third party ActiveX controls.

Building Blocks Used in Graphic Aspects


Elements used in the graphic aspects are:
• Generic elements
• Object aware graphic elements
Generic elements can be used to implement the static part of the configured graphic
aspect. Generic elements can also be used to present dynamic information by
connecting expressions to their properties, see Expressions on page 62. Expressions
are added using the Expression Builder.

3BSE030335-510 61
Expressions Section 3 Graphic Aspects

Object aware elements represent the other way to implement presentation of


dynamic information in a graphic aspect. Object aware elements are usually a more
convenient to use than generic elements as the only requirement is that a reference
to an object is set up, in contrast to defining the data subscription using expressions.
Generic elements are, on the other hand much more flexible.

Expressions
Expressions are used in graphic aspects to implement following functions:
• Specify subscriptions to and calculations on data (properties of aspect objects)
to be presented.
• Define the usage of logical colors.
• Implement the effect of input properties, see Input Properties on page 66.
• Definition of NLS text.
Expressions are assigned to properties of elements used in the graphic aspect. The
expression syntax is based on standard Visual Basic. However, additions are made
to facilitate the functions above. Expressions are defined using the Expression
Builder, see Expression Builder on page 34.
Expression variables, can be used to reduce the complexity of individual
expressions and to improve performance by create intermediate results from
calculations that can be reused several times.
Execution of an expression takes place automatically when any input data to the
expression changes. Therefore, execution takes place for the following reasons:
• Initially when the graphic element is presented. The initial execution handles
constant values applied to input properties of the graphic element. As an
example, an NLS text has to be provided using an expression, even if the text as
such, is static. Such a text, thus is assigned during the initial execution.
• When values changes of object properties that are subscribed to.
• Continuously to redraw blinking parts of the graphic aspect. See
Enable/Disable Blinking Colors on page 88 for information on avoiding
unnecessary blink execution.
• When the configuration of the logical color is changed.

62 3BSE030335-510
Section 3 Graphic Aspects Direct References to Aspect Object Properties

• An expression is also recalculated when the value of an expression variable it


refers to changes.

Direct References to Aspect Object Properties


This section describes direct references to aspect object properties.
ObjectPropertyRef Properties on page 67 describes property references that are set
up using ObjectPropertyRef properties.
The syntax for a direct object property reference is the following:
<object reference>:<aspect name>:<property name>

The <object references> part is either a relative or an absolute reference to an object.


Examples of how an object reference is presented are:
.
./Level
AI.117

For more information about object references, see Object References in Graphic
Aspects on page 70.
For a structured property, <property name> is a sequence of names, separated by
periods. A reference to a property High of a structured property Limits would be:

Limits.High

Note that expressions can only refer to leafs of a structured property.

3BSE030335-510 63
Sub Properties of Object Properties Section 3 Graphic Aspects

Sub Properties of Object Properties


Expressions can access quality information about object properties using sub
properties. To do this, use the drop-down list in Expression Builder. It contains
object property sub properties. See Figure 16 for information on how to select sub
properties.

Table 5. Sub Properties

Attributes Description
Value The value for the object property is returned.
Initialized False until first data received from OPC.

QualityOk False if data has not been received, or is not good for
any reason.
QualityBad True when it is determined that data really is bad.
QualityBad is false while waiting for first update.
QualityUncertain True when the communication is determined to be
uncertain by OPC
QualityCode Returns the raw quality value received from OPC
TimeStamp Returns the timestamp of the data value typed as Date.
FloatClass Values returned are:
0 - The value is not a floating point value or if it is a non
extreme floating point value
1 - The value is the positive infinity
2 - The value is the negative infinity
3 - The value is not a number (NAN)
For more information, see below.
WriteAccessGranted False when the accessed aspect object property is not
writable by its nature or when the user is not permitted
to write to the aspect object property.

64 3BSE030335-510
Section 3 Graphic Aspects Examples of Expressions

The FloatClass sub property exists to avoid crashes caused by floating point
numbers that are not normal numbers. Therefore float numbers corresponding to
FloatClass <> 0, are replaced with 1.0. The FloatClass property is there to indicate
that such a replacement has been done.

Examples of Expressions
The extensions of Visual Basic expression syntax is that object property references
can be used in an expression at any point where Visual Basic allows a variable to be
used.
The following is an example of a legal expression:

AI.117:Control Connection:VALUE*14.2

This expression means that the VALUE property of object AI.117 multiplied
with 14.2 is assigned the property to which this expression is applied.
The following is an example of an expression that uses nested IIf statements:

IIf(.:Control Connection:ALARM_BLK, blockedColor,


IIf(.:Control Connection:ABOVE_HI_LIM2, highAlarmColor,
normalColor))

The symbols blockedColor, highAlarmColor and normalColor are logical


colors.
Expressions can refer, not only to object properties, but also to quality information
about object properties, so called sub properties. For more information, see Direct
References to Aspect Object Properties on page 63. The following is an example of
this:

IIf(.:Control Connection:UNIT.QualityBad, highAlarmText,


textNormal)
This expression evaluates to highAlarmText (which might be an expression variable
or an NLS text), in case the QualityBad sub property of the UNIT property of the
invocation object for the graphic aspect (“.”) is true. Otherwise the expression
evaluates to textNormal.

3BSE030335-510 65
Input Properties Section 3 Graphic Aspects

Input Properties
By input properties we mean properties of a graphic aspect that can be referenced by
expressions within the graphic aspect. Input properties are defined and referenced
using the Expression Builder, see Expression Builder on page 34.
From the outside of a graphic aspect, an input property is just any other property of
an ActiveX control, in this case the control that implements the graphic aspect. The
concept is used as a method of creating properties and making them accessible from
expressions within the graphic aspect. The term is also used to create a distinction
between these properties and properties of constituent elements, that is, properties to
which expressions are assigned.
An input property is defined to be either static or dynamic. Define a property as
being static when you expect it to only be used for static parameterization of the
graphic aspect. If it is to be used for dynamic values you should define it as
dynamic. The difference between the two is not very important though. Defining a
property as dynamic is a slight time optimization, but it adds a bit more code to the
graphic aspect.
Another way to implement input properties is to use the Add Member tool in
Graphics Builder. In this case, the property is implemented Visual Basic style, but
the developer doesn’t have to write the implementing code, that is all taken care of
by the Add Member tool. The tool isn’t limited to properties only but can also
handle methods, events and NLS text. More information on the Add Member tool
can be found in Appendix D, Adding Members.

Implementing Sub Elements With Input Properties


Subelements should typically be implemented by defining its properties as dynamic
input properties and by handling data within them using expressions. Subelements
implemented this way will offer a performance that is hard, or even impossible, to
achieve by using other methods. These optimization apply to all execution of
expressions.
Other advantages of using expressions within subelements is that it allows logical
colors to be used within subelements.

66 3BSE030335-510
Section 3 Graphic Aspects ObjectPropertyRef Properties

Especially persons with a programming background, tend to prefer to implement


subelements by writing Visual Basic code, possibly using the Add Member dialog to
assist in creating the code for the properties, before using the Expression Builder.
This was actually the only method that worked before the introduction of input
properties, and the method still works. But, even if writing Visual Basic code, rather
than using expressions appeals to you, you should still consider using expressions,
and input properties, due to the performance advantages it offers.

ObjectPropertyRef Properties
A special kind of input property, see Input Properties on page 66, is the
ObjectPropertyRef property. This property offers the possibility to create property
elements, see Property Elements on page 284.
An ObjectPropertyRef property is defined as an input property, using the Expression
Builder, by selecting the property type ObjectPropertyRef.
The static value assigned to an ObjectPropertyRef property is a reference to an
aspect object property. It is assigned using the properties window in the Graphics
Builder. This reference permits a two way communication with the referenced
property. For information about how to perform a write operation to an aspect object
property referenced by an ObjectPropertyRef property, see How to Write to the
Properties of an Aspect Object on page 142.
ObjectPropertyRef properties can be referenced from expressions within the graphic
aspect. In this case the values of the referenced aspect object properties are retrieved
by the expressions.
The value retrieved by an expression from an ObjectPropertyRef property, can be
overridden by the user of the graphic aspect, by assigning an override expression to
the ObjectPropertyRef property. That is, an expression inside the graphic aspect
retrieves, in this case, not the value of the referenced aspect object property, but the
value provided by the override expression assigned to the ObjectPropertyRef.
ObjectPropertyRef properties are special in this, that they can be assigned both the
static reference value and an override expression and both are valid at the same time.
For more information about this functionality, see Assigning an Override
Expression to the ObjectPropertyRef Property on page 160.

3BSE030335-510 67
ObjectPropertyRef Properties Section 3 Graphic Aspects

ObjectPropertyRef properties define sub properties, like direct object property


references, see Direct References to Aspect Object Properties on page 63, to allow
expressions to retrieve quality information about the transfer of the referenced
value.
All sub properties, that are defined for direct property references, are also defined
for ObjectPropertyRef properties. In addition, there are sub properties that concerns
the ObjectPropertyRef itself. As the description of sub properties differs from direct
references, Table 6 describes sub properties for ObjectPropertyRef properties.

Table 6. Sub Properties for ObjectPropertyRef Properties

Attributes Description
Value The value for the object property is returned.
If the reference value has not been set, the returned value
is vtEmpty.
If an override expression is assigned, see above, the
expression value is returned.
Initialized False until first data received from OPC.
If the reference value has not been set, the returned value
is false.
If an override expression is assigned, see above, the
returned value is true.
QualityOk False if data has not been received, or is not good for any
reason.
If the reference value has not been set, the returned value
is false.
If an override expression is assigned, see above, the
returned value is true.

68 3BSE030335-510
Section 3 Graphic Aspects ObjectPropertyRef Properties

Table 6. Sub Properties for ObjectPropertyRef Properties (Continued)

Attributes Description
QualityBad True when it is determined that data really is bad.
QualityBad is false while waiting for first update.
If the reference value has not been set, the returned value
is True.
If an override expression is assigned, see above, the
returned value is False.
QualityUncertain True when the communication is determined to be
uncertain by OPC.
If the reference value has not been set, the returned value
is False.
If an override expression is assigned, see above, the
returned value is False.
QualityCode Returns the raw quality value received from OPC.
If a reference value has not been set or if an overriding
value is dynamically provided, the returned value is 192
(good).
TimeStamp The function returns the timestamp of the data value
typed as Date.
FloatClass Values returned are:
0 - The value is not a floating point value or
if it is a non extreme floating point value
1 - The value the positive infinity
2 - The value is the negative infinity
3 - The value is not a number (NAN)
About FloatClass, see Sub Properties of Object
Properties on page 64.
WriteAccessGranted False when the accessed aspect object property is not
writable by its nature or when the user is not permitted to
write to the aspect object property.
ReferenceSet Returns true if a reference value has been set.

3BSE030335-510 69
Object References in Graphic Aspects Section 3 Graphic Aspects

Object References in Graphic Aspects


Presentation of Object References
Object references, in graphic aspects, are either absolute or relative. Following lines
shows some examples of how object references are presented:

• Absolute reference
AI.117
• Relative references
.
..
./Level
./Tank/Level
An absolute reference is presented with the name of the referenced object. Behind
the scene, an absolute reference is stored in a more complex way though, see The
Anatomy of Absolute References on page 71.
When manually entering an absolute object reference, for example by typing into
the ObjectPath property of an instance of an object aware graphic element, it is
possible to specify the object by typing an object path like Reactor/Temp.
A relative reference is presented with a period, which denotes the invocation object
for the graphic aspect, optionally followed an object path. For more information
information about relative object references, see Support for Composite Object
Types on page 72.

Using Relative and Absolute References


Relative references are always used by graphic aspects in object types. Note that it is
not possible to set up a reference from a graphic aspect in an object type to an object
that is not part of the object type.
Absolute references, are the default for references to objects in concrete structures.
It is possible to change a reference to an object in a concrete structure, which can
make it easier to copy a structure, containing the graphic aspect, and having
references in the copied aspect pointing at copied objects rather than the original
objects.

70 3BSE030335-510
Section 3 Graphic Aspects The Anatomy of Absolute References

The Anatomy of Absolute References


An absolute reference is internally stored as a unique identity (a GUID) and/or the
rescue name. The state of the reference can be:
• Unresolved. Only the name exists. The result of entering an object reference by
typing the name of an object that does not exist yet, or when several objects
with the same name exist.
• Resolved reference. Consists of a GUID and a name
• Broken. The reference has been resolved but the object has been removed (or
for some reason received a new identity)
References need to be resolved to be operational.
You can look at object references by opening a graphic aspect in the Graphics
Builder. Object references are presented in the object list which are shown in the
Expression Builder and in the Element Browser. Unresolved and broken references
are marked with a “U” in the Resolved column.
A reference entered by browsing to an object directly becomes a resolved reference.
Unresolved and broken object references can be made resolved in two ways:
• The deploy operation sees that the graphic aspect contains unresolved
references and offers the user the opportunity to try to automatically resolve
these.
• You can manually change an object reference by browsing to another object,
see Object List on page 46.
Automatic resolve, using the deploy operation, works when exactly one object
exists with a name matching the reference. If the automatic resolve operation did not
work as you would have expected, check that there is exactly one object with the
correct name.
The name that is stored for resolved references is the name of the referenced object
at the time of saving the graphic aspect. If the name of this object changes after
deploying the graphic, the reference still works as the object is found based on the
GUID.

3BSE030335-510 71
Support for Composite Object Types Section 3 Graphic Aspects

Automatic resolving using the deploy operation can lead to resolve errors if you
are not careful, e.g. by importing a graphic aspect into a system and deploying it,
references may be resolved to point to any object that happen to be correctly
named

Support for Composite Object Types


There is support, in several ways, for graphic aspects created on composite object
types. One essential point in this is that, all objects (formal instances) of the object
type are, by default entered into the object list. It is therefore possible to refer to all
objects of the object type, both from the Expression Builder and from the Element
Browser:
• Using the Expression Builder, it is possible to create expressions that refer to
properties of any object being part of the object type.
• Using the Element Browser, it is possible to, from within a graphic aspect, to
refer to graphic elements that are defined on other objects (formal instances)
within the same object type.
Graphic aspects can, in principle, be nested to an arbitrary depth. The value of the
ObjectPath property of an element instance is than a relative reference, i.e. it
typically has the following look:

./FormalInstanceName
A Process Control Solution can be programmed as a composite object in the Object
Type Structure. A small example of a composite cbject would be a Dual Pump Set
that contains 2 motors, 2 Valves, discharge pressure and suction pressure. Besides
the control code, a composite object type may contain composite graphic elements.
A composite graphic element is a graphical representation of the process solution
that may contain both static (process lines) and dynamic elements (motor, valve,
pump etc). The composite elements and other graphic elements are used from
graphic displays to visualize a complete part of the process.

72 3BSE030335-510
Section 3 Graphic Aspects Support for Composite Object Types

The standard input handling with respect to composite graphic element can be
broadly classified into two categories.
a. Non delegated Input Handling
In non delegated input handling, the child elements in a composite graphic
element have their EnableInput property set to False. For example, when
using a graphic element from a simple object, like an analog input object,
in a graphic element for a composite object type, like some kind of reactor,
if it is decided to disable the standard input handling for the analog input
object, set the EnableInput to False for the analog input element. On left
clicking the part of the reactor element that is implemented using the
analog input element, the invoked (default) aspect is typically the
faceplate for the reactor object.
b. Delegated Input Handling
A composite graphic element, and all, or some of its child elements can
support standard input handling. This can be done by setting the
EnableInput to True for the child elements that needs to support input
handling.
A composite graphic element can disable its own input handling and
delegate it to child elements that have their EnableInput set to True. To
support this behavior in a composite graphic element, the following
changes have to be implemented.

3BSE030335-510 73
Support for Composite Object Types Section 3 Graphic Aspects

•Uncomment the following code


Implements
IPgIDoNotImplementMouseInputButMyChildrenDo

Figure 28. Adding code in the Graphic Element

•In the UserControl_HitTest function, replace the following,


If (Not m_EnableInput) And
UserControl.Ambient.UserMode Then
with the following
If UserControl.Ambient.UserMode Then
For example, operators will not be able to select a composite graphic element on a
graphic display while the selection of individual graphic elements inside the
composite graphic element (pumps and valves) is possible.

74 3BSE030335-510
Section 3 Graphic Aspects Support for Composite Object Types

IPgIDoNotImplement
MouseInputButMy
ChildrenDo

There is also support for performing write operations to any object within
(instances of) the object type. Writing to an object is enabled by creating a proxy for
it, see Object List on page 46. See also How to Write to the Properties of an Object
In Faceplate Elements on page 167.
For the newly created graphic elements in System Version 4.0 SP1 Ru7a (and later
versions) and System Version 5.0 SP1 (and later versions), remove commenting
from the existing code.
For graphic elements that originate from versions prior to System Version 4.0 SP1
Ru7a and System Version 5.0 SP1, manually add the code. If nested graphic
elements with more than one level exist (that is, a composite graphic element
contains another composite graphic element), manually add the code for all levels of
composite graphic elements.
If a Graphic Element is overlapped by a Composite Graphic Element, the default
aspect of the Graphic Element cannot be opened because of higher stacking order
of the Composite Graphic Element.

3BSE030335-510 75
Standard Input Handling for Graphic Aspects Section 3 Graphic Aspects

Standard Input Handling for Graphic Aspects


Standard Input Handling in Object Aware Graphic Aspects
Graphic aspects implement the standard input handling, which involves identifying
the aspect object represented at the point where the user clicks or moves the cursor.
Standard input handling then performs one of the following functions:
• Left clicking invokes the default aspect of the aspect object (of course
assuming that there is a default aspect). In the typical case this means to bring
up the faceplate for that object
• Right clicking at a graphic aspect instance invokes the context menu for the
aspect object.
• When pointing at a graphic element, i.e. not the graphic display itself, two
things happen:
a. A marking rectangle is drawn to make the element representing the aspect
object appear like a push button
b. A tooltip pops up showing the name of the aspect object
• The graphic elements in a graphic display acts as drag source to automatically
configure Trend displays.
When creating a graphic aspect of a built in aspect category, the new aspect contains
the following code (error handling removed for clarity):

Private Sub UserControl_MouseDown(Button As Integer, _


Shift As Integer, X As Single, Y As Single)
m_sc.MouseDown Button, Shift
End Sub

Private Sub UserControl_MouseMove(Button As Integer, _


Shift As Integer, X As Single, Y As Single)
m_sc.MouseMove Button, Shift
End Sub

Private Sub UserControl_MouseUp(Button As Integer, _


Shift As Integer, X As Single, Y As Single)
If Shift = 0 Then

76 3BSE030335-510
Section 3 Graphic Aspects Standard Input Handling for Graphic Aspects

If Button = vbLeftButton
If m_sc.CancelInputSession = False Then
m_sc.ShowDefaultAspect
End If
ElseIf Button = vbRightButton Then
m_sc.ShowContextMenu
End If
Else
m_sc.MouseUp Button, Shift
End If
End Sub

The control m_sc is an instance of the PgSubscriptionControl that is present in all


graphic aspects, except for symbol elements. The API is described in The
PgSubscriptionControl Object on page 92.
The calls to ShowDefaultAspect and ShowContextMenu, implements
corresponding functions. The call to CancelInputSession cancels the input session,
(see Input Session Handling on page 152) if a session is in progress and returns, in
that case, True. Therefore, the call to ShowDefaultAspect is made, when clicking at
the element, only if an input session is not in progress.
Calling m_sc.MouseMove controls “marking”, that is, the element the user points at
is shown as a push button.
The calls m_sc.MouseDown and m_sc.MouseUp currently have no function and are
called for future compatibility.
Input handling calls like m_sc.ShowContextMenu, are executed differently when
called from an object aware graphic aspect and when called from a generic graphic
aspect. These calls need to identify the aspect object represented at the screen
location where the operator clicks. If the operator clicks directly at an object aware
graphic aspect, the aspect object is the invocation object of the element.
When on the other hand, the user clicks at a generic graphic element that is not click
transparent, see Click Transparency on page 78, input handling calls, input handling

3BSE030335-510 77
Click Transparency Section 3 Graphic Aspects

looks at the parent of the generic element. If it is object aware, the aspect object has
been identified. Otherwise the call searches further upwards.
A graphic display does not call up the default aspect when clicked on the
background area of the graphic display aspect.
To enable the calling up of the default aspect, uncomment the following code in
the UserControl_MouseUp event handler, and re-deploy the aspect.
m_sc.ShowDefaultAspect

Click Transparency
The input handling described in Standard Input Handling in Object Aware Graphic
Aspects on page 76, generally requires that generic elements used (e.g. primitive
elements) are click transparent. What is meant by that is that elements clicked at
does not “absorb” the click event. Instead, the generic element is pervious and the
click event is received by the user control that implements the input handling of the
graphic aspect.

Graphic Aspect
(as seen as a
working area in
Graphic Builder)

Generic Element
(have to be click
transparent to not
absorb the click event).

Figure 29. Click Transparency

Graphic Primitives, (except AdvantObjectTrim) and Extended primitives are click


transparent, at least when not been set up to react to click events, see Appendix A,
Standard Building Blocks. Primitive elements, with support for input operations, i.e.
elements that possesses the EnableInput property, are click transparent only when
the EnableInput property is set to false.
Other elements, like built in VB controls and most third party ActiveX controls, are
not click transparent. To use these, and still use the standard input handling, is
possible by incorporating an instance of the PgEventTunnel element into the

78 3BSE030335-510
Section 3 Graphic Aspects The EnableInput Property

configured graphic aspect. Doing that, makes events generated on top of a graphic
element “tunnel” through non click transparent controls, effectively making them
click transparent.
The PgEventTunnel element is found under the Special tab in Graphics Builder.
Normally you should try to use elements that are click transparent when you
implement a graphic aspect. As the usage of the PgEventTunnel element has a
negative side effect. A disadvantage is that the input function of any control put into
the graphic aspect is disabled.
For information about click transparency and graphic aspects, see Click
Transparency in Graphic Aspects on page 80.

The EnableInput Property


Aspects of aspect categories Faceplate Element and Graphic Element possess a
property named EnableInput. The semantics of this property is the following:
• When set to true, standard input handling, as described in Standard Input
Handling in Object Aware Graphic Aspects on page 76, is enabled.
• When set to false the graphic aspect becomes click transparent. How click
transparency is implemented in graphic aspects is described in Click
Transparency in Graphic Aspects on page 80
The EnableInput property is used when configuring a graphic aspect for a composite
object type to be built up from graphic aspects defined by formal instances of the
composite object, see Support for Composite Object Types on page 72.
Setting the EnableInput property to false of the constituent elements prevents input
operations accessing formal instances. It is therefore possible to invoke the default
aspect, and context menu, for the composite object rather than for these.
Property elements also possess the EnableInput property. Also in this case, setting
the property to false makes the element click transparent, again see Click
Transparency in Graphic Aspects on page 80, for click transparency of graphic
aspects. On the other hand, setting EnableInput to true has to be given an
implementation that is specific for each property element, thus with EnableInput is
true (the property element typically does not implement standard input handling).

3BSE030335-510 79
Click Transparency in Graphic Aspects Section 3 Graphic Aspects

Click Transparency in Graphic Aspects


Click transparency for graphic aspects is implemented in either of two ways. One
way is standard input handling, see Standard Input Handling in Object Aware
Graphic Aspects on page 76. The other way is used in graphic aspects that are set up
to windowless and transparent, that is, the Windowless property is set to True and
the BackStyle property is set to Transparent on the graphic aspects user control.
It is recommended to set up the graphic aspects to Windowless and Transparent,
which will result in the best performance. It is possible to configure other
alternatives, see table below, but a warning dialog will be shown if the Windowless
property is set False and BackStyle property is set Transparent, or if the
Windowless property is set True and BackStyle property is set Opaque.

Table 7. Possible Settings for the Graphics Aspects

Windowless BackStyle
property property
Recommended True Transparent
Good False Opaque
Not recommended False Transparent
Not recommended True Opaque

In the recommended case, the HitTest function specifies the click sensitivity of the
graphic aspect.
The following code shows the standard implementation of the HitTest function in a
Graphic aspect:

Private Sub UserControl_HitTest


(X As Single,_Y As Single, HitResult As Integer)
HitResult = vbHitResultHit

If (Not m_EnableInput) And UserControl.Ambient.UserMode Then


HitResult = vbHitResultOutside
End If
End Sub

80 3BSE030335-510
Section 3 Graphic Aspects Object Highlight

Thus, a windowless and transparent graphic aspect is click transparent when


EnableInput is set to false. The test on UserControl.Ambient.UserMode makes
sure that the graphic aspect is not click transparent when handled in the Graphics
Builder.
Subelements and symbol elements should typically always be click transparent, and
these therefore does not possess the EnableInput property. These elements,
therefore, by default are click transparent outside the Graphics builder.

Object Highlight
To reduce the risk of operating the wrong object when several faceplates are open at
the same time, the Object Highlight function will indicate all graphic elements on a
graphic display that corresponds to the active faceplate. All corresponding elements
will be surrounded by corner brackets (when using the default configuration) see
Figure 30. The Object Highlight is operator specific and is only visible on the
current workplace.
If a graphic element consists of a group of smaller graphic elements the EnableInput
property for these inner elements should be set to False, otherwise the corner
brackets will be presented for every single element in the group.
If an inner element in a group points to a child object, the EnableInput property
should be True to enable standard input handling for this element, that is, mouse
clicking and object marking and highlight.

3BSE030335-510 81
Object Highlight Section 3 Graphic Aspects

Graphic elements on the same aspect object within faceplate elements on a faceplate
will automatically have no Object Highlight, without setting the EnableInput
property.

Highlighted objects Active faceplate

Figure 30. Example of an active faceplate and its corresponding graphic objects.

When using hot-keys the Object Highlight also reduces the risk of operating the
wrong object. Hot-keys configured to highlighted objects only operate on the
objects connected to the active faceplate. When the Object Highlight mode has the
default setting 1, Follow faceplate (see Configuration on page 82), it is not required
to move the cursor over an object to apply commands on the object. Make sure that
the object of interest is surrounded by corner brackets (activate the corresponding
faceplate) before pressing any hot keys.

Configuration
The following User Profiles is used when configuring Object Highlight:
• Object Highlight mode has three values for configuration of how to control
what objects to be highlighted (default value = 1).

82 3BSE030335-510
Section 3 Graphic Aspects Auto Configured Trend Displays

– 0, Object Highlight is disabled.


– 1, Highlight the objects connected to the active faceplate.
– 2, Use the mouse to highlight the objects. No 3D-marking of the objects
will be visible in this case when the cursor points at an object.
• Highlight representation has three values for configuration of how to mark
the objects that is highlighted (default value = 2).
– 0, No marking.
– 1, Each highlighted object is surrounded by a rectangular frame.
– 2, Each highlighted object is surrounded by corner brackets (hooks).
• Highlight border width configures the thickness of the brackets or frame
around the highlighted objects (default value = 1 pixel).
– Enter a value, the unit is pixels.
• Highlight xy offset configures the distance between the object and its
surrounding corner brackets or frame.
– Enter a value, the unit is pixels.
The following logical color is used when configuring the color of Object Highlight:
• ObjectHighlight. The aspect Process Graphics Color makes it is possible to
change the color of the brackets or frame surrounding the objects. The default
color of the brackets is blue.

Auto Configured Trend Displays


Call up a Trend display. From the open graphic display you can drag the graphic
elements, that is their invocation object, into the Trend display to quickly build up a
temporary view.

Security
Graphic aspects support security. A hard security check is also done by the OPC,
which makes sure that no data is read or written without the required permissions.

3BSE030335-510 83
Security Section 3 Graphic Aspects

Operations. There are three security operations in graphic aspects, further


explained in Table 8. They are used to control whether the user is allowed or denied
to see different views or configure the aspect.

Table 8. Graphic Aspect Security Operations

Operation Description
Read The user has permission to see the graphic aspect dialogs in Plant
Explorer.
Modify The user has permission to start the Graphics Builder to modify the
aspect and save the changes but not to deploy it.
Deploy The user has permission to deploy the aspect in the Graphics Builder
loading it into the system.

The Edit button will be dimmed if the user is not granted configure permission on
an aspect.

Operation/Permission mapping. There is a mapping between operations and


permissions for the built-in aspect categories. This shows the permissions a user
needs to perform different operations. As displayed in Figure 31 the user needs read
permissions to see the Graphic Aspect and configure permission to modify and
deploy it.

84 3BSE030335-510
Section 3 Graphic Aspects Miscellaneous

Figure 31. Permission/Operation Mapping on a Graphic Aspect.

Miscellaneous
Setting the Background Color of Graphic Aspects
The background color of graphic displays, graphic elements and primitive elements
can be controlled. For each of these there is a separate mechanism.
Common for the graphic elements and primitive elements that do not posses a
transparent background, is that they may be made to appear transparent by setting
the background to the same color as the surrounding surface, sometimes called
pseudo transparency. There are different mechanisms for graphic elements and
primitive elements to achieve pseudo transparency.

3BSE030335-510 85
Setting the Background Color of Graphic Aspects Section 3 Graphic Aspects

Background Color of Graphic Displays


The background color of a graphic display is defined by setting the value of the
GeneralBackColor property of the displays PgSubscriptionControl object
(m_sc). Table 9 presents possible values:

Table 9. Possible Values of the GeneralBackColor Property of the


PgSubscriptionControl Object

Value of the
GeneralBackColor Resulting color
property

-1 The background color of the graphic is set to the logical


color by the name of GeneralBackColor found in the
Graphics Colors color set. (Note that the same name is
used for both the property and for the logical color.)

A static value other The background color of the graphic is set to the value of
than -1 the GeneralBackColor property.

Expression By assigning an expression to the GeneralBackColor


property, it is possible to set the background color of the
graphic to a logical color other than GeneralBackColor

The default value of the GeneralBackColor property is -1 is for all aspect categories
other than Faceplate Element.
The default value of the logical color GeneralBackColor is dark green.
Assigning an expression to the GeneralBackColor property is done using the
Expression Builder with the subscription control selected. Selecting the subscription
control is done using the drop down menu of the property window.

86 3BSE030335-510
Section 3 Graphic Aspects Setting the Background Color of Graphic Aspects

Background Color of Graphic Element Instances


Graphic elements that have been created from any of the built-in aspect categories,
has a property BackgroundColor that can be used to control the color of instances of
these elements. Table 10 presents values that are relevant for the BackgroundColor
property.

Table 10. Possible Values of the BackgroundColor Property of Graphic Element


Instances

Value of the Resulting color


BackgroundColor
property

-1 Pseudo transparent, i.e. the graphic element


receives a background color that is the background
color of the graphic that instantiates it.
This makes the graphic element appear
transparent when placed on top of the solid
background of the display.

Other static value than -1 The background color of the graphic element is set
to the value of the BackgroundColor property

Expression By assigning an expression to the


BackgroundColor property, it is possible to set the
background color of the graphic element to a
logical color

Background Color of Primitive Elements


It is often desirable to make the background of graphic primitives, or even entire
primitives, to appear invisible. This can be achieved by setting the background color
of the primitive to the logical color GeneralBackColor. This sets the color of the
primitive to the background color of the graphic element it is part of, making it
pseudo transparent.
The GeneralBackColor logical color is special in that it always has the background
color value of the graphic display/element in which it is used rather than the color
that is globally defined for it.

3BSE030335-510 87
Controlling the Update Rate of Data Subscriptions Section 3 Graphic Aspects

Controlling the Update Rate of Data Subscriptions


It is possible to control the rate by which dynamic updates take place in graphic
displays and elements. By default, the update rate is not controlled by graphics, but
by the configuration of aspects representing the connection to the process.
Setting the update rate for:
• Graphic displays
By setting the value of the UpdateRate property, of the graphic display´s
PgSubcriptionControl object.
• For instances of graphic elements
By setting the value of the UpdateRate property of the graphic element.
The unit for these properties is milliseconds.
The default value of both properties is 0. The interpretation of the zero value is that
the update rate is not determined by graphics but by the underlying integration of the
controller. In most cases, the update rate is then determined by means of control
connection configuration.
Setting a value other than 0 on a graphic display overrides any settings of the update
rate on graphic element instances, of that graphic display.
The effect of setting UpdateRate properties is determined by the (integration of the)
controller that is providing the data. In many cases, it is valid for analog properties
but not for properties that by their nature are changed in an event driven fashion.

Enable/Disable Blinking Colors


Blinking logical colors can be accessed from Expressions.The following is an
example of this.

iif(.:Control Connection:IsAlarm, AlarmColor, NormalColor)

The effect of the previous expression is that the color of the bar blinks when the
object is in the alarm state, and shows steady state color NormalColor, when the
object is not.
Note that the expression is executed anytime the color (blink color) changes.
Therefore, blink colors should be used with care as they might cause high CPU load.

88 3BSE030335-510
Section 3 Graphic Aspects Precautions When Importing/Exporting Aspects

The configurator of a graphic element can reduce total CPU load caused by blinking
by adding an expression to the “EnableBlink” property of the
PgSubscriptionControl m_sc. Using the example above, add the following
expression to the EnableBlink property:

.:Control Connection:IsAlarm

To allow an expression to be assigned to the EnableBlink property, you need to


select the subscription control in the Graphics Builder. To do this, open the
Properties window in Visual Basic, select “m_sc PgSubscriptionControl” in the
drop down box at the top.

Precautions When Importing/Exporting Aspects


The Import/Export tool can be used to restore graphic aspects, and produce copies
of exported aspects. When restoring graphic aspects there are restrictions for both
Import and Export.
To import or export VB graphic aspects, the user should belong to the Windows
Local Administrators group.

Import. You probably want to restore the graphic elements and hence preserve
existing unique identities, i.e you want the graphic display to look the same as it did.
If the graphic element is created with a new unique identity, previous references to
the aspect will not work.

Export. When a graphic aspect is exported, the object the aspect belongs to needs to
exported as well to keep all identities intact. However, this may not be enough
though. The object can in turn belong to a hierarchy of objects, and in this case the
whole structure needs to be available when the graphic aspect is imported. This
means that the entire object structure needs to be exported, though not necessarily in
the same afw file.
When exporting a graphic element to another system, the logical color relies on
the target system having the corresponding color definitions.

3BSE030335-510 89
Precautions When Copying Graphic Aspects Section 3 Graphic Aspects

For more information on importing and exporting aspects, as well as a description of


the Import/Export tool, refer to IndustrialIT 800xA, System, Configuration
(3BDS011222*).

Precautions When Copying Graphic Aspects


If you copy aspects, for example a graphic display that contain graphic elements
within Plant Explorer, there are restrictions.
When an object which contains graphic displays and graphic elements is copied,
all entities get new unique identities (except for the objects from the Object
Type Structure). The copied elements are therefore not found by the graphic
display, which still refers to the original graphic elements.

Precautions When using Multiple Monitors and Quad Displays


Graphic displays may not be displayed in an accurate manner for the Operators
working on multi monitor client nodes, if the AfwWorkplaceApplication.exe has
exceeded the Graphics Device Interface Objects (GDI). Several graphic displays
opened at the same time reduce the performance of the workplace.
GDI is a Microsoft Windows resource limitation and is monitored through the
Windows Task Manager. The maximum limit allowed is 10000 GDI objects for a
process.
A warning message is displayed when the workplace exceeds 8000 GDI objects.
This prevents the operator from opening more graphic displays. This value can be
changed through the GDIObjectThresholdValue profile in the Graphics Profile
Values aspect in User Structure.
Consider the following scenario when a workplace with multiple monitors is used in
a system.
A 4-monitor workplace consumes 1500 GDI objects and a graphic display
consumes 1000 GDI objects. Calling one graphic display on each monitor consumes
5500 GDI objects (calculated as 4*1000 + 1500). In addition, this configuration
also consumes GDI objects to perform operator specific activities such as faceplates
and trends.
If a quad display is used in one monitor and configured with four graphic displays, it
consumes 8500 GDI objects (calculated as 3*1000 + 4*1000 + 1500). Only 1500

90 3BSE030335-510
Section 3 Graphic Aspects Bad Data Presentation

GDI objects are available for operator specific activities, that is, the operator may
not be able to perform any activities in the workplace. Do not exceed 5,000 GDI
objects.
Quad displays allow the operators to open several graphic displays. These are used
on single or double monitor client nodes. The quad displays are recommended not
to be used on multi monitor client nodes for graphic displays including several
graphic elements.

Bad Data Presentation


The preferred way of presenting bad data is to connect a QualityCode sub property
to the OpcStatus property of a graphic primitive. This is done by assigning an
expression to the OpcStatus property, see Assign Expressions to Properties on page
45. Doing it this way supports a standardized presentation of Good, Uncertain, Bad
and similar.
Another method of handling bad quality data is based on the values of object
properties delivered as Variants. When QualityOk of an object property is not true,
its value is set to vtEmpty, and expression evaluate to vtEmpty if any of the variables
used has the value vtEnpty. Expressions can use IsEmpty to test expression variable
values.
There is another possibility as vtEmpty is treated as a null value when assigned to a
non Variant variable or property, specifically for a boolean, vtEmpty is assigned as
false.
As a result, when using conditional expressions (expressions containing nested
iif’s), the result will always evaluate to the last else branch when data is not good.

Graphic Aspect Priority


To be able to enhance performance in the system, the File Distribution System
(FSD) allows configuration of aspects using priorities. Either an aspect is
considered having low priority and is loaded “on demand” when needed, or it is
considered high and distributed to all nodes on startup. If an aspect doesn’t have an
assigned property level, the system considers the aspect category’s priority, and after
that the aspect type’s.
Graphics has two pre-defined priority levels, GraphicDisplay and
GraphicElement, defined as aspect objects in the Admin Structure.

3BSE030335-510 91
Display Exchange Time Section 3 Graphic Aspects

Graphic Displays
Graphic Displays are by default defined as having low priority and are distributed on
demand when selected from the workplace. A downloaded aspect is stored in the
cache-directory on the client. It is however possible to change the priority.

Graphic Elements
A Graphic Element is by default defined as having high priority and is distributed to
the client on connection to the server. The priority for Graphic Elements as for
Displays can be altered either to a pre-defined or a custom level.
For more information on FSD, priorities and how to create custom priorities refer to
IndustrialIT 800xA, System, System Installation (3BSE034678*).

Display Exchange Time


Bringing up a graphic display for the first time on each separate machine after a
Deploy operation takes a little bit longer than henceforth. Once the display is used it
will take less time since the subscription time is faster the second time.

The PgSubscriptionControl Object


All graphic aspects except for graphic aspects of the SymbolElement category,
contain an instance of the PgSubscriptionControl Object (m_sc). This object plays
an important role as being the engine that controls setting up subscriptions and
controlling execution of expressions.
In addition, the object provides a public interface available for the implementor of
graphic aspects when implementing various functions.

92 3BSE030335-510
Section 3 Graphic Aspects The PgSubscriptionControl Object

Methods. Table 11 shows methods implemented by PgSubscription Control.

Table 11. PgSubscriptionControl Methods

Method Description
GetInvocationObjectId A method which returns the “AfwObjectID” of the object, which is
presented by the graphic aspect.
GetInvocationObject A method which returns the IAfwObject interface pointer which
represents the “aspect object”, which is presented by the graphic
aspect. Available in object aware graphic aspects only.
Avoid using this function for future compatibility. Use
GetInvokationObject2 instead.
GetInvokationObject2 A method which returns the IABBObject interface pointer which
represents the “aspect object”, which is presented by the graphic
aspect. Available in object aware graphic aspects only.
ReportError This method should be called to report errors that occur during the
execution of Visual Basic code.
ExecuteExpressions Forces execution of all expressions of the graphic aspect.
GetObjectPropertyProxy Returns a proxy, of the ABB property type, for an aspect object
property referenced using an ObjectPropertyRef.
Note, there are situations when the object property proxy is null, for
example when there is a broken reference. Remember to always
check this before use!
StartInputSession Starts an input operation (session).
EnableApplyButton Enables or disables apply depending on the flag parameter.
When calling this method the faceplate elements in the same
faceplate/overlap display receives the DoEnableApplyButton event.
RequestApply Requests apply. E.g. used in the implementation of ApplyButton
property element.
CancelInputSession Requests cancel. E.g. used by the Cancel property element.
TriggerSessionTimeout Should be called on user actions to keep session alive.

3BSE030335-510 93
The PgSubscriptionControl Object Section 3 Graphic Aspects

Table 11. PgSubscriptionControl Methods (Continued)

Method Description
MouseMove Should be called when the mouse is moved to control element
marking.
MouseDown Should be called when a mouse button is pressed. For future
compatibility.
MouseUp Should be called when a mouse button is released. For future
compatibility.
ShowContextMenu Called to invoke the context menu for the object represented by the
graphic aspect.
ShowDefaultAspect Called to invoke the default aspect for the object represented by the
graphic aspect.
ShowAspect Called to invoke a specific aspect for the object represented by the
graphic aspect.
ShowAnyAspect Called to invoke any aspect from any object.
GetContextMenuObject Called to get a pointer to a context menu object allowing the graphic
aspect to add entries to the context menu.
BroadcastSiblingEvent Called to generate the SiblingEvent event, in all sibling elements.

94 3BSE030335-510
Section 3 Graphic Aspects The PgSubscriptionControl Object

Table 11. PgSubscriptionControl Methods (Continued)

Method Description
GetCompositeObjectList Returns an IPgCompositeObjectList object containing the object
identities for the objects in a composite object. This object can then
be used to populate the list in a Composite Object List element.
GetCompositeObjectList has a filter parameter, FilterEnum, which
can have the following values:
• All - all objects in the composite are returned
• WithDefaultAspect - only objects for which there is a default
aspect are returned
• WithFaceplate - only objects for which there is a faceplate aspect
are returned
GetContent GetContent is used to get a hold of the ABBContent object for the
current panel where a Composite Object List element is running.
When hold of the ABBContent is achieved, it is used in the Composite
Object List element to bring up the context menu, when right clicking
an object name. When left clicking an object name in the list the
ABBContent is used to navigate to the default aspect of the object
clicked.

Properties. Table 12 shows properties of PgSubscriptionControl.

Table 12. PgSubscriptionControl Properties

Property Description
EnableBlink By setting EnableBlink to false, expression execution as a result of
blink color changes stops
To reduce CPU load, EnableBlink should be set to false, for an
element that can not blink.

3BSE030335-510 95
The PgSubscriptionControl Object Section 3 Graphic Aspects

Table 12. PgSubscriptionControl Properties (Continued)

Property Description
GeneralBackColor For graphic display, the background color of the graphic display.
For graphic element, the default value of the “BackgroundColor
property, of the graphic element.
UpdateRate Requested update rate for subscriptions on cyclic data. The default
value is 0, which means that the update rate is determined by the
aspect object providing the data. The unit is milliseconds.

Events. The subscription control generates the events described in Table 13.

Table 13. IPgSubscriptionControl Events

Function Description
OnSubscriptionChange This event is triggered at the invocation of the graphic aspect. It is
invoked late enough for the invocation object, and other properties of
the element, to have received their values. It is invoked before any
expressions are called
The method is also called after any assignment to the ObjectPath
property, i.e. for elements executing in the Graphics Builder.
The method is used to initialize VB code that has been added.
OnPreDataChange Executes just before expressions are executed
OnPostDataChange Executes after expressions have been executed
DoApply Do apply. This event is triggered as a result of the user performing an
apply operation, see the RequestApply method in The
PgSubscriptionControl Object on page 92.
To receive the event, the graphic aspect must call the method
EnableApplyButton(True) in advance. Otherwise no event is fired.

96 3BSE030335-510
Section 3 Graphic Aspects The IPgCompositeObjectList interface

Table 13. IPgSubscriptionControl Events (Continued)

Function Description
DoCancelInputSession Do cancel. This event is triggered as a result of the user performing a
cancel operation, see the CalcelInputSession in The
PgSubscriptionControl Object on page 92.
To receive the event the graphic aspect must have started a session
by calling the method StartSession().
DoEnableApplyButton Event that is broadcasted to graphic aspects within the same
faceplate /graphic display as a result of a request to enable the apply
button.
OnSiblingEvent Event generated as a result of a sibling element calling the
BroadcastSiblingEvent method, see The PgSubscriptionControl
Object on page 92.

The IPgCompositeObjectList interface


The IPgCompositeObjectList contains identities of the objects in a composite
object. The functions in Table 14 are provided with IPgCompositeObjectList.

Table 14. IPgCompositeObjectList Functions

Function Description
NumberOfSubObjects Returns the number of objects recorded in the Composite Object List.
GetSubObjectId Returns the object identity of the object in that index position.

The IPgCompositeObjectList doesn't contain any structural information i.e. it


doesn't support nesting of composite object types.
For example, if a composite object A contains a formal instance of another
composite object B, where B has a number of subobjects, the list will include all
subobjects in both A and B, without being able to separate B's subobjects from
A's subobjects.

3BSE030335-510 97
NLS Handling of Far East Languages in Graphics Section 3 Graphic Aspects

NLS Handling of Far East Languages in Graphics


Many Microsoft and built in Visual Basic controls, do not support Unicode
characters i.e. text in Far East languages will not be correctly presented. The
controls use multi byte encoding, which supports Far East languages but requires
that the correct language setting be used in "Language for non-Unicode programs"
on Windows XP and “appropriate local" on Windows 2000.
The following parts in Graphics have this limitation:
• The Property elements Option Button and Check Box.
• The config view for faceplates. It is therefore necessary to have the correct
"Language for non-Unicode programs" setting when configuring faceplates.
• The Display tool.
• The Tooltip property.
• The Element Browser and Expression Builder.

Resizing Code
When creating a graphic aspect you specify a graphic aspect category. The template
code associated with the specified aspect category is then copied to the new aspect.
The copied template code contains, among other things, the default behavior for
resizing of the graphic aspect. This code exists in UserControl_Resize, where there
is code, which repositions all constituent controls.
The code for resizing can be changed by the user. The following tags must be
removed to avoid the standard resizing code.
a. $$ABB_BEGIN_USERCONTROL_RESIZE before the
UserControl_Resize function.
b. $$ABB_END_USERCONTROL_RESIZE after the UserControl_Resize
function.
Reasons for doing this may be:
• The user wants another resizing behavior than the original behavior.
• Element performance can be improved by handwriting code optimized for the
specific situation.

98 3BSE030335-510
Section 3 Graphic Aspects Resizing Code

• The graphic aspect is to contain controls which are not handled correctly by the
template code, for example lists and tabbed controls. If such controls are used,
each loop must contain tests on the control type to allow each control type to be
handled correctly.
Do not assign Font property for the controls through Visual Basic code if the
standard resize code is used. The size of the fonts is controlled by standard resize
code and the result becomes undetermined if the code tries to affect the font. This
may cause random text sizes to be shown when the graphic is resized.
Change the Font property of the controls only through the Input Properties in the
Expression Builder. For more information on defining and assigning expressions
using the expression builder, see Expression Builder on page 34.

3BSE030335-510 99
Resizing Code Section 3 Graphic Aspects

100 3BSE030335-510
Section 4 Faceplate Framework

The faceplate framework is an aspect system with the intention to provide a uniform
and easy to configure way to create faceplates. The faceplates consists of three
runtime views and are used to monitor and control the process.

Reduced Faceplate View (optional). The contents have typically been optimized
to cover the most frequently used process operator actions.They are small in size to
be able to have several faceplates for different objects visible at the same time.

Faceplate View (mandatory). This view is intended to cover the normal process
operator actions. It is the default view. The faceplate elements used here have a
default size to fit into this view.

Extended Faceplate View (optional) . Contains functions and information


intended for the process engineer, or the advanced operator such as a tuning display.
Each faceplate also has a Configuration View, which is used to configure the three
runtime views, see Configuring the Faceplate on page 116 for more information. In
addition there is a Resource view for use by software developers only.
A faceplate aspect is typically created and added to the object type (see Create a
New Faceplate on page 114) and is often assigned to be the default aspect.
To make the newly created faceplate aspect to be the default aspect, see the manual
IndustrialIT 800xA, Operations, Operator Workplace Configuration
(3BSE030322*).

3BSE030335-510 101
Section 4 Faceplate Framework

Figure 32. Each Faceplate Focus on One Aspect Object

Selecting Different Views. The active faceplate view is indicated at the bottom of
the faceplate where the corresponding View selection button is pressed in. For non-
existing views the corresponding view selection button is dimmed. Simply click on
the View selection buttons to select view.
Examples of the three predefined faceplate views are displayed below.

Note that the normal view is the default size of the template for faceplates.
To adjust the size to reduced or extended see Layout Tab on page 118.

102 3BSE030335-510
Section 4 Faceplate Framework

Figure 33. Reduced Faceplate, Faceplate and Extended Faceplate View Example

Invoking a Faceplate Aspect. In Figure 34 the faceplate is launched by a left


mouse-click on a graphic element placed on a graphic display.
Another way of launching a faceplate is to select an aspect in Plant Explorer, and
right click the mouse to bring up the context menu, then select one of the three
runtime views.

3BSE030335-510 103
Faceplate Overview Section 4 Faceplate Framework

Click here to open up the default aspect i.e. a faceplate

Figure 34. Graphic Display

Faceplate Overview
From a configurator’s point of view, the faceplate is divided into a number of areas,
each separately configurable.
Read about the contents of the faceplate areas here and you will use the knowledge
later on in Configuring the Faceplate on page 116.

104 3BSE030335-510
Section 4 Faceplate Framework Faceplate Overview

Alarm control
Object Lock

Header Area
Indicators and
Aspect Links Aspect Link
Area

Faceplate Element
Area

Buttons Area
Apply Button
(dimmed in this view)

View selection Buttons

Figure 35. Faceplate Terminology

3BSE030335-510 105
Header Area Section 4 Faceplate Framework

Header Area
Each faceplate contains a Header Area, which consists of the following Faceplate
parts:
• Object lock control (optional)
• Object name (mandatory)
• Object description (mandatory)
• Alarm control (optional)

Object Lock Object Name & Alarm


Description Control

Figure 36. Example of a Header area

Table 15 describes the user profile used to control the visibility of the faceplate
header information.

Table 15. User Profiles for faceplate header

Name Description Values


HideFaceplateHeader Hides the object name and To hide the header information in the
String object description displayed in faceplate, select Local in Datasource
the header area of the and select the Value check box.
faceplate.

Lock Control
In environments where several operator workplaces can control the same objects the
Object Lock function will give one operator the sole right to operate one or several

106 3BSE030335-510
Section 4 Faceplate Framework Lock Control

objects. The Lock Control button is optional. The faceplate framework just reserves
space for it in the header area.
To configure the Object Lock function, copy an instance of the LockControl aspect
from the Graphics Structure to your object type. For more information about the
LockControl aspect see Lock Control on page 272. The LockControl aspect
interacts with the Lock Server. For configuration and use of the Lock Server, please
refer to the manual IndustrialIT, 800xA, System, Administration and Security
(3BSE037410*).
If Autolock is enabled the object will be locked from the moment the user opens the
faceplate. When the faceplate is closed, the Lock Status will revert to unlocked.
If the Object Lock function is controlled manually, the user will lock an object by
clicking the Object Lock push button, see Figure 36. In some cases the lock required
option may be enabled. Then all buttons and commands will be dimmed until the
user clicks the Object Lock button.
The following strategy is used for backward compatibility with the existing property
LOCK:
1. If there is an instance of the LockControl aspect on the object. The Lock Server
is used to handle object locking.
2. If a property LOCK exist for the object. This property controls the object
locking with or without support from the application.
3. If neither of the above exists object locking is not used.
For performance reasons if no LockControl aspect exists it is possible to avoid
searching for the existence of a property LOCK by unchecking the user profile
UseOfLockProperty. That is, for those not interested in using the object lock
functionality.
To switch between Autolock and manual lock, change the FaceplateAutoLockObject
profile value in the Graphic Profile Values UserProfile.

3BSE030335-510 107
Lock Control Section 4 Faceplate Framework

The graphic element in the graphic display is surrounded by a white frame on all
workplaces, indicating that the object is locked, see Figure 37.

Figure 37. Example of a Locked Graphical Element

The white frame is supplied by the graphic element. If a new graphic element is
created the support for the white lock frame is included. For existing graphic
elements the white lock frame has to be added manually. A rectangular Shape
control is used with BackStyle=Transparent, BorderWidth=3. The following
properties are assigned via the ExpressionBuilder tool:
BorderColor=FaceplateLockedByMe,
Visible=IIF(EnableInput and (.:Globl Properties Definition:ControlUseLock
and 1) and (.:Globl Properties Definition:ControlLockStatus and 1), true,false)

Figure 38. Property Settings in the Expression Builder

108 3BSE030335-510
Section 4 Faceplate Framework Lock Control

The Object Lock push button will have different appearance depending on the lock
state, see Table 16 or Table 17 (depending of the type of lock)..

Table 16. Lock Status Using the Lock Control Aspect.

Background
Lock status Button Icon
Color
Unlocked Raised Bluegrey

Locked by me Sunken White

Locked by Flat Yellow


[name of the
user who locked]

Table 17. Lock Status Using the Build in Lock.

Background Lock Property


Lock status Button Icon
Color Value
Unlocked Raised Bluegrey 00

Locked by me Sunken White 11

Locked by other Flat Yellow 01

If the object is locked by another operator no operation is possible until the lock has
been released. The possible ways to release an object lock is first the operator that
owns the lock can manually unlock it, or he can close the faceplate. The object lock
may time out after a default time of four minutes. A privileged user may also break
the object lock via the context menu the Lock Control.

3BSE030335-510 109
Alarm Control Section 4 Faceplate Framework

Alarm Control
The Alarm Control button is optional and indicates the alarm state of the object, and
it enables you to acknowledge the alarms. The alarm control is an aspect of type
graphic element. The faceplate framework just reserves space for it in the header
area of a faceplate and shows it if the object has an aspect by the name
AlarmControl. To simplify the alarm button configuration there is a default
AlarmControl aspect. For more information on the AlarmControl graphic element
refer to AlarmControl on page 270.

Indicators and Aspect Links Area


In this area of the faceplate you can allocate Indicators and Aspect Links.
(How to configure this area is described in Indicators Tab on page 122.)
Indicators show a label, or an icon, as the result of a configured expression, which
can include one or several object properties subscribed for.
The standard format for icons are 32x32 (normal Windows icon size).
Aspect links are buttons that act as shortcuts to bring up another aspect as an
overlap window.

Status indicators are typically configured to the left, and aspect links to the right

The maximum number of indicators and aspect links allowed in the status and
navigation bar is controlled by layout settings in the config view of the faceplate.
A default configured faceplate view has space for a total sum of 6 indicators and
aspect links. You can also configure the amount of rows to be displayed in the Status
and navigation bar area. For more info on how to configure this, see Layout Tab on
page 118.

Faceplate Element Area


Aspects are displayed in the faceplate element area, either alone or included in tab
groups. Primarily, faceplate element aspects are intended to be included in this area.
Other aspects may also be included.
The orientation of those aspects and/or tab groups can be either horizontal (the
default order) or vertical, but not both in the same faceplate aspect.

110 3BSE030335-510
Section 4 Faceplate Framework Buttons Area

Each tab in a tab group contains one aspect view. A scrollbar becomes visible when
there is not enough space to show all the tabs in a tabgroup.
The faceplate element area in Figure 39 contains 2 tabgroups ordered horizontally.
In order to see Limits tab, you would have to select it, since Block is currently the
active tab in the right most tabgroup.

Tab group 1 Tab group 2

Figure 39. Example of a Faceplate Element Area

Buttons Area
Buttons that control properties of the object can be inserted in the Buttons area.
The number of button positions shown per row depends on the width of the
faceplate view. The default number of button positions per row is six.
If a button is positioned at position 7 it is discarded if there is only one button row,
the default, or positioned first on the second row when there are more than one
button row configured.

3BSE030335-510 111
View Selection Buttons Section 4 Faceplate Framework

You can configure the Apply button to be visible or not. If visible, it is always
positioned to the right (static position). For information on how to configure the
Button area see Buttons Tab on page 127.
A button can have two different action types, direct or applied. Default value is
System Default. See Direct and Applied Action on page 162 for more information.

View Selection Buttons


Select faceplate view. If a view does not exist, the button representing that view is
dimmed.

Reduced Faceplate Extended Pin button


faceplate faceplate

Figure 40. View Selection Buttons

Pin Button
By default the faceplates are unpinned. The faceplate will not be replaced by
another faceplate if it is pinned. It means that if you have one faceplate on the screen
and wants to open another one, the first one will be exchanged. To make the new
faceplate appear in a new window, you can configure the faceplate to be pinned.
Follow the steps below to pin your faceplates:
1. Expand the Library Structure.
2. Select Default View Class, Faceplate System View Class.
3. Select the default aspect and open the config view.
4. A list appears where you select Pinned.
5. Change the value to Local and in the Boolean value area and enter Yes.

112 3BSE030335-510
Section 4 Faceplate Framework Support for Composite Object Types in Faceplates

With this configuration the faceplates will always be pinned in your Workplace.
It is also possible to set only one faceplate to be pinned. See figure below:

Pin Button

Figure 41. A Faceplate with the Pin Button

In this case the first faceplate on the screen is pinned. The next faceplate that is
brought up is placed in a second window. If you want a third faceplate to appear on
the screen, the second faceplate has to be pinned as well. Otherwise the second
faceplate will be exchanged by the third.

Support for Composite Object Types in Faceplates


Faceplates support composite object types in two ways.
When configuring faceplates you can address subobjects to composite objects. You
can configure indicators, aspect links and buttons for properties of subobjects to the
object for which you are configuring a faceplate, see Expression Syntax in
Faceplates on page 136.
You can also add an instance of Composite Object List to a faceplate. Composite
Object List list is a ready made Faceplate Element which presents all the subobjects
of a composite object, see Composite Object List on page 276.

3BSE030335-510 113
Create a New Faceplate Section 4 Faceplate Framework

Create a New Faceplate


To create a faceplate follow the steps below.
1. Select an Aspect object for the object type to be updated using Plant Explorer.
Suitable objects are typically found in the Object Type structure, for example
within the Control System Object Type Group. See figure below.

Figure 42. Select Aspect Object

2. Add an aspect by right-clicking in the Aspect area and choose New Aspect
from the Context menu. The New Aspect window is presented.
3. Select Faceplate aspect system, Faceplate aspect type, and finally the
Faceplate aspect category in the aspect list.

114 3BSE030335-510
Section 4 Faceplate Framework Create a New Faceplate

Figure 43. New Aspect Window

4. Preferably, do not change the name of the aspect, since typically it only exists
one faceplate per object type. Click Create. The created aspect is added to the
object’s aspect list.
To make the newly created faceplate aspect to be the default aspect, see the manual
IndustrialIT 800xA, Operations, Operator Workplace Configuration
(3BSE030322*).

3BSE030335-510 115
Configuring the Faceplate Section 4 Faceplate Framework

Configuring the Faceplate


This section explains how to configure the appearance and behavior of the three
faceplate runtime views. The configuration is done in the Config view. You are
required to have the Application Engineer role to configure faceplates.
The Config view for faceplates does not have full Unicode support and requires
the correct language setting when using Far East languages, see NLS Handling of
Far East Languages in Graphics on page 98.

Note that if the faceplate is Inherited (True), changes can only be made in the
object type.

116 3BSE030335-510
Section 4 Faceplate Framework Configuring the Faceplate

Figure 44. Open Config View

The Config view contains the following tabs:


• Layout Configuration of the faceplate geometry.
• Header Configuration of the object lock control and alarm control.
• Indicators Configuration of the Status and Navigation bar.
• Buttons Configuration of the Button area.
• Element Configuration of the faceplate element area.

3BSE030335-510 117
Layout Tab Section 4 Faceplate Framework

• Online Help Configuration of the help files.

Layout Tab
In the Layout tab you specify which of the three runtime views should be present
and their geometrical layout. The faceplate view is mandatory. There are check
boxes for including the Reduced and/or Extended faceplate views.
Enable/disable of faceplate views requires restart of Plant Explorer and Operator
Workplace.

Figure 45. Layout Tab with Default Values

Default runtime view to be launched when an Operator clicks on a graphics element


in a graphics display is the faceplate view, but this can be changed.
Once the faceplate is opened you can also change the view via the View selection
buttons.
There is also a choice whether to have horizontal or vertical orientation of the
faceplate element area.

118 3BSE030335-510
Section 4 Faceplate Framework Layout Tab

The default size of the faceplate element aspects is designed with the pre-configured
values of the faceplate width and height in mind. If you still want to make changes,
see Appendix C, Create New Aspect Categories with Templates for more
information.
Figure 45 displays the configurable parameters in the Layout tab which affect the
overall layout of the faceplate.
The update rate for subscribed properties for indicators in the Status and Navigators
area and for buttons in the Button area are initially set to 1 second. This value can be
configured with a new value specified in milliseconds. The update rate for a
faceplate element aspect is handled by each individual aspect themselves and is by
default set to 1 second. In other words, changing the update rate within the Layout
tab does not have any affect on the faceplate element aspects used.

3BSE030335-510 119
Header Tab Section 4 Faceplate Framework

Header Tab
In the Header tab (see Figure 46) you can configure override settings for how to
locate the Lock button and the Alarm button. These configuration settings are
performance related and can be used to speed up the call-up time of the faceplate.
From a functional point of view it is no longer required to make copies of the
LockControl and the AlarmControl aspects to the object type if it is okay to use the
standard aspects found in the Graphics Structure, below Graphic Tools -> Special.

Figure 46. Header Tab

Object Lock Button


In the Lock button policy area the settings below are available:
• Default search order - Uses the search order described in Figure 46 (to the
left).
• Override Standard LockControl - Make use of the LockControl aspect
present on invocation object, if it exists.

120 3BSE030335-510
Section 4 Faceplate Framework Header Tab

• Legacy lock handling - Used if there is a property LOCK visible on the


invocation object.
• Standard LockControl - Use the LockControl aspect located in the Graphics
Structure, below Graphic Tools -> Special.
If the Lock Service is enabled and ‘Default search order’ is configured and the
search ends up with the ‘No Lock button’ used, the faceplate becomes inoperable.

If the Lock Service is disabled only a search for legacy lock handling is
performed.

Alarm Control Button


In the Alarm button policy area the following settings are available:
• Default search order - Uses the search order described in Figure 46 (to the
right).
• Override standard AlarmControl - Make use of the AlarmControl aspect
present on the invocation object, if it exists.
• No alarm button - No alarm button is used.
• Standard AlarmControl - Use the AlarmControl aspect located in the
Graphics Structure, below Graphic Tools -> Special.

3BSE030335-510 121
Indicators Tab Section 4 Faceplate Framework

Indicators Tab
The Indicators tab allows you to configure which indicators and aspect links to
display in the status and navigation area of the faceplate. You can decide in which
position to display them, depending on the selected view.

Figure 47. Indicators Tab

Configuring Indicators
Table 18 displays the configurable parameters in the Indicators tab which affect the
Status and Navigation area in the faceplate.

122 3BSE030335-510
Section 4 Faceplate Framework Indicators Tab

Table 18. Indicators Table

Parameter Description
Icons/Labels The list of Icons/Labels used to represent the result of the
object properties subscribed for and specified in the
Expression field as an expression. If the result of the
expression is 0, Icon no. 1 is displayed. If the expression is
1, icon no. 2 is displayed, etc. See Figure 48 for an
example.
Expression A calculation which results in an integer value. The result
must be in the range from 0 to number of Icon/Labels
configured - 1. See Expression Syntax in Faceplates on
page 136 for more information.
Reduced pos Specifies the position of the indicator in the Reduced view
starting at position 1 and counted from left to right with
increasing numbers.

0 = Not used by this view.

The exact position of the indicator depends on No. of


indicators per row., and No. of indicator rows
Faceplate pos The position within the faceplate view.
Extended pos The position within the extended view.

Click in the Icons/Labels field, and a dialog box opens. Add the number of icons or
labels you want to use for each indicator. Each entry in the Labels dialog is
numbered from 0, 1,2 to N-1.
By clicking in the leftmost “grey” column you select an entire indicator row. Now
you can Delete the selected row or change its position up or down with the spin
buttons.

3BSE030335-510 123
Indicators Tab Section 4 Faceplate Framework

The result of the configured expression must be in the same interval as the number
of Icons/Labels. A trick is to add an empty icon/label at the first position to show
nothing as a default value when the result is zero.

Index 0

Index 1

Figure 48. Configuration of Icons/Labels

Indicators are preferably positioned to the left in the Status and Navigation area.
Example.
To configure the first icon/label to be shown, if a property LIMIT is below 50, and
the second icon/label to be shown if the value is above 50, set the expression for the
indicator to:
iif($'.:Control Connection:LIMIT' < 50,0,1)
The indicator appears in the following way, if the expression for the indicator is
wrongly set, or the expression or expression value causes an error condition.

Figure 49. Faceplate with Indicator during an Error Condition

124 3BSE030335-510
Section 4 Faceplate Framework Indicators Tab

Configuring Aspect Links


Table 19 displays the configurable parameters for the Aspect links, which are
preferably positioned to the right in the Status and Navigation area. An Aspect
Link is a button to be used as a shortcut to call up any type of aspect as an overlap
window. Most aspects use their Main view when presented, but this can be
specified.
For aspect links you can check the Use aspect icon check box, to get the aspect
icon as a graphical representation of the button, or select a specific icon or label.

Table 19. Aspect Links Table

Parameter Description
Object The object whose aspect should be displayed.
Aspect The aspect to be displayed as an overlap window.
View Selected view for the chosen aspect. If a view is selected,
the link can have no verb
AspectVerb Verbs connected to the aspect. If a verb is selected the link
can have no view.
Icon/Label The label, an icon or the aspect icon to be displayed on the
aspect link.
Label color The text color used if a label is used.
Reduced pos The position within the Reduced view.
See same parameter in Table 18 for more information.
Faceplate pos The position within the faceplate view.
Extended pos The position within the extended view.
FontSize The size of the text.

When clicking the Object field a dialog opens where an object has to be selected.
If the faceplate is configured in the Object Type Structure, only objects in the same
object type can be chosen. In all other structures it is possible to chose any object.

3BSE030335-510 125
Indicators Tab Section 4 Faceplate Framework

Aspect verb is an operation without parameters. The operation is pointed out using
an Aspect Link and is executed when the link icon on the faceplate is pressed.
Aspect verb enables the system configurator to through an Aspect Link, access for
example on-line help. This means that an on-line help page will show up when the
Aspect Link is pressed.
In the picture below the aspect Graphics Element was chosen and has one verb,
Edit.

Figure 50. Aspect Verb for the Aspect Graphic Element

When pressing the icon for the aspect link in the faceplate defined in the picture
above, the verb Edit will execute. That would be the same as opening the Graphic
Element aspect and pressing the Edit button. See IndustrialIT 800xA, Operations,
Operator Workplace Configuration (3BSE030322*) for more details on using
Global Verbs.

126 3BSE030335-510
Section 4 Faceplate Framework Buttons Tab

Buttons Tab
The Buttons tab allows you to configure a number of buttons for use in the Buttons
area of the faceplate. The behavior of the buttons is specified via the Action column
and is by default set to SystemDefault. See Direct and Applied Action on page 162
Currently only buttons of PushButton type are supported. These buttons have a
static graphical presentation. The button appears as sunken until the mouse button is
released and the same value is written each time the button is pressed.

Figure 51. Buttons Tab

Table 20 displays the configurable parameters for the Button area.

3BSE030335-510 127
Buttons Tab Section 4 Faceplate Framework

Table 20. Buttons Table

Parameter Description
Object The object whose property should be used.
Icon/Labels The label or icon used as caption.
Property name The object property used to set the value when the button is
pressed.
Property type The datatype of the selected object property (ReadOnly).
Property value The value to be set when pressing the button.
Enabled An expression specifying whether the button is enabled,
dimmed or invisible. No expression means that the button is
always enabled. [0 - dimmed, 1 - enabled, 2 - invisible].
Tooltip text Text describing the button when the mouse is on top of it.
Reduced pos The position within the Reduced view.
See same parameter in Table 18 for more information.
Faceplate pos The position within the faceplate view.
Extended pos The position within the extended view.
Action Sets direct or applied action. See Direct and Applied Action
on page 162. Default value is System Default.

Note that it is possible for buttons to overlap. More than one button can have the
same position. In this case, only one of the overlapping buttons should be visible,
that is only one button can have the expression value 1 or 0. Overlapping buttons
can be used to change the configuration of a faceplate in runtime, showing different
buttons with different configurations for different states.
To inactivate the Apply button for a view uncheck the Apply present check boxes
on the right side of the window.
The Apply button is always located to the right in the button area and can not be
repositioned.

128 3BSE030335-510
Section 4 Faceplate Framework Elements Tab

Elements Tab
The elements tab is used to configure the faceplate element area. Aspects can be put
in directly, or they can be organized in tab groups.

Figure 52. Elements Tab

Aspects of category Faceplate Elements are specifically designed to be used here,


but any aspect type can be used. A Faceplate Element aspect has a default size to fit
within the default size of a faceplate view to avoid unnecessary rescaling. The
ability to call up the default aspect with a left mouse click has been removed
because the faceplate is typically the default aspect.
By clicking in the Aspect column a drop down menu opens (see Figure 53). In this
you can select the aspect you want to be represented as a tab in you faceplate.

3BSE030335-510 129
Elements Tab Section 4 Faceplate Framework

Figure 53. The Aspect Drop Down Menu

Then click in the View column and select view.


Click in the Tab Group column and type an identifying string representing the
identity of a tab group. A simple number is suitable in most cases because the
identification string is not visible for any operator.
For example, enter “1” for the first tab group, enter “2” for the second and so on.
Each time you want to create tabs for the same tab group, you only have to use the
same tab group. The location of the tabs in a group is defined by the order among
them and can be altered using the arrow buttons in the upper left corner of the
element view.

130 3BSE030335-510
Section 4 Faceplate Framework Elements Tab

Figure 54. Configuration of Two Tab Groups

The result of the configuring in tabgroups will be according to Figure 55.

Figure 55. The Two Tabs as Seen in the Faceplate

3BSE030335-510 131
Elements Tab Section 4 Faceplate Framework

When you click in a cell in the Caption column, a dialog window according to
opens. In this dialog you can enter the Tab name (see Figure 55).

Label checked

Tab text

Figure 56. The Caption Dialog Box

The last column, User Roles, is used to define which category of users that shall be
allowed to see the tab. It is by default set to EveryOne, see Figure 57.

Only the users in the defined group can see the tab and its content. If the column
line is empty or specifies EveryOne, all users can see the tab.

132 3BSE030335-510
Section 4 Faceplate Framework Elements Tab

Figure 57. Defining of User Role for Faceplate Tabs

Table 21. The Elements Tab Columns

Parameter Description
Object The object whose aspect should be placed in the element
area.
Aspect The faceplate element aspect (or other aspect) placed in
the faceplate element area.
View Selected aspect view for the chosen aspect.
Tab group The tab group identity as a string e.g. as a numeric value
0,1,... The group identity is not shown anywhere.
Leave this field empty if you do not want the configured
aspect to be part of a tab group.
Caption The name of the tab.
User Roles Specifies who can see this tab. Default is EveryOne. Empty
field is also EveryOne.

3BSE030335-510 133
On-Line Help Tab Section 4 Faceplate Framework

On-Line Help Tab


The on-line help tab is used to specify which help text should be displayed when
pressing the F1 button from the faceplate.

Figure 58. On-Line Help Tab

• Object Type help


The help for the object type is displayed.
• Help Aspect References
Select the object and the help aspect.
• File Reference
Here you point out a helpfile (.chm) directly without going through a help
aspect. Browse to which help-file you want to point out and fill in the A-link to
point out a specific section in the helpfile.
See IndustrialIT 800xA, System, Configuration (3BDS011222*) for more
information on the help aspect types.

134 3BSE030335-510
Section 4 Faceplate Framework Internationalization of Faceplates

Internationalization of Faceplates
Label names, tooltip texts and the caption of used tabs in tab groups can be
internationalized.
Check the NLS Text Reference option button when a Labels/Icon dialog is
displayed, and click on the Browse button (see Figure 59).

NLS Text Reference checked

Click on the Browse button

Figure 59. How to Select the NLS Facility

A new dialog opens (see Figure 60). Select the Resource Manager aspect to be used
which contains a list of identifiers representing the wanted text. Select the wanted
identifier and press the OK button.

Figure 60. Text Reference

Now the same dialog box as before opens (see Figure 56 and Figure 59), but with
the native text included (see Figure 61).

3BSE030335-510 135
Expression Syntax in Faceplates Section 4 Faceplate Framework

Resource id
selected

Corresponding
text in selected
Locale.

Figure 61. Caption Dialog Box With Domestic Text

When you click on the OK button, the selected text will be changed in the faceplate
tab.

Expression Syntax in Faceplates


Expressions in faceplates are used either to give as result a value 0, 1 or 2 for the
Enabled field for a button, or to return an integer in a limited range from 0 to the
number of configured icon/labels -1. Expressions returning other values are
considered as invalid.
The syntax of an object property reference is:
$’ObjectReference:aspect:property’
A dot ‘.’ as an object reference indicates the invocation object for a faceplate. For
object properties of an object that is a formal instance of a composite object type,
the full object path must be added:
$’./FormalInstanceName:aspectName:propertyName’
The following are two examples of expressions in faceplates:
$’.:Control Connection:VALUE’ * 2
IIF($’.:Tanklimit:limit’ < 100, 0, 1)

136 3BSE030335-510
Section 4 Faceplate Framework Security

Absolute references to objects can also be used. See the following examples:
$’ObjectReference:aspectName:propertyName’
$’ObjectReference/FormalInstanceName:aspectName:propertyName’

Only object paths where the first object has a unique name can be referenced
using absolute references.
The aspect name in a syntax of an object property reference can be omitted,
although it is not recommended to omit the aspect part because of performance
reasons. In this case every aspect on the invocation object is searched for looking for
the requested property instead of the specified one.
The syntax of expressions used in faceplates differs from the syntax used for graphic
aspects in general (See Expressions on page 62).

Security
Faceplates support security. A hard security check is also done by the OPC, making
sure that no read or write operation is performed without the user having the
required permissions.

Operations
There are two security operations in faceplates, further explained in Table 22. They
are used to control whether the user is allowed or denied to see different views or
configure the aspect.

Table 22. Faceplate Security Operations

Operation Description
Read The user has permission to see the main and config views.
Write The user has permission to modify the aspect

3BSE030335-510 137
Operation/Permission Mapping on Faceplate a Aspect Category Section 4 Faceplate Framework

If a user does not have configure permissions it won’t be possible to modify the
faceplate. When the Config view is selected in the context menu by a user with less
permissions, it would for example be possible to see all the values in the Layout tab,
but not to modify them. It is not possible to change any of the values on the
parameters, and all the buttons and choices are dimmed.
When a faceplate is brought up in runtime, the aspect pointed out by the aspect link
is dimmed if the user is not granted read operation on the aspect.
A button is dimmed if the user is not granted modify operation the aspect object
property the button is configured to perform the write operation to.

Operation/Permission Mapping on Faceplate a Aspect Category


Figure 62 shows the mapping between operations and permissions in a faceplate
aspect category. The user needs read permissions to see the faceplate and configure
permissions to modify it.

138 3BSE030335-510
Section 4 Faceplate Framework Operation/Permission Mapping on Faceplate a Aspect Category

Figure 62. Permission/Operation Mapping on a Faceplate Aspect Category

3BSE030335-510 139
Operation/Permission Mapping on Faceplate a Aspect Category Section 4 Faceplate Framework

140 3BSE030335-510
Section 5 Configuring Property Elements

This chapter describes configuration of Property Elements. Property Elements are


typically used when implementing Faceplate Elements, but can be used in any
graphic aspect.
Property Elements are graphic aspects that implement input properties of the
ObjectPropertyRef property type, see Property Reference Properties on page 158.
Property Elements are normally created using the Property Element Aspect
Category. Property Elements often implement both presentation and input.
This chapter describes basic mechanisms used when implementing Property
Elements. Before starting the creation of a property element, read also Section 6,
Configuring Faceplate Elements, to read about functions that property elements
typically should have.

This chapter assumes some knowledge of Visual Basic programming.

3BSE030335-510 141
How to Write to the Properties of an Aspect Object Section 5 Configuring Property Elements

How to Write to the Properties of an Aspect Object


To perform a write operation in a Property Element, to an aspect object property use
code similar to the example below.

'Declaration
Private WithEvents m_Property As ABBProperty
......
Private Sub SomeSub()
....
' Set up the property proxy
' "ThePropertyRefProperty" is the name of the
' ObjectPropertyRef property
Set m_Property = _
m_sc.GetObjectPropertyProxy("ThePropertyRefProperty")

'Perform the write operation


m_Property = NewValue
....
End Sub

The ABBProperty object is by default configured for asynchronous write. When the
write is complete the WriteComplete event is received.

'Write complete event example


Private Sub m_Property_WriteComplete()
On Error GoTo Error_m_Property_WriteComplete
' Do something useful
Exit Sub
Error_m_Property_WriteComplete:
Call ReportError("m_Property_WriteComplete", Err.source,_
Err.Description, "", 0)
End Sub
.....

142 3BSE030335-510
Section 5 Configuring Property Elements Configuring Direct Entry Windows

Configuring Direct Entry Windows


This section deals with how to activate and configure Direct Entry Windows
(DEW).
There are two kinds of objects involved in handling Direct Entry Windows:
• The PgDEW object
The PgDEW object is a data type neutral object that is used for controlling the
lifetime of a Direct Entry Window and operator event handling. The
communication with PgDEW is datatype independent.
• Objects to control the different datatypes are displayed in Table 23.

Table 23. Direct Entry Windows

Name DEW
PgNumericDEW

PgIntegerDEW

PgStringDEW

PgBoolDEW

PgTimeDEW

PgDateDEW

When a Direct Entry Window for a specific data type is needed, the corresponding
data type specific object is created.

3BSE030335-510 143
Positioning of the Direct Entry Window Section 5 Configuring Property Elements

Positioning of the Direct Entry Window


This section describes methods that can be called to control the position of a Direct
Entry Window. The methods are implemented by both PgDEW and the data type
specific objects.
The distances X and Y are always given in pixels.

Position the DEW to the Right of a Control. The PositionRightOf method is


called when you want to position the DEW to the right of the control. The distance
is given between the upper/right corner of the element and the upper/left corner of
the DEW (see Figure 63 below):

X
Y

Figure 63. How to Configure a DEW to the Right of the Control

Position the DEW Below a Control. The PositionUnder method is called when
you want to position the DEW below the control. The distance is given between the
lower/left corner of the element and the upper/left corner of the DEW (see Figure 64
below):

144 3BSE030335-510
Section 5 Configuring Property Elements Positioning of the Direct Entry Window

X
Y

Figure 64. How to Configure a DEW Below the Control

Position the DEW relative to a graphic aspect. The PlaceAtPosition method is


called when you want to position the DEW in relation to the upper left corner of the
configured graphic aspect (container). The distance is given between the upper/left
corner of the element and the upper/left corner of the DEW (see Figure 65 below).

Y
X

Figure 65. How to Configure a DEW Relative to Graphic Aspect

3BSE030335-510 145
Controlling the Lifetime of the Direct Entry Window Section 5 Configuring Property Elements

Controlling the Lifetime of the Direct Entry Window


The life time of a Direct Entry Window is controlled by keeping a reference to an
object representing the Direct Entry Window and releasing it when the Direct Entry
Window is to be released.
The typical case is that the lifetime is controlled by keeping a reference to the
PgDEW object:
One example of setting up a reference to a DEW is by doing it in the
OnMouseDown event from a primitive that implements automatic creation of the
Direct Entry Window:

Private WithEvents m_DEW As PgDEW

Private Sub Bar1_OnMouseDown(..., ByVal autoDew As Object)


...
Set m_Dew = autoDew
....
End Sub
To remove the Direct Entry Window, the reference is set to nothing, this is typically
done in the m_sc_DoCancelInputSession Event:
Set m_Dew = Nothing

Creating a Direct Entry Window from Visual Basic Code


The following code gives an example of how to create and handle a Direct Entry
Window from Visual Basic code. A reference to PgDirectEntryWindow 1.0 Type
Library has to be added.

Private WithEvents m_DEW As PgDEW

Private Sub CreateNumericDEW()


'Create local instance of typed DEW object
Dim NumericDEW As PgNumericDEW
Set NumericDEW = New PgNumericDEW

'Set min. and max values


NumericDEW.SetMinMax -1.5, 2.2
'Enable limit checking and set stepsize to 0.3

146 3BSE030335-510
Section 5 Configuring Property Elements The OnChange Event

NumericDEW.EnableLimits True, 0.3


'Position the dialog
NumericDEW.PositionUnder Me, 110, 10, False
'Show the dialog
NumericDEW.Show True

'Get the non-typed DEW


Set m_DEW = NumericDEW.GetDEW
' Release the typed DEW.
' Lifetime of the DEW is here after controlled by m_DEW
Set NumericDEW = Nothing
End Sub

The OnChange Event


Direct Entry Windows generates the OnChange event whenever the user changes
the entered value. This event can be used to enable or disable the apply button and
making sure that an input session does not time out. More information about this is
available in Responding to Data Entry Operations on page 155.

Controlling a Direct Entry Window via Graphic Primitives


Some graphic primitives support automatic creation of DEWs. Set the AutoDEW
property to True to activate this function. In order to allow a graphic aspect to gain
control over the Direct Entry Window, you should use code according to the
following example:

Private WithEvents m_DEW As PgDEW

Private Sub Bar1_OnMouseDown(..., ByVal autoDew As Object)


..
Set m_Dew = autoDew
...
End Sub

3BSE030335-510 147
Stepsize and limits in the PgNumericDew Direct Entry Window Section 5 Configuring Property

Graphic primitives that support auto creation of a Direct Entry Window also support
positioning of the DEW. The AdvantNumeric primitive for example, has the
following properties that controls the position of the Direct Entry Window:
• DisplacementX - controls displacement in the X direction
• DisplacementY - controls displacement in the Y direction
• RightOf - Boolean that control whether the created Direct Entry Window
should be place right of (True) or below the control (False)
Graphic primitives that support auto creation of a Direct Entry Window all have the
EnableInput property. A Direct Entry Window is only created if EnableInput
is set to True.
For the graphic primitives AdvantBar and PgBar, setting EnableInput to true has
an additional effect. The code described above has also to be added. The bars then
shows the transparent “drag handle” to inform the user that input is enabled. When
the user left-clicks in the Bar, the Direct Entry Window is displayed and the drag
handle transforms to a highlighted state.

Stepsize and limits in the PgNumericDew Direct Entry Window


The numeric Direct Entry Window supports interactive operations for increasing
and decreasing its value. The quantity by which the value increases or decreases is
determined by the stepsize parameter.
There are several methods a user can use to increase or decrease the value:
• Click the spin buttons (up and down arrows) in the Direct Entry Window.
– The value is increased/decreased by stepsize
• Use the up and down arrow keys on the keyboard.
– The value is increased or decreased by stepsize
– Holding the shift key down, while pressing the up and down arrow keys on
the keyboard, increases or decreases the value by 10 * stepsize.
– Holding down the control (ctrl) key, while pressing the up and down arrow
keys on the keyboard, increases the value by a 10th of stepsize.
• Use the Page Up and Page Down keys on the keyboard.

148 3BSE030335-510
Section 5 Configuring Property Elements Changing Font Size in Direct Entry Windows

– The step is 10*stepsize.


Step size is also set when calling the SetMinMax function. For example when auto
creating a Direct Entry Window using a PgBar primitive, the stepsize is set to
(RangeMax - RangeMin)/100.
The call:

m_NumericDew.SetMinMax - 10, 120

sets the max value to 120 and the min. value to -10 and the stepsize to 1.3.
The stepsize can be adjusted by calling the EnableLimits function. The call

m_NumericDew.EnableLimits True, 1.0

sets the stepsize to 1.0 while the previously set limits are maintained. The call

m_NumericDew.EnableLimits False, 2.0

disables the max and min. limits while the stepsize is set to 2.0.
Note that the examples above requires a typed DEW though these methods are
NumericDEW specific. A typed DEW can be retrieved from an untyped one using
the GetTypedDew method.

Changing Font Size in Direct Entry Windows


The default font size in Direct Entry Windows is 14pt. To change the font follow the
steps below:
1. Go to the User Structure.
2. Select a User in the Administrator’s Group.
3. Select the configuration view of the Graphics Profile Values aspect.

3BSE030335-510 149
Changing Font Size in Direct Entry Windows Section 5 Configuring Property Elements

4. In the Name area select DirectEntryWindowFontSize and Base rule. Mark


Local and enter the wanted font size in the Value field. See Figure 66.

Figure 66. Changing Font Size in Direct Entry Windows

5. Click Apply. Plant Explorer Workplace must be shut down and opened again
for the changes to take effect.
6. An example of a Direct Entry Window with font size 18pt is shown in
Figure 67 below.

Figure 67. Direct Entry Window Font Size 18pt.

150 3BSE030335-510
Section 5 Configuring Property Elements Automatically Invoked Direct Entry Windows

Automatically Invoked Direct Entry Windows


The property element InputField is prepared with a special quality, which allows its
direct entry window to pop up automatically. The operator may click at an element
in a graphic display to invoke a faceplate. If a faceplate element in the faceplate
contains an instance of an InputField object, which is set up for automatic
invocation of its DEW, then the DEW is invoked directly. The operator does not
need to click at the input field before entering a new value.
The following properties are used to control DEW invocation.

Table 24. DEW Invocation Properties

Name Description
ActivateCondition This property should be connected to an expression, which
sets it to true when data has been received via data
subscription.
DefaultActivation This property is set to a value, which controls the DEW
activation policy. Values are:
• Deactivated - Automatic DEW activation is not used.
• Activated - Automatic DEW activation is used. The DEW
is invoked the first time that the ActivateCondition
property changes from false to true.
• Reactivated - The DEW is invoked every time that the
ActiveCondition property changes from false to true.
• SystemDefault - The activation policy is controlled by
the DEWActivation user profile value.

The following is an example of an expression, which could be connected to the


ActivateCondition property:
.:myAspect:ManMode And .:myAspect:ManMode.QualityGood
In this case the DEW will be invoked only if the represented object is in manual
mode (Property ManMode = True). The test on QualityGood ensures that the DEW
is not invoked before Max and Min properties have well defined values in case these
are retrieved using data subscription. If several InputField elements are used in one
faceplate then all but one should have the DefaultActivation property set to
Deactivated. Deactivated is the default value.

3BSE030335-510 151
Visual Basic Error Handling Section 5 Configuring Property Elements

Visual Basic Error Handling


The writer of Visual Basic code, should ensure that errors that may occur during
execution of the code, are handled in a proper way.
A template for handling error code follows.

Private Sub MySub_DoApply


On Error GoTo Error_MySub_DoApply
‘MySub code here
....
Exit Sub
Error_MySub_DoApply:
Call ReportError(“MySub_DoApply”, Err.source,_
Err.Description, ““, 0)
End Sub

The ReportError method reports the errors as Operator Messages.

Input Session Handling


Input sessions is a concept that is used to control input operations. An input session,
in this case means an input operation that is carried out with applied action, see
Direct and Applied Action on page 162.
Input sessions are often used to control the lifetime of a Direct Entry Window. Then,
typically an input session is in progress as long as the Direct Entry Window is
visible. Input sessions are not limited to the use of Direct Entry Windows though.
An input session can also be used to control an input operation in which for example
a PushButton property element is used, and applied action is requested for it, see
Direct and Applied Action on page 162.
Input sessions are typically started by clicking at a click sensitive primitive. A
Direct Entry Window may pop up as a result. The input session is then finished
either because an apply operation, see Apply Operation on page 162, was performed
or because the input session was terminated by performing an Cancel operation, see
Cancel Operation on page 163.

152 3BSE030335-510
Section 5 Configuring Property Elements Starting an Input Session

A graphic aspect controls sessions by using the instance of the


PgSubscriptionControl with the name m_sc that is present in every graphic aspect.
Sessions can be used in graphic aspects of any aspect category. However, the aspect
categories Faceplate Element and Property Element are prepared to simplify the
implementation of input sessions. In a newly created Faceplate or Property Element
there is code present that implements some calls using sessions and some code with
helping comments to make the implementation right.
In the following sections parts of the code, relevant for session handling is
presented. Some of the code, presented has been uncommented.

Starting an Input Session


The following Sub shows how to start an input session and to trigger the session
time-out. The session is started in the "Control"_OnMouseDown event. The text
"Control" must be substituted with the name of the element that is clicked at.

Private Sub "Control"_OnMouseDown( .... )


....
m_sc.StartInputSession
m_sc.TriggerSessionTimeout
...
End Sub

Some lines have been removed for clarity in the above code.
The call m_sc.StartInputSession starts the input session. The effect is:
• If there is already an input session in progress, it is terminated before the new is
started.
• It directs the m_sc_DoApply event, see below, to the graphic aspect that has
started the input session when the operator performs an apply operation.
The call to m_sc.TriggerSessionTimeout triggers the session time out.
After the time-out period (currently fixed to 30 seconds), the input session is
cancelled. The m_sc.TriggerSessionTimeout should be called repeatedly on
every operator action while the session is in progress, to keep it alive.

3BSE030335-510 153
The DoApply Event Section 5 Configuring Property Elements

The DoApply Event


When the user performs the apply operation, the m_sc_DoApply event is triggered
to allow the element to react to the apply operation. You probably want to write a
value to an object. The code example below shows how this is done.

Private Sub m_sc_DoApply()


On Error GoTo Error_m_sc_DoApply
Set m_Property = _
m_sc.GetObjectPropertyProxy("PropRef")
m_Property = m_DEW.GetValue
Exit Sub
Error_m_sc_DoApply:
Call ReportError("m_sc_DoApply", Err.source,_
Err.Description, "", 0)
End Sub

The DoCancelSession Event


Whenever the input session is cancelled, the m_sc_DoCancelInputSession
event is triggered. In the code example below, the effect of the cancel operation is
that a Direct Entry Window is released.

Private Sub m_sc_DoCancelInputSession()


On Error GoTo Error_m_sc_DoCancelInputSession
Set m_DEW = Nothing
Exit Sub
Error_m_sc_DoCancelInputSession:
Call ReportError("m_sc_DoCancelInputSession", _
Err.source, Err.Description, "", 0)
End Sub

154 3BSE030335-510
Section 5 Configuring Property Elements Responding to Data Entry Operations

Responding to Data Entry Operations


While an input session is in progress, the user may repeatedly change the value that
is to be entered when the apply operation is performed. The following code shows a
typical case where actions are taken in response to the user entering a value in a
Direct Entry Value.

Private Sub m_DEW_OnChange(ByVal Value As Variant, ByVal Valid


As Boolean)
On Error GoTo Error_m_DEW_OnChange
m_sc.EnableApplyButton Valid
m_sc.TriggerSessionTimeout
Exit Sub
Error_m_DEW_OnChange:
Call ReportError("m_DEW_OnChange", Err.source,_
Err.Description, "", 0)
End Sub

This callback is received whenever the entered value in the DEW is changed.
The call m_sc.EnableApplyButton Valid enables or disables the apply button,
depending on the Valid flag, that is whether the entered value is correct, see
Validation of Input on page 164.
The call m_sc.TriggerSessionTimeout re-triggers the session time-out.

3BSE030335-510 155
Ending an Input Session When Performing an Apply Operation Section 5 Configuring Property

Ending an Input Session When Performing an Apply Operation


An input session is not automatically ended as a result of an apply operation.
Code has to be entered to achieve that, if it is the desired behavior. In many cases, to
improve the interactive behavior of the input operation, the canceling of the input
session is delayed until the property write operation is finished.
In the following example, the Direct Entry Window is not removed until the write
operation has completed.

Private Sub m_Property_WriteComplete()


On Error GoTo Error_m_Property_WriteComplete
m_sc.CancelInputSession
Exit Sub
Error_m_Property_WriteComplete:
Call ReportError("m_Property_WriteComplete", _
Err.source, Err.Description, "", 0)
End Sub

The DoEnableApplyButton Event


The input session handling provides support for implementing Apply buttons as the
m_sc_DoEnableApplyButton event is received by every element when a request
to enable or disable the apply button is made. This event is for example used by the
Apply property element.

Broadcasting to Sibling Elements


There is a broadcasting mechanism that allows an element to send an event to all
sibling elements, that is all elements with the same direct parent as the sending
element. Sending the event is done by calling the BroadcastSiblingEvent
method of the elements PgSubscriptionControl. Receiving the event is done by
implementing the OnSiblingEvent event in receiving elements.

156 3BSE030335-510
Section 6 Configuring Faceplate Elements

Faceplate Elements are used in Faceplates. Faceplate elements do not only support
presentation of data, but also allow a user to perform operations towards a
supervised and controlled process.
This chapter describes the preferred procedure for configuring Faceplate Elements
which involves the usage of Property Elements. Using Property Elements, the
creation of Faceplate Elements is greatly simplified, as it requires little or no VB-
code to handle input. The property elements encapsulates the implementation of
basic mechanisms such as input session handling and security handling.
It is possible to configure Faceplate Elements without the usage of Property
Elements by using the basic mechanisms described in Section 5, Configuring
Property Elements. If you need to implement Faceplate Elements this way, you
should also read Configuring Faceplate and Property Elements Using Basic
Mechanisms on page 166.
Faceplate Elements should typically be created using the Faceplate Element aspect
category, even if the Faceplate Framework supports showing aspects of any category
as “faceplate elements”. One feature of the Faceplate Element aspect category is
that faceplate elements created from it does not support “invoking the default
aspect” by left clicking it. The reason is that the Faceplate, containing the Faceplate
Element typically is the default aspect.
Property elements used in the design of Faceplates Elements may either be built in,
(provided as part of Graphics), or be implemented by the user by using mechanisms
described in Section 5, Configuring Property Elements. Following sections describe
built in property elements and descriptions of common characteristics of Property
Elements.

3BSE030335-510 157
Built in Property Elements Section 6 Configuring Faceplate Elements

Built in Property Elements


Under the Subelement library tab in the Graphic Builder you find nine (9) pre-
defined Property Elements. In Figure 68 below, you can see the predefined
property elements.

Obsolete item
ApplyButton

CancelButton Indicator

CheckBox OptionButton

InputField PushButton
ToggleButton
Ibar

Figure 68. Predefined Property Elements

Property Reference Properties


Each Property Element has at least one property of the ObjectPropertyRef type,
see ObjectPropertyRef Properties on page 67. ObjectPropertyRef properties allow
you to parameterize property elements with references to properties of aspect
objects in the system.
Assigning a reference value to an ObjectPropertyRef property is done using the
Properties window. Clicking the ObjectPropertyRef property in the Properties
window invokes a property page that supports browsing to the desired aspect object
property, see Figure 69.

158 3BSE030335-510
Section 6 Configuring Faceplate Elements Property Reference Properties

Figure 69. Property References

Many built in property elements, like the IBar element, support presentation of
process values. The primary sources of data for these element are the object
properties to which references are set up using the ObjectPropertyRef properties.

3BSE030335-510 159
Assigning an Override Expression to the ObjectPropertyRef Property Section 6 Configuring

Assigning an Override Expression to the ObjectPropertyRef Property


In the normal case, expressions within a property element retrieve values from
aspect object properties to which references have been set up by the user of the
property element.
There is yet another possibility available to the property element user. Values
retrieved by expressions within the property element, can be overridden. This is
done by assigning expressions to the elements ObjectPropertyRef properties.
Expressions inside the property element retrieves, in this case, not the value of the
referenced aspect object properties, but values provided by expressions assigned on
the outside of the property element to its ObjectPropertyRef properties.
ObjectPropertyRef properties are special in this, that they can be assigned both
static reference values and expressions and, in that case, both are valid at the same
time. Table 25 describes 3 relevant combinations of assignments to an
ObjectPropertyRef property.

Table 25. Assignments to Properties of ObjectPropertyRef Type

Assignments Function
Assign a property reference using the Write (input) operations and the
property window presentation function both use the
property reference
Assign an expression using the The presented data is received from the
Expression Builder expression. Only local input is possible,
see section Validation of Input on page
164 and Local Data Entry on page 165.
Assign a property reference using the Write (input) operations use the property
property window and an expression reference but the presented values is
using the expression builder received from the assigned expression

A number of built in property elements have a boolean presentation capability. For


example, the PushButton element shows the state of the referenced variable when
the IndicateValue property is set to true. The PushButton stays in when the value of
the referenced variable is the same as the value written, when pressing the
PushButton.

160 3BSE030335-510
Section 6 Configuring Faceplate ElementsSupplying Data Quality Information to Property Elements

It should be noted that the type of the referenced variable need not be Boolean. It
can be any supported data type. Yet, when overriding the reference of the
ObjectPropertyRef, by assigning an expression, this expression should always
provide a Boolean value.

Supplying Data Quality Information to Property Elements


Many property elements possess the ability to indicate bad quality of the data
retrieved using an ObjectPropertyRef property.
If the ObjectPropertyRef property has not been overridden by an expression, the bad
quality presentation is automatic. On the other hand, if the value presented is
provided through an expression, the element does not automatically know whether
the presented value should be regarded as good or bad. To cope this, many property
elements have a property called OpcStatus.
The OpcStatus property is intended to control the error presentation of the property
element, in case the value presented is provided through an expression. In this case
the OpcStatus property should be connected to the QualityCode sub property of the
aspect object property providing the error information.
An error state in the presented object must anyhow be provided using the AppError
property.

Error Presentation
Property elements, that present data, indicate bad or uncertain data using the
standard presentation for uncertain and bad data, see error presentation in Graphic
Primitives on page 213. That is, an uncertain value is crossed over with a single line.
Replacing the value with “XXX” indicates a bad value.

3BSE030335-510 161
Direct and Applied Action Section 6 Configuring Faceplate Elements

Direct and Applied Action


Input operations performed by property elements can either be one-step or two-step
operations. In this document, one-step operation is called direct operation, and two-
step operation is called applied operation.
With direct action is meant that a write operation towards an object property is
performed directly when the user clicks at a button. When an applied action is
performed, the write operation is postponed until the user performs an apply
operation.
Some property elements, like the Input Field element can only perform applied
operations. Other elements, like the Push Button, either performs applied or direct
actions depending on the configuration. Property elements in the latter category
posses the Action property that can have either of following values:
• SystemDefault (default)
• Direct
• Applied
The SystemDefault value means that a user profile value, the AppliedButtonAction
profile value in the Graphics Profile Values UserProfile, determines whether the
action is direct or applied.

Apply Operation
An operator can perform an apply operation in several ways:
• By clicking the apply button in the faceplate.
• By clicking on an instance of the property element ApplyButton in a graphic
aspect.
• When the operator presses the Enter key on the keyboard.
In addition, it is possible to create a “custom implementation” of the apply operation
by calling m_sc.RequestApply in an element based on any event.

162 3BSE030335-510
Section 6 Configuring Faceplate Elements Cancel Operation

Cancel Operation
An operator can perform a Cancel operation in several ways:
• By pressing the Esc key on the keyboard
• By waiting until the input session times out (30 seconds)
• By clicking on an instance of the Cancel property element.
• By clicking on the background of a graphic aspect when an input session is in
progress.
• By changing to another tab in a faceplate when an input session is in progress.

Distinction Between Current and Entered Value


There is a general requirement that while performing an input operation there must
be a clear distinction between an operator’s entered value and the current value of
the process, i.e. the user should typically see both values in parallel.
This requirement is especially relevant in cases when applied action is used.

An input operation is started when the user clicks at the property element and it
lasts until the write operation to the process is completed, or it is cancelled.
For property elements that use a Direct Entry Window (DEW), the requirement is
not a problem. The user sees the entered value in the DEW until the input operation
is completed.
For ToggleButton and PushButton (with property IndicateValue set to true) it is
indicated that an operation is in progress by dimming the button. For example, when
clicking at either button, the button immediately changes state to indicate the
desired value, but the button is dimmed until the input operation is completed. The
dimming thus indicates to the user that the value indicated by the position of the
button is not the current value of the process.
The CheckBox and OptionButton elements, does not indicate that an operation is in
progress. When an input operation is not in progress, either element reflects the state
of the process. When the user clicks at an element, it immediately changes to reflect
the desired value of the process.

3BSE030335-510 163
Input Operations Independent of Subscribed Data Section 6 Configuring Faceplate Elements

If you think the distinction between current and entered values is important, you
should not use CheckBox and OptionButton elements (and neither PushButton
and ToggleButton elements).
Use other constructions, where there is a separation between the presented value
and the entered value.

Input Operations Independent of Subscribed Data


Some users may have the requirement that input operations must not be affected by
subscribed data. Some property elements do not comply with this requirement. As
an example, the ToggleButton element performs either a set operation or a reset
operation depending on the value subscribed from the process. Another example is
the PushButton element with the Step property set to true. The element then
performs increment/decrement operations by adding the increment value to current
value.

Users that do not find it acceptable that input operations are affected by subscribed
data should use other constructions.

Validation of Input
Direct Entry Windows (DEW) and Property Elements check operator entered
values. This is to verify that those values are formally correct. The Apply button is
dimmed until the operator-entered value is valid.
Property elements also allow hosting elements (elements instantiating them) to
perform additional validation, in case applied action is used. Whenever the entered
changed, e.g. by typing in a DEW, the OnChange event is sent to the hosting
element:
Public Event OnChange (ByRef value As Variant, ByRef valid As
Boolean)
The valid flag reflects if the entered value is formally valid The hosting element
can in addition determine that the entered value is not valid. The client then sets the
valid flag to false. The effect is that the apply button is not enabled.

164 3BSE030335-510
Section 6 Configuring Faceplate Elements Local Data Entry

Before a write operation is performed by a property element, the OnApply event is


sent to the client element:

Public Event OnApply (ByRef value As Variant, ByRef cancel As


Boolean)

Note that, in spite of the event’s name, the event is sent also when direct action is
used, just before the write operation is to be performed.
By setting the cancel parameter to true in response to the OnApply event, the client
element can inhibit the write operation.

Local Data Entry


The OnApply event presented in section Validation of Input on page 164 allows
property elements to be used for data entry operations that are not necessarily
directed to an aspect object property. By leaving the ObjectPropertyRef properties
of a property element empty, and implementing the OnApply event, the hosting
element can become the target of the entered value.
The property element still encapsulates details such as DEW handling.

Enabling Write Operations


Property elements visually indicate (by dimming or not raising) to the user whether
write (input) operations are enabled or not.
The EnableInput property must be set to true to enable input. In addition property
elements also test the WriteAccessGranted subproperty of object properties to
which write operations are to be performed.
The WriteAccessGranted subproperty reflects if the property is
• writable by its nature.
• writable from a security point of view.

3BSE030335-510 165
Option (Radio) Button Behavior Section 6 Configuring Faceplate Elements

Option (Radio) Button Behavior


The option button behavior can be implemented by using the OptionButton element,
but also by using the PushButton elements with the IndicateValue property set to
true.
Option buttons are typically collected into a group, which means that only one of
the buttons can be activated at the time. Grouping is implemented by connecting
several buttons to a common process state, e.g. to one process variable. When direct
action is used, this is often sufficient as, after changing the common process state by
pressing a variable of the group, all other buttons of the group change automatically.
When applied action is used it is not sufficient just to connect the buttons to a
common process as, in this case, the process state is not change until an apply
operation is performed.A local option button group should be defined, in addition to
the common process state to provide local feedback.
A local option button group is defined by setting the OptionButtonGroup property
for all buttons in the group to the same number. Buttons with the
OptionButtonGroup property set to zero (0) are not part of a local group.

Configuring Faceplate and Property Elements Using


Basic Mechanisms
This section contains some specific details that need to be considered when
implementing Faceplate Elements without using Property Elements.

Support in the Faceplate Aspect Category


Faceplate Elements created from the Faceplate Element category has by default the
following characteristics:
• when you left-click on a Faceplate Element, the default aspect is NOT invoked,
in contrast to other graphic elements. This is to avoid re-invoking of the
faceplate (as it is typically the default aspect of the presented object).
• Faceplate Elements have support for communication with the Faceplate
Session Framework, see Input Session Handling on page 152.
The Faceplate Element Aspect Category provides code that is ”commented out”,
that is intended to help you add the right code when not using property elements.

166 3BSE030335-510
Section 6 Configuring Faceplate Elements How to Write to the Properties of an Object In Faceplate

How to Write to the Properties of an Object In Faceplate Elements


It is possible to facilitate writing to properties of an aspect object from any object
aware graphic aspect by defining a proxy for it. This mechanism is typically used in
faceplates implemented without using property elements. The proxy object is of
type ABBProperties and is part of the Aspect Object Automation model.
In order to add a proxy for an aspect object, you have to make sure that a reference
to that object exists in the object list. For more on object lists see Object List on
page 46.
Select the object reference, bring up the context menu and select Properties. This
brings up the dialog according to Figure 70.

Type an
Object Proxy
name here

Figure 70. Object Reference Dialog Box

In the Object Proxy Name input field, at the bottom of the dialog box, you add a
proxy name (e.g. m_Object). This gives you a representation of the object in the
Visual Basic code pane.
The declaration looks like:

Private WithEvents m_object As ABBProperties

3BSE030335-510 167
How to Write to the Properties of an Object In Faceplate Elements Section 6 Configuring Faceplate

To write to a property of an object write code similar to the following example:

Private Sub Command1_Click()


On Error GoTo Command1_error
m_object("ControlAspect:Value") = 5.2
Exit Sub
Command1_error:
Call ReportError("Command1_Click", Err.source,_
Err.Description, "", 0)
End Sub

When the write operation is finished an asynchronous event is received:

Private Sub m_object_WriteComplete(ByVal prop As _


ABBOBJECTAUTOMATIONINTERFACESLib.IABBProperty)
‘ Some action

End Sub

168 3BSE030335-510
Section 7 Maintenance

The Display Tool


A graphic aspect may consist of information from several other graphic aspects
(see Figure 71 below). In the figure you have a graphic display, which contains two
graphic elements. These elements include two subelements each.
If a subelement is changed and deployed, the compiled information in the graphic
display and the graphic elements is wrong, and these items have to be deployed as
well.

Graphic Graphic
Display Elements Subelements

A Typical Graphic
Structure are:
The graphic subelements
are included in a graphic
element. These are
then included in the graphic
display.

Figure 71. A Typical Graphic Image Structure

3BSE030335-510 169
The Display Tool Section 7 Maintenance

This means that, if you change the information in the Graphic aspect which is
also a part of another Graphic aspect (see Figure 71), you have to deploy not only
the changed subelement, but also all items containing info from it.
To help you find graphic aspects that got their information (source code) changed
but which have not been deployed, you can use the Display Tool. With the help of
the Display Tool it is easy for you to see which graphic aspects that have to be
deployed.
The following prerequisites exists for running the Display Tool.
• A running default system.
• A defined default Workplace for the actual user. The default workplace is
defined in the Workplace Profile Values aspect for each user in the
User Structure.

The Display Tool does not have full Unicode support and requires the correct
language setting when using Far East languages, see NLS Handling of Far East
Languages in Graphics on page 98.
You start the Display Tool from the Start menu, ABB Industrial IT >
800xA System > Display Tool. A window according to Figure 72 opens. From the
File menu, select Set System/Environment. A new dialog will appear where you
choose the system and the environment to work in.
In a table all items with changed but not deployed source code are shown.

170 3BSE030335-510
Section 7 Maintenance The Display Tool

Figure 72. Display Tool

Description of the Display Tools Interface. In the Display Tool (see Figure 72)
you find a display area with four columns:
• AspectName
In this column you find the name of the graphic aspect
• ObjectName
In this column you find the path to the Aspect Object, which contain the
graphic aspect

3BSE030335-510 171
The Display Tool Section 7 Maintenance

• Newer Source
– If Yes
The deployed version is older than the source file. Deploy!
– If No
The deployed version and the source file are the same.
• Newer Dependencies
– If Yes
The graphic aspect contains an instance of another graphic aspect. For this
instance there is a newer version. Deploy!
– If No
The graphic aspect is from the same time or older than the graphic aspect
you have accessed.
• Deploy Needed
– Yes: If either Newer Source or Newer Dependencies (or both) is/are Yes
– Yes, modification not allowed: If either Newer Source or Newer
Dependencies (or both) is/are Yes, but when modification is not allowed.
– No: If both Newer Source and Newer Dependencies are No.
The area in the upper left corner contains options to select one of the structures, all
structures or libraries in the system that have to be searched. By default No
Selection is chosen.
If All Libraries Without System Extensions option is selected, it displays all the
libraries that are not a part of the system extensions.
If All Libraries With System Extensions option is selected, it displays all the
libraries in the system including the system extension libraries.
If Search in all Structures option is selected, the aspects belonging to all the
structures are displayed.
If there are two system extensions in the system, for example, Process Portal A and
AC 800M, the selection will contain Process Portal A Libraries and AC 800M
Libraries. Select any one to display the libraries belonging to the specific system
extension.

172 3BSE030335-510
Section 7 Maintenance The Display Tool

If no libraries are selected, by default all the libraries are searched. After the
required selections are made, the Populate button is pressed to begin the search of
the aspects.
In the upper part of the interface there are some radio buttons:
• If you select Deploy Required only graphic aspects that have to be deployed
are shown.
• If you select All, every graphic aspect are shown in the list.
• If you select Autoresolve, the program will try to solve object references
automatically.
• If you select Deploy, the aspects will be deployed.
• If you select Check Unsolved Properties, all object references will be checked
for unsolved references. No deploy.

How to deploy with the help of the display tool. When you have a list selected,
you can easy deploy all or just a selection of the presented graphic aspects. If you
want to deploy:
• All presented graphic aspects
Just click on the Deploy All in List button
• Just a selection of the presented items
Select the items you want to deploy and click on the Deploy Selected button.
The deploy function takes same time per graphic aspect, so, if you are in a hurry,
only deploy the items needed for the moment.

When you perform a deploy operation with the Display Tool the following
message appears in Audit trail:
Display Tool session started
Graphic aspect deployed: <object name> : <aspect name>
Display Tool session terminated
For more information about Audit trail see IndustrialIT 800xA, System,
Administration and Security (3BSE037410*).

3BSE030335-510 173
Diagnostics Window Section 7 Maintenance

Diagnostics Window
The Diagnostics Window shows background information about graphic displays,
elements and faceplates. To display the Diagnostic Window open the context menu
of a graphic display or element and choose Diagnostics, see Figure 73. If you are
not an application engineer the Diagnostics option in the context menu will not be
visible by default. In that case you have to press the Alt+Shift keys at the same time
as you click the left mouse button to view the Diagnostics option.

Figure 73. Graphic Display Context menu - Diagnostics

The information presented in the Diagnostics Window depends on where you click,
when invoking the window. If you click on the background of the display, then
Diagnostics Window shows information about the entire display. If you click at a
graphic element, then Diagnostics Window shows information regarding the
element clicked at.
The Diagnostic Window has three tabs:
• General Tab
• OpcData Tab
• Error Messages Tab

174 3BSE030335-510
Section 7 Maintenance Diagnostics Window

Diagnostics Window shows a snapshot of data acquired when invoking it. On two
tabs, there are refresh buttons which triggers fetching of fresh information.

General Tab. The General tab has four areas, see Figure 74.

Figure 74. Diagnostics Window - General Tab

The content in the General tab and the Error message tab show data for all elements
in the graphic display. The OpcData tab only contains information regarding one
specific element. If the Diagnostics Window is opened when the cursor is pointing
at an element, the OpcData tab will show data for that element. If the cursor is
pointing at the background when the Diagnostics Window is opened the OpcData
tab will show a list of all used element, and you have to choose one of them to see
data for that element.

3BSE030335-510 175
Diagnostics Window Section 7 Maintenance

Table 26 shows the parameters listed in the Subscription overview.

Table 26. Subscription overview

Parameter Description
Total number of items The number of object properties subscribed for (via
OPC).
Number of failed items Shows the number of items for which a subscription
could not be set up. This figure corresponds to all items
presented, on the Opcdata tab, which have a HRESULT
that is not OK.
The value should be 0 unless it contains references to
OPC items that have been deleted or renamed. If the
value is not 0, performance is considerably affected.
Number of bad items Shows the number of items for which a bad OPC status
(no value known) has been received (the status is OPC
server dependent). This figure corresponds to all items
presented, on the OpcData tab, which have a "B" in the
quality field.
Number of uncertain Shows the number of items with uncertain quality, i.e.
items for which a value exists which may be too old. This
figure corresponds to all items presented, on the
OpcData tab, which have a "U" in the quality field.
Non received items Shows the number of items for which the subscription
was set up properly but for which no data has been
received. This figure corresponds to all items presented,
on the OpcData tab, which have "NI" in the quality field.
Number of good items Shows the number of items, which has received data
with a good quality. This figure corresponds to all items
presented, on the OpcData tab, which have a "G" in the
quality field.

176 3BSE030335-510
Section 7 Maintenance Diagnostics Window

Table 27. Error Message Overview

Parameter Description
Number of VB Shows the number of errors in the Visual Basic code. If the
Errors value is greater than 0, click on the Error messages tab for
information. See Diagnostics Window on page 181.
Number of Shows the number of errors in the expressions. If the value
expression is greater than 0, click on the Error messages tab for
information. See Diagnostics Window on page 181.

Table 28. Workplace GUI Resources Used

Parameter Description
GDI objects Shows the number of Graphics Device Interface (GDI)
objects active in the current workplace the present time.
There is a maximum of 10 000 GDI objects per process.
User objects Shows the number of User objects (windows, menus,
cursors, semaphores etc.) active in the current workplace
the present time. There is a maximum of 10 000 User
objects per process.

The Timing summary area presents timing information for the entire graphic
aspect. The time required to call up the graphic aspect may be divided in three main
parts:
• Creation. If the CoCreateinstance parameter is large it is the amount of
controls and graphic aspects used and their complexity that causes the long call
up time. Consider also to make use of windowless controls, that is, controls or
graphic aspects with the properties BackStyle=Transparent and
Windowless=True.

3BSE030335-510 177
Diagnostics Window Section 7 Maintenance

• Subscription. For example, if the parameter Load Subscription and


RuntimeInit (described in Table 29) show large values there are subscription
related causes for the long time. That may be due to network problems,
overloaded controller or slow replies from the OPC server. The parameter
LoadSubscription is always zero at first call-up time after a deploy on every
machine. During the first call-up of a graphic aspect a file that contains binary
information (a .sub file) of the OPC items subscribed for is generated and
which is used in subsequent call-ups. The name server lookups that is
necessary is the reason why the first call-up takes longer time. Then there
might be a number of reasons why this .sub file needs to be updated again.
One reason is when an application change has been done via the Control
Builder tool, for example an OPC item may no longer exist.
• Rendering. If the parameter EndCreate (excl. Paint) shows a smaller value (for
example 1,2 s) than the experienced drawing time (for example 5 s), there are
too much calculations to be performed before the object can be shown. One
reason could be that the graphics to be displayed do not fit into the container
area without resizing, which needs recalculation. Draw the object in a size so
that resizing is unnecessarily to escape from this problem, see Size Display on
page 274. High CPU load is another reason.
Some of the timing parameters that form these 3 parts are listed in Table 29.

Table 29. Timing parameters

Parameter Description
Get File Set Shows the time required to check and fetch the latest
version of the display and the graphic elements.
Create SubsMan Shows the time required to create the subscription
manager.
Load Subscription Shows the time required to set up the subscription for
the display.
CoCreateInstance Shows the time required for creating all objects of which
the display consists.
InplaceActivation Shows the time to inplaceactivate the display.

178 3BSE030335-510
Section 7 Maintenance Diagnostics Window

Table 29. Timing parameters (Continued)

Parameter Description
RuntimeInit The first time a display is called up, this time may be
much longer than at subsequent call-ups as the Init time
then includes setting up the subscription.
EndCreate (excl. Shows the time required to create the display excluding
Paint) the actual drawing on the screen.
Paint start Not used
First data received Shows the time from call-up to the first item data has
been received.
Latest data Shows the time required from call-up to the latest item
received data has been received.
All data received Shows the time required from call-up until data for all
items has been received.

OpcData Tab. Figure 75 shows the OpcData tab.

Figure 75. Diagnostics Window - OpcData

The Object list at the top of the tab, contains a list of referenced objects (not
elements). The item table, below the list, shows all items, of the object selected in
the list, which are referenced in the graphic aspect for which the Diagnostics
Window was invoked.

3BSE030335-510 179
Diagnostics Window Section 7 Maintenance

The list shows the names of referenced objects. If there is any problem with the
subscription for a certain object, then the name is prefixed with a "*". With "any
problem is, in this case, meant that either did the subscription not succeed
(HRESULT == OK) for all items or that some of the items have a quality which is
not good (G).
Pressing the Refresh button updates the information presented on the OpcData tab.
The Item table contains information listed in Table 30.

Table 30. Item table

Field Description
Property Name The name of the referenced property.
Aspect The name of the aspect which defines the referenced
property.
Data Type Shows the type of the data that has been received. I.e. it
does not show the canonical data type of the item, but
the received data type.
Value Value
Quality The Opc Quality. Presents the main categorization of the
quality and the numerical value of quality word. Main
categorization values are:
• G - Good
• U - Uncertain
• B - Bad
• NI - "Not initialised". Data has not been received
from the OPC handler
Time Stamp The time of the day associated with the value of the item.
HRESULT Returns the result of setting up the subscription for each
item. The presented value is either OK or Error followed
by the numerical value of the HRESULT.

180 3BSE030335-510
Section 7 Maintenance Diagnostics Window

Table 30. Item table (Continued)

Field Description
Access Shows if the property, "to its static nature" is
• R - readable
• W - writable
• RW - readable and writable.
Quality Info Shows the quality information, which is taken from the
Opc Quality. The following are the values shown here.
• Property not writable
• Operation not permitted
• Not lock owner
• System in frozen simulation mode

Error Messages Tab. The Error Messages tab shows errors for the element selected
in the Error elements list, see Figure 76. The Error elements list only shows
elements in which errors have been reported.

Figure 76. Diagnostics Window - Error Messages Tab

3BSE030335-510 181
Diagnostics Window Section 7 Maintenance

The fields in the Expression Error List are presented in Table 31.

Table 31. Expression Error List

Field Description
Property Shows the name of the property to which the "failing"
expression is connected as <Control name>:<Property
name>. Expressions connected to expression variables
are identified by the name of the expression variable.
Description The problem, as identified by Visual Basic, i.e. the
Description field shows the value of Err.Description at
the time of the problem.
Event Event. The name of the "event" which triggered the
execution of the expression (probably not so interesting).

The VB Error List shows information about errors that has occurred in Visual
Basic code, provided that error reporting is implemented in Visual Basic code.
If errors are reported according to the standard described in Visual Basic Error
Handling on page 152, i.e. the error message has been generated with a statement
like the following:
Call ReportError("<NameOfSub>", Err.source, _
Err.Description, "", 0)
then the VB Error List contains information according to Table 32.

Table 32. VB Error List

Field Description
Description The problem, as identified by Visual Basic, i.e. the
Description field shows the value of Err.Description at
the time of the problem. This field, more precisely, shows
the value of the 3d parameter in the call to ReportError.
Method The name of the Sub in which the error occurred.
Or more precisely, this field shows the value of the first
parameter in the call to ReportError.

182 3BSE030335-510
Section 7 Maintenance Frequently Asked Questions (FAQ)

Frequently Asked Questions (FAQ)


Edit is Dimmed or Missing in the Context menu
Edit is dimmed or missing in the context menu. What could be causing the problem
and what should I do?
1. You don’t have Visual Basic installed on your machine.
2. You tried to edit an inherited aspect, which this is not possible. Go to the object
type structure using Show Type on the context menu and try again.
3. You have to have the application engineer role to edit a graphics aspect.
4. You do not have the required permissions.

Edit Imported Graphics Aspect with 3rd party ActiveXs


There are error messages displayed, then the area where the missing ActiveXs
reside, turns into a picture box. What should I do?
1. Identify the missing ActiveXs.
2. Install them on your PC.

Edit a Graphic Display in a Remote Desktop Session


A sequence of errors may occur while editing a graphic display in an 800xA system
connected through Windows Remote Desktop. Figure 77 displays the error that
occurs while editing a graphic display. The Graphics Builder opens with certain
options missing in the user interface.
To solve this problem, disconnect the remote desktop session and connect it again.

3BSE030335-510 183
Limit of 256 Element Instances in VB Section 7 Maintenance

Figure 77. Error message while editing a graphic display

Limit of 256 Element Instances in VB


When creating (dragging or otherwise) graphic elements or ActiveX controls into
the graphic display, an error message indicating that only 256 different elements are
allowed in VB is displayed.
When the graphic element or ActiveX control is added from the Toolbox, the error
message: Reached limit: cannot create any more controls for this form is
displayed.
When the graphic element or ActiveX control is added from the Element browser,
the error message: AddControlToDisplay Failed to add control is displayed.

The solution to this problem is the use of Control arrays.


If you for example create five buttons, and give them all the same name, they count
as one. Simply give every new button the same name as the first one. This is done in

184 3BSE030335-510
Section 7 Maintenance “Out of Memory” in Graphics Builder

the Name field in VB Properties window. The “Do you wish to create a control
array” dialog box is displayed once. Click Yes to confirm. Now all buttons will
count as one, they will work properly due to the fact that they have their own
indexes.

“Out of Memory” in Graphics Builder


If there are too many components (Tools->Components) present in the graphics
builder you will get an "Out of memory" error when trying to add a new element.
Many unused components are unnecessary and might cause slower than usual
graphic aspects and deploys. Try unloading the components that are not being used,
and then add your element again. You will be notified if you try to unload a
component that is being used. The "out of memory" problem should be resolved.

Far East Languages are not Correctly Presented


Far East languages in e.g. Tool tip and faceplate configuration view, are not
correctly presented. These elements are built on Visual Basic controls which don’t
have full Unicode support. To present the Far East language text correctly you must
have the right language setting in "Language for non-Unicode programs" on
Windows XP and “appropriate local" on Windows 2000. For more information see
NLS Handling of Far East Languages in Graphics on page 98.

Problems with Elements in Frame Control


Problems with Frame Control can arise when object marking is not positioned
correctly. Elements should be placed on top of a Frame Control rather than using the
Frame Control as a container for the elements. To do this you should not have the
Frame Control selected when adding other controls and elements.

How to Avoid Allocating GDI Objects


Graphics Device Interface (GDI) objects are allocated when Graphic aspects use
bitmap objects, fonts and such. The number of GDI objects allocated for each
graphic aspect can be estimated by using Windows Task Manager. The total number
of GDI objects for one process is by default limited to 10 000 GDI objects.

3BSE030335-510 185
“Run Time Error 13” in Graphics Builder Section 7 Maintenance

Depending on how many graphic aspects you want to view at the same time, it is
recommended to not use more than 2000 GDI objects in one graphic aspect.

“Run Time Error 13” in Graphics Builder


An error dialog showing “Run Time Error 13” may be displayed when you try to
change the Object Path property for a Graphic element in display. This occurs if
elements from a previous 800xA version is referred. Redeploy the referenced
Graphic Elements to resolve the problem.

Problems with Resizing of Graphic Aspects


A graphic aspect may not correctly size itself in the systems that have a different
“DPI setting”. To get the correct scaling, the same DPI setting must be configured in
the nodes used for graphics engineering as well as in the operator workplaces, or the
graphic aspects have to be redeployed to resize the display according to the existing
DPI setting.
The above problem can be corrected by any one of the following.
1. Change the DPI settingof the client machines, so that the client and the sever
machines have the same settings. For information on changing the DPI settings,
see Changing the DPI Settings on page 186.
2. Redeploy the faceplate elements.

Changing the DPI Settings


Perform the following for changing the DPI settings, for Windows XP or Windows
2003.
1. Right-click on the desktop.
2. Select Properties.

186 3BSE030335-510
Section 7 Maintenance Problems with Resizing of Graphic Aspects

3. Click the Settings tab.

Figure 78. Display Properties

4. Click Advanced.
5. For Windows XP / Windows 2003, the following appears.

Figure 79. DPI Setting dialog box (Windows XP / Windows 2003)

3BSE030335-510 187
Problems with Resizing of Graphic Aspects Section 7 Maintenance

6. Select the required setting from the DPI Setting drop down list.
7. Click OK.
8. Click Apply and then OK, to apply the settings to the system.

188 3BSE030335-510
Section 8 Tutorial

In this chapter you find some tutorials and information about how to build, test,
save, deploy and use graphic elements and faceplates. The tutorials consists of the
following sections:

Tutorial 1 - Building a Graphic Display on page 190.


• How to Build a Graphic Display
• Adding Graphic Elements to the Graphic Display
• Using Logical Colors

Tutorial 2 - Creating a Graphic Display without an Existing Application on


page 195.

Tutorial 3 - Building a Graphic Element on page 199.


• Creating a Graphic Element
• Building a Graphic Element
• Changing Properties for the Generic Element
• Assigning Expressions to Properties
• Deploying a Graphic Element

Tutorial 4 - Creating and Configuring Faceplates on page 205.

3BSE030335-510 189
Tutorial 1 - Building a Graphic Display Section 8 Tutorial

Tutorial 1 - Building a Graphic Display


In this tutorial we will build a tank farm with two tanks connected via a valve in the
Functional Structure.
The levels in the tanks are measured by the analog inputs LI213 and LI330
(SignalReal).
The tanks are connected to each other through pipes and a valve. The display
contains a rectangle at the bottom, which turns red to indicate that fluid passes
through the valve. The fluid is measured by the valve object MV103 (ValveUni),
which must have a value above zero (0) before the rectangle turns red.

Upper tank Valve Pipe Level indicator


Graphic primitive (Bar)

Direction arrow Lower tank


Fluid warning (Graphic primitive)

Figure 80. Graphic Aspect Designed for Tutorial 1

190 3BSE030335-510
Section 8 Tutorial How to Build a Graphic Display

How to Build a Graphic Display


You create the graphic display as described below:
1. Add a new object into Functional Structure in Plant Explorer and name it
“Storage tanks, right-click the new object and select New Aspect from context
menu.
2. Select Graphic Display in the New Aspect list.
3. Name the Aspect Tank Farm Overview and click on the Create button.
4. Select the new aspect Tank Farm Overview and press the Edit button in the
preview area or select Edit from the context menu.
5. Now Graphic Builder starts, and its dialog windows open. Open Tools menu,
select Graphic Libraries and check Graphic Primitives and Extended
Primitives.
6. Create the tanks, pipes and valve as described below:
a. Select Graphic Primitives tab and use the AdvantCone tool from the
Graphic Primitives toolbox. Press the left mouse button and drag the
mouse to the size of choice, then release the left mouse button.

Figure 81. Graphic Primitives Tab

b. Open View menu - Properties Window - Direction and change in order


to get the desired look.
c. Build the pipe in between the tanks with the AdvantPipe tool in the
toolbox.
d. Change the AdvantPipe ends to make it look like a proper connection
between them.

3BSE030335-510 191
Adding Graphic Elements to the Graphic Display Section 8 Tutorial

Select Properties window in the View menu if not already open. Change
BottomRightEnd, TopLeftEnd, and Orientation in order to get the
desired look.

Figure 82. Properties Window

7. Add two arrows to show direction of the flow between the tanks.
Select the Extended Primitives tab and use the AdvantArrow tool.
Place the arrows on the pipe.

Adding Graphic Elements to the Graphic Display


You add graphic elements to the graphic display as described below:
1. Use the Element Browser. Open Element Browser in the Tools menu. Click
browse and select the LI213, SignalReal object from Control Structure.
Press OK.
2. The Element Browser now looks like in Figure 83. Select the graphic element
Display Element Bar, and click Add Element. Drag the bargraph to the upper
tank.

192 3BSE030335-510
Section 8 Tutorial Using Logical Colors

Figure 83. Lower Tank Level Display

3. Repeat the steps, which you just did, but place LI330 on the Lower tank
instead. Press OK.
4. Add the ValveUni object, MV103, to the Element Browser. Select the graphic
element Display Element Reduced Icon in the right list, press Add Element
and place it on the pipe.
So far we have the valve and the tanks with their level indicators.

Using Logical Colors


We want a rectangle at the bottom to turn red, when fluid passes through the valve,
to indicate dangerous fluid. The fluid is measured by LI330. If the value is above 0
the rectangle will turn red and blink. You can use logical colors to perform this
function.
1. Click on the Graphic Primitives tab, select the AdvantRectangle tool. Place
it below the tanks.
It is now time to assign expressions to properties. This is done with the combination
of inserting references and typing in the Expression entry field.
2. Mark the rectangle in the workspace area. Open Expression Builder in the
View menu. Select the FillColor property, in the top half of the Expression
Builder.

3BSE030335-510 193
Using Logical Colors Section 8 Tutorial

The expression we will build will eventually look like this:


iif(LI330:Function Block:out> 0, unackHighAlarm,
GeneralBackColor)
3. Below is described how to do this:
a. Type iif(
b. Select the Object property tab in the lower half of the Expression
Builder. Select the object LI330 and select out in the property list.
c. Click out - Function Block from the Object Property list and then select
Insert and the reference to LI330:Function Block:out will be inserted.
Note that the above reference cannot be entered, it must be inserted from the
bottom part of the Expression Builder.
d. Type “>0,”
e. Select the Color tab. Click the drop down menu with the color groups,
choose Event Colors, then click UnackHighAlarm, and then Insert a red
blinking color. A logical color reference is added to the FillColor
property.
f. type “,”
g. Repeat 3e, choose Process Graphic Colors and General Back Color.
h. Type “)”
4. Select the FrameColor property. Click the drop down menu with the color
groups, choose Process graphics color, then Insert the GeneralBackColor.
5. Repeat step 4, but do it on the LineColor property instead.
6. Open the File menu and Deploy. This will save, compile and link your Graphic
Display.
7. Close Graphic Builder without save (already done).

194 3BSE030335-510
Section 8 Tutorial Tutorial 2 - Creating a Graphic Display without an Existing Application

Hopefully you have accomplished a similar result as shown in Figure 80.

Upper tank Valve Pipe Level indicator


Graphic primitive (Bar)

Direction arrow Lower tank


Fluid warning (Graphic primitive)

Figure 84. Graphic Aspect Designed for Tutorial 1

Tutorial 2 - Creating a Graphic Display without an Existing


Application
If there is no existing application with connected objects you can still add static
graphics to you display as described in Tutorial 1 - Building a Graphic Display on
page 190.
Without an existing application dynamic graphic elements must be added using the
standard object types in the Object Type structure libraries. If you know the object
type and the name of the object that is going to be referenced, you just need to
deploy the graphic display when the application is created, to show dynamic data.

3BSE030335-510 195
Tutorial 2 - Creating a Graphic Display without an Existing Application Section 8 Tutorial

Follow the steps below to add the Display Element Reduced Icon for the object
MB301 (see Figure 85) using an object type graphic element.
1. Use the Element Browser in Graphic Builder. Select Tools > Element
Browser.
2. Click Browse and browse the Object Type Structure to the right library and
select the object type MotorBi. Click OK.

Figure 85. MP301 Object in Object Type Structure

196 3BSE030335-510
Section 8 Tutorial Tutorial 2 - Creating a Graphic Display without an Existing Application

3. The Element Browser now looks like in Figure 86. Select the graphic element
Display Element Reduced Icon, and click Add Element. Drag the icon to the
right position in the graphic display.

Figure 86. Element Browser - MotorBi Aspects

4. Write the name MP301 in the Object Path property in Properties Window.

Figure 87. Object Path

5. Save and Deploy as described in Saving, Deploying and Deleting Graphic


Aspects on page 51
6. You will get a message about unresolved references. Click Auto Resolve and in
the next dialog click OK.

3BSE030335-510 197
Tutorial 2 - Creating a Graphic Display without an Existing Application Section 8 Tutorial

7. Now the Graphic Element looks like this:

Figure 88. Unresolved Motor MP301

8. Repeat the steps, for all the objects you want to add to the display.
After the application is created, all graphic elements and displays containing
unresolved references must be deployed to obtain the connection with the object
variables and dynamic data.

198 3BSE030335-510
Section 8 Tutorial Tutorial 3 - Building a Graphic Element

Tutorial 3 - Building a Graphic Element


Graphic elements are building blocks that are used in displays and in other elements.
Graphic elements contain Visual Basic controls, ActiveX controls, sub-elements and
primitives.
In this tutorial we will create a graphic element aspect and build an element
containing a bargraph, which could be added to a graphic display. The result of this
tutorial will look like Figure 89 on your screen.

Figure 89. The Graphic Element Tutorial 3

3BSE030335-510 199
Creating a Graphic Element Section 8 Tutorial

Creating a Graphic Element


1. Browse to a suitable object type in the Object Type structure. Right-click the
mouse and select New Aspect.

Figure 90. Object Type Structure

2. The New Aspect window is opened. Select Show all.


3. Select Process Graphics, Graphic element and Graphic element and name
it.
4. Click Create.

200 3BSE030335-510
Section 8 Tutorial Building a Graphic Element

5. Right-click on the created Graphic element. Select Edit, to open up the


Graphics Builder.

Figure 91. New Aspect

Building a Graphic Element


To build the new graphic element:
1. Click on the icon for the desired generic element. In our example, it is the IBar
in the Subelements tab in the toolbox.
2. Place the cursor at any point in the Visual Basic’s workspace.
3. Press the left mouse button and drag the mouse to the size of choice, then
release the left mouse button.
4. The selected generic element now appears inside a bounding rectangle in the
workspace.

3BSE030335-510 201
Changing Properties for the Generic Element Section 8 Tutorial

Figure 92. IBar with its Properties Window

Changing Properties for the Generic Element


Properties are changed to adapt the look, in this case color and width of the graphic
element.
1. Select the graphic primitive IBar in the workspace.
2. Open the Properties Window from the View menu. The Properties window is
presented (if not already open).
3. Change properties: FrameWidth to three (3), RangeMin to zero (0).
4. Select property ValueRef in Properties Window. Click the browse button (...)
and select ./AI1_12:FunctionBlock:in.

202 3BSE030335-510
Section 8 Tutorial Assigning Expressions to Properties

Assigning Expressions to Properties


All properties can be assigned an expression. Expressions can be written directly in
the Expression Builder via the keyboard and via the tabs. To assign an expression to
a property:
1. Select the IBar in the workspace.
2. Select Expression Builder in the View menu (if necessary: Resize/move the
Expression Builder).

Figure 93. Expression Builder - Object Colors

3. Select FillColor property to assign an expression. Move the cursor to the right
column “the expression entry field”.
4. Type “iif(“

3BSE030335-510 203
Deploying a Graphic Element Section 8 Tutorial

5. Select the Object Property tab and select Object “./AI1_12”.


The dot (”.”) represents the object which the graphic element resides on, and
hence receives its value from. Select In - Function Block, click Insert.
6. Then type “>60,” (this will be the High Level Alarm).
7. Go to Color / Event Color / SignalStateFalse.
8. Click Insert in order to set high level alarm color.
9. Type “,”
10. Go to Colors / Object Colors / SignalStateTrue.
11. Click Insert in order to set the non-alarm color.
12. Type “)”
Value is set with the same method. First select the relative object “./AI1_12“ and
then the property In - Function Block.

Deploying a Graphic Element


To deploy the new graphic element:
1. Choose Deploy from the File menu
The Deploy function save, compile and link the aspect. If a graphic element is
not deployed, you can only use it in Graphics Builder.
2. Confirm the deployment.
3. Exit Graphics Builder and answer No on the question if you want to save the
changes (they are already saved).
The Tutorial 3 is now done and the object ready for use.

204 3BSE030335-510
Section 8 Tutorial Tutorial 4 - Creating and Configuring Faceplates

Tutorial 4 - Creating and Configuring Faceplates


The faceplate will contain an input field which sets the bar value.It will also contain
two buttons T and F. Select T and a smiley icon will appear in the indicator field.
Select F and an “F” will appear in the indicator field. The faceplate also includes an
aspect link, which when clicked upon open up the window of the aspect.
The result will look like this.

Indicator

Aspect link

Bar

Command button

Push buttons

Figure 94. Faceplate

Creating a Faceplate Element. Add a new Faceplate Element aspect to the same
object type as in tutorial 3, by right-click on the object and then select New Aspect.
1. Go to Process Graphics, select Graphic Element, then Faceplate Element.
2. Name the Faceplate Element. “Faceplate Element1” and press Create.
3. Click on edit and the Graphics Builder is launched. The grey area represents
the Faceplate Element.

3BSE030335-510 205
Tutorial 4 - Creating and Configuring Faceplates Section 8 Tutorial

4. Go to the Tools menu, select Graphic Libraries and mark Subelements.


Click Ok.
5. Click on the Subelements tab, select the IBar and place it in the object
window, left-click and drag to wanted size.
6. Open the Properties Window area from view menu and set the property
EnableInput to True, RangeMax to 100 and RangeMin to 0.
7. Click on ValueRef in Property Window and open the Property Pages menu.
8. Select ObjectProperty tab and Object “AI1_12” and In - Function Block in
the right column. Click Insert.
The Bar is now placed in the Faceplate Element area.

Creating an Input Field.


1. Go to the toolbox, select the Subelements tab, click on the InputField tool and
create the button.
2. Open Properties Window from view menu and select PropertyRef.
3. Click in the right field for PropertyRef and open the dotted menu button.
4. Press the menu button and a new menu Property pages will open.
5. Select object “./AI1_12” and the property In - Function Block. Press OK.
6. Set the property Max to 100 and Min to 0.
7. Deploy your graphics from the File menu. Confirm deployment, exit and
answer no on question to save.

206 3BSE030335-510
Section 8 Tutorial Tutorial 4 - Creating and Configuring Faceplates

Figure 95. Graphic Workplace - Insert InputField

We have now created a Faceplate Element which contains a bar and an input field.

Configuring a Faceplate. Set up the Button field and faceplate.


1. Mark the object where the Faceplate should reside. Right-click and select New
Aspect.
2. Mark list presentation and find Faceplate, name it Faceplate1.
3. Select Faceplate1, the unconfigured Faceplate is visible.
4. Select Config view from the view selection drop-down menu.
5. Go to Layout tab and Set MaxNoOfButtonRows to 1 and
MaxNumberOfButtonsPerRow to 6. Click Apply.

3BSE030335-510 207
Tutorial 4 - Creating and Configuring Faceplates Section 8 Tutorial

6. Select Element tab, click in the Aspect field. Select Faceplate Element1 in the
drop down list. Click Apply.

Figure 96. Button Field

Create the Indicator.


1. Select Indicators tab, click in the Icons/Labels field on Indicators row and
you get the submenu Labels.
2. Click on the Label/Icon field, press radio button for Label field in the new
menu. Enter “F” in the Label field and click Ok.
3. Click on Color field, select Event Colors and color unackHighAlarm. Click
OK.

208 3BSE030335-510
Section 8 Tutorial Tutorial 4 - Creating and Configuring Faceplates

4. In Labels menu click Add and you get a new row.


5. Click on the new Label/Icon field, press radio button for Icon and browse to
your IndustrialIT System Product’s icon library. Click Ok.
6. Select Icon and browse. Choose an icon from your icon library. Click Open
and then Ok.
7. The labels dialog should now look like this.

Figure 97. The Indicator Labels Dialog

8. Click Ok.
9. Click on the Expression field, a new window Expressions show up and then
type iif($’./AI1_12:Function Block:ParError’,1,0). Click Ok.
10. Click on the Faceplate Pos field, enter “1” and press Apply.

Create the Aspect Link.


1. Click on the Aspect field under Indicator tab and Aspect Link row, select
Trend Display in the drop down list.
2. Select Faceplate Pos field, enter “6”.Press Apply and an aspect link has been
created.

3BSE030335-510 209
Tutorial 4 - Creating and Configuring Faceplates Section 8 Tutorial

Figure 98. Create Aspect Link

Create the Push Buttons.


1. Select Buttons tab and click on Icons/Labels field.
2. In the new menu Labels click on Label/Icon.
3. A new menu Add label or Icon comes up. Click on the radio button for the
Label field, enter “T” in the field and click Ok.
4. Click on the Property Name field, select ParError in the drop down list.
5. Click on the Property Value select True in the drop down list.

210 3BSE030335-510
Section 8 Tutorial Tutorial 4 - Creating and Configuring Faceplates

6. Click on the Faceplate Pos and set it to “1”.


7. Click Add and configure the new button field the same as previously
described but with the following exceptions.
8. Set Icon/Label to “F”.
9. Set Property Value to False.
10. Set Faceplate Pos to “2”.
11. Press Apply.

Figure 99. Create Push Buttons

The Faceplate is now completely configured and ready for test.


For information about using faceplates in runtime, from the operators perspective,
see Faceplate Overview on page 104.

3BSE030335-510 211
Tutorial 4 - Creating and Configuring Faceplates Section 8 Tutorial

212 3BSE030335-510
Appendix A Standard Building Blocks

Graphic Primitives
This section describes primitive elements found on the graphic primitives tab in the
toolbox of Graphics Builder In the first section, common properties are listed, and
subsequent sections each describe a separate graphic primitive.

Common Properties

Table 33. Graphic Primitives

NAME DESCRIPTION
AdvantArc Draws an arc inside a bounding rectangle.
AdvantBar Bar graph.
AdvantBezier Draws a Beziér line (curved line) between an
array of points.
AdvantChord Draws a chord inside a bounding rectangle.
AdvantCone Draws a cone inside a bounding rectangle.
AdvantEllipse Draws an ellipse inside a bounding rectangle.
AdvantHscale Horizontal placed scale.
AdvantLimit Limit indicator.
AdvantNumeric Text box with numeric formatting.
AdvantObjectTrim Trim element for max four traces.
AdvantPie Draws a pie slice inside a bounding rectangle.

3BSE030335-510 213
Common Properties Appendix A Standard Building Blocks

Table 33. Graphic Primitives (Continued)

NAME DESCRIPTION
AdvantPipe Draws a pipe inside a bounding rectangle.
AdvantPolygon Draws a filled polygon bounded by an array of
points.
AdvantPolyline Draws a polyline between an array of points.
AdvantRectangle Draws a rectangle between a top-left and a
bottom-right point. The rectangle can appear with
rounded corners.
AdvantText Text box.
AdvantVscale Vertical placed scale.
PgBar Bar graph with limits and error presentation.
PgErrorIndic Used as overlay to other elements. Displays the
error state.

The following section presents a list of properties common for all graphic primitives
in Table 33.

ErrorPresentation
The ErrorPresentation is used in the PgBar element, AdvantNumeric element,
PgErrorIndicator and in the AdvantObjectTrim.

214 3BSE030335-510
Appendix A Standard Building Blocks Common Properties

Table 34. Error Presentation Properties

NAME TYPE DEFAULT DESCRIPTION


AppError ENUM GOOD Values for the property are:
2- BAD - Bad data
1- UNCERTAIN - Uncertain value.
Can only be presented if a good
value was previously received
0-GOOD - Good data
OpcStatus[6,7] INTEGER GOOD Server status. The source for this
property is intended to be an Opc
status. The value may be set through
e.g. the expression builder, by
referring to the “sub property”
QualityCode of some accessed
object property.
The OpcStatus property masks out
bit 6 and 7 from the input (1 byte) and
interprets the value the following
way:
0- BAD - The presentation is defined
by ErrorFrameColor, ErrorColor,
ErrorBackground and ErrorFillColor
logical colors. The element is marked
with a cross in color ErrorColor on a
background in color ErrorBackground.
1- UNCERTAIN. Last known value is
presented. The element is marked as
crossed over with a diagonal line by
the color of the ErrorUncertain Color
logical color.
2- NOTRECEIVED - The element
does not draw at all until data has
been received
3- GOOD - All OK

3BSE030335-510 215
Common Properties Appendix A Standard Building Blocks

For the OpcStatus property, the values presented, (0-3) refer to bit field consisting
of bits 6 and 7 of the property. The primitive, that presents the error, masks out
the bit field and makes the comparison with it.
Possible value for the OpcStatusProperty, thus, are 0 - BAD, 64 - UNCERTAIN, 128
- NOTRECEIVED and 192 - GOOD. The default value of OpcStatus, as presented
in the properties window, is 192.

Presentation

Table 35. Error Presentation Images

OpcStatus[6,7] AppError
0:GOOD 1:UNCERTAIN 2:BAD

0: BAD

64: UNCERTAIN

128: NOT RECEIVED

192: GOOD

The status “NOT RECEIVED” means that the primitive that implements the error
presentation, does not draw at all.

216 3BSE030335-510
Appendix A Standard Building Blocks Common Properties

Tool Tip. The Tool TipText property contains a text string shown as a Tool tip
whenever the mouse pointer is held over a Graphic Primitive. This property
however, is only valid for a primitive that has an EnableInput property and it is set to
True. If the EnableInput property is set to False, the primitive is considered click-
transparent and no Tool tip is shown.

Visibility. You can show or hide a Graphic Primitive dynamically by setting the
value for Visibility in Expression Builder to TRUE or FALSE.

Line Properties. All lines drawn in the primitive elements are controlled by the
Line Width, Line Color and Line Style.

Table 36. Line Properties

Name Type Default Description


LineColor COLOR &H00000000& Color of the line.
LineStyle ENUM SOLID Style of the line. See below.
LineWidth INTEGER 1 Width in pixels of the drawn line. Valid values are
any positive integer.

Line Styles. The LineStyle property specifies the style of the line.

Table 37. Line Styles

Value Enum Sample


0 SOLID

1 DASH

2 DOT

3 DASHDOT

3BSE030335-510 217
Common Properties Appendix A Standard Building Blocks

Table 37. Line Styles (Continued)

Value Enum Sample


4 DASHDOTDOT

5 TRANSPARENT

Solid lines can be any width. Any other style uses a line width of 1 no matter of
the value in LineWidth.

Smooth Property. Smooth is defined in the range 0 to 100. When Smooth is set >
0, the function includes as many (visible) points as specified, between the original
points. Then the bezier algorithm shapes each straight line into an arc instead.
Smooth applies to the primitive AdvantPolygon and AdvantPolyline.

Angle Properties. The primitive elements AdvantArc, AdvantChord and


AdvantPie have round handles at the start and end points.

AdvantPie AdvantChord AdvantArc

Figure 100. Primitive Elements with Angle Properties

The angles can be changed either by holding down the left mouse button while
dragging the handles (the cursor changes to AllsizeArrow when moved by a handle)
or by entering the desired values in the StartAngle and StopAngle properties.

218 3BSE030335-510
Appendix A Standard Building Blocks Common Properties

Point List. The primitive elements AdvantPolyline, AdvantPolygon and


AdvantBerzier are defined by a number of connected points. This means that you
change their look moving their existing point. It is also possible to add and delete
points. This gives you a lot of possibilities to change their look. Below is an
example with the AdvantPolyline primitive.

To Move a Point. You can change the look of the above defined primitives by
moving one or more of its point(s). See Figure 101 below.

Start Position of Point Moved Point


To move a point:
Move the cursor to the point
so the cursor changes from
an arrow to a cross.
By holding down the left
mouse button you can move
the point to a new position.
The Template View The Changed View
of the AdvantPolyline of the AdvantPolyline
with four points with four points

Arrow Cursor Cross Cursor

Figure 101. Moving an Existing Point

To Add a New Point. To add a new point:


1. Select the primitive.
2. Move the cursor to a line between two points. The cursor changes to a
cross (+).
3. Press Shift + left mouse button. The new point is added.

New Point

Figure 102. Adding a New Point

3BSE030335-510 219
Common Properties Appendix A Standard Building Blocks

To Delete a Point. To delete a point:


1. Move the cursor to the point. The cursor changes to AllsizeArrow.
2. Press Ctrl + left mouse button. The point is deleted.

Fill Properties. Many primitive elements are area filled. The filling is controlled by
FillColor, FillStyle and FillColor2. The FillStyle2 is effective when one of the
hatched or shading patterns is used. The FillStyle property specifies how the area fill
would appear.

Table 38. Fill Properties

Name Type Default Description


FillColor COLOR &H00F7F7F7& Color of the area fill.
FillColor2 COLOR &H00BFBFBF& Second color of the rectangle if FillStyle is set to
any of the hatched or shading methods.
FillStyle ENUM SOLID See below.
FillStyle2 ENUM OPAQUE Mode of the background if any of the hatched
patterns is used. Can be OPAQUE or
TRANSPARENT.
Granularity INTEGER 50 Granularity of the shading. This property is only
valid on primitive elements with shaded fill styles.

220 3BSE030335-510
Appendix A Standard Building Blocks Common Properties

Fill Styles. The FillStyle property specifies how the area fill would appear.

Table 39. Fill Styles

Value Enum Sample


0 SOLID

1 TRANSPARENT

2 BDIAGONAL

3 CROSS

4 DRAGCROSS

5 FDIAGONAL

3BSE030335-510 221
Common Properties Appendix A Standard Building Blocks

Table 39. Fill Styles (Continued)

Value Enum Sample


6 HORIZONTAL

7 VERTICAL

The filling is controlled by FillColor, FillStyle and in case of shading also by


FillColor2 and Granularity. The FillStyle2 is effective when one of the hatched
patterns is used. The FillStyle property specifies how the area fill would appear.

Table 40. Shaded Fill Styles

Value Enum Sample


8 VERTICAL
SHADE

9 HORIZONTAL
SHADE

222 3BSE030335-510
Appendix A Standard Building Blocks Common Properties

Table 40. Shaded Fill Styles (Continued)

Value Enum Sample


10 VERTICAL
3DSHADE

11 HORIZONTAL
3DSHADE

3D Frame Properties. All rectangle shaped primitive elements have the ability to
show a 3D frame around the element. The 3D frame is controlled by FrameWidth,
FrameColor, FrameColor2 and 3D-Effect.

Table 41. 3D Frame Properties

Name Type Default Description


Fram3Deffect ENUM RAISED 3D effect of the frame. See Figure 103 below.
FrameColor COLOR &H00FDFDFD& Color of the left-top part of the 3D frame.
FrameColor2 COLOR &H007F7F7F& Color of the right-bottom part of the
3D frame.
FrameWidth INTEGER 1 Width of the 3D frame.

3BSE030335-510 223
Event Declarations Appendix A Standard Building Blocks

The 3D effect of the frame can be RAISED or SUNKEN. If set to RAISED


FrameColor is used for the left-top part. FrameColor2 is used for the bottom-right
part. If set to SUNKEN the colors will be swapped.

RAISED SUNKEN

Figure 103. 3D-Effect Property (Raised/Sunken)

Event Declarations
Following controls generate events when clicked:
• AdvantBar
• PgBar
• AdvantLimit (only valid for AdvantBar)
• AdvantNumeric
• AdvantText
• AdvantVscale
• AdvantHscale
These elements each have at least the following properties, that controls the
generation of events:

224 3BSE030335-510
Appendix A Standard Building Blocks Event Declarations

Table 42. Event Generation Properties

NAME TYPE DEFAULT DESCRIPTION


AutoDew Boolean TRUE When set to true, the
primitive creates a
DEW object, that is
conveyed to the client
by the autoDew
parameter of the
OnMouseDown event.
EnableInput Boolean FALSE If true, the primitive
generates events when
clicked at.

3BSE030335-510 225
Event Declarations Appendix A Standard Building Blocks

Following events are generated when clicking at controls that are click sensitive:

Private Sub PgBar1_OnMouseDown(


ByVal button As Long,
ByVal target As Long,
ByVal xown As Single,
ByVal yown As Single,
ByVal xcontainer As Single,
ByVal ycontainer As Single,
ByVal autoDew As Object)
Private Sub PgBar1_OnMouseMove(
ByVal button As Long,
ByVal shift As Long,
ByVal xown As Single,
ByVal yown As Single,
ByVal xcontainer As Single,
ByVal ycontainer As Single)
Private Sub PgBar1_OnMouseUp(
ByVal button As Long,
ByVal shift As Long,
ByVal xown As Single,
ByVal yown As Single,
ByVal xcontainer As Single,
ByVal ycontainer As Single)
In most cases, it is just the MouseDown event that is of interest. Parameters that are
of interest are target and autoDew.
The Target parameter states, for primitives that possess more than one click
sensitive area, which area was clicked at by the operator. This enables the client of
the primitive (typically a faceplate element) to find out which value, typically a
property of a process object, shall be affected. E.g. the VScale and HScale
primitives use the target property to state whether some max value or some min.
value shall be affected.
The autoDew parameter brings a “data entry window” (DEW) object to the client.
The DEW is a “pop-up” window that allows the user to enter a new value that is
handed over to the client when the user clicks the return key.

226 3BSE030335-510
Appendix A Standard Building Blocks AdvantArc

The client controls the lifetime of the DEW. The DEW lives as long as the client
element maintains a reference to is. In a VB program it may look the following way:

Private WithEvents m_DEW As PgDEW


Private theTarget as Integer

Private Sub AdvantBar1_OnMouseDown(ByVal button As Long,


ByVal target As Long,
ByVal xown As Single, ByVal yown As Single,
ByVal xcontainer As Single, ByVal ycontainer As Single,
ByVal autoDew As Object)
Set m_DEW = autoDew‘Make sure the dew stays
Let theTarget = target
'....
End Sub
Private Sub ReleaseDew()
Set m_DEW = Nothing ‘Release the DEW
End Sub
The initial value of the DEW, in general, is the value of the property representing the
clicked target. I.e. when clicking at the max value of a VScale/HScale primitive, the
DEW pops up showing the value of the MaxValue property.

AdvantArc
An AdvantArc is a simple primitive element displaying a part of an ellipse.

Figure 104. AdvantArc

3BSE030335-510 227
PgBar Appendix A Standard Building Blocks

After creation the bounding rectangle can be manipulated to change size and
position of the Arc.

Table 43. AdvantArc Properties

NAME TYPE DEFAULT DESCRIPTION


StartAngle INTEGER 135 Starting angle (0-359)
of the arc. 0 is
positioned at 3 o’clock.
StopAngle INTEGER 100 Stop angle (0-359) of
the arc. If StartAngle
and StopAngle are
equal a full ellipse is
drawn.
Additional Properties for AdvantArc are found in:
• Line Properties on page 217
• Angle Properties on page 218
• Visibility on page 217

PgBar
A Graphic Primitive with the ability to draw a bar-graph symbol with two hatched
limit areas or 8 limit markers (depending on the Style property).
The PGBar includes ErrorPresentation.
The bar is able to respond on mouse click. If part of the bar has been clicked, a
DEW is shown. Through this DEW, the values of the bar can be changed.

Layout
Style = EightLimits
The bar is displayed with max 8 limits. All limits with values inside the range of the
bar are shown.

228 3BSE030335-510
Appendix A Standard Building Blocks PgBar

Style = TwoLimits
The bar is displayed with max 2 limits, which is determined by Limit1 and Limit2.
Limit1 is high limit and Limit2 is low limit.
Limits with values inside the range of the bar are shown. The limits are shown as
two hatched areas.

Limit1
Limit2
Limit3
Limit1
Limit4

Value
Limit5 Value

Limit6
Limit2
Limit7
Limit8

Style = EightLimits Style = TwoLimits

Figure 105. Example of PgBars

In the EightLimits case, the limits can be made invisible by setting corresponding
LimitStyleN property to INVISIBLE. Limits are also made invisible by setting the
limit value out of range.

BarLimit
The bar limits are used in the PgBar, and control the appearance and the behavior of
the limit. The properties are:

3BSE030335-510 229
PgBar Appendix A Standard Building Blocks

Table 44. Limit Properties

NAME TYPE DEFAULT DESCRIPTION


LimitNColor OLE_COLOR &H007F7F7F& Color of the two limits
LimitNFill ENUM Not filled Limit fill style (Table 45)
LimitNStyle ENUM Invisible Limit style (Table 45)
LimitNValue FLOAT 0 Value of limit N

Table 45. Limit Fill Styles

Filled Notfilled
LeftSideSymmetric

LeftSideLeft

LeftSideRight

RightSideSymmetric

RightSideRight

RightSideLeft

Invisible

230 3BSE030335-510
Appendix A Standard Building Blocks PgBar

The properties of the PgBar are:

Table 46. PgBar Properties

NAME TYPE DEFAULT DESCRIPTION


AutoDEW Boolean TRUE If True and you click on the bar, a
Direct Entry Window object is created.
It is returned to the client.
Displacement § 0 Displacement of the Data Entry
Window from the bar. Horizontal bar
gives displacement downwards.
Vertical bar gives displacement to the
right.
EnableInput Boolean FALSE Enable generation of the events:
MouseUp, MouseDown and
MouseMove when clicked upon.
EnableInputLimits Boolean FALSE Enables input associated with the limits
FrameWidth2 INTEGER 0 Defines how far outside the bar the
limit object reaches
LimitHeight FLOAT 5 Limit height (valid for Eight Limits)
LimitLineWidth INTEGER 1 Limit line width (valid for Eight Limits)
OpcStatus Integer 192 = Good The Opc status presented by the Input
element in case the AutoPresentation
property is set to false.
More information found in
ErrorPresentation on page 214.
Orientation ENUM Vertical The orientation of the bar. Can be
VERTICAL or HORIZONTAL.
RangeMax FLOAT 100 Value of the top or right part of the bar.
RangeMin FLOAT -100 Value of the bottom or left part of the
bar.
StartValue FLOAT 0 Starting point of the bar.

3BSE030335-510 231
PgBar Appendix A Standard Building Blocks

Table 46. PgBar Properties (Continued)

NAME TYPE DEFAULT DESCRIPTION


Style ENUM EightLimits See Figure 105 above.
Value FLOAT 50 Value to control the bar.
ValueColor OLE_COLOR &H0000DF00& Color of the area indicating the current
bar value
ValueColorNeg OLE_COLOR &H00FF0000& Color of the area indicating the current
bar value, if the value is below zero
Additional properties for PgBar are found in:
• ErrorPresentation on page 214
• Fill Properties on page 220
• 3D Frame Properties on page 223
• Visibility on page 217

FrameWidth2

Figure 106. FrameWidth2 on PgBar Example

232 3BSE030335-510
Appendix A Standard Building Blocks PgBar

Input handling
Input of values can be initialized by clicking at different target areas of the Bar
primitive. If the EnableInput property is set to TRUE, input related to the Value
property can be initialized. Setting EnableInputLimits to True, enables input
associated with the limits. Target areas for Value and for Limits are shown below.

Mouse click target areas

Figure 107. Target Areas

Clicking at a target area, fires the events described in Event Declarations on page
224. The target parameter of each event has the following coding:

Target Value
Value 0
Limit 1 1
Limit 2 2
...
Limit 8 8

3BSE030335-510 233
PgBar Appendix A Standard Building Blocks

If the AutoDew property is set to True, clicking at either target area brings up a
DEW that is initialized with the value of the property related to the target area. The
initial value of the DEW is taken from corresponding property.
The value of the DEW can be changed using a dragging operation, in addition to
changing the value using the provisions of the DEW.
A drag handle is shown to indicate that input for the value is enabled, i.e. that
EnableInput is set to True. When a value operation has been started, the drag handle
is filled to indicate this. The drag handle is moved, to indicate the new value before
it is entered, also in the case that the new value has been entered using the DEW.
Also for limits, there is a “drag handle” visible in while an input operation is in
progress.

ErrorPresentation
The PgBar element supports error presentation See ErrorPresentation on page 214.
The following shows error presentation specifically for this bar.

UNCERTAIN

ErrorUncertainColor

BAD

ErrorFramecolor

ErrorFillColor

ErrorBackground

ErrorColor

Figure 108. Error Presentation

234 3BSE030335-510
Appendix A Standard Building Blocks AdvantBezier

AdvantBezier
A Bezier is like a polyline where the connecting lines are formed using the bezier
algorithm instead of straight lines.

Figure 109. AdvantBezier

Each point of a bezier curve is controlled by the point itself and two “gravity”
points, which control the shape of the curve. The endpoints have only one “gravity”
point.
After creation the bounding rectangle can be manipulated to change size and
position of the Bezier. See Point List on page 219 for manipulating single points.
Gravity points are moved in the same way as other points.

Table 47. AdvantBezier Properties

NAME TYPE DEFAULT DESCRIPTION


Additional Properties for AdvantBezier are found in:
• Line Properties on page 217
• Visibility on page 217

3BSE030335-510 235
AdvantChord Appendix A Standard Building Blocks

Table 48. AdvantBezier methods

NAME DESCRIPTION
AddPoint(x,y,x1,y1,x2,y2) Adds one point with the given
coordinates and gravity points.
DeleteAllPoints() Deletes all points of the curve.

AdvantChord
An AdvantChord is a closed figure bounded by the intersection of an ellipse and a
line segment.

Figure 110. AdvantChord

After creation, the bounding rectangle can be manipulated to change size and
position of the Chord.

Figure 111. Another Example of an AdvantChord

236 3BSE030335-510
Appendix A Standard Building Blocks AdvantChord

The properties of AdvantChord are:

Table 49. AdvantChord Properties

NAME TYPE DEFAULT DESCRIPTION


StartAngle INTEGER 225 Starting angle (0-359)
of the chord. 0 is
positioned at 3 o’clock.
StopAngle INTEGER 135 Stop angle (0-359) of
the chord. If StartAngle
and StopAngle are
equal a full ellipse is
drawn.
Additional properties for AdvantChord are found in:
• Line Properties on page 217
• Fill Properties on page 220
• Visibility on page 217
• Angle Properties on page 218.

3BSE030335-510 237
AdvantCone Appendix A Standard Building Blocks

AdvantCone
The AdvantCone primitive draws a cone consisting of four vertices connected by
straight lines.

Figure 112. Examples of AdvantCones

The cone can be any color, any line width, many different line styles and solid area
fill, hatched area fill or shaded area fill.
After creation the bounding rectangle can be manipulated to change size and
position of the AdvantCone.

Table 50. AdvantCone Properties

Name Type Default Description


ConStrength INTEGER 20 Size of the cone top in percent of full width. If set
to 100, the cone top is the same size as the cone
bottom, and the cone is drawn as a pipe with flat
ends.

238 3BSE030335-510
Appendix A Standard Building Blocks AdvantEllipse

Table 50. AdvantCone Properties

Name Type Default Description


Direction ENUM DOWN UP, DOWN, RIGHT or LEFT.
Additional properties for AdvantCone are found in:
• Line Properties on page 217
• Fill Properties on page 220
• Angle Properties on page 218
• Visibility on page 217

AdvantEllipse
An AdvantEllipse Primitive is an ellipse with a frame and an area fill.

Figure 113. Examples of AdvantEllipses

3BSE030335-510 239
AdvantHscale Appendix A Standard Building Blocks

The properties of the AdvantEllipse are:

Table 51. AdvantEllipse Properties

Name Type Default Description


Additional Properties for AdvantEllipse are found in:
• Line Properties on page 217
• Fill Styles on page 221
• Visibility on page 217

After creation the bounding rectangle can be manipulated to change size and
position of the Ellipse.

AdvantHscale
An Hscale is a primitive with the ability to show a horizontal scale. The scale can
contain labels as well as minor and major tics. The background of the scale is
transparent.

0.0 100.0

Figure 114. AdvantHscale

240 3BSE030335-510
Appendix A Standard Building Blocks AdvantHscale

After creation the bounding rectangle can be manipulated to change size and
position of the scale.

Table 52. AdvantHscale Properties

Name Type Default Description


EndValue FLOAT 100 The EndValue (Right point on the scale).
LabelFont FONT Ambient.Fo Font used as labeling the scale. Default font from
nt the container (VB User Control).
LabelFormat BSTR #0.0 Format of the scale labels in Excel format. For
more information on Excel format, se
AdvantNumeric on page 245.
LabelPosition ENUM DOWN The position of the label and tics.
Can be UP or DOWN. See Figure 115 below.
LabelStyle ENUM CENTRIC LabelStyle CENTRIC or ALIGNED.
See Figure 115 below.
MajorStrength INTEGER 5 The length of the major tics in percent of bounding
rectangle height.
MajorTics INTEGER 3 Number of major tics.
MinorStrength INTEGER 5 The length of the minor tics in percent of bounding
rectangle height.
MinorTics INTEGER 1 Number of minor tics. The number is the amount
of minor tics between two major tics.
StartValue FLOAT 0 The StartValue (Left point on the scale).
Additional Properties for AdvantHscale are found in:
• Line Properties on page 217
• Visibility on page 217

3BSE030335-510 241
AdvantHscale Appendix A Standard Building Blocks

Below is an example of AdvantHscale.

LabelStyle = CENTRIC
0,0 5000000,0 10000000,0
LabelPosition = DOWN

LabelStyle = CENTRIC
0,0 5000000,0 10000000,0
LabelPosition = UP

LabelStyle = ALIGNED
0,0 10000000,0 LabelPosition = DOWN

LabelStyle = ALIGNED
0,0 10000000,0
LabelPosition = UP

Figure 115. Example of AdvantHscale

The size of the outer boarder is constant.


This means, when the LabelStyle = CENTRIC, that the number of characters in
the labels set the size of the scale. More number of characters gives a shorter
scale.
See Figure 115 above where the number of characters are the same for
LabelStyle = ALIGNED and LabelStyle = CENTRIC but the length of the scale
differs.

242 3BSE030335-510
Appendix A Standard Building Blocks AdvantLimit (only valid for AdvantBar)

AdvantLimit (only valid for AdvantBar)


An AdvantLimit has the ability to show a vertically or horizontally placed limit
symbol.

Table 53. AdvantLimit Directions

Examples LEFT RIGHT FULL

UP

DOWN

LEFT

RIGHT

Only to be used with AdvantBar. Already included in PgBar.

3BSE030335-510 243
AdvantLimit (only valid for AdvantBar) Appendix A Standard Building Blocks

After creation the bounding rectangle can be manipulated to change size and
position of the Limit.

Table 54. AdvantLimit Properties

Name Type Default Description


Direction ENUM LEFT The direction of the Limit. Can be UP, DOWN,
LEFT or RIGHT.
EnableInput Boolean FALSE If true, the primitive generates events when
clicked at.
Shape ENUM FULL Shape of the filled part of the Limit. Can be LEFT,
RIGHT or FULL.
Additional Properties for AdvantLimit are found in:
• Line Properties on page 217
• Fill Properties on page 220
• Visibility on page 217

244 3BSE030335-510
Appendix A Standard Building Blocks AdvantNumeric

AdvantNumeric
An AdvantNumeric has the ability to show a number as formatted text.

Table 55. Advant Numeric Format Examples

Value Format Output


12345 #0

#,###

#,###0.0

kr #,###0.0

After creation, the AdvantNumeric can be manipulated by changing size and


position of its bounding rectangle.
When using big numbers it is preferable to use AdvantText, see AdvantText on
page 261.

Strike Through
If the formatted text extends outside the width of the available draw area, the font is
changed to a strike through font. This is to prevent any misunderstanding caused by
a message not being displayed in its full length.
Different from earlier editions is that the font is not changed to strike through if a
text’s height is greater than the height of the text box in the AdvantNumeric control,
but only when it exceeds in length.
The strike through font can be disabled using the StrikeThrough property
(Table 56).

3BSE030335-510 245
AdvantNumeric Appendix A Standard Building Blocks

Disabling the strike through function could lead to misunderstandings when a


message text is not entirely visible. It is advisable to consider the type and
severity of the message when the function is disabled.

Table 56. Advant Numeric Properties

Name Type Default Description


AutoDEW Boolean True If True and you click on the bar, a Direct
Entry Window object is created. It is returned
to the client.
DisplacementX Integer 3 Displacement of the Data Entry Window from
the numeric. See Figure 116.
DisplacementY Integer 5 Displacement of the Data Entry Window from
the numeric. See Figure 116.
EnableInput Boolean False Enable generation of the events: MouseUp,
MouseDown and MouseMove when clicked
upon.
Error Boolean False Error True means that ErrorCaption is
displayed instead of the normal value.
ErrorCaption String ““ Is displayed when Error=True.
Font FONT Default font Font used in the text.
from the
container
Format STRING #0.0 Format of the value in Excel format. Only
valid if NumberOfDecimals is set to -1.
Se examples in Table 55 or Microsoft Excel
Help(1)
Halign ENUM CENTER Horizontal alignment of the text inside the
frame. Can be LEFT, CENTER or RIGHT.

246 3BSE030335-510
Appendix A Standard Building Blocks AdvantNumeric

Table 56. Advant Numeric Properties (Continued)

Name Type Default Description


NumberOfDecimals Integer -1 Sets the number of decimals.
NumberOfDecimals controls the Format
property. The value -1 represents not valid,
meaning that the Format property is active.
RightOf Boolean False RightOf true or false means that origo has
two different positions. See Figure 116
below, for information.
StrikeThrough Boolean TRUE Enable or disable the strike through facility,
when the field is exhausted.
TextColor OLE_COLOR &H00000000& Color of the text.
Valign ENUM MIDDLE Vertical alignment of the text inside the
frame. Can be TOP, MIDDLE or BOTTOM.
Value FLOAT 0.0 The value to display.
Additional Properties for Numeric are found in:
• ErrorPresentation on page 214
• Line Properties on page 217
• Fill Properties on page 220
• 3D Frame Properties on page 223
• Visibility on page 217
(1) For more information on Excel format, use Microsoft Excel 2000. In the Help menu select Microsoft Excel
Help. Type in the word “format” and select “Create a custom number format”.

3BSE030335-510 247
AdvantNumeric Appendix A Standard Building Blocks

RightOf = false RightOf = true

* DisplacementY
Numeric

*DisplacementY DisplacementX

Data entry window


DisplacementX
RightOf indicates the position of origo *
Figure 116. Displacement of Data entry window

For further information, please see Event Declarations on page 224.

248 3BSE030335-510
Appendix A Standard Building Blocks AdvantObjectTrim

AdvantObjectTrim
A graphic primitive with the ability to show up to four trim curves. The trim curve
shows the most current 120 samples of the input, the CurveNValue property. The
sample time is determined by the sample time (TotalTime/240).

Figure 117. ObjectTrim

Error Presentation
The ObjectTrim can show error presentation for each curve. If the input for a curve
is in error, an error indicator is showed at the left side of the pane.
The trim curve is drawn in the color set in the CurveNColor property.
The background of the trim area is determined by the Fill properties.
After creation the bounding rectangle can be manipulated to change size and
position of the ObjectTrim.

3BSE030335-510 249
AdvantObjectTrim Appendix A Standard Building Blocks

Table 57. AdvantObjectTrim Properties

Name Type Default Description


CurveNColor OLE_COLOR Color of the N:th trend curve.
CurveMinValueN FLOAT -100 Minimum value of the trim area for the N’th
curve.
CurveMaxValueN FLOAT 100 Maximum value of the trim area for the N’th
curve.
CurveNValueN FLOAT 0 Current value (input) for the N’th curve.
CurveVisibleN BOOL TRUE Visibility of the N’th trim curve.
GridColor OLE_COLOR &H007F7F7F& Color of grid.
GridNumberH INTEGER 5 Horizontal grid size.
GridNumberV INTEGER 5 Vertical grid size.
GridVisible BOOL TRUE Visibility of grid.
TotalTime DOUBLE 0 Total time in date/time format.
Additional Properties for AdvantObjectTrim are found in:
• 3D Frame Properties on page 223
• Fill Properties on page 220
• ErrorPresentation on page 214

250 3BSE030335-510
Appendix A Standard Building Blocks PgErrorIndic

PgErrorIndic
The ErrorIndicator Primitive can be used as overlay for other Primitives to show
some error status. It is windowless and can therefore be laid over other primitives
that are windowless.
Is used as overlay to other elements and displays the error state.

Table 58. PgErrorIndic Properties

Name Type Default Description


Additional Properties for PgErrorIndic are found in:
• ErrorPresentation on page 214
• Visibility on page 217

Figure 118. Error State Bad

Figure 119. Error State Uncertain

When the error state is “GOOD” the primitive is not visible at all.

3BSE030335-510 251
AdvantPie Appendix A Standard Building Blocks

AdvantPie
The AdvantPie draws a pie slice a closed figure bounded by the intersection of an
ellipse and line segments towards the center of the ellipse.

Figure 120. AdvantPie

After creation the bounding rectangle can be manipulated to change size and
position of the element.

Table 59. AdvantPie Properties

Name Type Default Description


Additional Properties for AdvantPie are found in:
• Line Properties on page 217
• Fill Properties on page 220
• Angle Properties on page 218
• Visibility on page 217.

252 3BSE030335-510
Appendix A Standard Building Blocks AdvantPipe

AdvantPipe
The AdvantPipe draws a pipe with area fill.

TopLeftEnd TopLeftEnd
Right Left

BottomRightEnd BottomRightEnd
Left Right

Figure 121. Examples of AdvantPipes

The pipe can be any color, any line width, a number of different line styles, solid
area fill, hatched area fill and shaded area fill. The pipe can be cut 45 degrees in one
or both ends. Pipe elements can also be combined.
After creation the bounding rectangle can be manipulated to change size and
position of the Pipe.

3BSE030335-510 253
AdvantPipe Appendix A Standard Building Blocks

Table 60. AdvantPipe Properties

Name Type Default Description


BottomRightEnd ENUM FLAT Bottom or right end shape (depending of the
direction) of the pipe. Can be FLAT, LEFT or
RIGHT.
Orientation ENUM HORIZONTAL Orientation of the pipe. Can be VERTICAL or
HORIZONTAL.
TopLeftEnd ENUM FLAT Top or left end shape (depending of the direction)
of the pipe. Can be FLAT, LEFT or RIGHT.
Additional properties for AdvantPipe are:
• Line Properties on page 217
• Fill Properties on page 220
• Visibility on page 217.

254 3BSE030335-510
Appendix A Standard Building Blocks AdvantPolygon

AdvantPolygon
A Polygon is a closed figure bounded by a line through a number of points.

Figure 122. Examples of Polygons

After creation the bounding rectangle can be manipulated to change size and
position of the Polygon. See Presentation on page 219 for manipulation of single
points.

Table 61. AdvantPolygon Properties

NAME TYPE DEFAULT DESCRIPTION


Additional properties for AdvantPolygon are:
• Line Properties on page 217
• Fill Properties on page 220
• Smooth Property on page 218
• Visibility on page 217

3BSE030335-510 255
AdvantPolyline Appendix A Standard Building Blocks

Table 62. AdvantPolygon Methods

NAME DESCRIPTION
AddPoint(x,y) Adds one point with the given
coordinates.
DeleteAllPoints() Deletes all points of the curve.

AdvantPolyline
An AdvantPolyline draws a line between a number of points.

Figure 123. AdvantPolyline

256 3BSE030335-510
Appendix A Standard Building Blocks AdvantPolyline

After creation the bounding rectangle can be manipulated to change size and
position of the Polyline. See Point List on page 219 for manipulating single points.

Table 63. AdvantPolyline Properties

NAME TYPE DEFAULT DESCRIPTION


Additional properties for AdvantPolyline are:
• Line Properties on page 217
• Smooth Property on page 218
• Visibility on page 217

Table 64. AdvantPolyline Methods

NAME DESCRIPTION
AddPoint(x,y,x1,y1,x2,y2) Adds one point with the given coordinates and
gravity points.
DeleteAllPoints() Deletes all points of the curve.

3BSE030335-510 257
AdvantRectangle Appendix A Standard Building Blocks

AdvantRectangle
An AdvantRectangle can draw a rectangle with a frame and an area fill.

Figure 124. Examples of AdvantRectangles

The frame can be any color, any line width, a number of different line styles, solid
area fill, hatched area fill and shaded area fill. The corners of the rectangle can be
sharp (90 degrees) or rounded.
After creation the bounding rectangle can be manipulated to change size and
position of the element.

258 3BSE030335-510
Appendix A Standard Building Blocks AdvantBar

Table 65. AdvantRectangle Properties

Name Type Default Description


Round INTEGER 0 Percent of rounding of the corners. 0 means a
rectangle with no rounding, 100 means fully
rounded.
Other properties of the primitive element AdvantRectangle are:
• Line Properties on page 217
• Fill Properties on page 220
• 3D Frame Properties on page 223
• Visibility on page 217

AdvantBar
An AdvantBar has the ability to show a vertically or a horizontally placed bargraph
symbol.

Figure 125. AdvantBar

3BSE030335-510 259
AdvantBar Appendix A Standard Building Blocks

After creation the bounding rectangle can be manipulated to change size and
position of the Bar.

Table 66. AdvantBar Properties

Name Type Default Description


AutoDEW Boolean True If True and you click on the bar, a Direct Entry
Window object is created. It is returned to the
client.
Displacement Integer 0 Displacement of the Data Entry Window from
the bar. Horizontal bar gives displacement
downwards. Vertical bar gives displacement to
the right.
EnableInput Boolean False Enable generation of the events: MouseUp,
MouseDown and MouseMove when clicked
upon.
MaxValue FLOAT 100 Value of the top or right part of the bar.
MinValue FLOAT -100 Value of the bottom or left part of the bar.
Orientation ENUM VERTICAL The orientation of the bar. Can be VERTICAL
or HORIZONTAL.
StartValue FLOAT 0 Starting point of the bar.
Value FLOAT 50 Value to control the bar.
ValueColorMaxg OLE_COLOR &H0000DF00& Color of the filled value part of the bar then
Value is in the interval StartValue-MaxValue.
ValueColorMin OLE_COLOR &H00FF0000& Color of the filled value part of the bar then
Value is in the interval StartValue-MinValue.
Additional properties for the AdvantBar are:
• Line Properties on page 217
• Fill Styles on page 221
• 3D Frame Properties on page 223
• Visibility on page 217

260 3BSE030335-510
Appendix A Standard Building Blocks AdvantText

This element should be considered obsolete.


The AdvantBar is only present for backward compatibility reasons. In new
development, use the graphic primitive PgBar on page 228.

AdvantText
A primitive with the ability to show text.

Figure 126. AdvantText

The Tool tip is used in a special way in the primitive element AdvantText. If the text
extends the available draw area, the font will be changed to a strike through font and
the tool tip presented will be the full text. If the text STRING can be drawn in the
draw area, the Comment is usually presented as a tool tip.

Use the StrikeThrough property to disable the strike through function with
caution to avoid misunderstandings if the text is not entirely visible. For more
information see Strike Through on page 245

Note that the tool tip for a graphic item does not work when the item is click
transparent.

3BSE030335-510 261
AdvantText Appendix A Standard Building Blocks

After creation the bounding rectangle can be manipulated to change size and
position of the element.

Table 67. AdvantText Properties

Name Type Default Description


AutoDEW Boolean TRUE At this point, the AutoDEW property has no effect.
The Text primitive does not create a DEW.
EnableInp Boolean FALSE If true, the primitive generates events when clicked at.
ut
Font FONT Default font Font used in the text.
from the
container
Halign ENUM CENTER Horizontal alignment of the text inside the frame. Can
be LEFT, CENTER or RIGHT.
StrikeThro Boolean Enabled Enable or disable the strike through facility, when the
ugh field is exhausted.
Text STRING ““ (empty) The text to display.
TextColor OLE_COLOR &H00000000& Color of the text.
Valign ENUM MIDDLE Vertical alignment of the text inside the frame. Can be
TOP, MIDDLE or BOTTOM.
Additional properties for AdvantText are:
• Line Properties on page 217
• Fill Styles on page 221
• 3D Frame Properties on page 223
• Visibility on page 217.

262 3BSE030335-510
Appendix A Standard Building Blocks AdvantVscale

AdvantVscale
An AdvantVscale has the ability to show a vertically placed scale. The scale
contains labels as well as minor and major tics.

100.0

0.0

Figure 127. AdvantVscale

After creation the bounding rectangle can be manipulated to change size and
position of the element.

Table 68. AdvantVscale Properties

Name Type Default Description


AutoDEW Boolean True If True, a Direct Entry Window object is created
and returned to the client when the object is
clicked upon.
EnableInput Boolean False Enable generation of the events: MouseUp,
MouseDown and MouseMove when clicked upon.
EndValue FLOAT 100 The EndValue (Highest point on the scale).
Font FONT Ambient.Fo Font used for labeling the scale. Default font from
nt the container (VB Form).
LabelFormat BSTR #0.0 Format of the scale labels in Excel format. For
more information on Excel format se
AdvantNumeric on page 245.

3BSE030335-510 263
AdvantVscale Appendix A Standard Building Blocks

Table 68. AdvantVscale Properties (Continued)

Name Type Default Description


LabelPosition ENUM LEFT The position of the label and tics. Can be LEFT or
RIGHT.
LabelStyle ENUM CENTRIC LabelStyle CENTRIC or ALIGNED.
In LabelStyle CENTRIC, all major ticks are
labeled, in LabelStyle ALIGNED, only the end
ticks are labeled regardless of the number of
major ticks.
MajorStrength INTEGER 10 The length of the major tics in percent of bounding
rectangle width.
MajorTics INTEGER 3 Number of major tics.
MinorStrength INTEGER 5 The length of the minor tics in percent of bounding
rectangle width.
MinorTics INTEGER 1 Number of minor ticks. The number is the amount
of minor tics between two major tics.
StartValue FLOAT 0 The StartValue (Lowest point on the scale).
Additional properties for AdvantVscale are:
• Line Properties on page 217
• Visibility on page 217

264 3BSE030335-510
Appendix A Standard Building Blocks AdvantVscale

LabelStyle = Aligned
LabelStyle = Centric LabelPosition = Right
LabelPosition = Left
10000000,0
10000000,0

5000000,0

0,0
0,0

LabelStyle = Aligned
LabelStyle = Centric LabelPosition = Left
LabelPosition = Right
10000000,0
10000000,0

5000000,0

0,0
0,0

Figure 128. Example of an AdvantVscale

3BSE030335-510 265
Special Elements Appendix A Standard Building Blocks

Special Elements
Aspect Link
The Aspect Link can be placed in a graphic display and used to open another aspect.
Note that it will always open an overlap from the preview area in the plant explorer,
since the plant explorer does not allow replace.
The Aspect Link is based on a standard Visual Basic CommandButton.

Figure 129. Aspect Link

To link the AspectLink component to the desired aspect, click on the aspect
property in the Properties window in the Graphics Builder (Figure 130).

Figure 130. AspectLink aspect Property

This will open a dialog that allows browsing for any aspect in the system
(Figure 131). The aspect selected in the dialog will be linked the AspectLink object
and opened every time the button is pressed.

266 3BSE030335-510
Appendix A Standard Building Blocks Aspect Link

The "aspect" property can be modified in runtime from Visual Basic code. This can
be used to change the target aspect dynamically.
Valid syntax of the "aspect" property is:
ObjectReference:AspectName
{objectid}:{aspectid}
where ObjectReference is either an absolute or relative reference.

Figure 131. Browse Dialog

3BSE030335-510 267
PgEventTunnel Appendix A Standard Building Blocks

Table 69. AspectLink Properties

Name Type Default Description


Appearance Integer 1 0 = Flat, 1 = 3D (See Command Button)
aspect String : Specifies in human-readable form, the aspect
linked to by the Aspect Link item
Defined easily using the Properties window in
the Graphics Builder (Figure 130).
BackColor OLE_COLOR Default The Background color of the aspect link.
background (See Command Button)
Caption String Aspect Link The text displayed by the aspect link.
(See Command Button)
DisabledPicture Picture - The picture displayed by the aspect link when
enabled is false. (See Command Button)
DownPicture Picture - The picture displayed by the aspect link when it
is pressed. (See Command Button)
Font Font Tahoma The Font used to display the Caption property.
(See Command Button)
Picture Picture - The picture displayed by the aspect link.

The table contains custom made properties, plus a few of the most useful properties
for a standard command button.

PgEventTunnel
There are situations when you click within a graphic element or display when you
may not see the context menu (right-click), or may not be able to bring up the
default aspect (left-click), or see any object marking around a graphic element.
The reason is that it is not possible to “click through” some of the controls used in
the graphic element. Examples: Standard Visual Basic and 3rd party ActiveX
controls. Primitive elements described in Graphic Primitives on page 213 do not
have this problem.
If you are obliged to use other elements than the Graphic Primitives, the methods
described below are useful.

268 3BSE030335-510
Appendix A Standard Building Blocks PgEventTunnel

Recommended methods:
• Use click transparent element because mouse events are automatically passed
to its container object, for example Primitives supplied by ABB. This is the
preferred way, no further actions are necessary.
• ActiveX controls that are not click transparent usually are equipped with mouse
action events. This requires that events be handled in Visual Basic code. You
have to add code to, for instance, the mouse events, see example below.
• Event Tunnel control is needed.
Event Tunnel Control
To solve the problem you can place Event Tunnel controls, to cover, and in turn
enable mouse-clicks to tunnel through to the standard input handling. The point is to
be able to tunnel the click through the labels.
The presences of an EventTunnel control marks the whole graphic aspect to capture
and response on all Mouse Events to the container object - the graphic element or
display.

Visual Basic Code. For some controls that have suitable events, Visual Basic code
can solve the problem.
Sometimes controls that ought to be transparent for mouse-event can be altered to
be transparent via Visual Basic code. Tunnel control is a “last alternative solution”.
Example: Code in Visual Basic when standard Label control is used.
....
Label1_MouseMove(...)
m_sc.MouseMove Me, Button, Shift
End Sub

Label1.Click(..)
If Button=VBLeftButton Then
m_sc.ShowDefaultAspect Me
Else If
m_sc.ShowContextMenu Me
End If
End Sub

3BSE030335-510 269
AlarmControl Appendix A Standard Building Blocks

AlarmControl
The AlarmControl is a template object used to indicate the aspect object’s alarm
state, and allows alarm acknowledgement. All alarm icons are built up by a triangle
and a digit, see Table 70. The digit shows the priority level of the alarm, where the
number one represents the most urgent alarm. The number of priority levels is
configured by the system engineer.
For configuration of Alarm Control see the manuals IndustrialIT 800xA, System,
Configuration (3BDS011222*) and IndustrialIT 800xA, System, Administration
and Security (3BSE037410*).
The color setting will follow the Alarm priority color. The edge color of the triangle
is the same as the priority color. Every operator in a system will see the same color
settings for the alarms. For example an alarm icon with priority number one may
have a red edge and a second degree alarm may have an orange edge and so on.
Sometimes it is needed to make the alarm even more visible, for example when
signaling an unacknowledged alarm, and for those situations a blinking icon can be
configured.
Table 70 shows the most common alarm indicators.

Table 70. Alarm Indicators

Icon Description
Alarm is active and acknowledged.

Alarm is active, but not acknowledged.

Indicates illegal alarm configuration.

Alarm is automatically disabled by the


system.

270 3BSE030335-510
Appendix A Standard Building Blocks AlarmControl

Table 70. Alarm Indicators (Continued)

Icon Description
Alarm disabled by a user.

Alarm is idle, that is there are no alarms.

Alarm is neither active, nor acknowledged.

Hidden Alarm.
A white rectangle covering an alarm symbol,
shows that there are hidden alarms for the
object.
Shelved Alarm.
A white circle appearing to the right of the
alarm symbol shows that there are shelved
alarms for the object.

The AlarmControl element is intended to be displayed in the header area of a


faceplate, and has a reserved place in the faceplate framework see Figure 132.
Thus, the AlarmControls’s aspect object needs to contain a faceplate aspect for the
control to be visible, directly or by inheritance.

Object Lock button Alarm Control button

Figure 132. The Faceplate Header

The AlarmControl is different from all the other graphic primitives in the way that it
is not instantiated by dragging it onto a form using the Graphics Builder. Instead

3BSE030335-510 271
Lock Control Appendix A Standard Building Blocks

you have to make a copy of the AlarmControl aspect from the ObjectType Structure
of the connectivity used. If no connectivity is used, make a copy of the
AlarmControl aspect from the Graphic Structure using Plant Explorer.
For further information on the usage of an AlarmControl and faceplate
configuration, refer to Section 4, Faceplate Framework.

Lock Control
Lock Control is a template object used to indicate lock status. It will be copied to the
object type structure when it is used. In environments where several operator
workstations can control the same objects the Object lock function will give one
user the sole right to operate an object. If Autolock is enabled the object will be
locked from the moment the user opens the faceplate. When the Faceplate is closed,
the Lock Status will revert to Unlocked. If the Object Lock function is controlled
manually, the user will lock an object by clicking the Object Lock push button, see
Figure 132. In some cases the lock required option may be enabled. Then all buttons
and commands will be dimmed until the user clicks the Object Lock button.
To make sure you are using the latest kind of Object Lock, check if there is a Lock
Control aspect on the object. The Lock Control aspects communicates with the
Lock Server.
For more information about Lock Control, see Lock Control on page 106.

AspectViewCtl
The AspectViewCtl element is intended to be used as a host to any aspect you might
want to display in a graphical view. This could for an example be an alarm list
(Figure 133).

272 3BSE030335-510
Appendix A Standard Building Blocks TrendViewCtl

An aspect hosted in an AspectViewCtl is fully functional and its graphical interface


can be accessed as usual.

Figure 133. AspectViewCtl hosting an Alarm and Event List Aspect

The link to the hosted aspect is set up using the Aspect property. If the property is
clicked upon in the Properties window in the Graphics Builder a dialog is shown
allowing you to choose the aspect to be hosted in the control.

Table 71. AspectViewCtl Properties

Name Type Default Description


Aspect String - String representation of the Aspect
hosted by the AspectViewCtl element

TrendViewCtl
The TrendViewCtl element is used for showing a mini-view of a trend display in a
graphic aspect.
The link to the hosted trend display is set up using the Aspect property. When the
property is clicked upon in the Properties window in the Graphics Builder a dialog
showing trend displays is shown allowing you to choose the trend display to be
hosted in the control.

3BSE030335-510 273
Size Display Appendix A Standard Building Blocks

The trend area with grid but without axes appears on the screen. When clicking on
the TrendViewCtl the trend display is shown in a new window, see Figure 134.

Figure 134. Example of a Tend Display.

Table 72. TrendViewCtl Properties

Name Type Default Description


Aspect String - String representation of the Aspect
hosted by the TrendViewCtl element

Size Display
To achieve the best performance it is important that the graphics displayed have the
right size. If the graphics to be displayed do not fit into the container area without
resizing, recalculation is needed which will take extra time. To minimize this
problem, setup the width and height of the graphic aspects so that resizing is
unnecessary. The Size Display is provided to assist in finding out the actual size of

274 3BSE030335-510
Appendix A Standard Building Blocks Size Display

any display area used. With the information supplied (see Figure 135) it is possible
to create customer specific aspect categories or give instructions for those building
graphic aspects in a way that the graphic aspects builds fits into the Base area or a
Fixed display area of the Operator Workplace.

Figure 135. The Size Display Window

3BSE030335-510 275
Composite Object List Appendix A Standard Building Blocks

Composite Object List


The Composite Object List element provides fast access to faceplates associated to
objects in a composite object. The Composite Object List shows a list of the objects
in a composite object and it can be placed in the faceplate for the composite object
wherever you want the list to be presented. As with any other faceplate element, it is
possible to place the Composite Object List under a tab in a tab group or in the
"main view" of the faceplate. It is also possible to combine the Composite Object
List with another element.
To use the element, copy it from the Graphic Structure to a composite object type or
use aspect group.
The list element does not show any structural information at all. For example, if a
composite object A contains a formal instance of another composite object B, where
B has a number of sub objects, the list will include all subobjects in both A and B,
without being able to separate B's subobjects from A's subobjects. It just presents a
flat list of objects, see Figure 136.

Figure 136. Composite Object List Element

If you left-click an object in the list, the default aspect for that object will pop up in
a new window. There is only one pop up window, and that window will display the
default aspect associated with the latest object that was left clicked.

276 3BSE030335-510
Appendix A Standard Building Blocks Resource Tools

When right-clicking an object in the list the objects context menu will show up,
see Figure 137.

Figure 137. Composite Object List Context Menu

Resource Tools
The Resource Tools shows the number of active GDI objects and USER objects.
With this tool it is possible to insert a visual indicator, to warn the user when the
level of GDI and USER objects has reached threshold value. For example when the
threshold value for the GDI objects is exceeded its background will change color.
The threshold values and the indicator background color are possible to configure.
The default threshold values are 9000 GDI objects and 9000 USER objects.
The default indicator background color is yellow. See the example below, where the
threshold value for the GDI objects is set to 360, but default for the USER objects.

3BSE030335-510 277
ABB Subelements Appendix A Standard Building Blocks

Figure 138. An Example of the Resource Tools

To be able to use the Resource Tools a reference to AfwResourceTools 1.0 Type


Library has to be added. This is done in Components dialog box that is found in the
Aspect menu.
In addition to the GDI Watcher, 800xA has increased the perform tool with a
supervisor for GDI and USER objects.

ABB Subelements
These are basic subelements developed by ABB. They are building blocks in
Graphics Builder. You can find the subelements provided by ABB in the toolbox.

Bar

This element should be considered obsolete.


The Bar element is present for backward compatibility reasons only. In new
development the PgBar should be used instead.

278 3BSE030335-510
Appendix A Standard Building Blocks Bar

A Bar has the ability to show a bar with two hatched limit areas or four limit
markers.

Figure 139. Bar

After creation the bounding rectangle can be manipulated to change size and
position of the Bar.

Table 73. Bar Properties

Property Name Default Remarks


BackColor Black Background color of the bar
Displacement 0 Displacement of the Data Entry window
from the bar.
EnableInput False Enable generation of the events:
MouseUp, MouseDown and
MouseMove when clicked upon.
Error False True: ErrorCaption is shown. The bar is
hidden. False: The bar is shown
ErrorCaption “?” Indication for Error presentation
Font Arial 10 Bold Font used for ErrorCaption mark
FrameStyle Sunken Raised or Sunken
FrameWidth 0
FrameWidth2 0 Defines how far outside the bar the limit
object reaches.

3BSE030335-510 279
Bar Appendix A Standard Building Blocks

Table 73. Bar Properties (Continued)

Property Name Default Remarks


HighLimit1 75 Warning limit high marker placement
HighLimit1Color Grey Color of the limit and filling
HighLimit1Fill Transparent Solid or Transparent
HighLimit1Visible True Controls visibility, True or False
HighLimit2 85 Alarm limit high marker placement
HighLimit2Color Grey Color of the limit and filling
HighLimit2Fill Transparent Solid or Transparent
HighLimit2Visible True Controls visibility, True or False
LowLimit1 25 Warning limit low marker placement
LowLimit1Color Grey Color of the limit and filling
LowLimit1Fill Transparent Solid or Transparent
LowLimit1Visible True Controls visibility, True or False
LowLimit2 15 Alarm limit low marker placement
LowLimit2Color Grey Color of the limit and filling
LowLimit2Fill Transparent Solid or Transparent
LowLimit2Visible True Controls visibility, True or False
Orientation Vertical Bar orientation, Vertical or Horizontal
RangeMax 100 Top value of the bar
RangeMin 0 Bottom value of the bar
StartValue 0 Start position of value in the bar
Style FourLimits FourLimits or TwoLimits
Value 50 Value level
ValueColor Green Color of bar and question mark

280 3BSE030335-510
Appendix A Standard Building Blocks Bar

Table 73. Bar Properties (Continued)

Property Name Default Remarks


ValueColorNeg Blue Color of bar when value is below Start
Value
Additional properties for Bar are:
• Visibility on page 217

The Bar subelement generates an event:

Table 74. Event primitives

Events Description
OnMouseDown The mouse is clicked.

Event signatures. Private Sub Bar1_OnMouseDown(


ByVal button As Long,
ByVal shift As Long,
ByVal xown As Single,
ByVal yown As Single,
ByVal xcontainer As Single,
ByVal ycontainer As Single,
ByVal autoDew As Object)

3BSE030335-510 281
Bar Appendix A Standard Building Blocks

Bar Styles
The subelement Bar can have two hatched limit areas or four limit markers.

HighLimit2

HighLimit1

?
Value

LowLimit1

LowLimit2

Figure 140. Bar Styles

FourLimits
The height of the limits is 1/11 of the subelement height. The height of the bar area
(bar without frame) is 10/11 of the element height. The vertical edges of the bar area
is placed on the center of the limit headers. The FrameWidth cannot exceed 1/2 of
the width of a limit header.

TwoLimits
The bar is resized to fit the subelement. The limits are sized to fit the bar area. The
lower edge of the upper limit area is determined by HighLimit1. The upper edge of
the lower limit area is determined by LowLimit1.
The properties below are set to the given value in accordance with the chosen Style.

282 3BSE030335-510
Appendix A Standard Building Blocks Bar

Table 75. Default Property Values for Bar Styles

Property Name FourLimits TwoLimits


BackColor Black Black
Error False False
ErrorCaption “?” “?”
Font Arial 10 Bold Arial 10 Bold
Field1Visible True True
FrameStyle Sunken Sunken
FrameWidth 1 1
HighLimit2 85
HighLimit2Fill Transparent
HighLimit2Color Grey
HighLimit2Visible True
HighLimit1 75 75
HighLimit1Fill Transparent Transparent
HighLimit1Color Grey Grey
HighLimit1Visible True True
LowLimit1 25 25
LowLimit1Fill Transparent Transparent
LowLimit1Color Grey Grey
LowLimit1Visible True True
LowLimit2 15
LowLimit2Fill Transparent
LowLimit2Color Grey

3BSE030335-510 283
Property Elements Appendix A Standard Building Blocks

Table 75. Default Property Values for Bar Styles (Continued)

Property Name FourLimits TwoLimits


LowLimit2Visible True
Orientation Vertical Vertical
RangeMax 100 100
RangeMin 0 0
StartValue 0 0
Value 50 50
ValueColor Green Green
ValueColorNeg Blue Blue

Property Elements
Property elements greatly simplify the process of implementing faceplate elements.
It is no longer a necessity to write VB code to implement input functions, although
still possible.
Property elements have more functionality than basic subelements, they are also
developed by ABB. They facilitate presentation of process values, and can handle
input operations to process variables and work as building blocks in Graphics
Builder.
Property elements are located at the SubElements object in the Graphics structure
of Plant Explorer. You find them in the Toolbox under Subelements. Open the
Graphic Libraries window in the Tools menu to populate the toolbox.
The Following elements are described:
• Indicator
• Push Button
• Toggle Button
• IBar

284 3BSE030335-510
Appendix A Standard Building Blocks Property Elements

• Input Field
• CheckBox
• Option Button
• Apply Button
• Cancel Button

CancelButton
CheckBox ApplyButton
IBar InputField
Indicator
OptionButton
ToggleButton
PushButton

Figure 141. Property Elements

3BSE030335-510 285
Indicator Appendix A Standard Building Blocks

Indicator
The indicator element implements an On-Off presentation by means of a filled or an
unfilled rectangle.
Clicking at the element, in case input is enabled and in case the user is authorized to
change the value, brings up a DEW with a set and a reset button. The element
indicates that input is enabled by raising the indicator. The Indicator element is
windowless and transparent.
The properties for Indicator are listed in Table 76.

Table 76. Indicator Properties

Name Type Default Description


AppError Enum 0 = Good Property that, in
corporation with
OpcStatus, controls the
Bad (2) and Uncertain (1)
presentation of the
indicator.

Displacement Integer 4 The distance in the X


dimension, between the left
side of the control and
DEW.
EnableInput Boolean True Needs to be “True” to allow
input.
Font Font Tahoma The font used for caption of
the Boolean DEW.
FrameColor OLE_COLOR &H00DFDFDF& Color of left top part of 3D
frame.
FrameColor2 OLE_COLOR &H007F7F7F& Color of bottom right part of
3D frame.

286 3BSE030335-510
Appendix A Standard Building Blocks Indicator

Table 76. Indicator Properties (Continued)

Name Type Default Description


FrameWidth Integer 3 Width of 3D frame used to
indicate input enabled.
IndicatorColor OLE_COLOR &H00FFFFFF& The color of the indicator
LineWidth Integer 3 Width of the line.
OpcStatus Integer 192 = Good Controls the presentation
of bad and uncertain
values from opc.
OpcStatus is only used
when SetProperty has
been overridden using an
expression.
ResetCaption String "Off" Caption of the set button on
the Boolean DEW.

ResetProperty ObjectPropertyRef Empty Reference to the object


property that to which
ResetValue is written in a
reset operation.
As with the SetProperty,
the property can also be
assigned an expression via
the Expression Builder or
VB code. That overrides
the property reference set
in the Properties window.
If ResetProperty is left
empty, reset operations use
SetProperty
ResetValue Variant False The value used in the reset
operation

3BSE030335-510 287
Indicator Appendix A Standard Building Blocks

Table 76. Indicator Properties (Continued)

Name Type Default Description


SetCaption String "On" Caption of the set button on
the Boolean DEW.

SetProperty ObjectPropertyRef Empty Reference to the object


property to which SetValue
is written in a set operation.
The value presented by the
indicator is set to true if
SetProperty is equal to
SetValue.The property can
also be assigned an
expression via the
Expression Builder or VB
code. This would override
the reference set in the
Properties Window.
SetValue Variant True The value used in the set
operation.

Events. •Public Event OnChange (value As Variant, ByRef valid As Boolean)


• Public Event OnApply (value As Variant, ByRef cancel As Boolean)
More information on events used by property elements is found in Section 6,
Configuring Faceplate Elements.

288 3BSE030335-510
Appendix A Standard Building Blocks Push Button

Push Button
Functions of the Push button property element are:
• It allows write operations to be performed towards an object property.
• It can be used to perform Increase/Decrease operations towards the property.
• It can indicate the state of the property by staying in its sunken position. In this
case, it can be used to implement an option button behavior.
The data type of the property written to, can theoretically be any type that can be
handled by a Variant. Variable types that seem reasonable are Boolean, Integer, Real
and String. To support increase/decrease of the number of operations, the type of the
property must be numeric.
The push button element is windowless and transparent.

Table 77. Push Button Properties

Property Type Default Description


Action Enum SystemDefault Determines if a direct or an
applied action is performed
by the element.
Caption String “On” The text on the push button
DisableColor OLE_COLOR &H00808080& Color of the disabled text
EnableInput Boolean True When set to false, the push
button cannot be pressed
and it is dimmed.
FillColor OLE_COLOR &H00C0C0C0& Color of button background
Font Font Tahoma The font of the text
FrameColor OLE_COLOR &H00DFDFDF& Color of left top part of 3D
frame
FrameColor2 OLE_COLOR &H007F7F7F& Color of the bottom right
part the 3D frame
FrameWidth Integer 3 Width of 3D frame

3BSE030335-510 289
Push Button Appendix A Standard Building Blocks

Table 77. Push Button Properties (Continued)

Property Type Default Description


IndicateValue Boolean False When set to true, the
button stays in when the
value of the property
referenced by PropertyRef
equals Value. In this case,
standard error presentation
is based on quality of the
object property referenced
by PropertyRef.
OptionButtonsGroup Integer 0 This property is valid only
when IndicateValue is true.
In that case it is determined
which "local" option” button
group the PushButton is
part of.
PropertyRef ObjectPropertyRef Empty Reference to the object
property to which a write
operation is performed,
when the push button is
pressed.
The property can also be
assigned an expression via
the Expression Builder or
VB code. This overrides the
reference set in the
Properties window.
Step Boolean False When set to true, an
increase/decrease
operation is performed
when the button is pushed.
The step size is defined by
the Value property.

290 3BSE030335-510
Appendix A Standard Building Blocks Toggle Button

Table 77. Push Button Properties (Continued)

Property Type Default Description


TextColor OLE_COLOR &H00000000& Color of caption
Value Variant True The value written to the
PropertyRef property when
the push button is pressed.

Events.
• Public Event OnChange (ByVal value As Variant, ByRef valid As Boolean)
• Public Event OnApply (ByVal value As Variant, ByRef valid As Boolean)
More information on events used by property elements is found in Section 6,
Configuring Faceplate Elements.

Toggle Button
The Toggle button element implements an On-Off presentation by being presented
in a raised or in a sunken state. At the same time, it allows the user to toggle a
process state, i.e. when the button is pressed from its raised position, a set operation
is performed. And conversely, when the button is clicked at in its sunken position, a
reset operation is performed.
Note: The operation performed on the object depends on the state of the button,
which, in turn, depends on subscribed data. Thus, if subscribed data are wrong, then
the operation performed, may be the opposite of the operators intention. If this is a
concern, select a solution, in which the operation does not depend on subscribed
data, e.g. use two buttons or use the indicator element.

3BSE030335-510 291
Toggle Button Appendix A Standard Building Blocks

If EnableInput is set to false, the text of the Toggle button is dimmed to indicate it
does not respond to click operations. It is also dimmed if WriteAccessGranted.

Table 78. Toggle Button Properties

Property Type Default Description


Action Enum SystemDefault Determines if a direct or an
applied action is performed
by the element.
AppError Integer 0 = Good Property that, in
corporation with
OpcStatus, controls the
Bad (2) and Uncertain (1)
presentation of the button.
DisableColor OLE_COLOR &H00808080& Color of the disabled text
EnableInput Boolean True If not set, input is not
possible.
FillColor OLE_COLOR &H00C0C0C0& Color of button background
Font Font Tahoma The font used for caption.
FrameColor OLE_COLOR &H00DFDFDF& Color of left top part of 3D
frame in the buttons raised
state and of the bottom
right part in the sunken
state.
FrameColor2 OLE_COLOR &H007F7F7F& Color of left top part of 3D
frame in the buttons raised
state and of the bottom
right part in the sunken
state.
FrameWidth Integer 3 Width of 3D frame

292 3BSE030335-510
Appendix A Standard Building Blocks Toggle Button

Table 78. Toggle Button Properties (Continued)

Property Type Default Description


OpcStatus Integer 192 = Good Controls the presentation
of bad and uncertain
values from opc.
OpcStatus is only used
when SetProperty has
been overridden using an
expression.
ResetCaption String “Off” Caption of the button in its
raised state.
ResetProperty ObjectPropertyRef Empty Reference to the object
property that receives
ResetValue in a reset
operation. If ResetProperty
is left empty, reset
operations are performed
on the object property
referenced by SetProperty
If ResetProperty has a
value and the
corresponding
WriteAccessGranted sub
property is not true, then
the button is dimmed to
indicate "Input not
allowed".
The property can also be
assigned an expression via
the Expression Builder or
VB code. This overrides the
reference set in the
Properties window.
ResetValue Variant False The value used in the reset
operation.

3BSE030335-510 293
Toggle Button Appendix A Standard Building Blocks

Table 78. Toggle Button Properties (Continued)

Property Type Default Description


SetCaption String “On” Caption of the button in its
sunken state.
SetProperty ObjectPropertyRef Empty Reference to the object
property that receives
SetValue in a set operation.
If the WriteAccessGranted
sub property, of the
referenced property, is not
true, then the button is
dimmed to indicate "Input
not allowed".
The value presented by the
indicator is set to true if
SetProperty is equal to
SetValue.The property can
also be assigned an
expression via the
Expression Builder or VB
code. This overrides the
reference set via the
Properties window.
SetValue Variant True The value used in the set
operation.
TextColor OLE_COLOR &H00FFFFFF& The color of caption text.

Events.
• Public Event OnChange (ByVal value As Variant, ByRef valid As Boolean)
• Public Event OnApply (ByVal value As Variant, ByRef valid As Boolean)
More information on events used by property elements is found in Section 6,
Configuring Faceplate Elements.

294 3BSE030335-510
Appendix A Standard Building Blocks IBar

IBar
The IBar element presents a numeric value in a bar format.
It also presents limit values. Limits are presented either in the limit marker or the
hatched limit area formats. Up to eight limits can be presented in the limit marker
format. Two limits can be shown in the hatched limit area format.

Table 79. IBar Properties

Property Type Default Description


AppError Enum 0 = Good Property that, in
corporation with
OpcStatus, controls the
Bad (2), Uncertain (1)
and good (0)
presentation of the
indicator.
BarBackground OLE_COLOR &H007F7F7F& Background color of
the bar.
Displacement Integer 3 Displacement of direct
input window.
EnableInput Boolean True Controls whether “input
value” operations can
be initiated by clicking
at the bar.
EnableInputLimits Boolean False Controls whether "input
value" operations can
be initiated by clicking
at the bar.
ForegroundColor OLE_COLOR &H00DF0000& Foreground color of the
bar.
FrameColor OLE_COLOR &H00DFDFDF& Color of left top part of
3D frame.

3BSE030335-510 295
IBar Appendix A Standard Building Blocks

Table 79. IBar Properties (Continued)

Property Type Default Description


FrameColor2 OLE_COLOR &H007F7F7F& Color of the bottom
right part of the 3D
frame.
FrameWidth Integer 3 Width of 3D frame
FrameWidth2 Integer 2 Distance with which
limit arrows exceeds
out the 3D frame of the
bar
LimitHeight Integer 9 Controls the height of
the "arrow" for limits in
the EigthLimits style.
LimitLineWidth Integer 1 Line width of limits in
the EightLimits style.
OPCStatus Integer 192=good Controls the
presentation of bad
and uncertain values
from opc. OpcStatus is
only used when
SetProperty has been
overridden using an
expression.
Orientation Enum Vertical The orientation can be
either be vertical or
horizontal
RangeMax Single 100.0 Max value of presented
range
RangeMin Single 0.0 Min. value of presented
range
Style Enum EightLimits See Figure 105.

296 3BSE030335-510
Appendix A Standard Building Blocks IBar

Table 79. IBar Properties (Continued)

Property Type Default Description


ValueRef ObjectPropertyRef Empty Reference to an object
property that controls
the value presented by
the bar. The property
also controls the
source for OPC error
presentation. Input
operations to "the
value" of the bar are
also performed to the
object property
referenced by this
property.
Visibility Boolean True Controls the visibility of
the bar.

More information on events used by property elements is found in Section 6,


Configuring Faceplate Elements.
In addition, the IBar has 8 sets of the following properties. X in each name is 1 to 8.

Table 80. IBar Additional Properties

Property Data type Default Value Description


LimitXColor OLE_COLOR &H007F7F7F& The color of limit X.
LimitXFill Enum Filled Controls whether the
"tail" of a marker style
limit is filled or not.

3BSE030335-510 297
IBar Appendix A Standard Building Blocks

Table 80. IBar Additional Properties (Continued)

Property Data type Default Value Description


LimitXStyle Enum Invisible Controls the style of
limit X. Possible values
of the property are:
LeftSideSymmetric,
LeftSideLeft,
LeftSideRight,
RightSideSymmetric,
RightSideLeft,
RightSideRight,
Invisible
LimitXValue ObjectPropertyRef "" Used to define the
object property from
which presented data
is read and to which
write operations are
performed relating to
limit X.
StartValue Double 0.0 The Start value
ValueColorNeg OLE_COLOR &H00FF0000& The color of
ValueColorNeg

Events.
• Public Event OnChange (ByVal value As Variant, ByRef valid As Boolean)
• Public Event OnApply (ByVal value As Variant, ByRef valid As Boolean)
• Public Event OnStartSession(ByVal Target As Integer, ByRef Cancel As
Boolean)
The OnStartSession event can be used to disable input for individual limits,
rather than disabling all limits by setting the EnableInput limits property to
false. The target parameter specifies which limit the user clicks at (1=limit1,
2=limit2 ...). By setting the cancel parameter to false, no input operation is
started.

298 3BSE030335-510
Appendix A Standard Building Blocks Input Field

Input Field
This element is used to show and change the value of an object property, where the
object property can be of a number of data types. See property DataType for a list of
available types. If input is enabled, the user can click at the element to bring up a
direct entry window that is suitable for the selected data type.
Formatting rules is found in Direct Entry Windows on page 309.

Table 81. Input Field Properties

Property Type Default Description


AppError Enum 0 = Good Property that, in
corporation with
OpcStatus, controls the
Bad (2) and Uncertain
(1) presentation of the
button.
DataType Enum Real The DataType property
determines the type of
the Direct Entry
Window that is created
when the user clicks at
the element.
The property also
determines the default
formatting used for
respective data type.
Possible Values are:
Real
Integer
String
DateTime
Time

3BSE030335-510 299
Input Field Appendix A Standard Building Blocks

Table 81. Input Field Properties (Continued)

Property Type Default Description


EnableInput Boolean True Set to True, the Input
Field fires a Direct
Entry Window when
pressed, to allow input
of a value (Figure 142).
FillColor OLE_COLOR &H00C0C0C0& Background color of
the text object.
Font Font Tahoma The font used for text.
Format String "" Format string for the
presented value in
Excel format. If the
Format property is
empty, then a standard
format that depends on
the DataType property
is used. The Format
property is not effective
and should not be set
when the selected
DataType is time
(interval).
FrameColor OLE_COLOR &H00DFDFDF& Color of left top part of
3D frame.
FrameColor2 OLE_COLOR &H007F7F7F& Color of the bottom
right part the 3D frame.
FrameWidth Integer 3 Width of 3D frame used
to indicate that an input
operation could be
started clicking at the
element.

300 3BSE030335-510
Appendix A Standard Building Blocks Input Field

Table 81. Input Field Properties (Continued)

Property Type Default Description


Max Single - Sets the maximum
value that can be
entered into the DEW
Min Single - Sets the minimum
value that can be
entered into the DEW.
NumberOfDecimals Integer 2 Property that controls
the number of decimals
presented by the input
element, in case the
data type is Real and
when the Format
property is empty.
OpcStatus Integer 192 = Good Controls the
presentation of bad
and uncertain values
from opc. OpcStatus is
only used when
SetProperty has been
overridden using an
expression.
PropertyRef ObjectPropertyRef Empty Reference to the object
property to be
represented by the
Input element.
An expression written
via the expression
builder overrides the
reference set in
Properties window.
ShowMillieSeconds Boolean - Currently not used.

3BSE030335-510 301
Input Field Appendix A Standard Building Blocks

Table 81. Input Field Properties (Continued)

Property Type Default Description


StepSize Integer 1 Controls the step
between possible
values in the DEW.
TextAlignment Enum Center Enum that specifies,
left, center or right
adjusted text.
TextColor OLE_COLOR White Color or the text.
ActivateCondition Boolean False Property used to
control Direct entry
windows invocation.
Connected to an
expression. True when
data has been received
via data subscription.
DefaultActivation Enum 0 = Deactivated Property used to
control Direct entry
windows invocation.
Can be set to:
Deactivated, Activated,
Reactivated and
SystemDefault. See
Automatically Invoked
Direct Entry Windows
on page 151.

Figure 142. Input Field DEW

302 3BSE030335-510
Appendix A Standard Building Blocks CheckBox

Events.
• Public Event OnChange (ByVal value As Variant, ByRef valid As Boolean)
• Public Event OnApply (ByVal value As Variant, ByRef valid As Boolean)
More information on events used by property elements is found in Section 6,
Configuring Faceplate Elements.

CheckBox
The CheckBox element visually looks like the built in VB check box. It is similar to
the ToggleButton element, i.e. it implements an On-Off presentation by being
presented in a checked or unchecked state. At the same time, it allows the user to
toggle a process state, i.e. when the CheckBox is clicked at in its unchecked state, a
set operation is performed. And conversely, when the CheckBox is clicked at in its
checked state a reset operation is performed.

The operation performed on the object depends on the state of the CheckBox,
which, in turn, depends on subscribed data. Thus, if subscribed data is wrong,
then the operation performed, may be the opposite of the operators intention. If
this is a concern, select a solution, in which the operation does not depend on
subscribed data, e.g. use two buttons or use the indicator element.

The grayed state that exists in the VB check box is not, at this point, defined for
the CheckBox element.

The CheckBox element does not support standard error presentation.

The CheckBox element does not have full Unicode support and requires the
correct language setting when using Far East languages, see NLS Handling of Far
East Languages in Graphics on page 98.

3BSE030335-510 303
CheckBox Appendix A Standard Building Blocks

The CheckBox element is not windowless and transparent, tool tip does not show.

Table 82. CheckBox Properties

Property Type Default Description


Action Enum SystemDefault Determines if a direct
or an applied action is
performed by the
element.
Caption String "Check" Caption of the
CheckBox.
EnableInput Boolean True If not set, input is not
possible.
Font Font Tahoma The font used for
caption.
ForeColor OLE_COLOR &H00000000& The color of caption
text.

304 3BSE030335-510
Appendix A Standard Building Blocks CheckBox

Table 82. CheckBox Properties (Continued)

Property Type Default Description


ResetProperty ObjectPropertyRef Empty Reference to the object
property that receives
ResetValue in a reset
operation.
If ResetProperty is left
empty, reset operations
are performed on the
object property
referenced by
SetProperty.

If ResetProperty has a
value and the
corresponding
WriteAccessGranted
sub property is not
true, then the check
box does not react to
click operations.
The property can be
overridden by an
expression set via the
Expression Builder or
via VB code.
ResetValue Variant False The value used in the
reset operation.

3BSE030335-510 305
CheckBox Appendix A Standard Building Blocks

Table 82. CheckBox Properties (Continued)

Property Type Default Description


SetProperty ObjectPropertyRef Empty Reference to the object
property that receives
SetValue in a set
operation.
The value presented by
the indicator is set to
true if SetProperty is
equal to SetValue.
If the
WriteAccessGranted
sub property, of the
referenced property, is
not true, then the check
box does not react to
click operations.
The property can also
be set by an
expression via
Expression Builder, it
can also be set from
VB code.
SetValue Variant True The value used in the
set operation.

Events.
• Public Event OnChange (ByVal value As Variant, ByRef valid As Boolean)
• Public Event OnApply (ByVal value As Variant, ByRef valid As Boolean)
More information on events used by property elements is found in Section 6,
Configuring Faceplate Elements.

306 3BSE030335-510
Appendix A Standard Building Blocks Option Button

Option Button
The Option button element is similar to the built in VB option button. When you
click on an Option button in a group, it is checked, and all others in the group are
unchecked.
The Option button element does not have full Unicode support and requires the
correct language setting when using Far East languages, see NLS Handling of Far
East Languages in Graphics on page 98.
The Option button element is not windowless and transparent, tooltip does not
show.

Table 83. Option Button Properties

Property Type Default Description


Action Enum SystemDefault Determines if a direct
or an applied action is
performed by the
element.
Caption String "On" The text on the push
option.
EnableInput Boolean True When set to false, the
option button cannot be
pressed does not react
to clicking.
Font Font Tahoma The font of the caption.
OptionButtonGroup Integer 0 Determines which
"local" option button
group the option button
is part of.

3BSE030335-510 307
Option Button Appendix A Standard Building Blocks

Table 83. Option Button Properties (Continued)

Property Type Default Description


PropertyRef ObjectPropertyRef Empty Reference to the object
property to which a
write operation is
performed, when the
option button is
pressed.
The property can be
overridden by an
expression set via the
Expression Builder or
via VB code.
TextColor OLE_COLOR &H00000000& Color of caption.
Value Variant True The value written to the
PropertyRef property
when the option button
is pressed.

When an input
operation is not in
progress, the option
button is checked if
value of the object
property referenced by
PropertyRef is equal to
Value.

Events.
• Public Event OnChange (ByVal value As Variant, ByRef valid As Boolean)
• Public Event OnApply (ByVal value As Variant, ByRef valid As Boolean)
More information on events used by property elements is found in Section 6,
Configuring Faceplate Elements.

308 3BSE030335-510
Appendix A Standard Building Blocks Apply Button

Apply Button
Clicking the Apply button applies the entered value and is equivalent to pressing the
Enter key.
The Apply button is dimmed when there is no valid value to enter.

Figure 143. The Apply Button

Cancel Button
Clicking the Cancel button cancels the input session.

Figure 144. The Cancel button

Direct Entry Windows


For more information of handling of Direct Entry Window see Configuring Direct
Entry Windows on page 143.

3BSE030335-510 309
PgDEW Appendix A Standard Building Blocks

PgDEW
The PgDEW object is used by faceplate elements or other graphic aspects to control
the lifetime of a Direct Entry Window. The PgDEW also allows data independent
retrieval of data from the DEW.

Table 84. PgDEW Methods

Method Description
Function GetTypedDew() As Object Returns a pointer to the typed DEW
attached to the non-typed DEW.
Function GetValue() As Variant Returns the DEW’s current value.
Sub PlaceAtPosition(ByVal container As Positions the dialog relative to a containers
Object, ByVal posX As Long, ByVal posY window. PosX and posY are coordinates
As Long) relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Positions the dialog to the right of the
Object, ByVal displacementX As Long, control primitive.
ByVal displacementY As Long) DisplacementX/Y – The distance in pixels
between upper-right corner of the control
and the upper-left corner of the DEW
dialog.
Sub PositionUnder(ByVal primitive As Positions the dialog under the control.
Object, ByVal displacementX As Long, DisplacementX/Y – The distance in pixels
ByVal displacementY As Long, ByVal between lower-left corner of the control and
adaptWidth As Boolean) the upper-left corner of the DEW dialog.
AdaptWidth – Has no effect.
Sub SetValue(ByVal Value As Variant) Sets the value to be shown in DEW.
Sub Show(ByVal Show As Boolean) Shows DEW dialog. Prior to calling this
method, one of the three positioning
methods above must be called.

310 3BSE030335-510
Appendix A Standard Building Blocks PgNumericDEW

Events.
• Event OnChange (Value, Valid as Boolean)
Value Change
• Event OnHandsOff ()
Release DEW

PgNumericDEW
Object capable of displaying a dialog where the user can enter a float value.

Table 85. PgNumericDEW Methods

Method Description
Function GetDEW() As IPgDEW Returns a PgDew object.
Function GetValue() As Single Returns the DEW’s current value.
Sub EnableLimits(ByVal EnableLimits As Enables/disables limit checking of the input
Boolean, ByVal NormalStep As Single) value and sets the step size used in the
increase/decrease operations. By default,
limit checking is turned on and the normal
step size is set to 1.
Sub PlaceAtPosition(ByVal container As Positions the dialog relative to a containers
Object, ByVal posX As Long, ByVal posY window. PosX and posY are coordinates
As Long) relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Positions the dialog to the right of the
Object, ByVal displacementX As Long, control primitive.
ByVal displacementY As Long) DisplacementX/Y – The distance in pixels
between upper-right corner of the control
and the upper-left corner of the DEW
dialog.

3BSE030335-510 311
PgIntegerDEW Appendix A Standard Building Blocks

Table 85. PgNumericDEW Methods (Continued)

Method Description
Sub SetMinMax(ByVal MinValue As Single, Sets the min. and max value boundaries.
ByVal MaxValue As Single) The step size is also set to 1/100 times the
span between min. and max.
If this method not has been called, the
default min. and max values are 0 and 100
and the step size is 1.
Sub SetNumberOfDecimals(ByVal Sets the number of decimals to be
NoOfDecimals As Long) displayed.
Sub SetValue(ByVal Value As Single) Sets the value to be shown in DEW. This
value is NOT limited.
Sub Show(ByVal Show As Boolean) Shows DEW dialog. Prior to calling this
method, one of the three positioning
methods above must be called.
Sub PositionUnder(ByVal primitive As Position DEW under a primitive.
Object, ByVal displacementX As Long,
ByVal displacementY As Long, ByVal
adaptWidth As Boolean)

PgIntegerDEW
Object capable of displaying a dialog where the user can enter an integer value.

Table 86. PgIntegerDEW Methods

Method Description
Function GetDEW() As IPgDEW Returns a PgDEW object.
Function GetValue() As Long Returns the DEW’s current value.
Sub EnableLimits(ByVal EnableLimits As Controls whether incr./decr. can exceed the
Boolean, ByVal NormalStep As Long) max/min values.

312 3BSE030335-510
Appendix A Standard Building Blocks PgIntegerDEW

Table 86. PgIntegerDEW Methods (Continued)

Method Description
Sub PlaceAtPosition(ByVal container As Positions the dialog relative to a containers
Object, ByVal posX As Long, ByVal posY window. PosX and posY are coordinates
As Long) relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Positions the dialog to the right of the
Object, ByVal displacementX As Long, control primitive.
ByVal displacementY As Long) DisplacementX/Y – The distance in pixels
between upper-right corner of the control
and the upper-left corner of the DEW
dialog.
Sub PositionUnder(ByVal primitive As Positions the dialog under the control.
Object, ByVal displacementX As Long, DisplacementX/Y – The distance in pixels
ByVal displacementY As Long, ByVal between lower-left corner of the control and
adaptWidth As Boolean) the upper-left corner of the DEW dialog.
Sub SetMinMax(ByVal MinValue As Long, Sets the min. and max value boundaries.
ByVal MaxValue As Long) The step size is also set to 1/100 times the
span between min. and max (1 is the
smallest possible step size).
If this method not has been called, the
default min. and max values are 0 and 100
and the step size is 1.
Sub SetValue(ByVal Value As Long)Sets Sets the value to be shown in DEW. This
the value to be shown in DEW. This value value will is NOT limited.
will is NOT limited.
Sub Show(ByVal Show As Boolean) Shows DEW dialog. Prior to calling this
method, one of the three positioning
methods above must be called.

3BSE030335-510 313
PgStringDEW Appendix A Standard Building Blocks

PgStringDEW
Object capable of displaying a dialog where the user can enter a string value.

Table 87. PgStringDEW Methods

Method Description
Function GetDEW() As IPgDEW Creates an instance of the non-typed DEW
and returns a pointer to it.
Function GetValue() As String Returns the DEW’s current value.
Sub PlaceAtPosition(ByVal container As Positions the dialog relative to a containers
Object, ByVal posX As Long, ByVal posY window. PosX and posY are coordinates
As Long) relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Positions the dialog to the right of the
Object, ByVal displacementX As Long, control primitive.
ByVal displacementY As Long) DisplacementX/Y – The distance in pixels
between upper-right corner of the control
and the upper-left corner of the DEW
dialog.
Sub SetValue(ByVal Value As String) Sets the value to be shown in DEW.
Sub Show(ByVal Show As Boolean) Shows DEW dialog. Prior to calling this
method, one of the three positioning
methods above must be called.
Sub PositionUnder(ByVal primitive As Positions the dialog under the control.
Object, ByVal displacementX As Long, DisplacementX/Y – The distance in pixels
ByVal displacementY As Long, ByVal between lower-left corner of the control and
adaptWidth As Boolean) the upper-left corner of the DEW dialog.

314 3BSE030335-510
Appendix A Standard Building Blocks PgBoolDEW

PgBoolDEW
Object capable of displaying a dialog where the user can chose a true or false state.

Table 88. PgBoolDEW Methods

Method Description
Function GetDEW() As IPgDEW Returns a PgDEW object.
Function GetValue() As Boolean Returns the DEW’s current value.
Sub PlaceAtPosition(ByVal container As Positions the dialog relative to a containers
Object, ByVal posX As Long, ByVal posY window. PosX and posY are coordinates
As Long) relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Positions the dialog to the right of the
Object, ByVal displacementX As Long, control primitive.
ByVal displacementY As Long) DisplacementX/Y – The distance in pixels
between upper-right corner of the control
and the upper-left corner of the DEW
dialog.
Sub PositionUnder(ByVal primitive As Positions the dialog under the control.
Object, ByVal displacementX As Long, DisplacementX/Y – The distance in pixels
ByVal displacementY As Long, ByVal between lower-left corner of the control and
adaptWidth As Boolean) the upper-left corner of the DEW dialog.
Sub SetButtonText(ByVal eButton As Sets the text to be displayed on one of the
PGDIRECTENTRYWINDOWLib.TF_BUTT buttons.
ON, ByVal bstrText As String) Public Enum TF_BUTTON
TF_TRUE_BUTTON = 1
TF_FALSE_BUTTON
End Enum
Values for the eButton parameter are
TF_TRUE_BUTTON and
TF_FALSE_BUTTON.
Sub SetValue(ByVal Value As Boolean) Sets the value to be shown in DEW.

3BSE030335-510 315
PgTimeDEW Appendix A Standard Building Blocks

Table 88. PgBoolDEW Methods (Continued)

Method Description
Sub Show(ByVal Show As Boolean) Shows DEW dialog. Prior to calling this
method, one of the three positioning
methods above must be called.
Sub SetFont(ByVal pUnk As Unknown) Set the font of the buttons. pUnk must point
to an object that supports the interface
IFont. In Visual Basic an object of the type
StdFont can be used.

PgTimeDEW
Object capable of displaying a dialog where the user can enter a time span string.
The time span value is stored as a numeric value representing the time span in
milliseconds.

Formatting Rules
When the user changes the string value in the dialog the string is parsed and
translated to a value representing the time span in milliseconds and the other way
around when the SetValue method is called the milliseconds value is formatted to a
time span string.

Standard time span string format. N1T1 N2T2 N3T3 N4T4


Nx Integer values.
Tx Time identifier strings.
The parsing mechanism accepts optional space characters between the integer
values and the case insensitive time identifier strings. For every time unit any of the
corresponding time identifier strings (see table below) can be used when entering
values in the dialog.

316 3BSE030335-510
Appendix A Standard Building Blocks PgTimeDEW

Time Identifier Strings:

Table 89. PgTimeDEW Identifier Strings

Time unit Case insensitive time identifier string


Value = 1Long format Value > 1Long format Short format
Year " Year” " Years "“Y”
Month " Month "" Months ""MO"
Day " Day "" Days "“D”
Hour ” Hour "“ Hours "“H"
Minute " Minute” ” Minutes” "M”
Second " Second "“ Seconds "”S”
Millisecond " Millisecond "“ Milliseconds” ”MS”

Input Examples.
User input string: “57m 12s”
Value in milliseconds: 3432000
User input string: “57 Minutes 12s”
Value in milliseconds: 3432000
User input string: “ 57 M 12 s ”
Value in milliseconds: 3432000
User input string: “12sec”
The parsing failed and the value is invalid. The Valid flag in the OnChange callback
is set to false.

3BSE030335-510 317
PgTimeDEW Appendix A Standard Building Blocks

Output Examples.

The method SetValue is called with a value of 37302.


SetValue 37302
Displayed time span string: “37S 302MS”

Table 90. PgTimeDEW Methods

Method Description
Function GetDEW() As IPgDEW Returns a PgDEW object.
Function GetValue() As Double Returns the DEW’s current value in
milliseconds.
Sub PlaceAtPosition(ByVal container As Positions the dialog relative to a containers
Object, ByVal posX As Long, ByVal posY window. PosX and posY are coordinates
As Long) relative to the containers upper left corner.

Sub PositionRightOf(ByVal primitive As Positions the dialog to the right of the


Object, ByVal displacementX As Long, control primitive.
ByVal displacementY As Long) DisplacementX/Y – The distance in pixels
between upper-right corner of the control
and the upper-left corner of the DEW
dialog.
Sub PositionUnder(ByVal primitive As Positions the dialog under the control.
Object, ByVal displacementX As Long, DisplacementX/Y – The distance in pixels
ByVal displacementY As Long, ByVal between lower-left corner of the control and
adaptWidth As Boolean) the upper-left corner of the DEW dialog.

318 3BSE030335-510
Appendix A Standard Building Blocks PgDateDEW

Table 90. PgTimeDEW Methods (Continued)

Method Description
Sub SetValue(ByVal Value As Double) Sets the time span value in milliseconds.
The value is formatted to a time span string
that is displayed in the DEW.
Sub Show(ByVal Show As Boolean) Shows DEW dialog. Prior to calling this
method, one of the three positioning
methods above must be called.
Sub SetShowSignificant(ByVal lVal As Sets number of significant time unit fields to
Long) show. The default value is two significant
fields.
VB Example:
SetShowSignificant 3
SetValue 60123
Output time span string:“1M 2S 123MS”
Sub SetShortTimeFormat(ByVal bVal As Sets short or long printout format. See table
Boolean) above. The default printout format is short.

PgDateDEW
Object capable of displaying a dialog where the user can enter a time and date span
string.

3BSE030335-510 319
PgDateDEW Appendix A Standard Building Blocks

Table 91. PgDateDEW

Method Description
Function GetDEW() As IPgDEW Returns a PgDEW object.
Function GetValue() As Double Returns the DEW’s current value.
Sub PlaceAtPosition(ByVal container As Positions the dialog relative to a containers
Object, ByVal posX As Long, ByVal posY window. PosX and posY are coordinates
As Long) relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Positions the dialog to the right of the
Object, ByVal displacementX As Long, control primitive.
ByVal displacementY As Long) DisplacementX/Y – The distance in pixels
between upper-right corner of the control
and the upper-left corner of the DEW
dialog.
Sub PositionUnder(ByVal primitive As Positions the dialog under the control.
Object, ByVal displacementX As Long, DisplacementX/Y – The distance in pixels
ByVal displacementY As Long, ByVal between lower-left corner of the control and
adaptWidth As Boolean) the upper-left corner of the DEW dialog.
Sub SetValue(ByVal Value As Double) Sets the time span value.
Sub Show(ByVal Show As Boolean) Shows DEW dialog. Prior to calling this
method, one of the three positioning
methods above must be called.

320 3BSE030335-510
Appendix A Standard Building Blocks Symbol Factory Control

Symbol Factory Control


Symbol Factory Control is a library containing a vast variety of symbols for static
information. Add symbols by selecting Symbol Factory Controls and SFStandard
tool. Add it to the display.

SFStandard tool

Figure 145. Symbol Factory Controls

Change the symbol by right-click and choose Properties. Select, for example Valve
and the right symbol.

Figure 146. Symbol Factory Properties Window

Add the other Symbol Factory Control symbols using the same procedure.

3BSE030335-510 321
Usage of GDI and USER objects Appendix A Standard Building Blocks

Usage of GDI and USER objects


The following tables describes the consumption of windows resources for the
standard building blocks. Be aware of that there is a process limitation of 10,000
USER objects and 10,000 GDI objects. One should have this in mind when
configuring graphic aspects.

Table 92. Graphic Primitives

Control Name User Objects GDI Objects


AdvantRectangle 0 0
AdvantEllipse 0 0
AdvantChord 0 0
AdvantArc 0 0
AdvantPie 0 0
AdvantPolyline 0 0
AdvantPolygon 0 0
AdvantBezier 0 0
AdvantPipe 0 0
AdvantCone 0 0
AdvantVScale 0 0
AdvantHScale 0 0
AdvantLimit 0 0
AdvantText 0 0
AdvantNumeric 0 0
AdvantBar 0 0
AdvantObjectTrim 1 0

322 3BSE030335-510
Appendix A Standard Building Blocks Usage of GDI and USER objects

Table 92. Graphic Primitives (Continued)

Control Name User Objects GDI Objects


PgErrorInd 0 0
PgBar 0 0

Table 93. Extended Primitives

Control Name User Objects GDI Objects


AdvantIntegerLimit 0 0
AdvantIntegerPercent 0 0
AdvantIntegerPercent 0 0
AdvantInteger3DButton 0 0
AdvantBarLimits 0 0
AdvantLabel3DSquare 0 0
AdvantLabel 0 0
Advant3DDiamond 0 0
AdvantArrow 0 0
AdvantMixer 0 0
AdvantMotor 0 0
AdvantPumpFlow 0 0
AdvantFanFlow 0 0
AdvantMotorMultiSpeed 0 0
Advant3DValve 0 0
AdvantValveInteger 0 0
Advant3DThreewayValve 0 0
Advant3ValveLRD 0 0

3BSE030335-510 323
Usage of GDI and USER objects Appendix A Standard Building Blocks

Table 93. Extended Primitives (Continued)

Control Name User Objects GDI Objects


Advant3ValveLLD 0 0
AdvantChokeValve 0 0
AdvantDamperFlow 0 0
AdvantRegLoop 0 0
AdvantPbRegLoop 0 0
AdvantBreaker 0 0
AdvantEarth 0 0
AdvantValveconStatus 0 0
AdvantMotconStatus 0 0
AdvantMotconDirection 0 0

Table 94. Standard Symbols

Control Name User Objects GDI Objects


Panel 0 3
AlarmActiveNotAckedAC400 0 3
PauseHold 0 3
AlarmActiveAcked 0 3
AlarmNotDefined 0 3
Select 0 3
AlarmIdle 0 3
MultipliedFeedForward 0 3
Undo 0 3
AlarmDisabled 0 3

324 3BSE030335-510
Appendix A Standard Building Blocks Usage of GDI and USER objects

Table 94. Standard Symbols (Continued)

Control Name User Objects GDI Objects


AutoAlarmDisabledAC400 0 3
Up 0 3
EnableRun 0 3
StartIncreaseSpeed 0 3
AutoAlarmDisabled 0 3
AlarmNotActiveNotAckedAC400 0 3
Internal 0 3
Forced 0 3
InternalExternal 0 5
AddedFeedForward 0 3
Tracking 0 3
Manual 0 3
Tuning 0 3
Local 0 3
StartOn 0 3
ExecuteApply 0 3
BackTracking 0 3
Down 0 3
CheckInspect 0 3
External 0 3
OperatorMessage 0 3
AlarmNotActiveNotAcked 0 3
StopOff 0 3

3BSE030335-510 325
Usage of GDI and USER objects Appendix A Standard Building Blocks

Table 94. Standard Symbols (Continued)

Control Name User Objects GDI Objects


Interlocked 0 3
AlarmAC400 0 9
Right 0 3
Alarm 0 9
ManAuto 0 4
AlarmActiveNotAcked 0 3
Acknowledge 0 3
AutoMode 0 3
DisableStop 0 3
Left 0 3

Table 95. Special Objects

Control Name User Objects GDI Objects


AlarmSymbol 0 2
PgEventTunnel 0 0
AlarmControl 1 4
CompositeObjectList 3 2
TrendViewCtl 7 4
AspectViewCtl 7 4
LockControl 6 17
AspectLink 2 2
PgObjListCtl 3 8

326 3BSE030335-510
Appendix A Standard Building Blocks Usage of GDI and USER objects

Table 96. Subelements

Control Name User Objects GDI Objects


IBar 0 2
CancelButton 1 5
PushButton 0 2
Indicator 0 2
CheckBox 2 2
ToggleButton 0 2
ApplyButton 1 5
Bar 1 2
InputField 0 2

Table 97. Symbol Factory Controls

Control Name User Objects GDI Objects


SFStandard 0 0
SFCutaway 0 0

Table 98. Tank Elements

Control Name User Objects GDI Objects


TankTop 0 3
TankBottom 0 2
MainPipeLine 0 2
TankCone 0 2
TankBody 0 2
TankNeck 0 2

3BSE030335-510 327
Usage of GDI and USER objects Appendix A Standard Building Blocks

Table 99. Base Load for Instances of Aspect Category 'Graphic Element'

Control Name User Objects GDI Objects


Base Load for a 1 2
Graphic Element
Windowed
Base Load for a 0 2(1)
Graphic Element
Windowless
(1) The empty graphic element consumes one GDI object. But whenever
it contains anything it consumes one extra GDI object. So effectively it
consumes two.

Table 100. General (Intrinsic VB Controls)

Control Name User Objects GDI Objects


VB Image Control(No Image) 0 0
VB Image Control(JPEG) 0 1
VB Image Control(BMP) 0 1
VB Image Control(GIF) 0 2
VB Image Control (ICO) 1 2 or more
VB Image Control(WMF) 0 1
Base Load for a VB ActiveX 1 2
Control(Windowed)
Base Load for a VB ActiveX 0 2(1)
Control(Windowless)
Label 0 0
TextBox 1 1
PictureBox(Empty) 1 2
PictureBox(JPEG) 1 3

328 3BSE030335-510
Appendix A Standard Building Blocks Usage of GDI and USER objects

Table 100. General (Intrinsic VB Controls) (Continued)

Control Name User Objects GDI Objects


PictureBox(BMP) 1 3
PictureBox(GIF) 1 3
PictureBox(ICO) 2 3 or more
PictureBox(WMF) 1 3
Frame 1 0
CommandButton 1 0
Shape 0 0
Line 0 0
Checkbox 1 0
OptionButton 1 0
VScrollBar 1 0
HScrollBar 1 0
(1) The empty VB ActiveX control consumes one GDI object. But whenever it contains
anything it consumes one extra GDI object. So effectively it consumes two.

3BSE030335-510 329
Usage of GDI and USER objects Appendix A Standard Building Blocks

330 3BSE030335-510
Appendix B Sizes of Faceplates

To be able to group faceplates created in different versions of the 800xA System,


it is strongly recommended that these guidelines are followed.
The appendix is written to assist the Faceplate Element builders in their work and to
explain what happens when a faceplate does not behave as expected.
All sizes are measured in pixel units unless noted otherwise.

Default Faceplate Element


To fit into a normal faceplate a Faceplate Element should have default size
according to the table below.

Table 101. Faceplate Element Size

Height Width
Pixel 220 250
Twip 3300 3750

The ratio between Height and Width will then be 0.88.

3BSE030335-510 331
Default Faceplate Appendix B Sizes of Faceplates

Default Faceplate
A faceplate should have default size according to the table below:.

Table 102. Faceplate Size

Height Width
Pixel 400 250

In later versions of the product, when faceplates can be grouped together, faceplates
must have the same size to fit in the group display.

Sizes of Each Default Component in a Faceplate


A normal faceplate has a default configuration, which holds:
• A default sized header
• A status and navigation bar with 1 row and 6 positions
• A faceplate element area
• A button area with 2 rows and 6 buttons per row
The sizes of these are added in the table below. Note that the width is not added
since all components reside in the same space width.

Table 103. Sizes of Default Component in a Faceplate

Component Height Width


Header 46 250
Status and 46 249
Navigation
Element 220 250
Buttons 87 249
Sum 399 250

332 3BSE030335-510
Appendix B Sizes of Faceplates Non-default Faceplate

Non-default Faceplate
Any view of the faceplate can have almost any size. (The normal faceplate view
should have a height of 400 pixels and a width of 250 pixels.) There is a minimum
size allowed in a faceplate that is a single header with the width of three buttons.
That gives a minimum height of 46 pixels and a minimum width of 126 pixels.

Size of Each Part of the Components


Each part of a component (for example an aspect link in the Status and Navigation
bar) has a more or less fixed size. To best fit in the Faceplate Element, calculate the
size it should have according to the rules below.

Table 104. Component Size

Component Part No Height Width


Header 46 -
Status and First 46 44
Navigation
Following 41 41
Element Tab row 24 -
Element - -
Buttons First 46 44
Following 41 41

Header
The header has a fixed height of 46 pixels and a non-fixed width, that must be at
least 88 pixels wide.

3BSE030335-510 333
Size of Each Part of the Components Appendix B Sizes of Faceplates

Status-, Navigation Bar and Buttons


Indicators, Aspect links and buttons have all the same size that is 38x38 pixels. The
space between the "buttons" is 3 pixels wide and high and the bottom horizontal line
is 2 pixels high. So, the first "button" is 3+38+3 (=44) pixels wide and
3+38+3+2 (=46) pixels high and the following are 3+38 (=41) pixels wide and high.
The sum of 6 indicators (and/or Aspect links) on one row is 44+5*41 (=249) pixels
wide and 46 pixels high.
The sum of 6 buttons (on one row) times 2 rows is 44+5*41 (=249) pixels wide
and 46+41 (=87) pixels high.

Element
The Faceplate Element varies in size. The faceplate element uses the left over space
in the faceplate. If you want to preserve the aspect ratio and if you want to keep the
font size and so on it is recommended that you calculate the faceplate element
height and width using this document.

Tab Rows
If you are using tabs in any form (happens if you have configured more than one
faceplate element in a faceplate view) each tab row takes 24 pixels in height. More
than one tab group does not take any more space (except if you configure them
vertically, thus adding more pixels on tab heights).

334 3BSE030335-510
Appendix B Sizes of Faceplates Example

Example
Assume that you want to design both a reduced faceplate and a normal faceplate.
The different views should contain these component parts:

Table 105. Example Faceplate Content

Component Reduced Normal


Header 1 1
MaxNoOfIndicatorRows 0 2
MaxNoOfIndicatorsPerRow 0 5
MaxNoOfButtonRows 1 2
MaxNoOfButtonPerRow 4 5
Elements 1 1

We also want the views to have these sizes:

Table 106. Size of Views

View Height Width


Reduced 150 To fit 4 buttons
Normal 400 250

3BSE030335-510 335
Example Appendix B Sizes of Faceplates

Calculation gives these sizes per component in each view:

Table 107. Sizes per Component

Reduced Normal
Component
Height Width Height Width
Header 46 - 46 -
Status and 0 0 87 208
Navigation
Buttons 46 167 87 249
Sum 92 167 220 250
Element 58 167 180 250

The element size available is calculated as the space left between the sum of all
other components and the total space in the view.

336 3BSE030335-510
Appendix C Create New Aspect Categories
with Templates

It is possible to create your own aspect categories with templates. This way you can
configure for example background color, you can add a bar or change the size.

Create a New Aspect Category


1. Select the Aspect System Structure in Plant Explorer.
2. Go to Process Graphics and right-click one of the two aspect types, Graphic
Display or Graphic Element. A drop down box appears, select Aspect Type
Definition.

Figure 147. Aspect Type Definition

The Aspect Type Definition window is opened.

3BSE030335-510 337
Create a New Aspect Category Appendix C Create New Aspect Categories with Templates

3. Click on the Categories tab, click the Add button and enter a category name,
we entered “Loram Display”. Close the dialog.
The Graphic Display aspect type now contains “your” aspect category, in this case
Loram Display.

Figure 148. New Aspect Type

4. Right-click Loram Display, and select New Aspect in the drop-down menu.
5. Navigate to your new aspect category, Process Graphics, Graphic Display,
Loram Display. Click the Create button at the bottom of the dialog
The template from the aspect type, is now copied to your new category.
6. Click Loram Display, in the aspect window, on the right side of Plant
Explorer.
7. Select the Edit button, to open your new aspect category template.
8. Configure the template, change background color, or size. You can even create
cones or bars to be a part of the template.
9. Once the template is configured, simply Select Save in the File menu.
10. Close the Graphics Builder.
11. Go to the aspect window, on the right side of Plant Explorer. Right-click
Loram Display and select Properties in the drop-down menu.
12. In the dialog, Select Aspect Details and click Add. Select Template Aspect
and click OK in the drop-down menu that appears.
13. You are now back in Dialog, click Apply and OK.
Now you have created your own aspect category.

338 3BSE030335-510
Appendix D Adding Members

Adding a member is applicable for subelements only.


The Add Member feature is accessed through the Tools menu. It allows you to add
members to graphics. Member is a collective name for property, method, and event.
The member is added to the entire graphic and not to any of its single elements.
You can find more details about adding properties, methods and events in the Visual
Basic’s On-line Help file.

Add Member Window


Open the Add Member window by choosing Add Member in the Tools menu.
Before the Add Member Window is shown a dialog box with the question "The
function has been replaced by Input Properties. Do you want to continue?" is
shown. Using Input Properties and Expressions instead of Add Member gives
performance advantages.

3BSE030335-510 339
Add Member Window Appendix D Adding Members

Figure 149. Add Member Window

The main objectives of the Add Member window are:


• Adding methods and events. Adding Methods/Events on page 342.
• Adding properties. Adding Properties on page 343.

Properties field. A list of all members that have been added to the graphic element.
You can only see the member(s) you are currently working with.

340 3BSE030335-510
Appendix D Adding Members Add Member Window

Add Member button. Press Add Member to present the Add Member dialog box,
where you enter a name and select the type (Property, Method or Event).

Figure 150. Add Member Dialog Box

Do not try to add two or more members with the same name. Doing so will cause
a deploy failure.

Member Types.
• Property is a named attribute of an object. Properties define object
characteristics, such as size and name, or state of an object, such as enabled or
disabled. Properties are visible in the Expressions and Properties windows.
• Method is a built-in routine attached directly to an ActiveX control. It can be
called from a user of graphic elements.
• Event is an action, recognized by an object, for which a user of graphic
elements can write code to respond to you. Events can be generated by a user
action (such as clicking the mouse or pressing a key), by program code, or by
the system, as with timers.

3BSE030335-510 341
Adding Methods/Events Appendix D Adding Members

Delete Member button. Select a member and click Delete Member to remove it
from the list.

Attribute Information fields. Attribute Information fields in the Add Members


window: Data Type, Default Value, Run Time, Design Time and Arguments.
• Data Type
Select one of the available data types: Boolean, Color, Date, Double, Font,
Integer, Long, Picture, Single, String or Variant in this field. You can find more
details about the different data types in Visual Basic’s On-line Help file.
• Default Value
Enter a default value in this field. The value type depends on the selected data
type.
• Run Time
Select one of the available alternatives (Read, Read/Write, Write) which
decides how the property will act at run time.
• Design Time
Select one of the available alternatives (Read, Read/Write, Write) that decides
how the property will act at design time.
• Arguments
This information field is only available when you select Method as the member
type. Enter an argument in this field. The argument must follow the Visual
Basic syntax.

Adding Methods/Events
To add methods and events you follow the steps below.
1. Click the Add Member button in the Add Member window.
2. Enter an appropriate name.
3. Select type: Method or Event. You can only do one at a time.
4. Enter an argument if required.

342 3BSE030335-510
Appendix D Adding Members Adding Properties

5. Click OK. The member is now added to the member list. You can only see the
member(s) you are currently working with. Other members, that may have
been added earlier, you can find in the code.

Adding Properties
To add properties you follow the steps below.
1. Click the Add Member button in the Add Member window
2. Enter an appropriate name.
3. Select type: Property.
4. Enter/select data type, default value, runtime behavior, design time behavior in
the Attributes Information fields.
5. Click OK. The member is now added to the list in the Properties field. You can
only see the member(s) you are currently working with. Other members, that
may have been added earlier, you can find in the code.

3BSE030335-510 343
Adding Properties Appendix D Adding Members

344 3BSE030335-510
INDEX
A Aspect Link 209, 266
Absolute, relative reference configure 125
difference 47 Autopopulate 48
ActiveX 183 Autopupulate the object list 48
external ActiveX controls 33
Add Member 339 B
Add member Bar 214, 278
member types 341 Displacement 231
Add member window 339 EnableInputLimits 231, 233
Adding FrameWidth2 231
Graphic libraries 29 LimitHeightN 231
methods and events 342 LimitLineWidthN 231
AdvantBar 259 Orientation 231
AdvantBezier 235 RangeMax 231
AdvantChord 236 RangeMin 231
AdvantCone 238 StartValue 231
AdvantEllipse 239 Style 232
AdvantHscale 240 Value 232
AdvantLimit 243 ValueColor 232
AdvantNumeric 245 ValueColorNeg 232
AdvantObjectTrim 249 BarLimit
AdvantPie 252 LimitColorN 230
AdvantPipe 253 LimitFillN 230
AdvantPolygon 255 LimitStyleN 230
AdvantPolyline 256 LimitValueN 230
AdvantRectangle 258 Bezier 213
Alarm Control 110 Building faceplate elements 141, 157
Alarm indicators 270 Built 59
Alarm status
in Display elements 270 C
Alarm symbols 270 Chord 213
AlarmControl 270 StartAngle 237
Arc 213 StopAngle 237
StartAngle 228 Click transparency 78
StopAngle 228 graphic aspects 80

3BSE030335-510 345
Index

Color tab 45 Expression Builder 22, 34, 108


Cone 213 bottom half 39
examples 238 top half 35
Configuration of Label/Icons 124 Expressions 62
Control array 29, 184 assign expressions to properties 45
Current action examples 65
Applied action 163 Extended faceplate 101
Current value 163
F
D Faceplate 101
Debug 24 building elements 141, 157
Deleting button area 111
graphic aspects 52 configuration overview 104
Deploy 22, 204 configuration tutorial 205
Deploying configure 116
graphic aspects 51 create 114
Diagnostics Window 174 to 175 default size 332
Direct Entry Window element area 110
controlling the lifetime 146 expression syntax 136
positioning 144 extended 101
Direct entry window 143, 309 inactivate apply button 128
Direct Entry Windows 164 NLS 135
change font size 149 reduced 101
configure 143 size 331
Display Tool 169 to 171, 173 status and navigation bar 110
support for composite object types 113
E view selection buttons 112
Element Browser 22 write to properties of an object 142, 167
Element browser Faceplate Element 331
add graphic elements 49 Faceplate element
select graphic elements 49 create 205
Ellipse 213 Faceplate element area 110
Entered value 163 Faceplate elements 157
Entered value and the current value of the Faceplate framework configuration
process 163 buttons tab 127
ErrorIndicator 214 elements tab 129
ErrorPresentation Faceplate size 331
AppError 215 Faceplate view 112
OpcStatus 215 FAQ 183
Export aspects 89 Frequently asked questions (FAQ) 183

346 3BSE030335-510
Index

G aspect system 55
GDI Objects 185 product overview 17
GDI objects 177, 278, 322 Graphics Builder
Generic element exit 22
changing properties 202 start 22
Generic elements 24 Graphics builder
select 27 Generic elements 24
Graphic aspect setting options 23
creating 56 Graphics builder options
priority 91 advanced user mode 23
Graphic aspect categories debug 24
differences 59 element browser 24
Graphic aspects 55 Enable Autopopulate 24
Background color 88 expression builder 24
background color 85 live data in design mode 23
click transparency 80 Grouping option buttons
copying precautions 90 By connecting to a common process state 166
deleting 52 By defining a local option button group 166
deploying 51
elements 61 H
object references 70 Hot-keys
saving 51 object highlight 82
standard input handling 76 Hscale 213
Graphic display EndValue 241
add graphic elements 192 LabelFont 241
build 191 LabelFormat 241
Graphic element 59 LabelPosition 241
build 201 LabelStyle 241
building 201 MajorStrength 241
create 200 MajorTics 241
deploy 204 MinorStrength 241
white frame 108 MinorTics 241
Graphic elements StartValue 241
assigning an expression to a property 203
limitation 27 I
object highlight 82 IBar 295
Graphic libraries 29 Import aspects 89
Graphic Libraries dialog 22 Import/export tool 89
Graphic primitives 213 Indicator 208
Graphics Input field 206

3BSE030335-510 347
Index

Input Properties tab 45 CurveNColor 250


CurveNMaxValue 250
L CurveNMinValue 250
Label/Icons dialog 124 CurveNValue 250
Limit 213 CurveNVisible 250
Lock Control 106, 272 GridColor 250
Lock Server 107 GridVisible 250
Logical colors 193 GridVSize 250
TotalTime 250
M ObjectTrimCurve
Maintenance 169 CurveNVisible 225, 231
frequently asked questions 169 Option buttons 166
Member 339 out 118
add 339
Member types P
event 341 PgBar 228
method 341 PgErrorIndic 251
property 341 PgEventTunnel 268
Pie 213
N Pipe 214
NLS handling 98 Polygon 214
NLS Text tab 45 Polyline 214
Numeric 213 Populate
object list 47
Precautions when copying aspects 89
O
Precautions when importing/exporting aspects 89
Object highlight 81
Properties
border width 83
Assign Expressions 45
color 83
Properties window 53
configuration 82
Property Elements 158, 161, 164
hot-keys 82
Property elements 284
representation 83
configure 141
Object list 46
Proxy 167
autopopulate 48
Push button
populate 47
create 210
Object Lock 106
push button 107
Object proxy name 47 R
Object reference dialog 46 Radio buttons 166
ObjectProperty tab 45 Rectangle 214
ObjectTrim 213 Reduced faceplate 101

3BSE030335-510 348
Index

Resource Tools 278 add graphic elements 192


Run Time Error 13 186 assigning expressions to properties 203
building a graphic display 190
S building a graphic element 199, 201
Saving changing properties for generic element 202
graphic aspects 51 changing properties for the graphic
Security 83, 137 element 202
SimpleBar 213 configuring a faceplate 207
Size Display 274 create a button 206
Sizes and scaling of faceplates create an aspect link 209
buttons 334 create an indicator 207
default component sizes 332 creating a graphic display without an existing
default faceplate 332 application 195
default faceplate element 331, 337 creating a graphic element 200
element sizing 334 creating and configuring faceplates 205
navigation bar 334 Deploying a graphic element 204
size of header 333 deploying a graphic element 204
status bar 334 logical colors 193
Sizes of faceplates
tab rows 334 U
Standard input handling 76 Update rate 88
Symbol USER objects 278, 322
elements 26 User objects 177
factory controls 27 User profile for object marking 106
Symbol Factory Control 321
V
T Value
Timing parameters 178 Current 163
Timing summary 177 Entered 163
Toolbox Variables tab 45
adding graphic libraries 29, 31 VB restriction 29, 184
adding tools 29 Visual Basic
deleting tools 30 error handling 152
window 24 version 17
Toolbox buttons Vscale 214
aspect link 25 EndValue 263
extended primitives 26 Font 263
graphic primitives 26 LabelFormat 263
subelements 26 LabelPosition 264
Tutorial 189 LabelStyle 264

3BSE030335-510 349
Index

MajorStrength 264
MajorTics 264
MinorStrength 264
MinorTics 264
StartValue 264

W
Write property 142, 167

350 3BSE030335-510
Contact us

3BSE030335-510
ABB AB Copyright © 2003-2010 by ABB.
Control Systems All Rights Reserved
Västerås, Sweden
Phone: +46 (0) 21 32 50 00
Fax: +46 (0) 21 13 78 45
E-Mail: [email protected]
www.abb.com/controlsystems

ABB Inc.
Control Systems
Wickliffe, Ohio, USA
Phone: +1 440 585 8500
Fax: +1 440 585 8756
E-Mail: [email protected]
www.abb.com/controlsystems

ABB Industry Pte Ltd


Control Systems
Singapore
Phone: +65 6776 5711
Fax: +65 6778 0222
E-Mail: [email protected]
www.abb.com/controlsystems

ABB Automation GmbH


Control Systems
Mannheim, Germany
Phone: +49 1805 26 67 76
Fax: +49 1805 77 63 29
E-Mail: [email protected]
www.abb.de/controlsystems

Power and productivity


TM
for a better world

You might also like