Upload
others
View
23
Download
0
Embed Size (px)
Citation preview
IndustrialIT800xA - Engineering
System Version 4.1
Graphics
IndustrialIT800xA - Engineering
System Version 4.1
Graphics
NOTICEThe information in this document is subject to change without notice and should not beconstrued as a commitment by ABB. ABB assumes no responsibility for any errors thatmay appear in this document.
In no event shall ABB be liable for direct, indirect, special, incidental or consequentialdamages of any nature or kind arising from the use of this document, nor shall ABB beliable 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 usedfor any unauthorized purpose.
The software or hardware described in this document is furnished under a license andmay be used, copied, or disclosed only in accordance with the terms of such license.
This product meets the requirements specified in EMC Directive 89/336/EEC and in LowVoltage Directive 72/23/EEC.
Copyright © 2003-2005 by ABB. All rights reserved. Release: June 2005Document number: 3BSE030335R4101
TRADEMARKSAll rights to trademarks reside with their respective owners.
TABLE OF CONTENTS
About This BookGeneral ............................................................................................................................15
Intended User...................................................................................................................15
How to Use This Book .........................................................................................15
Where to Start .....................................................................................15
Building Graphic Elements, and Graphic Displays ............................16
Faceplates ......................................................................................16
Basic Building Blocks Provided by ABB ...........................................16
Assigning and Building Expressions ..................................................16
Sizes and Scaling of Faceplates ..........................................................16
Use of Warning, Caution, Information, and Tip Icons ....................................................17
Document Conventions ...................................................................................................18
Terminology.....................................................................................................................19
Related Documentation ...................................................................................................22
Section 1 - IntroductionProduct Overview ............................................................................................................23
What You Can Do with Graphics.........................................................................23
Prerequisites and Requirements ......................................................................................24
Section 2 - Graphics BuilderAdding Graphic Aspect to an Object and Open Graphic Builder ...................................25
Graphics Builder ..................................................................................................27
Features .............................................................................................................28
Starting Graphics Builder ................................................................................................28
Setting Options in Graphics Builder................................................................................29
3BSE030335R4101 5
Table of Contents
Working with Generic Elements ..................................................................................... 31
Toolbox Window.................................................................................................. 31
Select Generic Elements From the Toolbox ........................................................ 35
Adding Graphic Libraries to the Toolbox............................................................ 37
Extending the Graphic Libraries Window ........................................................... 39
Copy, Paste, and Paste All ................................................................................... 40
External ActiveX Controls................................................................................... 40
External ActiveX Controls with Design Time Licenses ..................... 41
Expression Builder .......................................................................................................... 43
The Top Half of the Expression Builder .............................................................. 43
The Bottom Half of the Expression Builder ........................................................ 48
Assign Expressions to Properties......................................................................... 54
Object list ........................................................................................................................ 55
Populate the Object List....................................................................................... 56
Element Browser ............................................................................................................. 58
Saving, Deploying and Deleting Graphic Aspects.......................................................... 60
Saving ............................................................................................................ 60
Deploying ............................................................................................................ 60
Deleting ............................................................................................................ 60
Properties Window .......................................................................................................... 61
Section 3 - Graphic AspectsThe Graphics Aspect System .......................................................................................... 63
Creating a New Graphic Aspect .......................................................................... 64
Relevance of Structures for Graphic Aspects ...................................................... 65
Object Aware and Generic Graphic Aspects........................................................ 66
Built in Graphic Aspect Categories ..................................................................... 66
Subsets of Elements ............................................................................................. 68
Building Blocks Used in Graphic Aspects .......................................................... 69
Expressions ..................................................................................................................... 70
Direct References to Aspect Object Properties.................................................... 71
Sub Properties of Object Properties..................................................................... 72
Examples of Expressions ..................................................................................... 73
6 3BSE030335R4101
Table of Contents
Input Properties ....................................................................................................74
Implementing Sub Elements With Input Properties.............................................74
ObjectPropertyRef Properties ..............................................................................75
Object References in Graphic Aspects ............................................................................78
Presentation of Object References .......................................................................78
Using Relative and Absolute References .............................................................78
The Anatomy of Absolute References .................................................................79
Support for Composite Object Types ..............................................................................80
Standard Input Handling for Graphic Aspects ................................................................81
Standard Input Handling in Object Aware Graphic Aspects................................81
Click Transparency...............................................................................................83
The EnableInput Property ....................................................................................84
Click Transparency in Graphic Aspects ...............................................................85
Security............................................................................................................................86
Miscellaneous ..................................................................................................................88
Setting the Background Color of Graphic Aspects ..............................................88
Background Color of Graphic Displays ..............................................88
Background Color of Graphic Element Instances...............................89
Background Color of Primitive Elements ...........................................90
Controlling the Update Rate of Data Subscriptions .............................................90
Enable/Disable Blinking Colors...........................................................................91
Precautions When Importing/Exporting Aspects.................................................91
Precautions When Copying Graphic Aspects ......................................................92
Bad Data Presentation ..........................................................................................92
Graphic Aspect Priority........................................................................................93
Graphic Displays.................................................................................93
Graphic Elements ................................................................................93
Display Exchange Time .......................................................................................93
The PgSubscriptionControl Object ......................................................................94
The IPgCompositeObjectList interface................................................................98
NLS Handling of Far East Languages in Graphics ..............................................99
Resizing Code ....................................................................................................100
3BSE030335R4101 73BSE030335R4101 7
Table of Contents
Section 4 - Faceplate FrameworkFaceplate Overview....................................................................................................... 105
Header Area ....................................................................................................... 106
LockControl ....................................................................................................... 106
Alarm Control .................................................................................................... 108
Indicators and Aspect Links Area...................................................................... 108
Faceplate Element Area ..................................................................................... 108
Buttons Area ...................................................................................................... 109
View Selection Buttons...................................................................................... 110
Support for Composite Object Types in Faceplates ...................................................... 110
Create a New Faceplate ................................................................................................. 112
Configuring the Faceplate ............................................................................................. 114
Layout Tab ......................................................................................................... 116
Indicators Tab..................................................................................................... 118
Configuring Indicators ...................................................................... 118
Configuring Aspect Links................................................................. 120
Buttons Tab ........................................................................................................ 123
Elements Tab...................................................................................................... 125
On-Line Help Tab .............................................................................................. 130
Internationalization of Faceplates ...................................................................... 131
Expression Syntax in Faceplates........................................................................ 132
Security ......................................................................................................................... 133
Operations .......................................................................................................... 133
Operation/Permission Mapping on Faceplate a Aspect Category ..................... 134
Section 5 - Configuring Faceplate ElementsBuilt in Property Elements ............................................................................................ 138
Property Reference Properties....................................................................................... 138
Assigning an Override Expression to the ObjectPropertyRef Property............. 140
Supplying Data Quality Information to Property Elements............................... 141
Error Presentation.......................................................................................................... 142
Direct and Applied Action ............................................................................................ 142
8 3BSE030335R4101
Table of Contents
Apply Operation.................................................................................................142
Cancel Operation................................................................................................143
Distinction Between Current and Entered Value...........................................................143
Input Operations Independent of Subscribed Data........................................................144
Validation of Input .........................................................................................................144
Local Data Entry............................................................................................................145
Enabling Write Operations ............................................................................................145
Option (Radio) Button Behavior ...................................................................................146
Configuring Faceplate and Property Elements Using Basic Mechanisms ....................147
Support in the Faceplate Aspect Category .........................................................147
How to Write to the Properties of an Object In Faceplate Elements .................147
Section 6 - Configuring Property ElementsHow to Write to the Properties of an Aspect Object ....................................................152
Configuring Direct Entry Windows...............................................................................153
Positioning of the Direct Entry Window............................................................154
Controlling the Lifetime of the Direct Entry Window .......................................156
Creating a Direct Entry Window from Visual Basic Code.................................157
The OnChange Event .........................................................................................157
Controlling a Direct Entry Window via Graphic Primitives ..............................158
Stepsize and limits in the PgNumericDew Direct Entry Window......................159
Changing Font Size in Direct Entry Windows ...................................................160
Automatically Invoked Direct Entry Windows ..................................................162
Visual Basic Error Handling..........................................................................................163
Input Session Handling..................................................................................................164
Starting an Input Session....................................................................................165
The DoApply Event ...........................................................................................166
The DoCancelSession Event ..............................................................................166
Responding to Data Entry Operations................................................................167
Ending an Input Session When Performing an Apply Operation ......................167
The DoEnableApplyButton Event .....................................................................168
Broadcasting to Sibling Elements ......................................................................168
3BSE030335R4101 93BSE030335R4101 9
Table of Contents
Section 7 - MaintenanceThe Display Tool ........................................................................................................... 169
Diagnostics Window ..................................................................................................... 174
Frequently Asked Questions (FAQ) .............................................................................. 182
Edit is Dimmed or Missing in the Context menu .............................................. 182
Edit Imported Graphics Aspect with 3rd party ActiveXs .................................. 182
Limit of 256 Element Instances in VB .............................................................. 182
“Out of Memory” in Graphics Builder .............................................................. 183
Far East Languages are not Correctly Presented ............................................... 183
Problems with Elements in Frame Control........................................................ 183
How to Avoid Allocating GDI Objects.............................................................. 183
“Run Time Error 13” in Graphics Builder ......................................................... 184
Section 8 - TutorialTutorial 1 - Building a Graphic Display........................................................................ 185
How to Build a Graphic Display........................................................................ 187
Adding Graphic Elements to the Graphic Display ............................................ 189
Using Logical Colors ......................................................................................... 190
Tutorial 2 - Building a Graphic Element....................................................................... 192
Creating a Graphic Element............................................................................... 193
Building a Graphic Element .............................................................................. 195
Changing Properties for the Generic Element ................................................... 196
Assigning Expressions to Properties.................................................................. 197
Deploying a Graphic Element............................................................................ 199
Tutorial 3 - Creating and Configuring Faceplates ......................................................... 200
Appendix A - Standard Building BlocksGraphic Primitives......................................................................................................... 213
Common Properties ........................................................................................... 213
ErrorPresentation .............................................................................. 214
Presentation .................................................................................... 216
Event Declarations ............................................................................................. 225
AdvantArc.......................................................................................................... 228
10 3BSE030335R4101
Table of Contents
PgBar ...........................................................................................................229
Layout ....................................................................................229
BarLimit ....................................................................................230
Input handling ...................................................................................234
ErrorPresentation...............................................................................235
AdvantBezier......................................................................................................236
AdvantChord ......................................................................................................237
AdvantCone........................................................................................................240
AdvantEllipse .....................................................................................................241
AdvantHscale .....................................................................................................242
AdvantLimit (only valid for AdvantBar) ...........................................................245
AdvantNumeric ..................................................................................................247
Strike Through ..................................................................................247
AdvantObjectTrim..............................................................................................251
Error Presentation..............................................................................251
PgErrorIndic .......................................................................................................252
AdvantPie ...........................................................................................................254
AdvantPipe .........................................................................................................255
AdvantPolygon...................................................................................................257
AdvantPolyline...................................................................................................258
AdvantRectangle ................................................................................................260
AdvantBar ..........................................................................................................261
AdvantText .........................................................................................................263
AdvantVscale .....................................................................................................265
Special Elements ...........................................................................................................268
Aspect Link ........................................................................................................268
PgEventTunnel ...................................................................................................270
AlarmControl .....................................................................................................272
AspectViewCt.....................................................................................................274
Composite Object List........................................................................................275
ABB Subelements .........................................................................................................277
Bar ...........................................................................................................277
3BSE030335R4101 113BSE030335R4101 11
Table of Contents
Bar Styles .................................................................................... 280
FourLimits .................................................................................... 280
TwoLimits .................................................................................... 281
Property Elements ......................................................................................................... 282
Indicator .......................................................................................................... 284
Push Button........................................................................................................ 287
Toggle Button..................................................................................................... 289
IBar .......................................................................................................... 293
Input Field.......................................................................................................... 297
CheckBox .......................................................................................................... 301
Option Button .................................................................................................... 305
Apply Button...................................................................................................... 307
Cancel Button .................................................................................................... 307
Direct Entry Windows................................................................................................... 307
PgDEW .......................................................................................................... 308
PgNumericDEW ................................................................................................ 309
PgIntegerDEW................................................................................................... 310
PgStringDEW .................................................................................................... 312
PgBoolDEW ...................................................................................................... 313
PgTimeDEW...................................................................................................... 314
Formatting rules ................................................................................ 314
PgDateDEW....................................................................................................... 317
Appendix B - Sizes of FaceplatesDefault Faceplate Element ............................................................................................ 319
Default Faceplate........................................................................................................... 320
Sizes of Each Default Component in a Faceplate .............................................. 320
Non-default Faceplate ................................................................................................... 321
Size of Each Part of the Components ................................................................ 321
Header .................................................................................... 321
Status-, Navigation Bar and Buttons................................................. 322
Element .................................................................................... 322
Tab Rows .................................................................................... 322
12 3BSE030335R4101
Table of Contents
Example ...........................................................................................................323
Appendix C - Create New Aspect Categories with TemplatesCreate a New Aspect Category......................................................................................325
Appendix D - Adding MembersAdd Member Window ...................................................................................................330
Adding Methods/Events ................................................................................................332
Adding Properties ..........................................................................................................333
INDEX
3BSE030335R4101 133BSE030335R4101 13
Table of Contents
14 3BSE030335R4101
About This Book
GeneralThis book contains information about IndustrialIT 800xA System Graphics.
Intended UserThe book is intended for engineers who configure and use graphic aspects (graphic elements, graphic displays and faceplates). It also includes information about the basic building blocks provided by ABB. IndustrialIT 800xA System Graphics is often referred to as “Process Graphics” or “Graphics”.
It is assumed that you are familiar with the concept of Aspect Objects, Aspects, Structures etc. before you start using this book.
The reader should have experience with process control systems and Microsoft® Windows® operating systems. In general, Microsoft Windows functions are not described in this instruction.
How to Use This Book
For a quick hands-on start to Graphics, go to Section 8, Tutorial.
Where to Start
If you are a first-time user, refer to Section 1, Introduction to learn about the basic functions and features for this software option.
The section Frequently Asked Questions (FAQ) on page 182, contains useful information, which can facilitate your work with Graphics.
3BSE030335R4101 15
How to Use This Book About This Book
Building Graphic Elements, and Graphic Displays
Refer to Section 2, Graphics Builder, to learn what you need to do in Graphics Builder, to build graphic elements and graphic displays.
Faceplates
Refer to Section 4, Faceplate Framework to learn more about how to configure faceplates.
Basic Building Blocks Provided by ABB
Refer to Appendix A, Standard Building Blocks to learn more about the graphics provided by ABB. The Primitives (primitive elements) and Subelements included in this appendix are those supplied by ABB at delivery.
Assigning and Building Expressions
Refer to Section 3, Graphic Aspects to learn more about expressions and how you use them.
Sizes and Scaling of Faceplates
Refer to Appendix B, Sizes of Faceplates to learn more about Faceplates.
16 3BSE030335R4101
About This Book Use of Warning, Caution, Information, and Tip Icons
Use of Warning, Caution, Information, and Tip IconsThis 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:
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, comply fully with all Warning and Caution notices.
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.
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
3BSE030335R4101 17
Document Conventions About This Book
Document ConventionsThe following conventions are used for the presentation of material:
• The words in names of screen elements (for example, the title in the title bar of a window, the label for a field of a dialog box) are initially capitalized.
• Capital letters are used for the name of a keyboard key if it is labeled on the keyboard. For example, press the ENTER key.
• Lowercase letters are used for the name of a keyboard key that is not labeled on the keyboard. For example, the space bar, comma key, and so on.
• Press CTRL+C indicates that you must hold down the CTRL key while pressing the C key (to copy a selected object in this case).
• Press ESC E C indicates that you press and release each key in sequence (to copy a selected object in this case).
• The names of push and toggle buttons are boldfaced. For example, click OK.
• The names of menus and menu items are boldfaced. For example, the File menu.
– The following convention is used for menu operations: MenuName > MenuItem > CascadedMenuItem. For example: select File > New > Type.
– The Start menu name always refers to the Start menu on the Windows Task Bar.
• System prompts/messages are shown in the Courier font, and user responses/input are in the boldfaced Courier font. For example, if you enter a value out of range, the following message is displayed:
Entered value is not valid. The value must be 0 to 30.
You may be told to enter the string TIC132 in a field. The string is shown as follows in the procedure:
TIC132
Variables are shown using lowercase letters.
sequence name
18 3BSE030335R4101
About This Book Terminology
TerminologyThe following is a list of terms, associated with IndustrialIT 800xA System, that you should be familiar with. The list contains terms and abbreviations that are unique to ABB or have a usage or definition that is different from standard industry usage.
Term Description
ActiveX Microsoft standard for user interface components, based on definition of software interfaces.
Aspect An aspect is a description of some properties of a real world entity. The properties described could be mechanical layout, how the object is controlled, a live video image, name of the object etc.
Aspect Category A specialization of an aspect type. For example, the aspect type Graphic Display includes the categories Overview, Group and Object Display.
Aspect Object Type An Aspect Object type defines certain characteristics that are shared between several Aspect Object instances, such as a basic set of common aspects. This makes it possible to create and efficiently re-use standardized solutions to frequently recurring problems. For example, rather than building an Aspect Object from scratch for every valve in a plant, you can define a set of valve types, and then create all valve objects as instances of these types.
Aspect Objects A computer representation of a real world entity like a pump, a valve, an order or a virtual object like a service. This computer representation is implemented by the 800xA System. An Aspect Object works like an information container for it’s aspects.
Aspect Server A server that runs the central functions of the Aspect Object architecture, such as Aspect Directory, Structure and Name Server, Cross Referencing, File Set Distribution, etc.
3BSE030335R4101 19
Terminology About This Book
Aspect System A software system, which implements one or several aspect types by providing one or several aspect system objects.
Composite Aspect Object Type
A composite Aspect Object type describes a set of Aspect Objects organized in a structure, with a parent object and one or several child objects. The children in a composite object type are called formal instances, because they inherit from object types defined elsewhere in the Object Type Structure, but they are not actual instances. When a composite object is instantiated actual instances are created for these child objects.
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.
IndustrialIT 800xA System
A computer system that implements the IndustrialIT
vision.
Node A computer communicating on a network e.g. the Internet, Plant, Control or IO network. Each node typically has a unique node address with a format depending on the network it is connected to.
Term Description
20 3BSE030335R4101
About This Book Terminology
OPC/DA An application programming interface defined by the standardization group OPC Foundation. The standard defines how to access large amounts of real-time data between applications. The OPC standard interface is used between automation/control applications, field systems/devices and business/office application.
Permission A permission groups a set of operations that require the same authority. For each operation defined for an aspect, the aspect category specifies the permission needed to use that interface.
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.
Security Security controls a user’s authority to perform different operations on Aspect Objects, depending on several parameters:
• The user’s credentials, as provided by Windows
• The node where the user is logged in. This makes it possible to give a user different authority depending on where he/she is located, e.g. close to the process equipment, in a control room, or at home accessing the system through Internet.
• The operation the user wants to perform the operation on.
Server A node that runs one or several Afw Services.It is the part of the software that supply data to a subscriber.
Term Description
3BSE030335R4101 21
Related Documentation About This Book
Related Documentation
Structure A hierarchical tree organization of Aspect Objects. Each structure is used to define a certain kind of relation between Aspect Object. The functional structure defines how a function can be divided into sub functions, the location structure defines how different objects are located within each other. The control structure defines how functions are executed by tasks, controllers etc. An Aspect Object can be located in several structures, for example both in a functional structure and in a location structure.
View An Aspect can have several ways to be presented depending on the task performed, like viewing or configuration. Each presentation form is called a view.
Category Title Description
Installation IndustrialIT 800xA System Installation This book describes how to install the Industrial IT 800xA System, including the requirements on the hardware. It also describes the basic configuration needed to be done in order to start the system.
Configuration IndustrialIT 800xA System Operator Workplace Configuration
This book describes how to configure the Industrial IT 800xA System Operator Workplace.
IndustrialIT 800xA System Administration and Security
This book describes how to set security and perform SW maintenance in Industrial IT 800xA System.
Term Description
22 3BSE030335R4101
Section 1 Introduction
Product OverviewProcess Graphics consists of a graphic run-time viewer included in the 800xA System. It also includes the software option 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.
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 book:
• A tutorial
• Detailed information about the basic building blocks provided by ABB
There are two methods for building graphics:
• Building graphics while connected to a workplace, please see IndustrialIT 800xA Operator Workplace Configuration.
• Building graphics while not connected to a workplace, please see Section 8, Tutorial for details.
3BSE030335R4101 23
Prerequisites and Requirements Section 1 Introduction
Prerequisites and RequirementsIndustrialIT 800xA System Graphics runs on the Microsoft Windows 2000/XP Professional operating system.
All hardware and software requirements are listed in IndustrialIT 800xA System Installation. Please note that you will need to have VisualBasic 6.0 SP6 installed on the node to be able to build graphics.
It is required that you are familiar with the graphical user interface of Microsoft Windows 2000/XP Professional. You should also a have general knowledge of common terms such as menus, buttons, drag/drop etc. It is also useful if you are familiar with Microsoft Visual Basic since Graphics Builder works in conjunction with it.
To deploy graphics you must belong to the IndustrialIT group Application Engineer and the Windows group Power User, or higher.
24 3BSE030335R4101
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.
3BSE030335R4101 25
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.
Figure 1. Graphic Element Aspect added to an Aspect Object in Plant Explorer
Preview Area with Edit Button
Aspect Object Graphic Aspect (Graphic Element)
26 3BSE030335R4101
Section 2 Graphics Builder Graphics Builder
Graphics Builder
Figure 2 shows the interface of the 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.
Figure 2. Graphics Builder
Library PropertyWindow
ExpressionBuilder
ElementBrowser
WorkingArea
User Window
3BSE030335R4101 27
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 BuilderThere 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).
28 3BSE030335R4101
Section 2 Graphics Builder Setting Options in Graphics Builder
Setting Options in Graphics BuilderThere 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.
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 checkbox to select live data in design mode.
Figure 3. Graphics Builder Options
Note that live data results in a higher CPU usage, which in turn leads to slower operation of Graphics Builder.
3BSE030335R4101 29
Setting Options in Graphics Builder Section 2 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 checkbox to select Advanced User Mode.
Debug
Click the Debug checkbox to get access to an additional debug menu.
Element Browser
Click the checkbox to show Element Browser at startup.
Expression Builder
Click the checkbox to show Expression Builder at startup.
30 3BSE030335R4101
Section 2 Graphics Builder Working with Generic Elements
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.
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 35.
• Provide third party ActiveX Controls. Refer to Adding Graphic Libraries to the Toolbox on page 37 for further information.
Figure 4. The Graphic Libraries Dialog Box
3BSE030335R4101 31
Working with Generic Elements Section 2 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 83. AlarmControl is a template object for an alarm button for faceplates and AspectViewCt shows a view of an aspect on the graphic display. CompisiteObj displays a list of objects in a composite object.
All Special elements are described thoroughly in Special Elements on page 268.
Figure 5. Standard Toolboxes in Graphics Builder
Visual Basiccontrols
Special
Extended Primitives
Graphic Primitives
Subelements
Graphic Primitives
Subelements +Property elements
32 3BSE030335R4101
Section 2 Graphics Builder Working with Generic Elements
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 Faceplates.
The subelements provided by ABB are described in ABB Subelements on page 277.
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.
3BSE030335R4101 33
Working with Generic Elements Section 2 Graphics Builder
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 bar graph) 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 6. The Symbol Library
Figure 7.The Symbol Factory Controls Library
34 3BSE030335R4101
Section 2 Graphics Builder Select Generic Elements From the Toolbox
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 a crosshair 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 graphic elements/Active X controls in a graphic display.The use of Control arrays solves this problem. See Select Generic Elements From the Toolbox on page 35.
3BSE030335R4101 35
Select Generic Elements From the Toolbox Section 2 Graphics 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.
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
Figure 8. Some of the Buttons of the Graphic Builder
Toolbox Deploy CreateNewWizard
ElementBrowser
ObjectBrowser
ExpressionBuilder
PropertyWindow
ProjectExplorer
36 3BSE030335R4101
Section 2 Graphics Builder Adding Graphic Libraries to the Toolbox
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.
Figure 9. Graphic Libraries Window
3BSE030335R4101 37
Adding Graphic Libraries to the Toolbox Section 2 Graphics Builder
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.
A dialog box opens, where you uncheck the tools you want to delete. Then you click on the Apply or OK button.
Deleting tools from the toolbox is also described in Visual Basic’s on-line help file.
Figure 10. Open Components Dialog Box
Figure 11. The Component Dialog Box
The Graphic LibrariesExtended Primitives Typeand Primitives Type.Delete by uncheck themand click on the Apply orOK button.
38 3BSE030335R4101
Section 2 Graphics Builder Extending the Graphic Libraries Window
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 37.
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 25. Edit the graphics aspect and deploy it.
External ActiveX Controls:
a. Select Graphics Structure in Plant Explorer. Select the Graphics Tools object.
3BSE030335R4101 39
Copy, Paste, and Paste All Section 2 Graphics Builder
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.
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.
Copy, Paste, and Paste All
You can copy an expression and paste (assign) it toanother property or expression variable.
Select 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.
External ActiveX Controls
For information about how to install external (3rd party) ActiveX controls (not provided by ABB) please read the suppliers documentation.
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 41.
ActiveX components need to be installed on all operator workplaces where they will be used. If not, they will not be shown.
40 3BSE030335R4101
Section 2 Graphics Builder External ActiveX Controls
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 39. To create a new object, see Step b under Extending the Graphic Libraries Window on page 39 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 37.
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.
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.
3BSE030335R4101 41
External ActiveX Controls Section 2 Graphics Builder
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.
42 3BSE030335R4101
Section 2 Graphics Builder Expression Builder
Expression BuilderProperties of elements in the configured graphic aspect can be assigned.
• Constant values. Assigned using the Properties window.
• Expressions. Assigned using 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 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.
Avoid assigning constant values using Expression Builder.It unnecessarily increases the CPU load and in many cases it does not work at all.
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 99.
3BSE030335R4101 43
The Top Half of the Expression Builder Section 2 Graphics Builder
• 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
• The Edit Variables tab. All expression variables defined in the graphic element are listed here.
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.
Figure 12. Edit Variables Tab
44 3BSE030335R4101
Section 2 Graphics Builder The Top Half of the Expression Builder
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.
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 92 for more information.
3BSE030335R4101 45
The Top Half of the Expression Builder Section 2 Graphics Builder
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.
Click on 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 on Update button to confirm the changes.
Figure 13. Selecting an Expression assigned to a property or an Expression Variable
46 3BSE030335R4101
Section 2 Graphics Builder The Top Half of the Expression Builder
Figure 14. Edit expression tab
3BSE030335R4101 47
The Bottom Half of the Expression Builder Section 2 Graphics 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.
For a generic graphic aspect is the ObjectProperty tab 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 55 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.
Figure 15.Object Property Tab
48 3BSE030335R4101
Section 2 Graphics Builder The Bottom Half of the Expression 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.
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 72.
Figure 16.Subproperty List
3BSE030335R4101 49
The Bottom Half of the Expression Builder Section 2 Graphics 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.
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’s unnecessary to use the VB code pane.
Figure 17. Color Tab
50 3BSE030335R4101
Section 2 Graphics Builder The Bottom Half of the Expression Builder
The Input Properties tab is displayed below.
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 72.
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.
Figure 18. Sub Property Selector
3BSE030335R4101 51
The Bottom Half of the Expression Builder Section 2 Graphics Builder
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 19. The Add Property Dialog
Figure 20. Modify Dialog
52 3BSE030335R4101
Section 2 Graphics Builder The Bottom Half of the Expression 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.
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).
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.
Figure 21. Text row in Expression Builder
Figure 22. The National Language Support Tab
Select Resource Select language in the text stringText from the Resource Manageraspect in the selected languageManager Aspect
3BSE030335R4101 53
Assign Expressions to Properties Section 2 Graphics Builder
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
54 3BSE030335R4101
Section 2 Graphics Builder Object list
Object listThe 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
3BSE030335R4101 55
Populate the Object List Section 2 Graphics Builder
• Reference type drop down list, where you can choose either Absolute or Relative reference type.
The functional difference between absolute and relative referencesObject 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 70.
• 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”.
Populate the Object List
A prerequisite before assigning expressions to properties is that the ObjectProperty tab, 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.
56 3BSE030335R4101
Section 2 Graphics Builder Populate the Object List
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.
Figure 24. Add an Object.
3BSE030335R4101 57
Element Browser Section 2 Graphics Builder
Element BrowserThe main objective of the Element Browser window is to select and add graphic elements to a graphic aspect.
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 56.
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.
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 99.
Figure 25. Element Browser
Object list Graphic Element list Add Element button
58 3BSE030335R4101
Section 2 Graphics Builder Element Browser
The Graphics Element Browser specific fields and buttons are:
Browse buttonBrings up the object browser, used to populate the object list.
Object listThe list displays object references. The object list is common for Expression Builder and Element Browser.
Graphic Element listThis list shows the graphic element aspects, associated with the selected Object.
Add Element buttonClick 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.
3BSE030335R4101 59
Saving, Deploying and Deleting Graphic Aspects Section 2 Graphics Builder
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.
Deleting
To delete a graphic aspect, right-click it in Plant Explorer and choose Delete from the context menu.
Figure 26. Save Button
To deploy graphics you must belong to the IndustrialIT group Application Engineer and the Windows group Power User, or higher.
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.
60 3BSE030335R4101
Section 2 Graphics Builder Properties Window
Properties WindowThe 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.
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.
You can find more details about the Properties window in the Visual Basic’s on-line help file.
Figure 27. 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.
3BSE030335R4101 61
Properties Window Section 2 Graphics Builder
62 3BSE030335R4101
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 5, Configuring Faceplate Elements and in Section 6, Configuring Property Elements. The separation is somewhat arbitrary, but this chapter mainly describes mechanism that are common for all graphic aspects. Section 5, 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 SystemThe 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.
3BSE030335R4101 63
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.
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.
The example is a graphic element but could might as well have been a Faceplate element, Subelement or Graphic Display.
Figure 28. New Aspect Window - Graphic Element Selected
64 3BSE030335R4101
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 66 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 (typically the Functional Structure)
Graphic aspects placed in other structures are typically aspects of the Graphic Display aspect category. Graphic aspects placed for example in the functional structure are sometimes called “instance graphics”.
3BSE030335R4101 65
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 AspectsGeneric 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 31.
• Object Aware Graphic AspectsIn 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 68.
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 58.
• For graphic displays the invocation object is set up in runtime by the runtime system.
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.
66 3BSE030335R4101
Section 3 Graphic Aspects Built in Graphic Aspect Categories
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.
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.
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.
3BSE030335R4101 67
Subsets of Elements Section 3 Graphic Aspects
Table 3 describes built in aspect categories to configure generic aspect aspects.
ABB provides libraries of generic elements, see Appendix A, Standard Building Blocks.
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.
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.
68 3BSE030335R4101
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.
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 70. Expressions are added using the Expression Builder.
Table 4. Subsets of Graphics Elements
Subset Object aware
Implemented using
Graphics Builder
Usage
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 aspect
Yes Yes
(So far always)
X
3BSE030335R4101 69
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.
ExpressionsExpressions 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 74.
• 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 43.
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 91 for information on avoiding unnecessary blink execution.
• When the configuration of the logical color is changed.
70 3BSE030335R4101
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 75 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:
.
./LevelAI.117
For more information about object references, see Object References in Graphic Aspects on page 78.
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.
3BSE030335R4101 71
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.
72 3BSE030335R4101
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 71. 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.
3BSE030335R4101 73
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 43.
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.
74 3BSE030335R4101
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 74, is the ObjectPropertyRef property. This property offers the possibility to create property elements, see Property Elements on page 282.
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 152.
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 140.
3BSE030335R4101 75
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 71, 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.
76 3BSE030335R4101
Section 3 Graphic Aspects ObjectPropertyRef Properties
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 72.
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.
Table 6. Sub Properties for ObjectPropertyRef Properties (Continued)
Attributes Description
3BSE030335R4101 77
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 referenceAI.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 79.
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 80.
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.
78 3BSE030335R4101
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 55.
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.
3BSE030335R4101 79
Support for Composite Object Types Section 3 Graphic Aspects
.
Support for Composite Object TypesThere 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
The EnableInput property, that is available for graphic elements, is also part of the support for composite object types. 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, it may be decided to disable the standard input handling for the analog input object. This is then done by setting EnableInput to false for the analog input element. Therefore, even when left clicking at 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.
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 55. See also How to Write to the Properties of an Object In Faceplate Elements on page 147.
Automatic resolving using the deploy operation can lead to resolve errors if you arenot 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
80 3BSE030335R4101
Section 3 Graphic Aspects Standard Input Handling for 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
3BSE030335R4101 81
Standard Input Handling for Graphic Aspects Section 3 Graphic Aspects
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, ShiftEnd Sub
Private Sub UserControl_MouseMove(Button As Integer, _Shift As Integer, X As Single, Y As Single)
m_sc.MouseMove Button, ShiftEnd Sub
Private Sub UserControl_MouseUp(Button As Integer, _Shift As Integer, X As Single, Y As Single)
If Shift = 0 ThenIf Button = vbLeftButton
If m_sc.CancelInputSession = False Thenm_sc.ShowDefaultAspect
End IfElseIf Button = vbRightButton Then
m_sc.ShowContextMenuEnd If
Elsem_sc.MouseUp Button, Shift
End IfEnd 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 94.
The calls to ShowDefaultAspect and ShowContextMenu, implements corresponding functions. The call to CancelInputSession cancels the input session, (see Input Session Handling on page 164) 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”, i.e. that the element the user points at is highlighted.
82 3BSE030335R4101
Section 3 Graphic Aspects Click Transparency
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 83, input handling calls, input handling 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.
Click Transparency
The input handling described in Standard Input Handling in Object Aware Graphic Aspects on page 81, 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.
Figure 29. Click Transparency
Graphic Aspect
Generic Element
(as seen as aworking area inGraphic Builder)
(have to be clicktransparent to notabsorb the click event).
3BSE030335R4101 83
The EnableInput Property Section 3 Graphic Aspects
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 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 effect on performance. Another disadvantage of using PgEventTunnel is that the input function of any control put into the graphic aspect is disabled. Yet another problem is that the tooltip function is disabled.
For information about click transparency and graphic aspects, see Click Transparency in Graphic Aspects on page 85.
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 describe in Standard Input Handling in Object Aware Graphic Aspects on page 81, 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 85
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 80.
84 3BSE030335R4101
Section 3 Graphic Aspects Click Transparency in Graphic Aspects
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 85, 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).
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 81. 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. In this 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 ThenHitResult = vbHitResultOutside
End IfEnd Sub
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.
3BSE030335R4101 85
Security Section 3 Graphic Aspects
For graphic aspects that are neither windowless nor transparent, input handling is described in Standard Input Handling in Object Aware Graphic Aspects on page 81. Testing of the EnableInput property is in that case, “behind the curtain”. It is done in a way that is not visible to the configurator of the graphic aspect.
SecurityGraphic 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.
Operations
There are three security operations in graphic aspects, further explained in Table 7. They are used to control whether the user is allowed or denied to see different views or configure the aspect.
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 30 the user needs read permissions to see the Graphic Aspect and configure permission to modify and deploy it.
Table 7. 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.
86 3BSE030335R4101
Section 3 Graphic Aspects Security
Figure 30. Permission/Operation Mapping on a Graphic Aspect.
3BSE030335R4101 87
Miscellaneous Section 3 Graphic Aspects
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.
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 8 presents possible values:
The default value of the GeneralBackColor property is -1 is for all aspect categories other than Faceplate Element.
Table 8. Possible Values of the GeneralBackColor Property of thePgSubscriptionControl Object
Value of the GeneralBackColor
propertyResulting color
-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 than -1
The background color of the graphic is set to the value of 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
88 3BSE030335R4101
Section 3 Graphic Aspects Miscellaneous
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.
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 9 presents values that are relevant for the BackgroundColor property.
Table 9. Possible Values of the BackgroundColor Property of Graphic Element Instances
Value of the BackgroundColor property
Resulting color
-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
3BSE030335R4101 89
Controlling the Update Rate of Data Subscriptions Section 3 Graphic Aspects
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.
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 displaysBy setting the value of the UpdateRate property, of the graphic display´s PgSubcriptionControl object.
• For instances of graphic elementsBy 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.
90 3BSE030335R4101
Section 3 Graphic Aspects Enable/Disable Blinking Colors
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.
The configurator of a graphic element can reduce total CPU load caused by blinking by adding an expression to the “EnableBlink” property of thePgSubscriptionControl 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.
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.
3BSE030335R4101 91
Precautions When Copying Graphic Aspects Section 3 Graphic Aspects
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.
For more information on importing and exporting aspects, as well as a description of the Import/Export tool, refer to IndustrialIT 800xA, System, Operator Workplace Configuration.
Precautions When Copying Graphic Aspects
If you copy aspects, for example a graphic display that contain graphic elements within Plant Explorer, there are restrictions.
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 54. 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.
When exporting a graphic element to another system, the logical color relies on the target system having the corresponding color definitions.
When an object which contains graphic displays and graphic elements is copied, all entities get new unique identities. The copied elements are therefore not found by the graphic display, which still refers to the original graphic elements.
92 3BSE030335R4101
Section 3 Graphic Aspects Graphic Aspect Priority
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.
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, Installation.
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.
3BSE030335R4101 93
The PgSubscriptionControl Object Section 3 Graphic Aspects
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.
Methods
Table 10 shows methods implemented by PgSubscription Control.
Table 10. PgSubscriptionControl Methods
Property 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.
StartInputSession Starts an input operation (session).
94 3BSE030335R4101
Section 3 Graphic Aspects The PgSubscriptionControl Object
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.
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.
Table 10. PgSubscriptionControl Methods (Continued)
Property Description
3BSE030335R4101 95
The PgSubscriptionControl Object Section 3 Graphic Aspects
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.
Table 10. PgSubscriptionControl Methods (Continued)
Property Description
96 3BSE030335R4101
Section 3 Graphic Aspects The PgSubscriptionControl Object
Properties
Table 11 shows properties of PgSubscriptionControl.
Events
The subscription control generates the events described in Table 12.
Table 11. 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.
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.
Table 12. 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
3BSE030335R4101 97
The IPgCompositeObjectList interface Section 3 Graphic Aspects
The IPgCompositeObjectList interface
The IPgCompositeObjectList contains identities of the objects in a composite object. The functions in Table 13 are provided with IPgCompositeObjectList.
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 94.
To receive the event, the graphic aspect must call the method EnableApplyButton(True) in advance. Otherwise no event is fired.
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 94.
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 94.
Table 13. 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.
Table 12. IPgSubscriptionControl Events (Continued)
Function Description
98 3BSE030335R4101
Section 3 Graphic Aspects NLS Handling of Far East Languages in Graphics
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.
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.
3BSE030335R4101 99
Resizing Code Section 3 Graphic Aspects
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 at two places:
• In UserControl_Initialize there is code, which reads the original positions of all constituent controls.
• In UserControl_Resize there is code, which repositions all constituent controls.
The code for resizing can be changed by the user. 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.
• 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.
100 3BSE030335R4101
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 114 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 112) and is often assigned to be the default aspect via the Properties entry in the context menu.
3BSE030335R4101 101
Section 4 Faceplate Framework
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.
Figure 31. Each Faceplate Focus on One Aspect Object
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 116.
102 3BSE030335R4101
Section 4 Faceplate Framework
Figure 32. Reduced Faceplate and Faceplate View Example
Figure 33. Extended Faceplate View Example
3BSE030335R4101 103
Section 4 Faceplate Framework
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.
Figure 34. Graphic Display
Click here to open up the default aspect i.e. a faceplate
104 3BSE030335R4101
Section 4 Faceplate Framework Faceplate Overview
Faceplate OverviewFrom 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 114.
Figure 35. Faceplate Terminology
Header Area
Indicators andAspect Links
Buttons Area
View selection Buttons
Faceplate Element
Apply Button
Area
Alarm control
(dimmed in this view)
AreaAspect Link
Object Lock
3BSE030335R4101 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)
LockControl
The object lock button is shown as pressed from the moment the user has locked the object until the object lock is released.
Object lock will give you the sole right to operate the object.
If the object is locked by another user, indicated as a flat button and yellow icon, no operation is possible.
Figure 36. Example of a Header area
Object Name & Description
AlarmControl
Object Lock
106 3BSE030335R4101
Section 4 Faceplate Framework LockControl
The table below shows the different object lock states and their corresponding indications.
When the object is released by somebody else, the button changes from flat to raised and it turns bluegrey. To lock the object simply press the button.
Possible ways to release a lock on an object, is to either click the lock button or to close the faceplate. In case of inactivity of operation action in the faceplate, there is a specific time-out period until the object lock is released.
If a Lock property does not exist no Lock Control is drawn.
The behaviour of the lock control is further defined by the Graphic ProfileValues Aspect in the User profile of the User Control Structure.
If the FaceplateAutoLockObject profile value in the Graphic Profile Values UserProfile is set, will AutoLock be enabled, i.e. Lock Status will be set to Locked by me when the Faceplate is opened. When the Faceplate is closed, the Lock Status will revert to Unlocked.
If the FaceplateAutoLockObject profile value in the Graphic Profile Values UserProfile is not set, Lock Status remains as Unlocked when the Faceplate is opened. The only way to change the Lock Status is then to manually click the Lock Icon in the Faceplate.
Table 14. Lock States Displayed in the Object Lock.
Lock status Button IconBackground
ColorLock Property
Value
Unlocked Raised Bluegrey 00
Locked by me Sunken White 11
Locked by other Flat Yellow 01
3BSE030335R4101 107
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 Alarm Control. 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 272.
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 118.)
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.
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 116.
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.
Status indicators are typically configured to the left, and aspect links to the right
108 3BSE030335R4101
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 37 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.
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.
Figure 37. Example of a Faceplate Element Area
Tab group 2Tab group 1
3BSE030335R4101 109
View Selection Buttons Section 4 Faceplate Framework
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.
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 123.
A button can have two different action types, direct or applied. Default value is Direct Action. See Direct and Applied Action on page 142 for more information.
View Selection Buttons
Select faceplate view. If a view does not exist, the button representing that view is dimmed. The Push-pin pins the faceplate to the display. The faceplate will not be replaced by another faceplate if it is pinned.
Support for Composite Object Types in FaceplatesFaceplates 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 propoerties of subobjects to the object for which you are configuring a faceplate, see Expression Syntax in Faceplates on page 132.
Figure 38. View Selection Buttons
Reduced FaceplateFaceplate
ExtendedFaceplate
Push-pin
110 3BSE030335R4101
Section 4 Faceplate Framework Support for Composite Object Types in Faceplates
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 275.
3BSE030335R4101 111
Create a New Faceplate Section 4 Faceplate Framework
Create a New FaceplateTo 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.
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.
Figure 39. Select Aspect Object
112 3BSE030335R4101
Section 4 Faceplate Framework Create a New Faceplate
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 IndustrialIT 800xA Operator Workplace Configuration.
Now the faceplate aspect is configured to be the default aspect for the object. The defaut search path i set in the Library Structure.
Figure 40. New Aspect Window
3BSE030335R4101 113
Configuring the Faceplate Section 4 Faceplate Framework
Configuring the FaceplateThis 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 99.
Note that if the faceplate is Inherited (True), changes can only be made in the object type.
114 3BSE030335R4101
Section 4 Faceplate Framework Configuring the Faceplate
The Config view contains the following tabs:
• Layout Configuration of the Faceplate geometry.
• Indicators Configuration of the Status and Navigation bar.
• Buttons Configuration of the Button area.
• Element Configuration of the Faceplate element area.
Figure 41. Open Config View
3BSE030335R4101 115
Layout Tab Section 4 Faceplate Framework
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 checkboxes for including the Reduced and/or Extended faceplate views.
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.
Enable/disable of faceplate views requires restart of Plant Explorer and Operator Workplace.
Figure 42. Layout Tab with Default Values
116 3BSE030335R4101
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 42 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.
3BSE030335R4101 117
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.
Configuring Indicators
Table 15 displays the configurable parameters in the Indicators tab which affect the Status and Navigation area in the Faceplate.
Figure 43. Indicators Tab
118 3BSE030335R4101
Section 4 Faceplate Framework Indicators Tab
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.
Table 15. 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 44 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 132 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 Reduced view.
3BSE030335R4101 119
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.
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)
Configuring Aspect Links
Table 16 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.
Figure 44. Configuration of Icons/Labels
Index 0
Index 1
120 3BSE030335R4101
Section 4 Faceplate Framework Indicators Tab
For aspect links you can check the Use aspect icon checkbox, to get the aspect icon as a graphical representation of the button, or select a specific icon or label.
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.
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.
Table 16. 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 15 for more information.
Faceplate pos The position within the Faceplate view.
Extended pos The position within the Extended view.
3BSE030335R4101 121
Indicators Tab Section 4 Faceplate Framework
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 Operator Workplace Configuration for more details on using Global Verbs.
Figure 45. Aspect Verb for the Aspect Graphic Element
122 3BSE030335R4101
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 command buttons is Direct action, that is, pressing a button directly invokes a write operation.
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.
Table 17 displays the configurable parameters for the Button area.
Figure 46. Buttons Tab
If “Apply present” is checked,the faceplate size got an Apply button
3BSE030335R4101 123
Buttons Tab Section 4 Faceplate Framework
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. 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.
Table 17. 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 visible. No expression means that the button is always enabled. [0 - dimmed, 1 - enabled, 2 - visible]
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 15 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 142. Default value is Direct Action.
The Apply button is always located to the right in the button area and can not be repositioned.
124 3BSE030335R4101
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.
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.
Figure 47. Elements Tab
3BSE030335R4101 125
Elements Tab Section 4 Faceplate Framework
By clicking in the Aspect column a drop down menu opens (see Figure 48). In this you can select the aspect you want to be represented as a tab in you faceplate.
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.
Figure 48. The Aspect Drop Down Menu
126 3BSE030335R4101
Section 4 Faceplate Framework Elements Tab
The result of the configuring in tabgroups will be according to Figure 50.
Figure 49. Configuration of Three Tab Groups
Figure 50. The Three Tabs as Seen in the Faceplate
Three tabs in tabgroup 1
Two tabs in tabgroup 2
3BSE030335R4101 127
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 50).
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 52.
Figure 51. The Caption Dialog Box
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.
Label checked
Tab text
128 3BSE030335R4101
Section 4 Faceplate Framework Elements Tab
Figure 52. Defining of User Role for Faceplate Tabs
Table 18. 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.
3BSE030335R4101 129
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.
• Object Type help The help for the object type is diasplayed.
• Help Aspect ReferencesAn aspect is pointed out. The type of help or a help file i addressed in the aspect. Select object and the help aspect.
• File ReferenceHere 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.
Figure 53. On-Line Help Tab
130 3BSE030335R4101
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 54).
A new dialog opens (see Figure 55). 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.
Now the same dialog box as before opens (see Figure 51 and Figure 54), but with the native text included (see Figure 56).
Figure 54. How to Select the NLS Facility
Figure 55. Text Reference
NLS Text Reference checked
Click on the Browse button
3BSE030335R4101 131
Expression Syntax in Faceplates Section 4 Faceplate Framework
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:$’.:aspect:property’
The dot ‘.’, in the syntax above, 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:aspect:property’
The following are two examples of expressions in faceplates:$’.:Control Connection:VALUE‘ * 2IIF($’.:Tanklimit:limit’ < 100, 0, 1)
Figure 56. Caption dialog Box With Domestic Text
Resource idselected
Corresponding text in selectedLocale.
132 3BSE030335R4101
Section 4 Faceplate Framework Security
Absolute references to objects can also be used. See the following examples:$’ObjectName:aspect:property’$’ObjectName/FormalInstanceName:aspect:property’
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.
Another reason for always including the aspect part is when there are multiple properties with the same name. Omitting the aspect part, the first found property is used on any of the available aspects.
The syntax of expressions used in faceplates differs from the syntax used for graphic aspects in general (See Expressions on page 70).
SecurityFaceplates 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 19. They are used to control whether the user is allowed or denied to see different views or configure the aspect.
Only object paths where the first object has a unique name can be referenced using absolute references.
Table 19. 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
3BSE030335R4101 133
Operation/Permission Mapping on Faceplate a Aspect Category Section 4 Faceplate Framework
If a user doesn’t 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 57 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.
134 3BSE030335R4101
Section 4 Faceplate Framework Operation/Permission Mapping on Faceplate a Aspect Category
Figure 57. Permission/Operation Mapping on a Faceplate Aspect Category
3BSE030335R4101 135
Operation/Permission Mapping on Faceplate a Aspect Category Section 4 Faceplate Framework
136 3BSE030335R4101
Section 5 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 6, 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 147.
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 6, Configuring Property Elements. Following sections describe built in property elements and descriptions of common characteristics of Property Elements.
3BSE030335R4101 137
Built in Property Elements Section 5 Configuring Faceplate Elements
Built in Property Elements
Under the Subelement library tab in the Graphic Builder you find nine (9) predefined Property Elements. In Figure 58 below, you can see the predefined property elements.
Property Reference PropertiesEach Property Element has at least one property of the ObjectPropertyRef type, see ObjectPropertyRef Properties on page 75. 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 59.
Figure 58. Predefined Property Elements
ApplyButton
CancelButton
CheckBox
Indicator
InputField
OptionButton
PushButtonToggleButton
Ibar
Obsolete item
138 3BSE030335R4101
Section 5 Configuring Faceplate Elements Property Reference Properties
Figure 59. 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.
3BSE030335R4101 139
Assigning an Override Expression to the ObjectPropertyRef Property Section 5 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 20 describes 3 relevant combinations of assignements to an ObjectPropertyRef property.
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.
Table 20. Assignments to Properties of ObjectPropertyRef Type
Assignments Function
Assign a property reference using the property window
Write (input) operations and the presentation function both use the property reference
Assign an expression using the Expression Builder
The presented data is received from the expression. Only local input is possible, see section Validation of Input on page 144 and Local Data Entry on page 145.
Assign a property reference using the property window and an expression using the expression builder
Write (input) operations use the property reference but the presented values is received from the assigned expression
140 3BSE030335R4101
Section 5 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.
3BSE030335R4101 141
Error Presentation Section 5 Configuring Faceplate Elements
Error PresentationProperty 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.
Direct and Applied ActionInput 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.
142 3BSE030335R4101
Section 5 Configuring Faceplate Elements Cancel Operation
• 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.
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 ValueThere 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.
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.
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.
3BSE030335R4101 143
Input Operations Independent of Subscribed Data Section 5 Configuring Faceplate Elements
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.
Input Operations Independent of Subscribed DataSome 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.
Validation of InputDirect 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:
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.
Users that do not find it acceptable that input operations are affected by subscribed data should use other constructions.
144 3BSE030335R4101
Section 5 Configuring Faceplate Elements Local Data Entry
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.
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)
By setting the cancel parameter to true in response to the OnApply event, the client element can inhibit the write operation.
Local Data EntryThe OnApply event presented in section Validation of Input on page 144 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 OperationsProperty 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.
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.
3BSE030335R4101 145
Option (Radio) Button Behavior Section 5 Configuring Faceplate Elements
The WriteAccessGranted subproperty reflects if the property is
• writable by its nature.
• writable from a security point of view.
Option (Radio) Button BehaviorThe 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.
146 3BSE030335R4101
Section 5 Configuring Faceplate Elements Configuring Faceplate and Property Elements Using
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 164.
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.
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 55.
3BSE030335R4101 147
Configuring Faceplate and Property Elements Using Basic Mechanisms Section 5 Configuring
Select the object reference, bring up the context menu and select Properties. This brings up the dialog according to Figure 60.
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
Figure 60. Object Reference Dialog Box
Type in anObject Proxyname here
148 3BSE030335R4101
Section 5 Configuring Faceplate Elements Configuring Faceplate and Property Elements Using
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 SubCommand1_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
3BSE030335R4101 149
Configuring Faceplate and Property Elements Using Basic Mechanisms Section 5 Configuring
150 3BSE030335R4101
Section 6 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 138. 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 5, Configuring Faceplate Elements, to read about functions that property elements typically should have.
This chapter assumes some knowledge of Visual Basic programming.
3BSE030335R4101 151
How to Write to the Properties of an Aspect Object Section 6 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.
'DeclarationPrivate 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 examplePrivate Sub m_Property_WriteComplete()On Error GoTo Error_m_Property_WriteComplete
' Do something usefulExit SubError_m_Property_WriteComplete: Call ReportError("m_Property_WriteComplete", Err.source,_
Err.Description, "", 0)End Sub.....
152 3BSE030335R4101
Section 6 Configuring Property Elements Configuring Direct Entry Windows
Configuring Direct Entry WindowsThis 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 withPgDEW is datatype independent.
• Objects to control the different datatypes are displayed in Table 21.
When a Direct Entry Window for a specific data type is needed, the corresponding data type specific object is created.
Table 21. Direct Entry Windows
Name DEW
PgNumericDEW
PgIntegerDEW
PgStringDEW
PgBoolDEW
PgTimeDEW
PgDateDEW
3BSE030335R4101 153
Positioning of the Direct Entry Window Section 6 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.
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 61 below):
The distances X and Y are always given in pixels.
Figure 61. How to Configure a DEW to the Right of the Control
YX
154 3BSE030335R4101
Section 6 Configuring Property Elements Positioning of the Direct Entry Window
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 62 below):
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 63 below):
Figure 62. How to Configure a DEW Below the Control
YX
3BSE030335R4101 155
Controlling the Lifetime of the Direct Entry Window Section 6 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
Figure 63. How to Configure a DEW Relative to Graphic Aspect
YX
156 3BSE030335R4101
Section 6 Configuring Property Elements Creating a Direct Entry Window from Visual Basic Code
Creating a Direct Entry Window from Visual Basic Code
Following code gives an example of how to create and handle a Direct Entry Window from Visual Basic code:
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 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 = NothingEnd 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 167.
3BSE030335R4101 157
Controlling a Direct Entry Window via Graphic Primitives Section 6 Configuring Property Elements
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
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 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.
158 3BSE030335R4101
Section 6 Configuring Property Elements Stepsize and limits in the PgNumericDew Direct Entry
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 spinbuttons (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.
– 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.
3BSE030335R4101 159
Changing Font Size in Direct Entry Windows Section 6 Configuring Property Elements
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.
160 3BSE030335R4101
Section 6 Configuring Property Elements Changing Font Size in Direct Entry Windows
4. In the Name area select DirectEntryWindowFontSize and Base rule. Mark Local and enter the wanted font size in the Value field. See Figure 64.
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 65 below.
Figure 64. Changing Font Size in Direct Entry Windows
Figure 65. Direct Entry Window Font Size 18pt.
3BSE030335R4101 161
Automatically Invoked Direct Entry Windows Section 6 Configuring Property Elements
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.
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.
Table 22. 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.
162 3BSE030335R4101
Section 6 Configuring Property Elements Visual Basic Error Handling
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.
Visual Basic Error HandlingThe 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.
3BSE030335R4101 163
Input Session Handling Section 6 Configuring Property Elements
Input Session HandlingInput 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 142.
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 142.
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 142, was performed or because the input session was terminated by performing an Cancel operation, see Cancel Operation on page 143.
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.
164 3BSE030335R4101
Section 6 Configuring Property Elements Starting an Input Session
Starting an Input Session
The following Sub shows how to start an input session and to trigger the session timeout. 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 timeout 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.
3BSE030335R4101 165
The DoApply Event Section 6 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 SubError_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 SubError_m_sc_DoCancelInputSession: Call ReportError("m_sc_DoCancelInputSession", _
Err.source, Err.Description, "", 0)End Sub
166 3BSE030335R4101
Section 6 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 SubError_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 144.
The call m_sc.TriggerSessionTimeout re-triggers the session timeout.
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.
3BSE030335R4101 167
The DoEnableApplyButton Event Section 6 Configuring Property Elements
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.CancelInputSessionExit 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.
168 3BSE030335R4101
Section 7 Maintenance
The Display ToolA graphic aspect may consist of information from several other graphic aspects (see Figure 66 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.
Figure 66. A Typical Graphic Image Structure
SubelementsGraphicDisplay
GraphicElements
The graphic subelementsare included in a graphicelement. These arethen included in the graphicdisplay.
A Typical GraphicStructure are:
3BSE030335R4101 169
The Display Tool Section 7 Maintenance
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.
This means that, if you change the information in the Graphic aspect which is also a part of another Graphic aspect (see Figure 66), you have to deploy not only the changed subelement, but also all items containing info from it.
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 99.
170 3BSE030335R4101
Section 7 Maintenance The Display Tool
You start the Display Tool from the Start menu, ABB Industrial IT > 800xA System > Display Tool. A window according to Figure 67 below opens. In a table all items with changed but not deployed source code are shown.
Description of the Display Tools Interface
In the Display Tool (see Figure 67) you find a display area with four columns:
• AspectNameIn this column you find the name of the graphic aspect
• ObjectNameIn this column you find the path to the Aspect Object, which contain the graphic aspect
Figure 67. Display Tool
3BSE030335R4101 171
The Display Tool Section 7 Maintenance
• Newer Source
– If YesThe deployed version is older than the source file. Deploy!
– If NoThe deployed version and the source file are the same.
• Newer Dependencies
– If YesThe graphic aspect contains an instance of another graphic aspect. For this instance there is a newer version. Deploy!
– If NoThe graphic aspect is from the same time or older than the graphic aspect you have accessed.
An area in the upper left corner contains info about the structure, that will be searched. With help of a drop down menu, which you access through the arrow head on the right side of the area, you can select the structure you want to search and view. Default is the Functional Structure presented.
A check box, named Search in all structures, will, if checked, present all structures.
In the middle of the upper part of the interface you find a pair of 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.
172 3BSE030335R4101
Section 7 Maintenance The Display Tool
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 aspectsJust click on the Deploy All in List button
• Just a selection of the presented itemsSelect 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.
3BSE030335R4101 173
Diagnostics Window Section 7 Maintenance
Diagnostics WindowThe Diagnostics Window shows background information about graphic displays and elements. To display the Diagnostic Window open the context menu of a graphic display or element and choose Diagnostics, see Figure 68.
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
Diagnostics Window shows a snapshot of data acquired when invoking it. On two tabs, there are refresh buttons which triggers fetching of fresh information.
Figure 68. Graphic Display Context menu - Diagnostics
174 3BSE030335R4101
Section 7 Maintenance Diagnostics Window
General Tab
The General tab has three areas, see Figure 69.
Figure 69. Diagnostics Window - General Tab
3BSE030335R4101 175
Diagnostics Window Section 7 Maintenance
Table 23 shows the parameters listed in the Subscription overview.
Error Message Overview shows the number of errors in Visual Basic code and expressions.
Table 23. 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. This figure corresponds to all items presented, on the OpcData tab, which have a "B" in the quality field.
Number of uncertain items
Shows the number of items with uncertain quality, i.e. 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 3BSE030335R4101
Section 7 Maintenance Diagnostics Window
The Timing summary area presents timing information for the entire display regardless of where the user pointed when invoking the Diagnostics Window. Some of the timing parameters are listed in Table 24.
Table 24. Timing parameters
Parameter Description
Grab license Shows the time required to check if a user has a valid license for viewing the graphic display.
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.
RuntimeInit Without using property server the parameter shows the init time including setting up the subscription and storing the .sub file.
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 Shows the time required to create the display excluding the actual drawing on the screen.
Paint Start Not used
First data received Shows the time from callup to the first item data has been received.
3BSE030335R4101 177
Diagnostics Window Section 7 Maintenance
OpcData Tab
Figure 70 shows the OpcData tab.
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.
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.
Latest data received
Shows the time required from callup to the latest item data has been received.
All data received Shows the time required from callup until data for all items has been received.
Figure 70. Diagnostics Window - OpcData Tab
Table 24. Timing parameters (Continued)
Parameter Description
178 3BSE030335R4101
Section 7 Maintenance Diagnostics Window
The Item table contains information listed in Table 25.
Table 25. 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.
Access Shows if the property, "to its static nature" is
• R - readable
• W - writable
• RW - readable and writable.
3BSE030335R4101 179
Diagnostics Window Section 7 Maintenance
Error Messages Tab
The Error Messages tab shows errors for the element selected in the Error elements list, see Figure 71. The Error elements list only shows elements in which errors have been reported.
The fields in the Expression Error List are presented in Table 26.
Figure 71. Diagnostics Window - Error Messages Tab
Table 26. 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.
180 3BSE030335R4101
Section 7 Maintenance Diagnostics Window
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 163, 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 27.
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).
Table 27. 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.
Table 26. Expression Error List (Continued)
Field Description
3BSE030335R4101 181
Frequently Asked Questions (FAQ) Section 7 Maintenance
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 don’t have the Graphics Builder option installed on your machine.
3. You tried to edit an inherited aspect, which this is not possible. Go to the object type structure using Goto Type on the context menu and try again.
4. You have to have the application engineer role to edit a graphics aspect.
5. 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.
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.
182 3BSE030335R4101
Section 7 Maintenance Frequently Asked Questions (FAQ)
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
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 99.
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
3BSE030335R4101 183
Frequently Asked Questions (FAQ) Section 7 Maintenance
of GDI objects on one machine is by default limited to 10 000 GDI objects. 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.
184 3BSE030335R4101
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 185
• How to Build a Graphic Display
• Adding Graphic Elements to the Graphic Display
• Using Logical Colors
Tutorial 2 - Building a Graphic Element on page 192
• Creating a Graphic Element
• Building a Graphic Element
• Changing Properties for the Generic Element
• Assigning Expressions to Properties
• Deploying a Graphic Element
Tutorial 1 - Building a Graphic DisplayIn 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 AI1.12 and AI1.13.
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
3BSE030335R4101 185
Tutorial 1 - Building a Graphic Display Section 8 Tutorial
through the valve. The fluid is measured by the analog input object AI1.14, which must have a value above zero (0) before the rectangle turns red.
Figure 72. Graphic Aspect Designed for Tutorial 1
Lower tank(Graphic primitive)
Upper tank
Direction arrow
Valve Pipe
Fluid warning
Level indicator(Bar)Graphic primitive
186 3BSE030335R4101
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, select the new “Storage tanks, Tank Farm” object, 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 73. The Functional Structure in Plant Explorer
3BSE030335R4101 187
How to Build a Graphic Display Section 8 Tutorial
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. Select Properties window in the View menu if not already open. Change BottomRightEnd, TopLeftEnd, and Orientation in order to get the desired look.
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.
Figure 74. Graphic Primitives Tab
Figure 75. Properties Window
188 3BSE030335R4101
Section 8 Tutorial Adding Graphic Elements to the Graphic Display
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 AI1.12 MB300AI from Control Structure. Press OK.
2. The Element Browser now looks like in Figure 76. Select the graphic element BargraphMV01, and click Add Element. Drag the bar-graph to the upper tank.
3. Repeat the steps, which you just did, but place AI1.13 on the Lower tank instead. Press OK.
4. In the Control structure there must be an object type MB300 valve (AC400 connection in this example). If not, create one under the external process objects.
5. Add the valve via the Element Browser. Select the graphic element Valve01 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.
Figure 76. Lower Tank Level Display
AI1.12
3BSE030335R4101 189
Using Logical Colors Section 8 Tutorial
Using Logical Colors
We want a rectangle at the bottom to turn red, when fluid passesthrough the valve, to indicate dangerous fluid. The fluid is measured by AI1.14. 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.
The expression we will build will eventually look like this:iif(AI1.14:Control Connection:VALUE > 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 AI1.14 and select Value in the sub-property list.
c. Click Value - Control Connection from the Object Property list and then select Insert and the reference to AI1.14:Control Connection:Value will be inserted.
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 “,”
Note that the above reference cannot be entered, it must be inserted from the bottom part of the Expression Builder.
190 3BSE030335R4101
Section 8 Tutorial Using Logical Colors
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.
The Expression Builder shall now look like Figure 77 below.
6. Open the File menu and Deploy. This will save, compile and link your Graphic Display.
7. Close Graphic Builder without save (already done).
Hopefully you have accomplished a similar result as shown in Figure 72 on page 186.
Figure 77. FillColor property
3BSE030335R4101 191
Tutorial 2 - Building a Graphic Element Section 8 Tutorial
Tutorial 2 - Building a Graphic ElementGraphic 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 a Bar element, which could be added to a graphic display. The result of this tutorial will look like Figure 78 on your screen.
Figure 78. The Graphic Element IBar
192 3BSE030335R4101
Section 8 Tutorial Creating a Graphic Element
Creating a Graphic Element
1. To create a new graphic element, start from Plant Explorer. Select Object Type Structure - Object Types - Control System - MB300 Object Types - MB300 Process Objects - MB300 Signals - MB300AI. Right-click the mouse and select New Aspect.
2. The New Aspect window is opened. Select Show all.
3. Select Process Graphics, Graphic element and Graphic element and name it.
Figure 79. Object Type Structure
3BSE030335R4101 193
Creating a Graphic Element Section 8 Tutorial
4. Click Create.
5. Right-click on the created Graphic element. Select Edit, to open up the Graphics Builder.
Figure 80. New Aspect
194 3BSE030335R4101
Section 8 Tutorial Building a Graphic Element
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 PgBar in the Graphic Primitives 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.
Figure 81. Expression Builder - Object Property
3BSE030335R4101 195
Changing Properties for the Generic Element Section 8 Tutorial
4. The selected generic element now appears inside a bounding rectangle in the workspace.
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 PgBar in the workspace.
2. Open the Properties Window from the View menu. The Properties window is presented (if not already open).
Figure 82. PgBar on Object Window With its Properties Window
196 3BSE030335R4101
Section 8 Tutorial Assigning Expressions to Properties
3. Change properties: FrameWidth to three (3), RangeMin to zero (0) and the ValueColor to a favorite color from the palette.
4. Select the object window and in the new properties menu, click BackColor in the right column, and select a nice color from the palette.
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 Bar in the workspace.
2. Select Expression Builder in the View menu (if necessary: Resize/move the Expression Builder).
3BSE030335R4101 197
Assigning Expressions to Properties Section 8 Tutorial
3. Select FillColor property to assign an expression. Move the cursor to the right column “the expression entry field”.
4. Type “iif(“
5. Select the Object Property tab and select Object “.”.The ”.” represents the object which the graphic element resides on, and hence receives its value from. Select Value - Control Connection, click Insert.
Figure 83. Expression Builder - Object Colors
198 3BSE030335R4101
Section 8 Tutorial Deploying a Graphic Element
6. Then type “>60,” (this will be the High Level Alarm).
7. Go to Color / Event Color / highAlarmSymbol.
8. Click Insert in order to set high level alarm color.
9. Type “,”
10. Go to Colors / Object Colors / Measure.
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 “.” and then the property VALUE-Control Connection.
Deploying a Graphic Element
To deploy the new graphic element:
1. Choose Deploy from the File menuThe 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 2 is now done and the object ready for use.
3BSE030335R4101 199
Tutorial 3 - Creating and Configuring Faceplates Section 8 Tutorial
Tutorial 3 - Creating and Configuring FaceplatesThe 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.
Creating a Faceplate Element
Before we start creating the faceplate element, we must create a test environment. We will use a general property aspect to be able to test the faceplate element.
Figure 84. Faceplate
Bar
Command button
Push buttons
Indicator
Aspect link
200 3BSE030335R4101
Section 8 Tutorial Tutorial 3 - Creating and Configuring Faceplates
Follow the steps to create a general property:
1. Mark the object where the Faceplate should reside by selecting the Object Type structure and browse to the MB300 AI object. The normal case is to create a new object type or to modify an existing one. In this case we modify the existing MB300 AI object type with new aspects. Right-click and select New Aspect.
2. Check the list presentation and find General Properties, name it Props, and press Create.
3. Click on Props in the Aspect list, and you get the menu: Property Configuration.
4. Set the name to BarNum, select Value type to Real. (The bar we will create should later use this value in the faceplate). Click Set.
5. Set a new name to Bool, select Value type Boolean. (The Faceplate we will create should later use this value). Click Set and Apply.
3BSE030335R4101 201
Tutorial 3 - Creating and Configuring Faceplates Section 8 Tutorial
6. Open aspect MB300AI Type Definitions and it´s Aspect Control tab.
7. Mark Props and check Copy when object is created. Uncheck the other two choices Use ... and Inherit ....
Now we have a value for the bar and we will create a Faceplate element.
Creating a Faceplate Element
1. Add a new Faceplate Element aspect to the MB300 AI object by right-click on the object and then select New Aspect.
2. Go to Process Graphics, select Graphic Element, then Faceplate Element.
3. Name the Faceplate Element. “Faceplate Element1” and press Create.
Figure 85. Property Configuration
202 3BSE030335R4101
Section 8 Tutorial Tutorial 3 - Creating and Configuring Faceplates
4. Click on edit and the Graphics Builder is launched. The grey area represents the Faceplate Element.
5. Go to the Tools menu, select Graphic Libraries and mark Subelements. Click Ok.
6. Click on the Subelements tab, select the IBar and place it in the object window, left-click and drag to wanted size.
7. Open the Properties Window area from view menu and set the property EnableInput to True, RangeMax to 100 and RangeMin to 0.
8. Click on ValueRef in Property Window and open the Property Pages menu.
9. Select ObjectProperty tab and Object “.” and BarNum-Props in the right column. Click Insert.
3BSE030335R4101 203
Tutorial 3 - Creating and Configuring Faceplates Section 8 Tutorial
The Bar is now placed in the Faceplate Element area.
Figure 86. Graphic Workplace - Insert BarNum
204 3BSE030335R4101
Section 8 Tutorial Tutorial 3 - Creating and Configuring Faceplates
Creating an Input Field.
1. Go to the toolbox, select the Subelements tab, click on the InputField tool and create the button.
2. Open the Expression Builder from view menu.
3. Open Object Property tab. Mark the “.” object.
4. In the upper field open Max, enter 100 and then open Min and enter 0.
5. Open Properties Window from view menu and select PropertyRef.
6. Click in the right field for PropertyRef and open the dotted menu button.
7. Press the menu button and a new menu Property pages will open.
8. Select object “.” and the property BarNum-Props. Press OK.
9. Deploy your graphics from the File menu. Confirm deployment, exit and answer no on question to save.
3BSE030335R4101 205
Tutorial 3 - Creating and Configuring Faceplates Section 8 Tutorial
We have now created a Faceplate Element which contains a bar and an input field.
Figure 87. Graphic Workplace - Insert InputField
206 3BSE030335R4101
Section 8 Tutorial Tutorial 3 - Creating and Configuring Faceplates
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 at dropdown menu from the eye.
5. Go to Layout tab and Set MaxNoOfButtonRows to 1 and MaxNumberOfButtonsPerRow to 6. Click Apply.
6. Select Element tab, click in the Aspect field. Select Faceplate Element1 in the drop down list. Click Apply.
3BSE030335R4101 207
Tutorial 3 - Creating and Configuring Faceplates Section 8 Tutorial
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 AC400 Event Colors and color AlarmPrio3. Click Ok.
Figure 88. Button Field
208 3BSE030335R4101
Section 8 Tutorial Tutorial 3 - 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.
8. Click Ok.
9. Click on the Expression field, a new window Expressions show up and then type $'.:Props:Bool’. 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. Click on the Icon/Label field. press the radio button for Use aspect icon. Click Open and then Ok
3. Select Faceplate Pos field, enter “6”.Press Apply and an aspect link has been created.
Figure 89. The Indicator Labels Dialog
3BSE030335R4101 209
Tutorial 3 - Creating and Configuring Faceplates Section 8 Tutorial
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.
Figure 90. Create Aspect Link
210 3BSE030335R4101
Section 8 Tutorial Tutorial 3 - Creating and Configuring Faceplates
4. Click on the Property Name field, select Bool in the drop down list.
5. Click on the Property Value select True in the drop down list.
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 91. Create Push Buttons
3BSE030335R4101 211
Tutorial 3 - Creating and Configuring Faceplates Section 8 Tutorial
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 105.
212 3BSE030335R4101
Appendix A Standard Building Blocks
Graphic PrimitivesThis 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 28. 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.
3BSE030335R4101 213
Common Properties Appendix A Standard Building Blocks
The following section presents a list of properties common for all graphic primitives in Table 28.
ErrorPresentation
The ErrorPresentation is used in the PgBar element, AdvantNumeric element, PgErrorIndicator and in the AdvantObjectTrim.
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.
Table 28. Graphic Primitives (Continued)
NAME DESCRIPTION
214 3BSE030335R4101
Appendix A Standard Building Blocks Common Properties
Table 29. 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
3BSE030335R4101 215
Common Properties Appendix A Standard Building Blocks
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
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.
Table 30. 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 3BSE030335R4101
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.
Line Styles
The LineStyle property specifies the style of the line.
Table 31. 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.
Table 32. Line Styles
Value Enum Sample
0 SOLID
1 DASH
3BSE030335R4101 217
Common Properties Appendix A Standard Building Blocks
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.
2 DOT
3 DASHDOT
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.
Table 32. Line Styles (Continued)
Value Enum Sample
218 3BSE030335R4101
Appendix A Standard Building Blocks Common Properties
Angle Properties
The primitive elements AdvantArc, AdvantChord and AdvantPie have round handles at the start and end points.
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.
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.
Figure 92. Primitive Elements with Angle Properties
AdvantPie AdvantChord AdvantArc
3BSE030335R4101 219
Common Properties Appendix A Standard Building Blocks
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 93 below.
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 crosshair (+).
3. Press Shift + left mouse button. The new point is added.
Figure 93. Moving an Existing Point
Figure 94. Adding a New Point
The Template Viewof the AdvantPolyline
Start Position of Point
with four points
The Changed Viewof the AdvantPolyline
Moved Point
with four points
To move a point:Move the cursor to the pointso the cursor changes froman arrow to a cross.By holding down the leftmouse button you can movethe point to a new position.
Arrow Cursor Cross Cursor
New Point
220 3BSE030335R4101
Appendix A Standard Building Blocks Common Properties
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 33. 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.
3BSE030335R4101 221
Common Properties Appendix A Standard Building Blocks
Fill Styles
The FillStyle property specifies how the area fill would appear.
Table 34. Fill Styles
Value Enum Sample
0 SOLID
1 TRANSPARENT
2 BDIAGONAL
3 CROSS
4 DRAGCROSS
5 FDIAGONAL
222 3BSE030335R4101
Appendix A Standard Building Blocks Common Properties
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.
6 HORIZONTAL
7 VERTICAL
Table 35. Shaded Fill Styles
Value Enum Sample
8 VERTICAL SHADE
9 HORIZONTAL SHADE
Table 34. Fill Styles (Continued)
Value Enum Sample
3BSE030335R4101 223
Common Properties Appendix A Standard Building Blocks
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.
10 VERTICAL 3DSHADE
11 HORIZONTAL 3DSHADE
Table 36. 3D Frame Properties
Name Type Default Description
Fram3Deffect ENUM RAISED 3D effect of the frame. See Figure 95 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.
Table 35. Shaded Fill Styles (Continued)
Value Enum Sample
224 3BSE030335R4101
Appendix A Standard Building Blocks Event Declarations
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.
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:
Figure 95. 3D-Effect Property (Raised/Sunken)
RAISED SUNKEN
3BSE030335R4101 225
Event Declarations Appendix A Standard Building Blocks
Table 37. 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.
226 3BSE030335R4101
Appendix A Standard Building Blocks Event Declarations
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.
3BSE030335R4101 227
AdvantArc Appendix A Standard Building Blocks
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 PgDEWPrivate 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 staysLet theTarget = target'....End SubPrivate Sub ReleaseDew() Set m_DEW = Nothing ‘Release the DEWEnd 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 96. AdvantArc
228 3BSE030335R4101
Appendix A Standard Building Blocks PgBar
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 = EightLimitsThe bar is displayed with max 8 limits. All limits with values inside the range of the bar are shown.
After creation the bounding rectangle can be manipulated to change size and position of the Arc.
Table 38. 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 219
• Visibility on page 217
3BSE030335R4101 229
PgBar Appendix A Standard Building Blocks
Style = TwoLimitsThe 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.
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:
Figure 97. Example of PgBars
Value
Limit1
Limit2
Limit3
Limit4
Style = EightLimits Style = TwoLimits
Limit1
Limit2
ValueLimit5
Limit6
Limit7
Limit8
230 3BSE030335R4101
Appendix A Standard Building Blocks PgBar
Table 39. Limit Properties
NAME TYPE DEFAULT DESCRIPTION
LimitNColor OLE_COLOR &H007F7F7F& Color of the two limits
LimitNFill ENUM Not filled Limit fill style (Table 40)
LimitNStyle ENUM Invisible Limit style (Table 40)
LimitNValue FLOAT 0 Value of limit N
Table 40. Limit Fill Styles
Filled Notfilled
LeftSideSymmetric
LeftSideLeft
LeftSideRight
RightSideSymmetric
RightSideRight
RightSideLeft
Invisible
3BSE030335R4101 231
PgBar Appendix A Standard Building Blocks
The properties of the PgBar are:
Table 41. 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.
232 3BSE030335R4101
Appendix A Standard Building Blocks PgBar
Style ENUM EightLimits See Figure 97 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 221
• 3D Frame Properties on page 224
• Visibility on page 217
Figure 98. FrameWidth2 on PgBar Example
Table 41. PgBar Properties (Continued)
NAME TYPE DEFAULT DESCRIPTION
FrameWidth2
3BSE030335R4101 233
PgBar Appendix A Standard Building Blocks
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.
Clicking at a target area, fires the events described in Event Declarations on page 225. The target parameter of each event has the following coding:
Target ValueValue 0Limit 1 1Limit 2 2...Limit 8 8
Figure 99. Target Areas
Mouse click target areas
234 3BSE030335R4101
Appendix A Standard Building Blocks PgBar
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.
Figure 100. Error Presentation
UNCERTAIN
ErrorFramecolor
ErrorBackground
ErrorFillColor
ErrorColor
BAD
ErrorUncertainColor
3BSE030335R4101 235
AdvantBezier Appendix A Standard Building Blocks
AdvantBezier
A Bezier is like a polyline where the connecting lines are formed using the bezier algorithm instead of straight lines.
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.
Figure 101. AdvantBezier
236 3BSE030335R4101
Appendix A Standard Building Blocks AdvantChord
AdvantChord
An AdvantChord is a closed figure bounded by the intersection of an ellipse and a line segment.
Table 42. AdvantBezier Properties
NAME TYPE DEFAULT DESCRIPTION
Additional Properties for AdvantBezier are found in:
• Line Properties on page 217
• Visibility on page 217.
Table 43. 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.
Figure 102. AdvantChord
3BSE030335R4101 237
AdvantChord Appendix A Standard Building Blocks
After creation, the bounding rectangle can be manipulated to change size and position of the Chord.
Figure 103. Another Example of an AdvantChord
238 3BSE030335R4101
Appendix A Standard Building Blocks AdvantChord
The properties of AdvantChord are:
Table 44. 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 221
• Visibility on page 217
• Angle Properties on page 219.
3BSE030335R4101 239
AdvantCone Appendix A Standard Building Blocks
AdvantCone
The AdvantCone primitive draws a cone consisting of four vertices connected by straight lines.
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.
Figure 104. Examples of AdvantCones
Table 45. 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.
240 3BSE030335R4101
Appendix A Standard Building Blocks AdvantEllipse
AdvantEllipse
An AdvantEllipse Primitive is an ellipse with a frame and an area fill.
Direction ENUM DOWN UP, DOWN, RIGHT or LEFT.
Additional properties for AdvantCone are found in:
• Line Properties on page 217
• Fill Properties on page 221
• Angle Properties on page 219
• Visibility on page 217.
Figure 105. Examples of AdvantEllipses
Table 45. AdvantCone Properties
Name Type Default Description
3BSE030335R4101 241
AdvantHscale Appendix A Standard Building Blocks
The properties of the AdvantEllipse are:
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.
Table 46. AdvantEllipse Properties
Name Type Default Description
Additional Properties for AdvantEllipse are found in:
• Line Properties on page 217
• Fill Styles on page 222
• Visibility on page 217.
Figure 106. AdvantHscale
100.00.0
242 3BSE030335R4101
Appendix A Standard Building Blocks AdvantHscale
After creation the bounding rectangle can be manipulated to change size and position of the scale.
Table 47. AdvantHscale Properties
Name Type Default Description
EndValue FLOAT 100 The EndValue (Right point on the scale).
LabelFont FONT Ambient.Font
Font used as labeling the scale. Default font from 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 247.
LabelPosition ENUM DOWN The position of the label and tics. Can be UP or DOWN. See Figure 107 below.
LabelStyle ENUM CENTRIC LabelStyle CENTRIC or ALIGNED. See Figure 107 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.
3BSE030335R4101 243
AdvantHscale Appendix A Standard Building Blocks
Below is an example of AdvantHscale.
Figure 107. 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 107 above where the number of characters are the same for LabelStyle = ALIGNED and LabelStyle = CENTRIC but the length of the scale differs.
0,0
0,0LabelStyle = ALIGNED
LabelStyle = CENTRICLabelPosition = DOWN
LabelPosition = DOWN10000000,0
10000000,0
0,0
0,0LabelStyle = ALIGNED
LabelStyle = CENTRICLabelPosition = UP
LabelPosition = UP10000000,0
10000000,0
5000000,0
5000000,0
244 3BSE030335R4101
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 48. AdvantLimit Directions
Examples LEFT RIGHT FULL
UP
DOWN
LEFT
RIGHT
Only to be used with AdvantBar. Already included in PgBar.
3BSE030335R4101 245
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 49. 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 221
• Visibility on page 217.
246 3BSE030335R4101
Appendix A Standard Building Blocks AdvantNumeric
AdvantNumeric
An AdvantNumeric has the ability to show a number as formatted text.
After creation, the AdvantNumeric can be manipulated by changing size and position of its bounding rectangle.
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 51).
Table 50. Advant Numeric Format Examples
Value Format Output
12345 #0
#,###
#,###0.0
kr #,###0.0
When using big numbers it is preferable to use AdvantText, see AdvantText on page 263.
3BSE030335R4101 247
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 51. 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 108
DisplacementY Integer 5 Displacement of the Data Entry Window from the numeric. See Figure 108.
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 from the container
Font used in the text.
Format STRING #0.0 Format of the value in Excel format. Only valid if NumberOfDecimals is set to -1.
Se examples in Table 50 or Microsoft Excel Help(1)
Halign ENUM CENTER Horizontal alignment of the text inside the frame. Can be LEFT, CENTER or RIGHT.
248 3BSE030335R4101
Appendix A Standard Building Blocks AdvantNumeric
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 108 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 221
• 3D Frame Properties on page 224
• 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”.
Table 51. Advant Numeric Properties (Continued)
Name Type Default Description
3BSE030335R4101 249
AdvantNumeric Appendix A Standard Building Blocks
For further information, please see Event Declarations on page 225.
Figure 108. Displacement of Data entry window
*
*RightOf = false RightOf = true
RightOf indicates the position of origo *
DisplacementY
DisplacementX
Numeric
Data entry window
DisplacementY
DisplacementX
250 3BSE030335R4101
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).
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.
Figure 109. ObjectTrim
3BSE030335R4101 251
PgErrorIndic Appendix A Standard Building Blocks
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 52. 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 224
• Fill Properties on page 221
• ErrorPresentation on page 214.
252 3BSE030335R4101
Appendix A Standard Building Blocks PgErrorIndic
When the error state is “GOOD” the primitive is not visible at all.
Table 53. PgErrorIndic Properties
Name Type Default Description
Additional Properties for PgErrorIndic are found in:
• ErrorPresentation on page 214
• Visibility on page 217.
Figure 110. Error State Bad
Figure 111. Error State Uncertain
3BSE030335R4101 253
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.
After creation the bounding rectangle can be manipulated to change size and position of the element.
Figure 112. AdvantPie
Table 54. AdvantPie Properties
Name Type Default Description
Additional Properties for AdvantPie are found in:
• Line Properties on page 217
• Fill Properties on page 221
• Angle Properties on page 219.
• Visibility on page 217.
254 3BSE030335R4101
Appendix A Standard Building Blocks AdvantPipe
AdvantPipe
The AdvantPipe draws a pipe with area fill.
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.
Figure 113. Examples of AdvantPipes
BottomRightEndLeft
BottomRightEndRight
TopLeftEndLeft
TopLeftEndRight
3BSE030335R4101 255
AdvantPipe Appendix A Standard Building Blocks
Table 55. 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 221
• Visibility on page 217.
256 3BSE030335R4101
Appendix A Standard Building Blocks AdvantPolygon
AdvantPolygon
A Polygon is a closed figure bounded by a line through a number of points.
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.
Figure 114. Examples of Polygons
Table 56. AdvantPolygon Properties
NAME TYPE DEFAULT DESCRIPTION
Additional properties for AdvantPolygon are:
• Line Properties on page 217
• Fill Properties on page 221
• Smooth Property on page 218
• Visibility on page 217.
3BSE030335R4101 257
AdvantPolyline Appendix A Standard Building Blocks
AdvantPolyline
An AdvantPolyline draws a line between a number of points.
Table 57. AdvantPolygon Methods
NAME DESCRIPTION
AddPoint(x,y) Adds one point with the given coordinates.
DeleteAllPoints() Deletes all points of the curve.
Figure 115. AdvantPolyline
258 3BSE030335R4101
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 58. 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 59. 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.
3BSE030335R4101 259
AdvantPolyline Appendix A Standard Building Blocks
AdvantRectangle
An AdvantRectangle can draw a rectangle with a frame and an area fill.
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.
Figure 116. Examples of AdvantRectangles
260 3BSE030335R4101
Appendix A Standard Building Blocks AdvantBar
AdvantBar
An AdvantBar has the ability to show a vertically or a horizontally placed bargraph symbol.
Table 60. 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 221
• 3D Frame Properties on page 224
• Visibility on page 217.
Figure 117. AdvantBar
3BSE030335R4101 261
AdvantBar Appendix A Standard Building Blocks
After creation the bounding rectangle can be manipulated to change size and position of the Bar.
Table 61. 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 222
• 3D Frame Properties on page 224
• Visibility on page 217.
262 3BSE030335R4101
Appendix A Standard Building Blocks AdvantText
AdvantText
A primitive with the ability to show text.
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.
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 229.
Figure 118. AdvantText
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 247
Note that the tool tip for a graphic item does not work when the item is click transparent.
3BSE030335R4101 263
AdvantText Appendix A Standard Building Blocks
After creation the bounding rectangle can be manipulated to change size and position of the element.
Table 62. 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.
EnableInput
Boolean FALSE If true, the primitive generates events when clicked at.
Font FONT Default font from the container
Font used in the text.
Halign ENUM CENTER Horizontal alignment of the text inside the frame. Can be LEFT, CENTER or RIGHT.
StrikeThrough
Boolean Enabled Enable or disable the strike through facility, when the 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 222
• 3D Frame Properties on page 224
• Visibility on page 217.
264 3BSE030335R4101
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.
After creation the bounding rectangle can be manipulated to change size and position of the element.
Figure 119. AdvantVscale
Table 63. 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.Font
Font used for labeling the scale. Default font from 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 247.
0.0
100.0
3BSE030335R4101 265
AdvantVscale Appendix A Standard Building Blocks
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.
Table 63. AdvantVscale Properties (Continued)
Name Type Default Description
266 3BSE030335R4101
Appendix A Standard Building Blocks AdvantVscale
Figure 120. Example of an AdvantVscale
0,0
5000000,0
0,0
0,0
5000000,0
LabelPosition = Right
0,0
10000000,0
LabelStyle = AlignedLabelStyle = Centric
LabelStyle = CentricLabelStyle = Aligned
LabelPosition = LeftLabelPosition = Right
LabelPosition = Left
10000000,010000000,0
10000000,0
3BSE030335R4101 267
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.
To link the AspectLink component to the desired aspect, click on the aspect property in the Properties window in the Graphics Builder (Figure 122).
This will open a dialog that allows browsing for any aspect in the system (Figure 123). The aspect selected in the dialog will be linked the AspectLink object and opened every time the button is pressed.
Figure 121. Aspect Link
Figure 122. AspectLink aspect Property
268 3BSE030335R4101
Appendix A Standard Building Blocks Special Elements
Figure 123. Browse Dialog
Table 64. 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 122).
BackColor OLE_COLOR Default background
The Background color of the aspect link.(See Command Button)
3BSE030335R4101 269
PgEventTunnel Appendix A Standard Building Blocks
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.
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.
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)
ForeColor OLE_COLOR Black Currently not used.
Picture Picture - The picture displayed by the aspect link.
Table 64. AspectLink Properties (Continued)
Name Type Default Description
270 3BSE030335R4101
Appendix A Standard Building Blocks PgEventTunnel
• 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 ControlTo 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, ShiftEnd Sub
Label1.Click(..)If Button=VBLeftButton Then
m_sc.ShowDefaultAspect MeElse If
m_sc.ShowContextMenu MeEnd If
End Sub
3BSE030335R4101 271
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. An overview of the different states of a standard AlarmControl is displayed in Table 65.
Table 65 shows the most common alarm indications.
Table 65. Alarm Indications
Icon Description
Alarm can be acknowledged
Alarm is active and acknowledged
Alarm is active, but not acknowledged
Alarm is automatically disabled by the system
Alarm disabled by a user
272 3BSE030335R4101
Appendix A Standard Building Blocks AlarmControl
The AlarmControl element is intended to be displayed in the header area of a faceplate, and has a reserved place in the faceplate framework Figure 124. Thus, the AlarmControls’s aspect object needs to contain a faceplate aspect for the control to be visible, directly or by inheritance.
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, but is instead copied from the Graphical Structure using the Plant Explorer
The AlarmControl is triggered whenever an event is fired. The faceplate aspect containing the AlarmControl gets the message from an Alarm and Event List aspect.
For further information on the usage of an AlarmControl and faceplate configuration, refer to Section 4, Faceplate Framework.
Alarm is idle, that is there are no alarms
Alarm is neither active, nor acknowledged
Figure 124. AlarmControl in Faceplate Header
Table 65. Alarm Indications (Continued)
Icon Description
3BSE030335R4101 273
AspectViewCt Appendix A Standard Building Blocks
AspectViewCt
The AspectViewCt 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 a trend curve or an alarm list (Figure 125).
An aspect hosted in an AspectViewCt is fully functional and its graphical interface can be accessed as usual.
The link to the hosted aspect is set up using the Aspect property. If the property is clicked upon in the Properties view in the Graphics Builder a dialog is shown allowing you to choose the aspect to be hosted in the control.
Figure 125. AspectViewCt hosting an Alarm and Event List Aspect
Table 66. AspectViewCt Properties
Name Type Default Description
Aspect String - String representation of the Aspect hosted by the AspectViewCt element
274 3BSE030335R4101
Appendix A Standard Building Blocks AspectViewCt
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 126.
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.
Figure 126. Composite Object List Element
3BSE030335R4101 275
AspectViewCt Appendix A Standard Building Blocks
When right clicking an object in the list the objects context menu will show up, see Figure 127.
Figure 127. Composite Object List Context Menu
276 3BSE030335R4101
Appendix A Standard Building Blocks ABB Subelements
ABB SubelementsThese 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
A Bar has the ability to show a bar with two hatched limit areas or four limit markers.
After creation the bounding rectangle can be manipulated to change size and position of the 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.
Figure 128. Bar
Table 67. Bar Properties
Property Name Default Remarks
BackColor Black Background color of the bar
Displacement 0 Displacement of the Data Entry window from the bar.
3BSE030335R4101 277
Bar Appendix A Standard Building Blocks
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.
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
Table 67. Bar Properties (Continued)
Property Name Default Remarks
278 3BSE030335R4101
Appendix A Standard Building Blocks Bar
The Bar subelement generates an event:
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
ValueColorNeg Blue Color of bar when value is below Start Value
Additional properties for Bar are:
• Visibility on page 217
Table 68. Event primitives
Events Description
OnMouseDown The mouse is clicked.
Table 67. Bar Properties (Continued)
Property Name Default Remarks
3BSE030335R4101 279
Bar Appendix A Standard Building Blocks
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)
Bar Styles
The subelement Bar can have two hatched limit areas or four limit markers.
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.
Figure 129. Bar Styles
Value?
HighLimit2
HighLimit1
LowLimit1
LowLimit2
280 3BSE030335R4101
Appendix A Standard Building Blocks Bar
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.
Table 69. 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
3BSE030335R4101 281
Property Elements Appendix A Standard Building Blocks
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.
LowLimit1Color Grey Grey
LowLimit1Visible True True
LowLimit2 15
LowLimit2Fill Transparent
LowLimit2Color Grey
LowLimit2Visible True
Orientation Vertical Vertical
RangeMax 100 100
RangeMin 0 0
StartValue 0 0
Value 50 50
ValueColor Green Green
ValueColorNeg Blue Blue
Table 69. Default Property Values for Bar Styles (Continued)
Property Name FourLimits TwoLimits
282 3BSE030335R4101
Appendix A Standard Building Blocks Property Elements
The Following elements are described:
• Indicator
• Push Button
• Toggle Button
• IBar
• Input Field
• CheckBox
• Option Button
• Apply Button
• Cancel Button
Figure 130. Property Elements
Indicator
ToggleButton
InputFieldApplyButtonCancelButton
CheckBox
IBar
OptionButton
PushButton
3BSE030335R4101 283
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 70.
Table 70. 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.
284 3BSE030335R4101
Appendix A Standard Building Blocks Indicator
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
Table 70. Indicator Properties (Continued)
Name Type Default Description
3BSE030335R4101 285
Indicator Appendix A Standard Building Blocks
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 5, Configuring Faceplate Elements.
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.
Table 70. Indicator Properties (Continued)
Name Type Default Description
286 3BSE030335R4101
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 71. 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
3BSE030335R4101 287
Push Button Appendix A Standard Building Blocks
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.
Table 71. Push Button Properties (Continued)
Property Type Default Description
288 3BSE030335R4101
Appendix A Standard Building Blocks Toggle Button
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 5, 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.
TextColor OLE_COLOR &H00000000& Color of caption
Value Variant True The value written to the PropertyRef property when the push button is pressed.
Table 71. Push Button Properties (Continued)
Property Type Default Description
3BSE030335R4101 289
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 72. 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
290 3BSE030335R4101
Appendix A Standard Building Blocks Toggle Button
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.
Table 72. Toggle Button Properties (Continued)
Property Type Default Description
3BSE030335R4101 291
Toggle Button Appendix A Standard Building Blocks
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 5, Configuring Faceplate Elements.
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.
Table 72. Toggle Button Properties (Continued)
Property Type Default Description
292 3BSE030335R4101
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 73. 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.
3BSE030335R4101 293
IBar Appendix A Standard Building Blocks
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 97.
Table 73. IBar Properties (Continued)
Property Type Default Description
294 3BSE030335R4101
Appendix A Standard Building Blocks IBar
More information on events used by property elements is found in Section 5, Configuring Faceplate Elements.
In addition, the IBar has 8 sets of the following properties. X in each name is 1 to 8.
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.
Table 74. 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.
Table 73. IBar Properties (Continued)
Property Type Default Description
3BSE030335R4101 295
IBar Appendix A Standard Building Blocks
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.
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
Table 74. IBar Additional Properties (Continued)
Property Data type Default Value Description
296 3BSE030335R4101
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 307.
Table 75. 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
3BSE030335R4101 297
Input Field Appendix A Standard Building Blocks
EnableInput Boolean True Set to True, the Input Field fires a Direct Entry Window when pressed, to allow input of a value (Figure 131).
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.
Table 75. Input Field Properties (Continued)
Property Type Default Description
298 3BSE030335R4101
Appendix A Standard Building Blocks Input Field
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.
Table 75. Input Field Properties (Continued)
Property Type Default Description
3BSE030335R4101 299
Input Field Appendix A Standard Building Blocks
ShowMillieSeconds Boolean False Used in addition to the Format property to format DateTime and Date formats.
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 162.
Table 75. Input Field Properties (Continued)
Property Type Default Description
300 3BSE030335R4101
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 5, Configuring Faceplate Elements.
CheckBox
The CheckBox element visually looks like the built in VB checkbox. 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.
Figure 131. Input Field DEW
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.
3BSE030335R4101 301
CheckBox Appendix A Standard Building Blocks
The CheckBox element is not windowless and transparent, tool tip doesn’t show.
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 99.
Table 76. 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.
302 3BSE030335R4101
Appendix A Standard Building Blocks CheckBox
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.
Table 76. CheckBox Properties (Continued)
Property Type Default Description
3BSE030335R4101 303
CheckBox Appendix A Standard Building Blocks
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 5, Configuring Faceplate Elements.
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.
Table 76. CheckBox Properties (Continued)
Property Type Default Description
304 3BSE030335R4101
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 is not windowless and transparent, tooltip doesn’t show.
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 99.
Table 77. 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.
3BSE030335R4101 305
Option Button Appendix A Standard Building Blocks
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 5, Configuring Faceplate Elements.
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.
Table 77. Option Button Properties (Continued)
Property Type Default Description
306 3BSE030335R4101
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.
Cancel Button
Clicking the Cancel button cancels the input session.
Direct Entry WindowsFor more information of handling of Direct Entry Window see Configuring Direct Entry Windows on page 153.
Figure 132. The Apply Button
Figure 133. The Cancel button
3BSE030335R4101 307
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 78. 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 Object, ByVal posX As Long, ByVal posY As Long)
Positions the dialog relative to a containers window. PosX and posY are coordinates relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Object, ByVal displacementX As Long, ByVal displacementY As Long)
Positions the dialog to the right of the control primitive.
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 Object, ByVal displacementX As Long, ByVal displacementY As Long, ByVal adaptWidth As Boolean)
Positions the dialog under the control.
DisplacementX/Y – The distance in pixels between lower-left corner of the control and 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.
308 3BSE030335R4101
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 79. 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 Boolean, ByVal NormalStep As Single)
Enables/disables limit checking of the input 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 Object, ByVal posX As Long, ByVal posY As Long)
Positions the dialog relative to a containers window. PosX and posY are coordinates relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Object, ByVal displacementX As Long, ByVal displacementY As Long)
Positions the dialog to the right of the control primitive.
DisplacementX/Y – The distance in pixels between upper-right corner of the control and the upper-left corner of the DEW dialog.
3BSE030335R4101 309
PgNumericDEW Appendix A Standard Building Blocks
PgIntegerDEW
Object capable of displaying a dialog where the user can enter an integer value.
Sub SetMinMax(ByVal MinValue As Single, ByVal MaxValue As Single)
Sets the min. and max value boundaries. 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 NoOfDecimals As Long)
Sets the number of decimals to be 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 Object, ByVal displacementX As Long, ByVal displacementY As Long, ByVal adaptWidth As Boolean)
Position DEW under a primitive.
Table 80. 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 Boolean, ByVal NormalStep As Long)
Controls whether incr./decr. can exceed the max/min values.
Table 79. PgNumericDEW Methods (Continued)
Method Description
310 3BSE030335R4101
Appendix A Standard Building Blocks PgNumericDEW
Sub PlaceAtPosition(ByVal container As Object, ByVal posX As Long, ByVal posY As Long)
Positions the dialog relative to a containers window. PosX and posY are coordinates relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Object, ByVal displacementX As Long, ByVal displacementY As Long)
Positions the dialog to the right of the control primitive.
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 Object, ByVal displacementX As Long, ByVal displacementY As Long, ByVal adaptWidth As Boolean)
Positions the dialog under the control.
DisplacementX/Y – The distance in pixels between lower-left corner of the control and the upper-left corner of the DEW dialog.
Sub SetMinMax(ByVal MinValue As Long, ByVal MaxValue As Long)
Sets the min. and max value boundaries. 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 the value to be shown in DEW. This value will is NOT limited.
Sets the value to be shown in DEW. This value 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.
Table 80. PgIntegerDEW Methods (Continued)
Method Description
3BSE030335R4101 311
PgStringDEW Appendix A Standard Building Blocks
PgStringDEW
Object capable of displaying a dialog where the user can enter a string value.
Table 81. 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 Object, ByVal posX As Long, ByVal posY As Long)
Positions the dialog relative to a containers window. PosX and posY are coordinates relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Object, ByVal displacementX As Long, ByVal displacementY As Long)
Positions the dialog to the right of the control primitive.
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 Object, ByVal displacementX As Long, ByVal displacementY As Long, ByVal adaptWidth As Boolean)
Positions the dialog under the control.
DisplacementX/Y – The distance in pixels between lower-left corner of the control and the upper-left corner of the DEW dialog.
312 3BSE030335R4101
Appendix A Standard Building Blocks PgBoolDEW
PgBoolDEW
Object capable of displaying a dialog where the user can chose a true or false state.
Table 82. 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 Object, ByVal posX As Long, ByVal posY As Long)
Positions the dialog relative to a containers window. PosX and posY are coordinates relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Object, ByVal displacementX As Long, ByVal displacementY As Long)
Positions the dialog to the right of the control primitive.
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 Object, ByVal displacementX As Long, ByVal displacementY As Long, ByVal adaptWidth As Boolean)
Positions the dialog under the control.
DisplacementX/Y – The distance in pixels between lower-left corner of the control and the upper-left corner of the DEW dialog.
Sub SetButtonText(ByVal eButton As PGDIRECTENTRYWINDOWLib.TF_BUTTON, ByVal bstrText As String)
Sets the text to be displayed on one of the buttons.
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.
3BSE030335R4101 313
PgTimeDEW Appendix A Standard Building Blocks
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.
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.
Table 82. PgBoolDEW Methods (Continued)
Method Description
314 3BSE030335R4101
Appendix A Standard Building Blocks PgTimeDEW
Time Identifier Strings:
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.
Table 83. 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”
3BSE030335R4101 315
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 84. 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 Object, ByVal posX As Long, ByVal posY As Long)
Positions the dialog relative to a containers window. PosX and posY are coordinates relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Object, ByVal displacementX As Long, ByVal displacementY As Long)
Positions the dialog to the right of the control primitive.
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 Object, ByVal displacementX As Long, ByVal displacementY As Long, ByVal adaptWidth As Boolean)
Positions the dialog under the control.
DisplacementX/Y – The distance in pixels between lower-left corner of the control and the upper-left corner of the DEW dialog.
316 3BSE030335R4101
Appendix A Standard Building Blocks PgDateDEW
PgDateDEW
Object capable of displaying a dialog where the user can enter a time and date span string.
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 Long)
Sets number of significant time unit fields to 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 Boolean)
Sets short or long printout format. See table above. The default printout format is short.
Table 84. PgTimeDEW Methods (Continued)
Method Description
3BSE030335R4101 317
PgDateDEW Appendix A Standard Building Blocks
Table 85. 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 Object, ByVal posX As Long, ByVal posY As Long)
Positions the dialog relative to a containers window. PosX and posY are coordinates relative to the containers upper left corner.
Sub PositionRightOf(ByVal primitive As Object, ByVal displacementX As Long, ByVal displacementY As Long)
Positions the dialog to the right of the control primitive.
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 Object, ByVal displacementX As Long, ByVal displacementY As Long, ByVal adaptWidth As Boolean)
Positions the dialog under the control.
DisplacementX/Y – The distance in pixels between lower-left corner of the control and 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.
318 3BSE030335R4101
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 ElementTo fit into a normal faceplate a Faceplate Element should have default size according to the table below.
The ratio between Height and Width will then be 0.88.
Table 86. Faceplate Element Size
Height Width
Pixel 220 250
Twip 3300 3750
3BSE030335R4101 319
Default Faceplate Appendix B Sizes of Faceplates
Default FaceplateA faceplate should have default size according to the table below:.
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 87. Faceplate Size
Height Width
Pixel 400 250
Table 88. Sizes of Default Component in a Faceplate
Component Height Width
Header 46 250
Status and Navigation
46 249
Element 220 250
Buttons 87 249
Sum 399 250
320 3BSE030335R4101
Appendix B Sizes of Faceplates Non-default Faceplate
Non-default FaceplateAny 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.
Header
The header has a fixed height of 46 pixels and a non-fixed width, that must be at least 88 pixels wide.
Table 89. Component Size
Component Part No Height Width
Header 46 -
Status and Navigation
First 46 44
Following 41 41
Element Tab row 24 -
Element - -
Buttons First 46 44
Following 41 41
3BSE030335R4101 321
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).
322 3BSE030335R4101
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:
We also want the views to have these sizes:
Table 90. Example Faceplate Content
Component Reduced Normal
Header 1 1
MaxNoOfIndicatorRows 0 2
MaxNoOfIndicatorsPerRow 0 5
MaxNoOfButtonRows 1 2
MaxNoOfButtonPerRow 4 5
Elements 1 1
Table 91. Size of Views
View Height Width
Reduced 150 To fit 4 buttons
Normal 400 250
3BSE030335R4101 323
Example Appendix B Sizes of Faceplates
Calculation gives these sizes per component in each view:
The element size available is calculated as the space left between the sum of all other components and the total space in the view
Table 92. Sizes per Component
ComponentReduced Normal
Height Width Height Width
Header 46 - 46 -
Status and Navigation
0 0 87 208
Buttons 46 167 87 249
Sum 92 167 220 250
Element 58 167 180 250
324 3BSE030335R4101
Appendix C Create New Aspect Categorieswith 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 Category1. 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 134. Aspect Type Definition
3BSE030335R4101 325
Appendix C Create New Aspect Categories with Templates
The Aspect Type Definition window is opened.
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.
4. Right-click Loram Display, and select New Aspect in the dropdown 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 dropdown menu.
12. In the dialog, Select Aspect Details and click Add. Select Template Aspect and click OK in the dropdown menu that appears.
Figure 135. New Aspect Type
326 3BSE030335R4101
Appendix C Create New Aspect Categories with Templates
13. You are now back in Dialog, click Apply and OK.
Now you have created your own aspect category.
3BSE030335R4101 327
Appendix C Create New Aspect Categories with Templates
328 3BSE030335R4101
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.
3BSE030335R4101 329
Add Member Window Appendix D Adding Members
Add Member WindowOpen the Add Member window by choosing Add Member in the Tools menu.
The main objectives of the Add Member window are:
• Adding methods and events. Adding Methods/Events on page 332.
• Adding properties. Adding Properties on page 333.
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.
Figure 136. Add Member Window
330 3BSE030335R4101
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).
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.
Figure 137. Add Member Dialog box
Do not try to add two or more members with the same name. Doing so will cause a deploy failure.
3BSE030335R4101 331
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 TypeSelect 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 ValueEnter a default value in this field. The value type depends on the selected data type.
• Run TimeSelect one of the available alternatives (Read, Read/Write, Write) which decides how the property will act at run time.
• Design TimeSelect one of the available alternatives (Read, Read/Write, Write) that decides how the property will act at design time.
• ArgumentsThis 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/EventsTo 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.
332 3BSE030335R4101
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 PropertiesTo 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.
3BSE030335R4101 333
Adding Properties Appendix D Adding Members
334 3BSE030335R4101
INDEX
AAbsolute, relative reference
difference 56ActiveX 182Add member
member types 331Add member window 330Adding
Graphic libraries 37methods and events 332
AdvantBar 261AdvantBezier 236AdvantChord 237AdvantCone 240AdvantEllipse 241AdvantHscale 242AdvantLimit 245AdvantNumeric 247AdvantObjectTrim 251AdvantPie 254AdvantPipe 255AdvantPolygon 257AdvantPolyline 258AdvantRectangle 260Alarm status
in Display elements 272Alarm symbols 272AlarmControl 272Arc 213
StartAngle 229StopAngle 229
Aspect Link 268Autopopulate 57
Autopupulate the object list 57
BBar 214, 277
Displacement 232EnableInputLimits 232, 234FrameWidth2 232LimitHeightN 232LimitLineWidthN 232Orientation 232RangeMax 232RangeMin 232StartValue 232Style 233Value 233ValueColor 233ValueColorNeg 233
BarLimitLimitColorN 231LimitFillN 231LimitStyleN 231LimitValueN 231
Bezier 213Building faceplate elements 137, 151Built 66
CChord 213
StartAngle 239StopAngle 239
Color tab 54Cone 213
examples 240
3BSE030335R4101 335
Index
Configuration of Label/Icons 120Control array 36, 183Current action
Applied action 143Current value 143
DDebug 30Deleting
graphic aspects 60Deploy 199Deploying
graphic aspects 60Direct entry window 153, 307
EElement browser
add graphic elements 58select graphic elements 58
Ellipse 213Entered value 143Entered value and the current value of the
process 143ErrorIndicator 214ErrorPresentation
AppError 215OpcStatus 215
Export aspects 92Expression Builder
bottom half 48Expression builder 43
top half 43Expressions 70
assign expressions to properties 54Extended faceplate 101
FFaceplate 101
building elements 137, 151button area 109
configuration overview 105element area 108extended 101header area 106inactivate apply button 124reduced 101status and navigation bar 108view selection buttons 110write to properties of an object 147, 152
Faceplate element area 108Faceplate framework configuration
buttons tab 123elements tab 125
Faceplate size 319Faceplate view 110FAQ 182Frequently asked questions (FAQ) 182
GGeneric elements 31
select 35Graphic aspect categories
differences 66Graphic aspects
Background color 90deleting 60deploying 60
Graphic element 67building 195
Graphic elementsassigning an expression to a property 197saving 60
Graphic libraries 37Graphics
product overview 23Graphics builder
Generic elements 31setting options 29
Graphics builder optionsadvanced user mode 30
336 3BSE030335R4101
Index
debug 30element browser 30expression builder 30live data in design mode 29
Grouping option buttonsBy connecting to a common process state 146By defining a local option button group 146
HHscale 213
EndValue 243LabelFont 243LabelFormat 243LabelPosition 243LabelStyle 243MajorStrength 243MajorTics 243MinorStrength 243MinorTics 243StartValue 243
IImport aspects 91Import/export tool 91Input Properties tab 54
LLabel/Icons dialog 120Limit 213
MMaintenance 169
frequently asked questions 169Member 329Member types
event 331method 331property 331
NNLS Text tab 54Numeric 213
OObject list 55
autopopulate 57populate 56
Object proxy name 56Object reference dialog 55ObjectProperty tab 54ObjectTrim 213
CurveNColor 252CurveNMaxValue 252CurveNMinValue 252CurveNValue 252CurveNVisible 252GridColor 252GridVisible 252GridVSize 252TotalTime 252
ObjectTrimCurveCurveNVisible 226, 232
Option buttons 146out 116
PPgBar 229PgErrorIndic 252PgEventTunnel 270Pie 213Pipe 214Polygon 214Polyline 214Populate
object list 56Precautions when copying aspects 92Precautions when importing/exporting aspects 91Properties window 61Proxy 147
3BSE030335R4101 337
Index
RRadio buttons 146Rectangle 214Reduced faceplate 101Run Time Error 13 184
SSaving
graphic elements 60SimpleBar 213Sizes and scaling of faceplates
buttons 322default component sizes 320default faceplate 320default faceplate element 319, 325element sizing 322navigation bar 322size of header 321status bar 322
Sizes of faceplatestab rows 322
TToolbox
adding graphic libraries 37 to 38adding tools 37deleting tools 38
Toolbox buttonsaspect link 32extended primitives 33graphic primitives 33subelements 33
Tutorial 185add graphic elements 189assigning expressions to properties 197building a graphic display 185building a graphic element 192, 195changing properties for generic element 196changing properties for the graphic
element 196
configuring a faceplate 207create a button 205create an aspect link 209create an indicator 207creating a faceplate element 200creating a graphic element 193creating and configuring faceplates 200Deploying a graphic element 199deploying a graphic element 199logical colors 190
UUpdate rate 90
VValue
Current 143Entered 143
Variables tab 54VB restriction 36, 183Visual Basic error handling 163Vscale 214
EndValue 265Font 265LabelFormat 265LabelPosition 266LabelStyle 266MajorStrength 266MajorTics 266MinorStrength 266MinorTics 266StartValue 266
WWrite property 147, 152
338 3BSE030335R4101
3BSE030335R4101. Printed in Sweden June 2005Copyright © 2003-2005 by ABB. All Rights Reserved® Registered Trademark of ABB.™ Trademark of ABB.
Automation Technology ProductsMannheim, Germanywww.abb.de/controlsystems
Automation Technology Products Wickliffe, Ohio, USAwww.abb.com/controlsystems
Automation Technology ProductsVästerås, Swedenwww.abb.com/controlsystems
http://www.abb.com