Beruflich Dokumente
Kultur Dokumente
PlantScape
Display Building Guide
Document
Release
Issue
Date
TC-DCXX31
R400
June 2001
Notice
This document contains Honeywell proprietary information. Information
contained herein is to be used solely for the purpose submitted, and no part of
this document or its contents shall be reproduced, published, or disclosed to a
third party without the express permission of Honeywell Limited Australia.
While this information is presented in good faith and believed to be accurate,
Honeywell disclaims the implied warranties of merchantability and fitness for a
purpose and makes no express warranties except as may be stated in its written
agreement with and for its customer.
In no event is Honeywell liable to anyone for any direct, special, or
consequential damages. The information and specifications in this document are
subject to change without notice.
Copyright 2001 Honeywell Limited Australia
Honeywell Trademarks
PlantScape, SafeBrowse, TotalPlant and TDC 3000 are U.S. registered
trademarks of Honeywell, Inc.
Other Trademarks
Microsoft, and SQL Server are either registered trademarks or trademarks of
Microsoft Corporation in the United States and/or other countries.
Trademarks that appear in this document are used only to the benefit of the
trademark owner, with no intention of trademark infringement.
ii
Contact:
Phone:
Facsimile:
(602) 313-5476
Mail:
Europe
Contact:
Phone:
+32-2-728-2657
Facsimile:
+32-2-728-2278
Mail:
Phone:
Facsimile:
+61-2-9353-8804
Mail:
GTAC@honeywell.com.au
Elsewhere
Call your nearest Honeywell office.
World Wide Web
Honeywell Industrial Automation and Control:
http://www.iac.honeywell.com
Honeywell TotalPlant Support Online:
http://support.totalplant.honeywell.com
Training Classes
Honeywell holds technical training classes on PlantScape. These classes are
taught by experts in the field of process control systems. For more information
about these classes, contact your Honeywell representative.
iii
Related Documentation
For a complete list of publications and documents for PlantScape, see the
PlantScape Overview.
iv
Contents
1
Getting Started
Starting Display Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Standard Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Toolbox Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
View Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Arrange Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Format Toolbar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Basic Drawing Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting the Defaults. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a Display Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Selecting Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Locking Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Aligning Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Distributing Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flipping Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Moving A Display Object To The Front Or Back . . . . . . . . . . . . . . . . . . .
Grouping Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Resizing Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Duplicating Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Deleting Display Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Editing Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rotating Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Moving Display Objects with the Arrow Keys. . . . . . . . . . . . . . . . . . . . . .
Selecting Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Undoing the Previous Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Properties Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Linking Display Objects to the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Shape Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dynamic Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Shape Gallery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Registering Shape Folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Supplied Shape Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using SafeBrowse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
URL Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Linking to Displays from HTML Pages . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
6
7
7
9
11
12
14
16
16
17
17
18
19
19
19
20
20
20
20
21
21
21
22
22
23
24
26
27
27
29
30
31
31
32
32
33
Contents
vi
R400
44
47
48
49
49
50
53
54
54
55
56
58
59
60
61
62
64
64
69
70
71
73
74
75
78
79
80
80
Contents
86
87
88
89
90
92
92
93
95
Writing Scripts
Understanding the Station Automation Object Model . . . . . . . . . . . . . . . . . . . . . 98
Understanding Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Using General Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Referencing Objects, Properties and Methods. . . . . . . . . . . . . . . . . . . . . . 102
Using the Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Writing Scripts for Shapes and Shapelinks . . . . . . . . . . . . . . . . . . . . . . . . 104
Event Handling in Groups and Shapes. . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Using Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Using the Script Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Writing Scripts for Displays and Shape files . . . . . . . . . . . . . . . . . . . . . . . 106
Writing Scripts for Station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Debugging Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Understanding the Possibilities of Automation . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Object Model Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Application Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
AppWindow Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Dictionary Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Display Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Objects Collection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Page Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Add Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
AddListItem Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
BeginCriticalSection Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Blue Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
CancelChange Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
CancelClick Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
CancelDoubleClick Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
CancelNavigate Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
CancelOperatorCommand Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Contents
Clear Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CreateTimer Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DPToLPX and DPToLPY Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EndCriticalSection Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ExecuteOperatorCommand Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GetResponse Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GoBack Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GoForward Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GoHome Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GoSearch Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Green Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
InvokeMenu Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Item Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
KillTimer Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LPToDPX and LPToDPY Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MakeColor Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OpenHelp Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Quit Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Red Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Redraw Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Refresh Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Remove Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RemoveListItem Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RequestServerLRN Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SelectText Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SetFocus Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Shell Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sleep Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Stop Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Update Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UserObjectNotify Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnAlarm Event. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnAppStartup Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnBeginNavigate Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnChange Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnClick Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnConnect Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnDisconnect Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnDoubleClick Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnDownloadBegin Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnDownloadComplete Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OnFocus Event. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
viii
R400
143
144
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
181
182
183
184
185
186
187
Contents
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
....
....
....
....
....
....
....
....
....
....
....
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
....
....
....
....
....
....
....
....
....
....
....
.
.
.
.
.
.
.
.
.
.
.
218
219
220
221
222
222
223
223
224
225
226
Contents
Tutorial
Setting up the Drawing Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Drawing the Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Saving the Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Reference Information
Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Shortcut Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Point Detail Displays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exporting System Displays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Display Builders Command-Line Parameters . . . . . . . . . . . . . . . . . . . . . .
Using DisplayInfo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Shapes for Early Versions of Old Products . . . . . . . . . . . . . . . . . . . . . .
Drawing Shape Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a New Numbered Shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Glossary
Index
R400
240
241
242
245
246
247
248
248
249
Describes how to create displays and link them to points in the server
database
Pre-Requisite Skills
This Guide assumes that you have some knowledge of Microsoft Windows, and
understand phrases such as double-clicking and dragging.
R400
Getting Started introduces you to Display Builder, and describes how to use
the drawing tools.
Defining Display and Shape File Properties describes how to specify the
characteristics of display and shape files.
R400
Getting Started
Custom displays work in the same way as the standard displays supplied with
PlantScape. However, custom displays allow you to present information in a
more sophisticated and user-friendly manner. As a consequence, custom
displays make it easier for operators to visualize complex processes, and reduce
the probability of operator errors.
2 Getting Started
R400
Tip
Standard Toolbar
The Standard toolbar includes basic Windows-related buttons such as Open and
Save.
2 Getting Started
Button
Description
Display/Shape. Creates a new display or shape. Click the arrow to the
right to display the list:
Display. Creates a new display.
Shape Sequence. Creates a new shape sequence. See Using
Shapes on page 27.
Dynamic Shape. Creates a new dynamic shape. See Using
Shapes on page 27.
Open. Opens an existing display.
Cut. Removes the selected object(s) from the display (and copies them
to the clipboard).
Copy. Copies the selected object(s) to the clipboard.
Find. Finds an object by its name (as shown in the Name property of
the Properties window).
Undo. Undoes the previous action.
R400
Toolbox Toolbar
The Toolbox toolbar contains two types of buttons:
Object Creation Buttons, which you use to create display objects. For
example, if you want to draw a rectangle, you click Rectangle.
Editing Buttons
Button
Description
Pointer. Selects, moves and resizes display objects.
Description
Text. Creates text, such as the displays title.
Freehand Line. Creates a freehand line which follows the path you
trace with the cursor.
2 Getting Started
Button
Description
Rectangle. Creates a rectangle or square.
10
R400
Button
Description
Checkbox. Creates a checkbox so that users can select or deselect an
option in an interactive display.
Combobox. Creates a combobox so that users can select from a list of
options in an interactive display.
Chart. Creates a chart (graph) that shows changes in values over time.
View Toolbar
The View toolbar includes a range of editing buttons.
Button
Description
Rulers. Shows/hides the rulers. The rulers make it easier to arrange
display objects in a neat and consistent manner. See Setting the
Displays Options on page 36.
Grid. Shows/hides the grid. The grid makes it easier to arrange display
objects in a neat and consistent manner. See Setting the Displays
Options on page 36.
Snap-to-Grid. Turns the snap-to-grid function on/off. When
snap-to-grid is active, objects automatically align to the grid when you
create, move or resize them.
11
2 Getting Started
Button
Description
Properties Window. Opens/closes the Properties window. You use the
Properties Window to edit the characteristics of the selected object(s).
See Using the Properties Window on page 24.
Script Window. Opens/closes the Script window. You use the Script
Window to write scriptsa script is a mini-program that performs a
specific task. See Using the Script Window on page 106.
Scripts enable you to increase the sophistication of your displays, and
can vary widely in functionality and complexity. Anyone with minimal
programming skills can write simple scripts. Scripts are described in
detail in Writing Scripts on page 97.
Shape Gallery. Opens/closes the Shape Gallery. The Shape Gallery
makes it easy to preview and add pre-built shapes to your displays. See
Using the Shape Gallery on page 30.
Arrange Toolbar
The Arrange toolbar contains buttons for aligning and grouping display objects.
Button
Description
Bring To Front. Moves the selected object(s) to the front so that it is
not obscured by overlapping objects.
Send To Back. Moves the selected object(s) to the back where it is
obscured by overlapping objects.
See Moving A Display Object To The Front Or Back on page 20.
Group. Groups the selected objects so that they become one object. If
necessary, you can nest grouped objects to create even more complex
display objects.
Ungroup. Splits a grouped object into its component objects.
See Grouping Display Objects on page 20.
12
R400
Button
Description
Align Left. Moves the selected objects horizontally so that they are all
aligned to the left.
Align Center. Moves the selected objects horizontally so that their
centers are aligned.
Align Right. Moves the selected objects horizontally so that they are all
aligned to the right.
Align to Page Center. Moves the selected objects so that they are
centered on an imaginary line that runs vertically through the center of
the display.
See Aligning Display Objects on page 19.
Align Top. Moves the selected objects vertically so that they are all
aligned at the top edge.
Align Middle. Moves the selected objects vertically so their centers are
aligned.
Align Bottom. Moves the selected objects vertically so that they are all
aligned at the bottom edge.
Align to Page Middle. Moves the selected objects horizontally so that
they are centered on an imaginary line that runs horizontally through the
center of the display.
See Aligning Display Objects on page 19.
Even Horizontal Spacing. Moves the selected objects (except the
outer two) horizontally so that they are spaced evenly. For example, if
you select three objects, the inner one will move left or right so that is
centered between the two outer ones.
Even Vertical Spacing. Moves the selected objects (except the top and
bottom ones) vertically so that they are spaced evenly. For example, if
you select three objects, the inner one will move up or down so that is
centered between the top and bottom ones.
See Distributing Display Objects on page 19.
Flip Horizontal. Flips the selected objects horizontally (as in a mirror
image).
Flip Vertical. Flips the selected objects vertically.
Rotate Left. Rotates the selected objects 90 degrees clockwise.(Only
available on Windows NT.)
Rotate Right. Rotates the selected objects 90 degrees anti-clockwise.
(Only available on Windows NT.)
See Flipping Display Objects on page 19.
13
2 Getting Started
Button
Description
Lock Objects Toggle. Locks/unlocks an object. Locking an object
protects it from being accidently moved or resized. See Locking Display
Objects on page 18.
Format Toolbar
The Format toolbar contains buttons for controlling the appearance of display
objects.
You can use Format buttons in two ways:
If you click a button while one or more objects are selected, it only affects
the appearance of selected object(s).
If you click a button while no object is selected, you change the displays
default value (standard value), which is then used whenever you create new
objects in that display. See Setting the Defaults on page 16.
Button
Description
Font. Sets the font of text. Note that you should only use fonts that are
loaded on every Station computer.
Font Size. Sets the size of text.
14
R400
Button
Description
Justify Left, Justify Center and Justify Right. Align lines of text within
a paragraph.
Line Color. Sets the line color of objects. When you click the button, a
palette opens from which you select the color. See Selecting Colors on
page 22.
Fill Color. Sets the fill color of objects. When you click the button, a
palette opens from which you select the color. See Selecting Colors on
page 22.
Line Style. Sets the line thickness.
Arrows. Sets the line-end style, such as arrows.
15
2 Getting Started
Tip
16
The
box sets the color to the displays background color, and the
color to transparent.
R400
4
5
To select:
Do this:
One object
Click it.
Several objects
17
2 Getting Started
To select:
Do this:
All objects
No object
Do this:
All objects
18
R400
If you want to flip the objects on their sides, click Rotate Left or Rotate Right
(only available on Windows NT).
19
2 Getting Started
If you want to retain the object proportions, hold down <Shift> and drag a corner
handle.
20
R400
Metafile
Rectangle
JPEG
Bitmap
Oval
Rounded Rectangle
TGA
Freehand Line
Polygon
Text
Line
Polyline
Wedge
Note:
You cannot rotate a shapelink if the associated shape contains any dynamic
objects. (Shapelinks are described in Using Shapes on page 27.)
21
2 Getting Started
To rotate an object:
1
Click Rotator on the Toolbox toolbar.
2
Click the object you want to rotate.
Four rotation handles appear, as well as a rotation markerthis indicates
the point about which the object rotates.
3
4
If you want to rotate the object about a specific point, drag the rotation
marker to that pointthe point can even be outside the object.
Drag one of the rotation handles clockwise or anticlockwise. As you drag
the handle, the object rotates about the rotation marker.
Selecting Colors
To select the line or fill color for the selected objects:
1
Click Line Color or Fill Color, as appropriate to open the color palette.
2
Click the appropriate color in the palette.
3
Alternatively, if you want to:
Remove the color, so that the line or fill becomes transparent, click the
box.
22
R400
Make the color the same as the displays background color, click the
box.
Tip
Click the point in the color spectrum box that has the color you want.
There are two other ways of selecting a color. Either, enter the HSV or RGB values
in the appropriate fields, or drag the Color marker (the x in the color spectrum
box) and the Saturation marker on the Saturation scrollbar.
4
Click Add to Custom Colors so that the color appears in the next available
Custom colors box.
5
Click the custom color you have just created and then click OK.
23
2 Getting Started
24
R400
Select several display objects of the same type. Any properties whose values
are not identical are blanked or grayed out. For example, Name in the
General tab will be blank because each object has a unique name.
If you edit a property, you change all selected objectsfor example, if you
change Fill Color to red, they will all turn red.
Deselect all objects. The Properties window then shows the displays
properties, and its title changes to Display Properties.
For a description of each property, see:
25
2 Getting Started
26
R400
Using Shapes
Using Shapes
A shape is a special display object that speeds up drawing tasks and makes your
displays visually consistent. Shapes are stored in special files called shape files.
Having created a shape, it can be used as many times as necessary (including
multiple times into the same display). To insert a shape into a display, you insert
a shapelink that includes a link to the shape. The shapelink also controls the size
and position of the shape in the display. (Because shapes are linked to displays,
updating a shape files attributes, other than size, automatically updates all
displays linked to that shape.)
There are two types of shapes: Shape Sequences and Dynamic Shapes.
Shape Sequences
A shape sequence consists of a set of shapes that can be used as either a status
indicator, or as a simple animation.
Note A shape sequence cannot contain any dynamic display objects, such
as alphanumerics.
Red
Amber
Green
When used in a display, the status of the associated point determines which of
the three shapes appears in the display. For, example, when the status is 0 (Stop)
the red hexagon appears; and when the status changes to 1, the hexagon
disappears and amber triangle appears.
27
2 Getting Started
Display file
Shapelink
Amber
Shape file
Red
Amber
Green
They cannot contain dynamic display objectsthat is, display objects that
are linked to the database, such as alphanumerics and comboboxes.
28
R400
Using Shapes
Alternatively, drag a shape from the Shape Gallery and drop it directly into the
display. See Using the Shape Gallery on page 30.
3
Move and resize the shapelink as required.
4
Open the Properties window and click the Data tab.
5
Enter the database link details. (If you are linking to a particular point
parameter, select Point/Parameter from Type of database link, and
then enter the appropriate point and parameter details.)
6
Click the Animation tab and select Shape Sequence from Type of
animation.
7
Enter the number of shapes you want to use in Number of shapes. (A
shape file may contain more shapes than is required for a particular
point/parameter. If, for example, there are only four states but the shape file
contains eight shapes, type 4 to use the first four shapes.)
Dynamic Shapes
A dynamic shape can contain dynamic objects, such as alphanumerics, that are
designed to be linked to the database.
For example, you could create a pump with an alphanumeric to display the
flow rate. Each time you use this pump in a display, you assign the appropriate
point/parameter to the alphanumeric.
Note
29
2 Getting Started
Tip
Alternatively, drag a shape from the Shape Gallery and drop it directly into the
display. See Using the Shape Gallery on page 30.
3
Move and resize the shapelink as required.
4
Open the Properties window and click the Data tab.
5
Specify the appropriate point and parameter details for each object. (Every
object in the dynamic shape is listed.)
You can only open the Shape Gallery if at least one display is open.
30
R400
Using Shapes
2
3
31
2 Getting Started
Using SafeBrowse
A SafeBrowse object is a Web browser specifically designed for use with Station.
SafeBrowse includes appropriate security features that prevent users from calling
up unauthorized Web pages or other documents in Station. For details about
restricting access, see the Configuration Guide.
URL Formats
The general format for the URL (Uniform Resource Locator) of a SafeBrowse object
is:
Protocol://ResourceName
Part
Description
Protocol
ResourceName
Example
32
R400
Using SafeBrowse
33
2 Getting Started
JPEG (*.jpg)
Targa (*.tga)
Metafile (*.wmf)
34
You can also paste a graphic from the clipboard. To do this, create your graphic in
a suitable application, copy it to the clipboard and then paste it into your display.
R400
35
2 Getting Started
Option
Description
Grid settings
36
Show rulers
Show grid
Shows/hides the grid. Note that you can change this setting
by clicking Grid on the View toolbar.
R400
Option
Description
37
2 Getting Started
Description
File name
Save as type
38
R400
You want Station to automatically call up the display when a user logs on.
You want to configure the <Page Up> and <Page Down> keys so that they
call up the next/previous pages. Both the page for which you configure the
keys and the pages you call up must be numbered pages.
Product release:
Release 320.2
Release 320
Release 310
PlantScape R200/R130
Release 300
Release 230
XSM R610
39
2 Getting Started
Save as type:
Product release:
Release 220
Release 110
Opening a File
To open an existing Display Builder file, select File Open and use the Open
dialog box to select the file you want to open.
Note If you open a file saved in an earlier file format, Display Builder
automatically opens it in the current format. Having made the required
changes, you must therefore select the original format when saving it if you
want to retain the earlier file format.
40
R400
Distributing Files
There are two storage techniques for displays and shape files:
Centralized, where all files are stored centrally on the server, and accessed
by Stations as required
Distributed, where each Station has its own copies on a local folder. (This
storage technique reduces communication traffic and callup delays because
Stations do not have to download display files before displaying them.)
To distribute files if you use centralized storage:
1
Copy the display and shape files to the appropriate display folder on the
server.
2
If you have any numbered displays, export them. See Exporting Numbered
Displays on page 42.
To distribute files if you use distributed storage:
1
Copy the display files to the appropriate server folder. (Shape files do not
need to be on the server.)
2
If you have any numbered displays, export them. See Exporting Numbered
Displays on page 42.
3
Copy the display and shape files to the appropriate display folder on each
Station computer that needs those files.
41
2 Getting Started
42
R400
If the Properties window is not open, click Properties Window in the View
toolbar.
For details about this tab:
Go to:
Animation
page 44
Appearance
page 47
Custom X-Y
page 48
Data
page 49
Details
page 54
Font
page 70
General
page 71
Options
page 73
Repeats
page 75
X-Y Plot
page 78
43
Animation Tab
The animation tab controls the correspondence between the objects color and
the value or status of the associated point.
44
R400
Animation Tab
Property
Description
Type of animation
Details
45
46
Point state
Red
White
R400
Appearance Tab
Appearance Tab
The Appearance tab controls the objects overall appearance, such as its fill color
and line thickness.
Property
Description
Colors
Lines
47
Custom XY Tab
The Custom X-Y tab is only applicable to chart objects and only appears when
you select Custom X-Y Plot from Chart type on the Options tab.
48
Item
Description
Plot colors
The colors used for the plot(s). The chart can display up
to two plots.
Fill colors
R400
Data Tab
Data Tab
The Data tab specifies the objects link to the database. The Type of database
link property specifies the type of link:
None. The object has no link to the database. See Using Local Display
Objects on page 53.
49
Property
Description
Point
Parameter
50
R400
Data Tab
Property
Description
File
51
Property
Description
Record
Word
Format
Security level
52
R400
Data Tab
53
Details Tab
The Details tab contains properties that are specific to each type of object.
For details about this type of object:
Go to:
ActiveX Document
page 54
Alarm Line
page 55
Alphanumeric
page 56
Chart
page 58
Checkbox
page 59
Combobox
page 60
Indicator
page 61
Pushbutton
page 62
SafeBrowse
page 64
Scrollbar
page 64
Text
page 69
54
R400
Details Tab
Property
Description
File Name
Property
Description
Type
55
Alphanumeric Object
Property
Description
Display as
Details
Number of characters
displayed
Word wrap
Local edit
56
R400
Details Tab
Description
Numeric
State Descriptor
Text
Acronym
Date
Time
Hexadecimal
Source Address
Destination Address
57
Display As option
Description
Chart Object
58
Property
Description
Plot
Point ID
Parameter
Color
R400
Details Tab
Checkbox Object
Property
Description
Label
59
Combobox Object
Property
Description
Display as
Details
Sort alphabetically
60
Display As option
Description
State Descriptor
R400
Details Tab
Display As option
Description
Acronym
Indicator Object
Property
Description
Display as
61
Property
Description
Orientation
Description
Bar
Pointer
Pushbutton Object
62
R400
Details Tab
Property
Description
Label
Action
Details
To do this:
Callup Page
Request Report
Request Task
Menu Tag
Launch Application
63
SafeBrowse Object
Property
Description
URL
Scrollbar Object
For an introduction to scrollbars, see Understanding Scrollbars on page 65.
64
R400
Details Tab
Property
Description
Minimum at bottom/right
Understanding Scrollbars
Scrollbars can control:
A value in the server database. For example, you could use a scrollbar to
control the value of a setpoint.
A value in a script.
An offset to a record or field for the display. Used in this way, the scrollbar
controls any other display objects that use the offset.
65
Maximum value
Minimum value
Figure 3.16 Setting the Value with a Scrollbar
66
R400
Details Tab
Relative offset
Records
Alphanumerics
9434.53
+1
84535.55
+2
4249.84
+3
234.07
3441 1027.05
3442
3443
1324234.98
9434.53
3444
84535.55
3445
4249.84
3446
234.07
3447
83449.23
3448
7559.45
Description
Record Offset
Field Offset
67
Value
Description
Database File or
Point/Parameter
Description
Minimum
Maximum
68
Range visible
File number
R400
Details Tab
Text Object
Property
Description
Label
69
Font Tab
The font tab controls the appearance of the objects text, such as the font and
point size.
70
Property
Description
Font
Size
Style
Justify
Effects
R400
General Tab
General Tab
The General tab controls the objects position and size.
Property
Description
Name
Position
Rotation
Visible
71
Property
Description
Tab stop
72
R400
Options Tab
Options Tab
The Options tab is only applicable to a chart object, and controls its major
characteristics, such as its type (line, pie, etc.) and the rate at which it plots new
values.
Property
Description
Chart type
Axis
Specifies the colors used for the legend text and its
background.
History type
Samples
Units
73
Description
Bar trend
Line trend
Numeric trend
Tuning trend
Pie chart
X-Y plot
74
R400
Repeats Tab
Repeats Tab
The Repeat tab reduces the amount of work required when creating repetitive
displays. For example, if you wanted to create a list of point values, you would
create only one alphanumeric object and use the Repeat tab to create all the other
objects. You can also specify the relative position of each repeated object, as well
as the relative address of each point.
Note
Property
Description
Number
Orientation
Spacing
75
Property
Description
Increment
76
R400
Repeats Tab
4
5
6
Property
Value
Database file
File
Record
Word
253
Format
Integer 4
77
XY Plot Tab
The X-Y Plot tab only appears when you select X-Y Plot from Chart type on the
Options tab.
Property
Description
Range
Marker
78
R400
Understanding Acronyms
Understanding Acronyms
Acronyms are text strings that represent the states or integer values of a point
parameter. When creating displays, you should use acronyms as often as
possiblefrom a users point of view, terms such as Stopped and Running are
much more meaningful than abstract values such as 0 and 1.
Station is supplied with a default acronym file that contains acronyms suitable for
most purposes. Acronyms in this file are divided into two ranges:
User. These records are initially blank, so that you can define your own
acronyms as required. User acronyms are stored in records 2881 to 3880.
Note You define user acronyms in Station (by selecting Configure
Acronyms User from the menu).
The following figure shows how acronyms are stored in the default acronym file.
Related acronyms are stored as contiguous records in the order corresponding to
the parameter values. For example, Closed (record 3342) represents 0, and
Open (record 3343) represents 1.
To select a set of acronyms, you specify the starting record, as well as the number
of records you require. For example, if you wanted to use Stopped, Slow,
Medium and Fast, you would set the starting record to 3444 and the number of
records to 4.
3441
...
3442
Closed
3443
Open
3444
Stopped
3445
Slow
3446
Medium
3447
Fast
3448
...
79
If the default acronym file is not sufficient for your needs, create your own
acronym filessee Using Custom Acronyms on page 80.
Property
Description
Start at acronym
Number of acronyms
Preview
80
R400
Understanding Acronyms
Creating and using a custom acronym file is a complex process that involves the
following tasks.
Task:
Go to:
Create a custom acronym file with the correct size and format.
page 81
page 81
page 82
page 82
page 82
Tip
If your acronyms are up to 20 characters long, you must halve the number of
columns in the original display.
4
Click the first alphanumeric and open the Properties window.
5
Click the Data tab.
81
6
7
8
82
R400
Understanding Acronyms
Property
Description
File
Start at record
Number of acronyms
Start at word
Length of acronyms
Location
Preview
83
84
R400
Go to:
page 86
page 88
page 89
page 90
page 92
page 95
85
Property
Description
Title
Type
86
Description
R400
Property
Description
Refresh rate
Numbered display
Description
All areas
Only area
File
Word
87
Property
Description
Key
Action
88
R400
Property
Description
Details
89
Property
Description
Details
90
R400
Property
Description
Request every
91
Figure 4.5 Help Tab for a DisplaySpecifying a HTML Help Topic by its Number
92
R400
Property
Description
Help Topic
Assigning a Document
You can assign any document, such as a HTML file or Microsoft Word document.
Figure 4.6 Help Tab for a DisplaySpecifying a Document other than a HTML Help file
93
Property
Description
94
R400
Property
Description
Title
Description
Numbered shape
95
96
R400
Writing Scripts
The main emphasis of this chapter is to describe how to enhance the functionality
of your displays with scriptsa script is a mini-program that performs a specific
task.
However, this chapter also contains information that has implications beyond
display-based scripts.
This chapter:
97
5 Writing Scripts
AppWindow
Application (Station)
Dictionary
Page
Page, which represents the current display. Because of the complexity and
importance of displays, the Page object is, in effect, the second part of the
object model.
98
R400
Objects collection
Display Object #1
Page
Display Object #n
Understanding Objects
Think of an object as a convenient way of interacting with a particular part of
Station, or one of its displays. When writing scripts, you need to become familiar
with three object-related terms:
99
5 Writing Scripts
100
R400
Events, such as alarms and user actions, which are applicable to the object.
A display object, for example, has events such as OnClick (which occurs
when a user clicks the object) and OnLoad (occurs when the object is first
loaded).
Understanding Scripts
Understanding Scripts
This section introduces you to the various features and rules that are applicable to
writing scripts.
You write scripts in VBScript, a popular scripting language, which does not
require extensive programming skills and is easy to use.
Note Select Help VBScript Reference to display the VBScript
Language Reference, which is installed with Display Builder.
Tip
Validating Events
Event handlers are called before the events are processed. This means that you
can use scripts to verify whether an event should proceed, canceling it if
necessary. The following example compares the user-entered value with the limit
and cancels the change if the value is greater than the limit.
Sub Alphanum1_OnChange(vNewValue)
tempvalue = CInt(vNewValue)
If tempvalue > Limit Then
MsgBox "Value must be below " & CStr(Limit) & "."
CancelChange()
End If
End Sub
101
5 Writing Scripts
Similarly, in a script attached to Alphanum2 you could clear its value using its
Clear method as follows:
Clear()
Or, because Item is the default method for the Objects collection, as:
Group1.Objects("Rectangle1")
102
R400
Understanding Scripts
103
5 Writing Scripts
Events are only passed to the current shape (the one that is currently visible
in the display).
Shapes do not have OnClick and OnDoubleClick events. Other than that,
they have the same events as a display object of the same type. For
example, if you create a Pushbutton in a display, it will have an OnClick
event; however, if you create a Pushbutton in a shape file, it will not have
that event.
OnClick and OnDoubleClick events are passed to the shapelink. This means
that if you want to write scripts for these two events, you must add them to
the display file rather than in the shape file.
104
R400
Understanding Scripts
You use the shapelinks Value property to set the current shape. For example, to
select the second shape:
Shapelink1.Value = 2
Note
Shapes are transient and only exist while they are displayed.
Using Timers
Timers provide a convenient mechanism for running scripts at regular intervals.
For example, to move a display object across the display, you would:
1
Create a timer for the display object using the objects CreateTimer method.
(A timer interval of about 250ms would be suitable.)
2
Write an OnTimer event for the object which moves the object a small
distance (to the left or right) each time the timer generates a timer event.
Note Timers with intervals of less than 100ms are not recommended for
performance reasons.
105
5 Writing Scripts
106
R400
4
5
Select the event you want to trigger your script from the Event list. This list
only contains events applicable to the type of object you have selected.
(Note however, if you select a display object, some of the events may not be
applicable to that particular type of display object. For example, the
OnBeginNavigate event is not applicable if you select a rectangle.)
A skeleton event handler appears in the Script window. Click below the Sub
statement and start writing your script for that event.
Repeat steps 2 to 4 if you want to write scripts for other combinations of
object and event.
Notes
Objects that already have scripts are shown in bold in the Object list.
Similarly, events that contain scripts for the selected object are shown in
bold in the Event list.
The Script window supports the Cut (<Ctrl>+<X>), Copy (<Ctrl>+<C>) and
Paste (<Ctrl>+<V>) functions.
Changes to scripts are added to the display file when you select another
object or event; however, they are only saved to disk when you save the
display file.
The syntax of your script is checked when you select another object or
event. Any syntax errors are displayed via a message box.
You can change the font by right-clicking in the Script window and selecting
Font from the floating menu.
107
5 Writing Scripts
5
6
7
Debugging Scripts
If you download and install the Microsofts Script Debugger from
http://msdn.microsoft.com/scripting/, you can debug faulty scripts
at run-time.
To debug your scripts, you must specify the debugscript parameter when
starting Station. The most convenient way of doing this is to create a shortcut and
type the following in the Target field:
station.exe -debugscript
Note Station timeouts are disabled when Station is running in debug
mode. See Clearing a Server Connection on page 109.
To debug your scripts:
1
Start Station in debug mode. The Script Debug Dialog appears, which
always remains on top.
108
R400
Stop Page Scripts stops scripts for the current display and its display
objects. To re-enable Page scripting, either refresh the display or select
another display.
109
5 Writing Scripts
110
R400
The objects are listed first, in alphabetical order. The description for each
object includes the description of each of its properties. The objects
methods and events are listed at the end of the topic.
The methods are listed after the objects, in alphabetical order. The
description for each method lists the applicable objects and generally
provides at least one example of how the method is used.
The events are listed after the methods, in alphabetical order. The
description for each event lists the applicable objects and generally provides
at least one example of how the event is used.
111
5 Writing Scripts
Objects
112
R400
Objects
Application Object
Description
The Application object is Stations root object. It represents Stations window,
Menu, Toolbar, Message Zone and Command Zone. All other objects in the object
hierarchy can be reached from the Application object.
Syntax
For scripts:
Application
When being addressed by other applications:
Station.Application
Note
The Application object cannot be referenced from within the general script
section.
Properties
Property
Description
AlarmZonePointID
AlarmZonePointServerA
liasName
AlarmZonePointServerN
etworkName
Application
AppWindow
AreSafeBrowseRightMou
seClicksAllowed
CommandZoneText
113
5 Writing Scripts
Property
Description
CurrentFieldOffset
CurrentFileOffset
CurrentPage
CurrentPointID
CurrentPointServerAli
asName
CurrentPointServerNet
workName
CurrentRecordOffset
114
DetailPointID
DetailPointServerAlia
sName
DetailPointServerNetw
orkName
Dictionary
R400
Objects
Property
Description
EchoSafeBrowseMessage
MessageZoneText
OperatorID
Page
PageBackgroundColor
Parent
SecurityLevel
115
5 Writing Scripts
Property
Description
ServerName
StationNumber
Methods
BeginCriticalSection Method
Blue Method
CancelOperatorCommand Method
CreateTimer Method
EndCriticalSection Method
ExecuteOperatorCommand Method
GetResponse Method
Green Method
InvokeMenu Method
KillTimer Method
MakeColor Method
Quit Method
Red Method
RequestServerLRN Method
Shell Method
Sleep Method
UserObjectNotify Method
Events
OnAlarm Event
OnAppStartup Event
OnConnect Event
OnDisconnect Event
OnMenu Event
OnOperatorChange Event
OnOperatorCommand Event
OnPageLoad Event
OnPeriodicUpdate Event
OnQuit Event
OnTimer Event
OnUserObjectNotify Event
116
R400
Objects
AppWindow Object
Description
The AppWindow object represents the Station window, and contains the
properties that reflect the current state of the main window.
Syntax
Application.AppWindow
Properties
Property
Description
Application
DisplayHWND
Height
HWND
Left
Parent
Title
Top
Width
117
5 Writing Scripts
Property
Description
WindowState
Methods
118
R400
Objects
Dictionary Object
Description
The dictionary is a collection of named variables. Each item (named variable) in
the dictionary has a case-sensitive name and a value. The value can be of any
form, such as text or numeric.
Dictionary items can be used by any script, regardless of the object to which it is
attached.
By default, dictionary items remain for the life of Station. It is therefore important
to use the Remove method to remove items if they are no longer required.
Syntax
Application.Dictionary
Properties
Property
Description
Application
Count
Parent
Description
Name
Value
Methods
Add Method
Item Method
Remove Method
Events
The Dictionary object has no events.
119
5 Writing Scripts
Example
This example shows how to create a variable called Volts and assign it a value:
Application.Dictionary.Add "Volts", 12.2
120
R400
Objects
Display Objects
Description
Display objects represent the graphic elements on the current display, such as
rectangles and pushbuttons.
Syntax
ObjectName
Where ObjectName is the display objects name, such as pushbutton3. (As
shown in Name on the General tab of the Properties window.)
Properties
Property
Description
Application
Busy
Document
DocumentType
121
5 Writing Scripts
Property
Description
FillColor
Sets and returns the objects fill color. The color can be
either the RGB value (24-bit) or one of the following
predefined VBScript colors:
vbBlack
vbWhite
vbRed
vbYellow
vbGreen
vbBlue
vbCyan
vbMagenta
FillColorBlink
FillColorTransparent
Height
Label
Left
LevelFillColor
122
R400
Objects
Property
Description
LineColor
Sets and returns the objects line color. The color can
be either the RGB value (24-bit) or one of the following
predefined colors:
vbBlack
vbWhite
vbRed
vbYellow
vbGreen
vbBlue
vbCyan
vbMagenta
LineColorBlink
LineColorTransparent
LineStyle
Sets and returns the objects line style. The values are:
0 = Flat
1 = Ridge
2 = Groove
3 = Raised
4 = Lowered
LineWidth
Sets and returns the objects line width. The values are:
0 = None (invisible)
1 = Hairline
2 = Thin
3 = Thick
4 = Thicker
5 = Thickest
ListCount
123
5 Writing Scripts
Property
Description
LocationName
Name
Objects
Parent
RotationAngle
RotationPointX
RotationPointY
SelectedListIndex
Top
124
R400
Objects
Property
Description
Type
125
5 Writing Scripts
Property
Description
Value
Visible
Width
ActiveX
Alphanumeric
Checkbox
Combobox
SafeBrowse
Scrollbar
Shapelink
126
R400
Objects
Object Type
Text
Methods
AddListItem Method
CancelChange Method
CancelClick Method
CancelDoubleClick Method
CancelNavigate Method
Clear Method
CreateTimer Method
GoHome Method
GoBack Method
GoSearch Method
GoForward Method
KillTimer Method
Refresh Method
RemoveListItem Method
SelectText Method
SetFocus Method
Stop Method
Update Method
Events
OnBeginNavigate Event
OnChange Event
OnClick Event
OnDoubleClick Event
OnDownloadBegin Event
OnDownloadComplete Event
OnFocus Event
OnLoad Event
OnMouseEnter Event
OnMouseLeave Event
OnMouseMove Event
OnNavigateComplete Event
127
5 Writing Scripts
128
R400
OnPageComplete Event
OnRightClick Event
OnTimer Event
OnUpdate Event
OnUnload Event
Objects
Objects Collection
Description
The Objects collection for:
The Page object contains the top-level display objects in the current display
Description
Application
Count
Parent
Methods
Item Method
Events
The Objects collection has no events.
Example
This example shows how to refer to Rectangle1.
Page.Objects.Item("Rectangle1")
This example shows how to refer to the second item in the collection.
Page.Objects.Item(2)
129
5 Writing Scripts
This example shows how to use display objects to perform an iterative task. In
this case, change the fill color of all objects in a display.
For i = 1 to Page.Objects.Count
Page.Objects.Item(i).FillColor = vbRed
Next
130
R400
Objects
Page Object
Description
The Page object represents the current display. The Page object also contains an
Objects collection, whose items are the display objects on the display (the
rectangles, alphanumerics, and so on).
Syntax
Page
Properties
Property
Description
Application
FilePath
HelpFile
HelpTopicFile
HelpTopicNumber
HelpType
Objects
Parent
Title
131
5 Writing Scripts
Methods
CreateTimer Method
KillTimer Method
OpenHelp Method
Redraw Method
UserObjectNotify Method
Events
OnLoad Event
OnMouseMove Event
OnPeriodicUpdate Event
OnTimer Event
OnUnload Event
OnUserObjectNotify Event
132
R400
Methods
Methods
133
5 Writing Scripts
Add Method
Applicable to
Dictionary Object
Description
Adds a new item (named variable) to the Dictionary collection.
Syntax
Add(name,value)
Part
Description
name
value
Notes
The Dictionary can contain a maximum of 256 items. If you need to add
more items, you must first use the Remove method to remove unused items.
There is no protection against adding more than one item with the same
name. If this happens, retrieving the items value will return the value of the
first item with that name.
Example
This example adds an item Voltage to the Dictionary and sets its value to 12.3.
Dictionary.Add "Voltage", 12.3
134
R400
Methods
AddListItem Method
Applicable to
Display Objects
Description
Adds an item to a local Combobox. (A local Combobox is one which does not
have a link to the database.) When a user selects a Combobox, the list of items
appears, allowing the user to select the appropriate item.
Syntax
[object.]AddListItem(item[, index])
or
[object.]AddListItem item[, index]
Part
Description
object
item
index
Notes
By default, the first item in the list is selected when the combobox is initially
displayed.
Example
This example adds three items to the Combobox SetSpeed.
SetSpeed.AddListItem Slow, 0
SetSpeed.AddListItem Medium, 1
SetSpeed.AddListItem Fast, 2
135
5 Writing Scripts
BeginCriticalSection Method
Applicable to
Application Object
Description
The BeginCriticalSection method disables the script timeout (which is set to
5 seconds).
The BeginCriticalSection and EndCriticalSection methods are usually used to
enclose a block of code that must not be interrupted once started. For example,
you may want to use the method(s) in a script that changes a number of values in
the database and then requests a task which uses the new values.
Syntax
Application.BeginCriticalSection()
Notes
136
R400
Methods
Blue Method
Applicable to
Application Object
Description
The Blue method is a utility function that can be used in any script. It returns the
blue component of a color value, expressed as a number between 0 (no blue)
and 255 (100% blue). Normally used in conjunction with the Red and Green
methods.
Syntax
Application.Blue(RGBvalue)
Part
Description
RGBvalue
Example
This example obtains the blue component of the fill color of Rect3.
BlueValue = Application.Blue(Rect3.FillColor)
137
5 Writing Scripts
CancelChange Method
Applicable to
Display Objects
Description
Cancels a change made by a user to the following types of display object:
Alphanumeric
Checkbox
Scrollbar
Combobox
Syntax
CancelChange
Note
138
R400
Methods
CancelClick Method
Applicable to
Display Objects
Description
Cancels the click when a user clicks a display object.
Syntax
CancelClick
Note
The CancelClick method can only be used within OnClick and OnRightClick
events. Together, they enable the click operation to be validated before
passing it on to the server.
Example
This example, attached to Pushbutton2, checks the users security level and
cancels the click if the level is below Engineer.
Sub PushButton2_OnClick()
If Application.SecurityLevel < 4 Then
MsgBox "Only an Engineer or Manager can do this"
CancelClick
End If
End Sub
139
5 Writing Scripts
CancelDoubleClick Method
Applicable to
Display Objects
Description
Cancels the double-click when a user double-clicks a display object.
Syntax
CancelDoubleClick
Note
140
R400
Methods
CancelNavigate Method
Applicable to
Display Objects
Description
Cancels a users navigation operation. Only applicable to a SafeBrowse object.
Syntax
CancelNavigate
Notes
141
5 Writing Scripts
CancelOperatorCommand Method
Applicable to
Application Object
Description
Cancels the command entered by a user in the Stations Command Zone.
Syntax
CancelOperatorCommand
Note
142
R400
Methods
Clear Method
Applicable to
Display Objects
Description
Clears (removes) the text of an Alphanumeric display object.
Syntax
[object.]Clear
Part
Description
object
Example
This example clears the alphanumeric Alphanum1 when the user clicks
Pushbutton1.
Sub Pushbutton1_OnClick()
Alphanum1.Clear
End Sub
143
5 Writing Scripts
CreateTimer Method
Applicable to
Application Object
Display Objects
Page Object
Description
Creates a timer for an object, which generates timer events at regular intervals.
(Timer events are captured by the objects OnTimer event.)
A timer keeps generating timer events until it is destroyed by either the KillTimer
method, or when the associated object is destroyed. For example, displaying a
new display destroys all timers associated with the old display and its display
objects.
Syntax
Call [object.]CreateTimer(timerID, interval)
or
[object.]CreateTimer timerID, interval
or
Description
object
timerID
interval
Notes
Timers with intervals of less than 100ms are not recommended for
performance reasons.
144
R400
Methods
Example
This example creates a 250ms timer for Circle3 when it is loaded into the
display.
Sub Circle3_OnLoad()
Call CreateTimer(1, 250)
End Sub
You would then write an appropriate OnTimer event handler for the object.
145
5 Writing Scripts
AppWindow Object
Description
These two methods convert the X- and Y-coordinates, respectively, from
resolution-dependent display coordinates (expressed in pixels) to Display
Builders logical coordinates. See Understanding Coordinates on page 205.
Syntax
Appwindow.DPToLPX(displaycoordx)
Appwindow.DPToLPY(displaycoordy)
Part
Description
displaycoordx
displaycoordy
Notes
146
R400
Methods
EndCriticalSection Method
Applicable to
Application Object
Description
Re-enables the script timeout after having been disabled by the
BeginCriticalSection method. See BeginCriticalSection Method on page 136 for
further details.
Syntax
EndCriticalSection
147
5 Writing Scripts
ExecuteOperatorCommand Method
Applicable to
Application Object
Description
Executes a user command as if it had been entered into the Command Zone by a
user. (A user command is anything a user would normally type into the
Command Zone.)
Syntax
ExecuteOperatorCommand(command)
Part
Description
command
Note
148
R400
Methods
GetResponse Method
Applicable to
Application Object
Description
Displays the specified prompt in Stations Message Zone and returns the response
entered by the user in Stations Command Zone.
Syntax
GetResponse(prompt)
Part
Description
prompt
Note
Station cannot perform any other task while waiting for a response from a
user. You should therefore only use GetResponse within a suitable OnTimer
sub-routine, as shown in the following example.
Example
This shows how to use an OnTimer sub-routine to check for a response, and if
there is none (indicated by a null string) exit the routine.
Sub CheckResponse_OnTimer(l)
Dim str
str = GetResponse (Are you sure (Y/N)?)
If str = then
.
.
Else
.
.
End If
End Sub
149
5 Writing Scripts
GoBack Method
Applicable to
Part
Description
SafeBrowse
Example
Sub Pushbutton1_OnClick()
Browser1.GoBack
End Sub
150
R400
Methods
GoForward Method
Applicable to
Part
Description
SafeBrowse
Example
Sub Pushbutton1_OnClick()
Browser1.GoForward
End Sub
151
5 Writing Scripts
GoHome Method
Applicable to
Part
Description
SafeBrowse
Note
The home page for all SafeBrowse objects is specified in the Station setup.
Example
Sub Pushbutton1_OnClick()
Browser1.GoHome
End Sub
152
R400
Methods
GoSearch Method
Applicable to
Part
Description
SafeBrowse
Note
The search page for all SafeBrowse objects is specified in the Station setup.
Example
Sub Pushbutton1_OnClick()
Browser1.GoSearch
End Sub
153
5 Writing Scripts
Green Method
Applicable to
Application Object
Description
The Green method is a utility function that can be used in any script. It returns
the green component of a color value expressed as a number between 0 (no
green) and 255 (100% green). Normally used in conjunction with the Blue and
Red methods.
Syntax
Application.Green(RGBvalue)
Part
Description
RGBvalue
Example
This example obtains the green component of the fill color of Rect3.
GreenValue = Application.Green(Rect3.FillColor)
154
R400
Methods
InvokeMenu Method
Applicable to
Application Object
Description
Invokes the selected menu item as if it had been selected by a user.
Syntax
InvokeMenu(item)
Part
Description
item
Example
This example shows how to display the Group Summary. In this example,
Stations menu file, menu.txt, contains the following entry:
>Group Summary,10208
155
5 Writing Scripts
Item Method
Applicable to
Dictionary Object
Objects Collection
Description
Returns the specified item from the Dictionary or Objects collection.
Syntax
Item(index|name)
Part
Description
index
name
Notes
The method returns the collection if neither index nor name are specified.
This example returns the value of a Dictionary item using its name.
SavedValue = Application.Dictionary.Item("Volts").Value
This example changes the fill-color of all display objects on the display.
For i = 1 to Page.Objects.Count
Page.Objects.Item(i).FillColor = vbRed
Next
156
R400
Methods
KillTimer Method
Applicable to
Application Object
Display Objects
Page Object
Description
Destroys the specified timer. (Timers are created by the CreateTimer method.)
Syntax
[object.]KillTimer(timer)
Part
Description
object
timer
Example
This example kills a timer, with an ID of 2, belonging to Rectangle1 when the
user clicks Pushbutton1.
Sub Pushbutton1_OnClick
Rectangle1.KillTimer(2)
End Sub
157
5 Writing Scripts
AppWindow Object
Description
These two methods convert the X- and Y-coordinates, respectively, from Display
Builders logical coordinates to the resolution-dependent display coordinates
(expressed in pixels). See Understanding Coordinates on page 205.
Syntax
Appwindow.LPToDPX(logicalcoordx)
Appwindow.LPToDPY(logicalcoordy)
Part
Description
logicalcoordx
logicalcoordy
Notes
158
R400
Methods
MakeColor Method
Applicable to
Application Object
Description
The MakeColor method is a utility function that can be used in any script. It
returns a color value, expressed in RGB format. The value is packed into the
lower 24 bits of a long integer.
Syntax
Application.MakeColor(red, green, blue)
Part
Description
red
green
blue
Example
This example changes the fill color of Rect3 to white.
Rect3.FillColor = Application.MakeColor(255,255,255)
159
5 Writing Scripts
OpenHelp Method
Applicable to
Page Object
Description
Opens the help associated with the display. The help details are specified in Page
Object properties.
Syntax
OpenHelp()
Example
This example sets the help to help.txt, and opens the help.
Sub Pushbutton1_OnClick()
Page.HelpType = 0
Page.HelpFile = "help.txt"
Page.OpenHelp
End Sub
160
R400
Methods
Quit Method
Applicable to
Application Object
Description
Terminates Station. Equivalent to the user selecting File Exit.
Syntax
Application.Quit
Note
161
5 Writing Scripts
Red Method
Applicable to
Application Object
Description
The Red method is a utility function that can be used in any script. It returns the
red component of a color value, expressed as a number between 0 (no red) and
255 (100% red). Normally used in conjunction with the Blue and Green methods.
Syntax
Application.Red(RGBvalue)
Part
Description
RGBvalue
Example
This example obtains the red component of the fill color of Rect3.
RedValue = Application.Red(Rect3.FillColor)
162
R400
Methods
Redraw Method
Applicable to
Page Object
Description
Immediately redraws the current display.
Syntax
Redraw
Example
This example redraws the page.
Sub ...
.
.
Page.Redraw
End Sub
163
5 Writing Scripts
Refresh Method
Applicable to
Part
Description
SafeBrowse
Example
Sub Pushbutton1_OnClick()
Browser2.Refresh
End Sub
164
R400
Methods
Remove Method
Applicable to
Dictionary Object
Description
Removes an item from the Dictionary collection.
Syntax
Remove(index|name)
Part
Description
index
name
Note
165
5 Writing Scripts
RemoveListItem Method
Applicable to
Part
Description
object
index
Example
This example removes the second item from the combobox.
Combobox1.RemoveListItem(1)
166
R400
Methods
RequestServerLRN Method
Applicable to
Application Object
Description
Requests the specified LRN (Logical Resource Number) on the server. LRNs are
described in the Configuration Guide.
Syntax
RequestServerLRN(LRN[, param1, param2])
Part
Description
LRN
param1
param2
Example
This example uses the Server Display Program (LRN 21) to call up page 11.
Application.RequestServerLRN 21, 1, 11
167
5 Writing Scripts
SelectText Method
Applicable to
Part
Description
object
Example
Sub Pushbutton1_OnClick()
Alphanum1.SelectText
End Sub
168
R400
Methods
SetFocus Method
Applicable to
Display Objects
Description
Selects the dynamic display object. (A dynamic display object is one that can
have focus.) Some display objects, such as checkboxes and alphanumerics, are
intrinsically dynamic; however, objects that are normally static, such as rectangles
and lines, are also dynamic if they are linked to the database.
Syntax
[object.]SetFocus
Part
Description
object
Example
Pushbutton1.SetFocus
169
5 Writing Scripts
Shell Method
Applicable to
Application Object
Description
Executes a command as an operating system command.
Syntax
Call Application.Shell(command, state)
or
Application.Shell command, state
Part
Description
command
state
Example
This example starts Windows Notepad and displays a text file.
Application.Shell "notepad c:\documents\readme.txt",1
170
R400
Methods
Sleep Method
Applicable to
Application Object
Description
Pauses script execution for a specified period.
Syntax
Sleep(interval)
Part
Description
interval
Note
Calling the Sleep method with a large time interval may cause Station to
disconnect from the server.
Example
The following example asks the user for a Y/N response, and every 200
milliseconds checks if the user has entered any response.
Dim str
str = ""
Do While str = ""
str = Application.GetResponse("Are you sure (Y/N)?")
Application.Sleep(200)
Loop
171
5 Writing Scripts
Stop Method
Applicable to
Part
Description
SafeBrowse
Example
Sub Pushbutton1_OnClick()
Browser1.Stop
End Sub
172
R400
Methods
Update Method
Applicable to
Display Objects
Description
Generates an OnUpdate event for a display object, even though it was not
updated by the server. (Normally, OnUpdate events are only generated when the
object is updated by the server.)
Syntax
[object.]Update()
Part
Description
object
Example
Sub Pushbutton1_OnClick()
Combobox1.Update
End Sub
173
5 Writing Scripts
UserObjectNotify Method
Applicable to
Application Object
Page Object
Description
Generates an OnUserNotify event for the Application or Page object. This method
is used by automation objects that may require significant processing time,
thereby avoiding script timeouts.
For a description of how the method is used in conjunction with custom dialog
boxes, see Using Custom Dialog Boxes on page 210.
Syntax
[object.]UserObjectNotify(lID, vParam)
174
Part
Description
object
lID
vParam
R400
Events
Events
175
5 Writing Scripts
OnAlarm Event
Applicable to
Application Object
Description
Generated when a new alarm appears in the Stations Alarm Zone.
Syntax
OnAlarm()
Example
This example sets the background color to red when an alarm occurs.
Sub Application_OnAlarm()
PageBackgroundColor = 3
End Sub
176
R400
Events
OnAppStartup Event
Applicable to
Application Object
Description
Generated as soon as Station is started and all its objects have been created.
Syntax
OnAppStartup()
Note
The event is not generated when the Station script is reloaded, for example,
when a user selects Station Connect.
Example
This example sets the background color to white when Station starts.
Sub Application_OnAppStartup()
PageBackgroundColor = 2
End Sub
177
5 Writing Scripts
OnBeginNavigate Event
Applicable to
Part
Description
URL
Notes
The URL is not passed immediately to the SafeBrowse object when the
OnBeginNavigate event is generated. This allows the event to be used in
conjunction with the CancelNavigate method to check the URL before
sending it to the SafeBrowse object.
178
R400
Events
OnChange Event
Applicable to
Display Objects
Description
Generated when a user changes the value of a display object. It is not generated
when the server or a script changes the value.
Only applies to the following types of display objects:
Alphanumeric
Checkbox
Scrollbar
Combobox
Syntax
OnChange(value)
Part
Description
value
Notes
The object retains its old value when the OnChange event is generated. This
allows the event to be used in conjunction with the CancelChange method
to validate the change before sending it to the server.
Do not use the OnChange event to create message boxes, input boxes or
dialog boxes for a scrollbar. Doing so will result in unpredictable object
behavior.
Example
This example displays a warning message when a user tries to change the state of
a point.
Sub Combobox1_OnChange(vNewValue)
If MsgBox("Do you want to change the point", vbYesNo)_
= vbNo Then
CancelChange()
End If
179
5 Writing Scripts
End Sub
180
R400
Events
OnClick Event
Applicable to
Display Objects
Description
Generated when a user clicks a display object.
Syntax
OnClick()
Note
The OnClick event is generated before the click action is processed. This
allows the event to be used in conjunction with the CancelClick method to
validate the action before sending it to the server.
Example
Sub Pushbutton1_OnClick()
.
.
.
End Sub
181
5 Writing Scripts
OnConnect Event
Applicable to
Application Object
Description
Generated when Station connects to a server.
Syntax
OnConnect()
Example
This example adds the named variable myKey to the Application Dictionary, with
value 10.
Sub Application_OnConnect()
Application.Dictionary.Add "myKey", 10
End Sub
182
R400
Events
OnDisconnect Event
Applicable to
Application Object
Description
Generated when Station disconnects from a server.
Syntax
OnDisconnect()
Example
This example removes the named variable myKey from the Application
Dictionary.
Sub Application_OnDisconnect()
Application.Dictionary.Remove("myKey")
End Sub
183
5 Writing Scripts
OnDoubleClick Event
Applicable to
Display Objects
Description
Generated when a user double-clicks a display object.
Syntax
OnDoubleClick()
Note
184
R400
Events
OnDownloadBegin Event
Applicable to
185
5 Writing Scripts
OnDownloadComplete Event
Applicable to
186
R400
Events
OnFocus Event
Applicable to
Display Objects
Description
Generated when a dynamic display object gets focus. (A dynamic display object
is one that can have focus.) Some display objects, such as checkboxes and
alphanumerics, are intrinsically dynamic; however, objects that are normally
static, such as rectangles and lines, are also dynamic if they are linked to the
database.
Syntax
OnFocus()
Example
This example sets a text objects text when the checkbox receives focus.
Sub Checkbox1_OnFocus()
Text1.Value = "Checkbox1 Focus"
End Sub
187
5 Writing Scripts
OnLoad Event
Applicable to
Display Objects
Page Object
Description
In the case of a display, the event is generated when the display is first displayed.
In the case of a display object, the event is generated when the display object is
loaded into the display.
Syntax
OnLoad()
Note
An OnLoad script for an object may fail if it references another object that
has not yet been loaded.
Example
This example creates a 2-second timer for Circle3 when it is loaded. (You would
then use the objects OnTimer event to run another script.)
Sub Circle3_OnLoad()
CreateTimer(1, 2000)
End Sub
188
R400
Events
OnMenu Event
Applicable to
Application Object
Description
Generated when a user selects a menu item, and returns the menu item.
Syntax
OnMenu(item)
Part
Description
item
Example
This example displays a warning when a user selects the Acknowledge/Silence
menu item. In this example, Stations menu file, menu.txt, contains the
following entry:
>Acknowledge/Silence, 2113
189
5 Writing Scripts
OnMouseEnter Event
Applicable to
Display Objects
Description
Generated when the mouse enters the bounding rectangle of a display object.
Applies to all types of display object, except Lines, FreeHandLines and Polylines.
Syntax
OnMouseEnter()
Notes
OnMouseEnter events should not be used for critical scripts because they
are given a low priority and are often discarded by the operating system.
Example
This example uses the OnMouseEnter and OnMouseLeave events to display an
explanatory message in the Stations Message Zone whenever the mouse pointer
is on top of the display object, MainValve. The OnMouseEnter event displays
the description.
Sub MainValve_OnMouseEnter()
Application.MessageZoneText = "Main Valve"
End Sub
And the corresponding OnMouseLeave event clears the description when the
cursor leaves the object.
Sub MainValve_OnMouseLeave()
reset the message zone text
Application.MessageZoneText = ""
End Sub
190
R400
Events
OnMouseLeave Event
Applicable to
Display Objects
Description
Generated when the mouse leaves the bounding rectangle of a display object.
Applies to all types of display object, except Lines, FreeHand lines and PolyLines.
Syntax
OnMouseLeave()
Notes
OnMouseLeave events should not be used for critical scripts because they
are given a low priority and are often discarded by the operating system.
Example
This example uses the OnMouseEnter and OnMouseLeave events to display an
explanatory message in the Stations Message Zone whenever the mouse pointer
is on top of display object, MainValve. The OnMouseEnter event displays the
description.
Sub MainValve_OnMouseEnter()
Application.MessageZoneText = "Main Valve"
End Sub
And the corresponding OnMouseLeave event clears the description when the
cursor leaves the object.
Sub MainValve_OnMouseLeave()
reset the message zone text
Application.MessageZoneText = ""
End Sub
191
5 Writing Scripts
OnMouseMove Event
Applicable to
Display Objects
Page Object
Description
In the case of the current display, the event is generated when a user moves the
mouse over the display.
In the case of a display object, the event is generated when a user moves the
mouse over the display object (excluding a SafeBrowse object).
Syntax
OnMouseMove(x, y)
Part
Description
Notes
OnMouseMove events should not be used for critical scripts because they
are given a low priority and are often discarded by the operating system.
The mouse coordinates range from -266, -122 to 8257, 4568 if a user moves
the cursor over the border around the display. See Understanding Mouse
Coordinates on page 205.
Example
This shows the current mouse coordinates in two text objects named TextX and
TextY.
Sub Page_OnMouseMove(lx,ly)
TextX.Value = lx
TextY.Value = ly
End Sub
192
R400
Events
OnNavigateComplete Event
Applicable to
193
5 Writing Scripts
OnOperatorChange Event
Applicable to
Application Object
Description
Generated when a user logs on, or when the user changes security levels.
Syntax
OnOperatorChange()
Example
This example shows how to display the appropriate home page when a user
logs on. Each display would display information appropriate to a particular
security level.
Sub OnOperatorChange()
If SecurityLevel = 2 Then
CurrentPage = "MainMenuOperator"
End If
If SecurityLevel = 3 Then
CurrentPage = "http://www.../overview.htm"
End If
If SecurityLevel = 4 Then
CurrentPage = 303
End If
If SecurityLevel = 5 Then
CurrentPage = 304
End If
End Sub
194
R400
Events
OnOperatorCommand Event
Applicable to
Application Object
Description
Generated when a user issues a command from Stations Command Zone.
Syntax
OnOperatorCommand(command)
Part
Description
command
Note
195
5 Writing Scripts
OnPageComplete Event
Applicable to
196
R400
Events
OnPageLoad Event
Applicable to
Application Object
Description
Generated when a new display is loaded, or when the current display is
refreshed.
Syntax
OnPageLoad()
Note
The equivalent events for the Page object is the OnLoad Event.
Example
This example shows the current page name in the Message Zone.
Sub Application_OnPageLoad()
MessageZoneText = Page.CurrentPage
End Sub
197
5 Writing Scripts
OnPeriodicUpdate Event
Applicable to
Application Object
Display Objects
Page Object
Description
Generated when Station receives a periodic update from the server. Periodic
updates occur whenever the server updates the system time in Stations Status
Line, and are generated for all display objects in the current display.
Syntax
OnPeriodicUpdate()
Example
This example animates a shapelink, stepping to the next shape on each periodic
update.
Sub Shapelink1_OnPeriodicUpdate()
Nextvalue = Nextvalue + 1
If Nextvalue > 4 Then
Nextvalue = 1
End If
End Sub
198
R400
Events
OnQuit Event
Applicable to
Application Object
Description
Generated when a user selects Station Exit.
Syntax
OnQuit()
Example
This example changes an alphanumeric value when a user exits Station.
Sub Application_OnQuit()
MsgBox "Have a nice day!"
End Sub
199
5 Writing Scripts
OnRightClick Event
Applicable to
Display Objects
Description
Generated when a user right-clicks a display object.
Syntax
OnRightClick()
Note
By default, right-clicking in Station gives focus to the next object in the tab
sequence. You can prevent the change in focus by including a CancelClick
method at the end of the script, as shown in the following example.
200
R400
Events
OnTimer Event
Applicable to
Application Object
Display Objects
Page Object
Description
Generated whenever a timer belonging to an object generates a timer event.
(Timers are created using the CreateTimer method.)
Syntax
OnTimer(timer)
Part
Description
timer
Example
This example shows how an OnTimer event handler can perform several tasks
for an object that has several timers. In this case, Tank2 has two timers.
Sub Tank2_OnTimer(lTimerID)
If lTimerID = 1 Then
.
.
.
ElseIf lTimerID = 2 Then
.
.
.
End If
End Sub
201
5 Writing Scripts
OnUnload Event
Applicable to
Display Objects
Page Object
Description
OnUnload events are generated for the current display and each of its display
objects when Station unloads the display (in preparation for displaying another
display or exiting Station).
Syntax
[object.]OnUnload()
Part
Description
object
Note
Scripts executed as the result of an OnUnload event must not contain any
message boxes, input boxes or dialog boxes.
Example
Sub Page_OnUnload()
.
.
.
End Sub
202
R400
Events
OnUpdate Event
Applicable to
Display Objects
Description
Generated when a display object is updated by the server, or because its Update
method was called.
Syntax
OnUpdate()
Example
Sub Alphanum1_OnUpdate()
Text1.Value = 2 * Alphanum1.Value
End Sub
203
5 Writing Scripts
OnUserObjectNotify Event
Applicable to
Application Object
Page Object
Description
Generated when an automation object calls the UserObjectNotify method. (The
method is used by automation objects that may require significant processing
time, thereby avoiding script timeouts.) See UserObjectNotify Method on
page 174.
For a description of how a custom dialog box would generate this event, see
Using Custom Dialog Boxes on page 210.
Syntax
OnUserObjectNotify(lID, vParam)
204
Part
Description
lID
vParam
R400
Understanding Coordinates
Understanding Coordinates
Display Builder uses logical coordinates, which are independent of screen
resolution. The logical coordinates for a display range from 0, 0 (top, left) to
7999, 4499 (bottom, right).
-266, -122
0, 0
7999, 4499
8257, 4568
Figure 5.5 Mouse Coordinate Ranges
205
5 Writing Scripts
Examples
The following examples demonstrate how scripts can be used.
The \dspbld\examples folder contains a number of example displays, such as
abs801.dsp which contains an ActiveX script.
Tip
When inserting the shapelink for the fan, you dont have to specify how many
shapes you want to usethis is controlled by your scripts.
The following shape sequence is used to represent the two states of the fan. The
first (left-hand) shape represents the off state, whereas the other four shapes are
used for the on animation.
206
R400
Examples
Tip
These shapes are bitmap images that were created in a drawing program and then
pasted into the shape file. Creating the shapes this way made it easier to produce a
more realistic effect.
The OnTimer script steps through the four on shapes. (Values 2 to 5.)
Sub StartBtn_OnTimer(lTimerID)
If Fan.Value = 5 Then
Fan.Value = 2
Else
Fan.Value = Fan.Value +1
End If
End Sub
Color Animation
You want to change the color of the heat exchanger plates as the temperature
varies. The plates are grey rectangles, which are grouped to form one object,
Plates.
The OnPeriodicUpdate event for Plates iterates over the rectangles, changing the
surface color in line with the temperature, which is stored in an alphanumeric
object called alphanum1.
207
5 Writing Scripts
Sub OnPeriodicUpdate()
Dim Temp
Dim RedComp
Dim BlueComp
Dim GreenComp
Temp = alphanum1.value
work out the values of the color components
RedComp = 126.0 + ((300.0 - Temp) / (300.00 - 20.0)
* 255.0)/2
BlueComp = 126.0 - ((300.0 - Temp) / (300.00 - 20.0)
* 255.0)/2
GreenComp = 126.0 - ((300.0 - Temp) / (300.00 - 20.0)
* 255.0)/2
For Each rect in Objects
rect.FillColor = Application.MakeColor(RedComp,
BlueComp, GreenComp)
Next rect
End Sub
208
R400
Examples
You use the OnMouseEnter event to display the description whenever a user
moves the cursor over an object.
Sub Gauge1_OnMouseEnter()
Application.MessageZoneText = "Main compressor
temperature"
End Sub
And you use the OnMouseLeave event to clear the description when the cursor
leaves the object.
Sub Gauge1_OnMouseLeave()
clear the message zone text
Application.MessageZoneText = ""
End Sub
The implementation details of this method are unimportant, but could include
using an Access database to record how many times each display is called up.
209
5 Writing Scripts
In the Stations OnPageChange event handler you pass the display number to the
DisplayMonitors RecordDisplayUsage method.
Sub OnPageChange()
DisplayMonitor.RecordDisplayUsage(CurrentPage,
StationNumber)
End Sub
Basic Concepts
An ActiveX component is a type of program designed to be called from other
applications, rather than being executed individually. Using the scripting
functions of Station, it is possible to call up user-written ActiveX components,
such as dialog boxes, that provide extra functionality.
For most applications, data needs to be transferred to and from the ActiveX
component. Typically, initialization data is passed from Station to the dialog box.
Conversely, when the dialog box exits, data is passed from the dialog box back
to Station.
210
R400
Examples
In the Script
The dialog box is used from Station by calling the CreateObject function. The
simplest way to do this is to:
Call the close dialog methods and delete the reference to the object in the
OnUnload event. This ensures that if the user changes page, the dialog is
closed first.
The class name passed to CreateObject is set in the project properties as the
project name.
General Section
Dim Dialog
Pushbutton Event
The following script shows how the dialog box is initialized, allocated an ID, and
called up when the user clicks a pushbutton. (Note that this must appear on one
line in the script.)
Sub pushbutton1_OnClick( )
211
5 Writing Scripts
dialog.ShowDialog1 1, ComboboxItemNo.Value, _
TextBoxText.Value,CheckboxValue.Value, _
ScrollbarValue.Value
End Sub
212
R400
Examples
9
10
11
Within the show methods, first get the current instance of Station using a
call to GetObject and assign it to the variable declared in the module. In the
remainder of the method, initialize and show the dialog box (do not try to
show it modally).
Within the close methods, it is necessary to unload the form and delete any
references to the Station object.
Create forms for each dialog box you wish to display.
In the code associated with closing the dialog box (such as an OK or Cancel
button click), add code to send the data from the dialog box back to Station.
Delete any references to the Station object and unload the form.
Example
This example shows how the following dialog box is created and used. The
dialog box contains a combobox, text box, check box and horizontal scroll bar.
The names of these controls are Combo1, Text1, Check1 and Hscroll1.
Data is returned to Station in an array of variants, the first element of the array
being a boolean which is true if OK is clicked and false otherwise.
Note The Visual Basic project on which this example is based is in the
\examples folder, and is called vbexample.
213
5 Writing Scripts
Module1
In module1, the SetWindowPos function is declared (this must be contained on
one line) as well as declarations for the Station object and the dialog ID number.
The dialog ID number is used in Station to identify the dialog box that called the
UserObjectNotify method.
[module1]
Declare Function SetWindowPos Lib "user32"_
(ByVal hwnd As Long, ByVal hWndInsertAfter As Long,_
ByVal x As
Long, ByVal y As Long, ByVal cx As Long,_
ByVal cy As Long, ByVal wFlags As Long) As Long
Public Station As Object
Public DialogID As Long
Class1
In class1, the methods for showing and closing the dialog boxes are defined.
These functions are used by Station scripts.
[class1]
Option Explicit
Public Sub ShowDialog1(lIDin As Long, Combo1ListIndex _
As
Long, Text1Text As String, Check1Value As Long, _
HScroll1Value As Long)
Set Station = GetObject(, "Station.Application")
DialogID = lIDin
Form1.Combo1.ListIndex = Combo1ListIndex
Form1.Text1.Text = Text1Text
214
R400
Examples
Form1.Check1.Value = ABS(Check1Value)
Form1.HScroll1.Value = HScroll1Value
Form1.Show
End Sub
Public Sub CloseDialog1()
Unload Form1
Set Station = Nothing
End Sub
Form1
In form1, the methods for closing down the dialog box and returning data to
Station are defined. As you can see, the data is returned to Station in an array of
variants. The first item of this array is a boolean used to determine whether OK
or Cancel was clicked.
[form1]
Private Sub OKButton_Click()
Dim ResultsArray(5) As Variant
ResultsArray(1) = True
ResultsArray(2) = Combo1.ListIndex
ResultsArray(3) = Text1.Text
ResultsArray(4) = Check1.Value
ResultsArray(5) = HScroll1.Value
Unload Form1
Station.Application.Page.UserObjectNotify DialogID,
ResultsArray
Set Station = Nothing
End Sub
Private Sub CancelButton_Click()
Dim ResultsArray(1) As Variant
ResultsArray(1) = False
Unload Form1
Station.Application.Page.UserObjectNotify DialogID,
ResultsArray
Set Station = Nothing
End Sub
Private Sub Form_Activate()
success& = SetWindowPos(hwnd, -1, 0, 0, 0, 0, &H10
Or &H40 Or &H2 Or &H1)
End Sub
215
5 Writing Scripts
216
R400
Involve users and try to see the system from their perspective. It is a good
idea to involve users throughout the design and testing process. This helps
you focus on the design of the displays, and the tasks users need to
perform.
Use design elements consistently throughout all displays. Users will then
know how to interpret a display even if they have never seen it before or
use it infrequently.
When providing users with options, use checkboxes and comboboxes (lists
of valid choices), rather than forcing them to enter an obscure code or
number.
Avoid creating displays that are cluttered or have a haphazard layout. Well
designed displays are easier to understand and easier to use.
217
General Standards
The following general standards apply to all system displays and can be used to
help you create consistent custom displays. You may use them as the basis for
creating your own style guide.
Using Color
You need to design displays that are legible on any user selectable background
color. (The system displays use an embedded background graphic that overrides
the user selected background.)
Limit the use of color to either special conditions such as alarms and indicators,
or to show relatedness (on trend displays for example) by color keying. Do not
use color in an arbitrary manner. Too many colors or activity on a display leads to
confusion.
Color is very effective in indicating different states. However, do not rely on color
alone to indicate a state. Use color as a separate indicator showing redundant
information. For example, you could use a text field beside an LED style
dynamic.
Using Animation
The principles that apply to color also apply to animation. Too much activity on a
display can lead to confusion. Use animation sparingly for the most effective
results.
218
R400
General Standards
Concentrating on user tasks rather than how Station and the server uses the
information
Designing Layouts
In general, favor an asymmetric layout. Make use of blank regions to provide
balance and promote legibility.
Use similar layouts for similar displays or groups of information. For example,
make all report detail similar.
Align display components in a visually intelligible manner, based on an
underlying grid.
Use existing displays as templates for any new displays.
Layering
Layer displays so that the display title bar (and its elements) is displayed first,
followed by other display components from the top left to the bottom right in
order.
Title Bar
The title bar describes the contents or purpose of the display.
As a minimum, a title bar should show the (static) title and, if appropriate, an
icon for visual reinforcement. If the display contains a dynamic item or view (for
example, point detail displays show one specific point at a time), show the
current item or view as an additional dynamic title. Other dynamic objects such
as comboboxes or data entry fields that define the display view can also be
shown.
219
Locate navigation pushbuttons that call up related displays, but which do not
indicate the display contents, on the right of the display title bar. In this way the
right hand side of the title bar can be used like a display-specific toolbar,
removing clutter and distraction from the display and reinforcing the function of
buttons in this position.
220
R400
General Standards
Graphic Pushbuttons
You can use graphics on pushbuttons:
To save space when the item is redundant anyway (for example, display
title pushbuttons). The experienced user can use these buttons when the
graphics become familiar.
To reinforce the text description and make it quick and easy to recognize
(for example, menu displays).
To be used in conjunction with icons that are associated with the titles of the
displays being called up (for example, menu displays) so that the icon is
reinforced.
To create a graphic pushbutton:
1
Start with a light gray rectangle as the background (ensure you send it to the
back).
2
Draw a pushbutton of the same size with a light gray line style, and
transparent background (a background with no fill), and bring it to the
front.
221
3
4
Tip
Text pushbutton
Graphic pushbutton
Comboboxes
Comboboxes are used for selecting one item from a list, which appears when the
combobox is selected. The currently active choice will appear in the combobox.
Use a white background and black text.
Checkboxes
Checkboxes are used for toggling the state of an item. The checkbox is checked
when the item is enabled and is white when disabled.
Only use a checkbox when a user can manually change the state (at some
security level). Otherwise, use LED indicators.
Use a white background and black text.
222
R400
General Standards
Group Headings
You can use group headings to organize the information on your display so that it
is easier to comprehend.
As a general rule, use no more than eight group headings (or other items mixed
with group headings) on a display. If the display becomes cluttered, either
reorganize the information into different frame headings or use more than one
display.
Tables
Tables can include alphanumeric data fields, comboboxes, pushbuttons and
checkboxes. Large tables can use a scrollbar.
A table consists of a table heading and body of the table. The scrollbar is
optional.
223
The table heading identifies each column of the data. Each table row is
uniquely identified by one (or more) index fields that form part of the tabular
data. These index fields can be thought of as the independent variable(s) in the
table.
Add a scrollbar to a table if there are more rows than can be shown on the
display.
Note Application Programmers, ensure data that you want to be able to
scroll is laid out so that you can use record or field indexing to each line in
the table. The advantages of using a table with Scrollbar are substantial, as:
The scrollbar slider indicates what view of the total data you are seeing
Icons
Icons are used to reinforce display titles and also for navigation. An icon should
be a simple graphic symbol rather than a real picture.
When associated with display titles, icons help the user identify the display as
belonging to a certain subsystem or relevant to a particular subject. You can
reinforce this by using icons on menu pages and their pushbuttons. When these
buttons are pressed a display containing that icon is called up. For the
experienced user then, iconic pushbuttons on the toolbar and display title bar
provide a quick means of navigation.
224
R400
General Standards
Simple icons are easier to remember and are less likely to appear
unprofessional.
Re-use the icons in as many related areas as possible. The more frequently
an icon appears, the more likely it will be remembered. For example, you
could use a magnifying glass icon for all point detail displays.
Reinforce icons with text (where space permits) to assist in the learning
process.
Consider using icons in the following locations:
Navigation pushbuttons on the right hand side of the display title bar
225
Further Reading
226
R400
Tutorial
This tutorial shows you how to create the simple display shown below.
In this tutorial you learn how to:
227
7 Tutorial
Activating Snap-to-grid
The snap-to-grid function makes it much easier to align display objects. To
activate snap-to-grid:
1
Click the Snap-to-Grid tool on the Arrange toolbar. Note that you
can turn off the function by clicking the tool a second time.
Tip
228
You can display the names of tools by moving the cursor slowly over the tools.
R400
Selecting the font and size while no text is selected changes the default font and
size. From now on, 18 point Times New Roman will be used whenever you create a
new object that contains text.
3
Click the Text tool on the Toolbox toolbar.
4
In the display, click where you want the title to start. A flashing bar-shaped
cursor marks the position of the first character.
5
Type Tank Level. If you make a mistake you can press <Backspace> to
delete unwanted characters.
229
7 Tutorial
Holding down <Shift> forces Display Builder to draw a circle. If you want to draw
an oval, dont hold down <Shift>.
3
Release the mouse button when the circle is an appropriate size.
230
R400
Changing the color (or any other property) of a selected object only changes that
objects colorit does not change the default color.
231
7 Tutorial
232
R400
233
7 Tutorial
234
R400
If necessary, you can move the Properties window so that it doesnt obscure the
display.
Tip
Click the Data tab and choose Point/Parameter from the Type of
database link property.
Type tanklevel (this is a points ID) in the Point property.
If you are creating the display on the server, Point will contain a list of all
database points. So, rather than typing the point ID, you simply select it from the
list.
7
Choose PV from the Parameter property.
8
Click the Details tab and choose Numeric from the Display as property.
235
7 Tutorial
236
The Properties window always shows the properties of the selected object(s).
Consequently, it now shows the pushbuttons properties.
5
Click the Details tab on the Properties window.
6
Type Overview in the Label property.
7
Choose Callup Page from the Action property and type Summary in the
Page property. (Note that you do not have to add the filenames extension.)
R400
237
7 Tutorial
238
R400
Reference Information
For information about:
Go to:
Keyboard shortcuts
page 240
page 241
page 242
page 245
page 246
page 247
page 248
239
8 Reference Information
Keyboard Shortcuts
240
R400
Command
Shortcut
<Ctrl>+<Y>
<Ctrl>+<W>
<Ctrl>+<Q>
<Ctrl>+<T>
<Ctrl>+<E>
<Ctrl>+<R>
<Ctrl>+<L>
Arrange Group
<Ctrl>+<G>
<Ctrl>+<K>
Arrange Ungroup
<Ctrl>+<F>
Edit Copy
<Ctrl>+<C>
Edit Cut
<Ctrl>+<X>
Edit Delete
Delete
Edit Duplicate
<Ctrl>+<D>
Edit Paste
<Ctrl>+<V>
<Ctrl>+<A>
Edit Undo
<Ctrl>+<Z>
<Ctrl>+<N>
File Open
<Ctrl>+<O>
File Print
<Ctrl>+<P>
File Save
<Ctrl>+<S>
Select this:
To:
Cut
Copy
Paste
Delete
Align
Group
Break Group
Properties
Script
241
8 Reference Information
242
Property
Description
Select Point/Parameter.
Point
Leave blank.
R400
Property
Description
Parameter
Description
Select Point/Parameter.
Point
Leave blank.
Parameter
Description
Select Point/Parameter.
Point
243
8 Reference Information
Property
Description
Parameter
244
R400
Part
Description
displaypath
Notes
Display Builder is not invoked interactively, which means that you cannot
modify the display(s).
245
8 Reference Information
Part
Description
-e
-es
displayname.dsp
-out outfilename
Notes
If you use -e or -es:
Display Builder is not invoked interactively, which means that you cannot
modify the display.
246
R400
Using DisplayInfo
Using DisplayInfo
DisplayInfo is a command-line utility that allows you to examine various display
details.
Syntax
displayinfo [options] displayfile
Part
Description
options
displayfile
Example
The following example shows the results if you use DisplayInfo without any
options:
DisplayInfo r### ...
Filename : MainBoiler.dsp
Type : Standard display
Title : Boiler Statuses
Last saved : Tue Aug 14 21:35:24 1998
File version : r###.# (0x22)
Total objects : 53
Total scripted objects : 16
Total dependent shapelinks : 3
247
8 Reference Information
Is assigned a unique number in the same way that page numbers are
assigned to displays
248
R400
249
8 Reference Information
250
R400
Glossary
acronym
An acronym is a text string that is used to represent a state or value of a point in a
display. From an operators point of view, it much easier to understand the significance
of an acronym such as Stopped, compared with an abstract value such as 0.
ActiveX component
An ActiveX component is a type of program designed to be called up from other
applications, rather than being executed independently. An example of an ActiveX
component is a custom dialog box, which works in conjunction with scripts, to facilitate
operator input into Station.
alarm
An indication (visual and/or audible) that alerts an operator at a Station of an abnormal
or critical condition. Each alarm has a type and a priority. Alarms can be assigned either
to individual points or for system-wide conditions, such as a controller communications
failure. Alarms can be viewed on a Station display and included in reports. PlantScape
classifies alarms into the following types:
PV Limit
Reasonable High and Reasonable Low
Control Failure
External Change
algorithm
See point algorithm.
analog point
A point type that is used to represent continuous values that are either real or integer.
Continuous values in a process could be: pressure, flow, fill levels, or temperature.
application program
A user-written program integrated into PlantScape using the Application Programming
Interface (API).
Glossary
area
A logical sub-section of your plant or process. Custom displays, points, and access
configuration may be partitioned by area. Operators or Stations can be assigned access
to particular areas only.
bad value
A parameter value, (for example, PV), that is indeterminate, and is the result of
conditions such as unavailable input.
Client software
An umbrella term covering PlantScape, Quick Builder, Station, and Display Builder
software.
collection
A collection is a set of named values or display objects that are used in scripts.
default
The value that an application automatically selects if the user does not explicitly select
another value.
display
Station uses displays to present PlantScape information to operators in a manner that
they can understand. The style and complexity of displays varies according to the type
of information being presented.
Displays are created in Display Builder.
display object
A display object is a graphic element, such as an alphanumeric, a pushbutton or a
rectangle, in a display.
Display objects that represent point information (such as an alphanumeric) or issue
commands (such as a pushbutton) are called dynamic display objects.
event
Can have either of two meanings:
Within the context of the system, an event is a significant change in the status of an
element, such as a point or piece of hardware. Some events have a low, high, or
urgent priority, in which case they are further classified as alarms. Events can be
viewed on an operator Station display and included in reports.
Within the context of scripts, an event is a change in system status or an
operator-initiated action that causes a script to run.
Glossary - 2
R400
Glossary
export
The process of registering a numbered display with the server so that it can be called up
in Station.
history
Point values stored to enable tracking and observation of long-term trends. Analog,
status, and accumulator point PVs can be defined to have history collected for
them.Three types of history collection are available:
Standard
Extended, and
Fast
local display object
A dynamic display object that displays information or issues a command, but which is
not linked to the server. Such display objects are used in conjunction with scripts.
method
A programmatic means of controlling or interrogating the Station Automation object
model. A method is equivalent to the terms function or command used in some
programming languages.
Mode
A point parameter which determines whether or not the operator can control the point
value. For example, in a status point, the mode determines whether the operator can
control the output value
Operating Group
A group of up to eight arbitrarily chosen points that can be viewed by an operator on a
standard Station display. An Operating Group can be defined in Quick Builder or in
Station.
operator ID
A unique identification assigned to each operator. If Operator-Based security is enabled,
the operator must use this ID and a password to sign on to a Station.
operator password
A character string (not echoed on screen) used with the operator ID to sign on to an
operator Station.
operator security level
PlantScape has six security levels defined for performing operations. An operator is
assigned a security level and may perform functions at or below that security level.
Glossary - 3
Glossary
Operator-Based security
An Operator-Based security comprises an operator ID and password, which must be
entered at an operator Station in order to access PlantScape functions.
Output
A point parameter used to issue control values. The output (OP) is often related to the
mode (MD) parameter and can be changed by an operator only if the mode is manual.
point
A data structure in the server database, usually containing information about a field
entity. A point can contain one or more parameters.
point algorithm
A prescribed set of well-defined rules used to enhance a points functionality. The point
algorithm accomplishes this by operating on the point data either before or after normal
point processing.
There are two types of point algorithms, PV (processed every time the point parameter
is scanned) and Action (processed only when a point parameter value changes).
Point Detail display
A display that shows the current point information. Each point has a Point Detail
display.
process variable
An actual value in a process: a temperature, flow, pressure, and so on. Process variables
may be sourced from another parameter and may also be calculated from two or more
measured or calculated variables using algorithms.
property
In Display Builder a property is attribute or characteristic of an object within the Station
Automation object model. For example, a display object has properties that define its
height, width and color.
PV algorithm
One of two types of algorithm you can assign to a point in order to perform additional
processing to change point parameter values. A PV algorithm changes the value of the
point process value (PV) input only. Contrast with Action algorithm.
report
Information collected by the server database that is formatted for viewing. There are
several pre-formatted reports, or the user can customize a report. Reports may be
generated on demand or at scheduled intervals. Reports can be printed or displayed on
an operator Station.
Glossary - 4
R400
Glossary
SafeBrowse object
A SafeBrowse object is a Web browser specifically designed for use with Station.
SafeBrowse includes appropriate security features that prevent users from displaying
unauthorized Web pages or other documents in Station.
script
A script is a mini-program that performs a specific task. Scripts use the Station
Automation object model to control and interrogate Station and its displays.
security level
Access to PlantScape functions is limited by the security level of the operator.
PlantScape has six security levels.
server
The computer on which the PlantScape database software runs.
Server software
An umbrella term used to refer to the database software and server utilities installed on
the PlantScape server computer.
server Station
A computer running both the PlantScape database (server) software and the Station
software. This computer can also be used as an operator Station.
setpoint
The desired value of a process variable. Setpoint is an analog point parameter, and the
value is entered by the operator. The setpoint can be changed any number of times
during a single process. The setpoint is represented in engineering units.
shape
A shape is a special type of display object that can be used in numerous displays.
Shapes can be used as clip-art or as shape sequences.
shapelink
A shapelink is, in effect, a window which always displays one shape of a shape
sequence. For example, a shapelink representing a points status displays the shape that
corresponds to the current status.
shape sequence
A shape sequence is a set of related shapes that are used in conjunction with shapelinks.
A shape sequences can be used to:
Represent the status of a point. (Each shape represents a particular status.)
Create an animation. (Each shape is one frame in the animation.)
Glossary - 5
Glossary
softkey
A softkey is a function key which, when pressed, performs the action specified by the
current display.
Station
The main operator interface to PlantScape. Stations may run on either a remote
computer through a serial or LAN link, or on the server computer.
When Station is running on the PlantScape server computer, it is often referred to as a
server Station. When it is running on a machine other than the server, it is often referred
to as an operator Station.
Station Automation object model
The Station Automation object model provides the programming interface through
which scripts control Station and its displays.
status point
A point type used to represent discrete or digital field values.
Output values can be used to control up to two consecutive discrete locations in a
controller. Output values can be automatic or operator-defined.
Mode values apply to output values and determine whether or not the output value is
operator-defined or automatic.
task
A task is any of the standard server programs or an application program that can be
invoked from a display.
timer
A timer is a programming mechanism for running scripts at regular intervals in Station.
URL
Uniform Resource Locator. For example, a Web address.
utility
PlantScape programs run from a command line to perform configuration and
maintenance functions; for example, the lisscn utility.
Glossary - 6
R400
Index
tool, 10
Animation tab, Properties window,
A
accelerator keys,
240
acronyms
adding custom acronym display to menu,
creating a custom acronym display, 81
creating a custom acronym file, 81
custom, 80, 81, 82
default, 79
defining custom, 82
described, 79
selecting, 80, 82
system, 79
user, 79
actions, assigning to keys, 88
ActiveX component, 210
ActiveX Documents
described, 10
properties, 54
tool, 10
Add method, 134
AddListItem method,
56
Arc tool, 10
Arrange toolbar,
44
47
12
98
B
BeginCriticalSection method,
136
135
Alarm Line
properties, 55
tool, 11
Align tools
Bottom (of page), 13
Center (a display object), 13
Left (a display object), 13
Middle (of page), 13
Page Center, 13
Right (a display object), 13
Top (of page), 13
aligning display objects, 19
alphanumeric
properties,
82
20
C
callup task, 89
CancelChange method,
138
140
73
Index
checkbox
properties,
tool, 11
59
60
commands (command-line)
displayinfo, 247
dspbld, 246
export, 245
coordinates
converting between logical and display,
display, 205
logical, 205
Copy tool, 8
CreateTimer method,
144
creating
display objects, 17
displays, 38
dynamic shape, 29
shape sequence, 28
Custom XY Plot tab, Properties window,
Cut tool, 8
D
Data tab, Properties window, 49
debugging scripts
clearing the server connection,
overview, 108
defaults, setting, 16
deleting a display object,
21
deselecting display objects, 18
Details tab, Properties window,
dialog boxes, custom,
Index - 2
R400
210
54
109
48
205
Dictionary objects
described, 98
reference, 119
using, 104
display objects
aligning, 19
bringing to front, 20
creating, 17
deleting, 21
deselecting, 18
distributing, 19
duplicating, 20
dynamic, 169
editing, 21
flipping, 19
grouping, 20
handles when selected, 17
linking to the database, 26, 49
local, 53
locking, 18
moving, 22
nudging, 22
object model, 99
properties, 24, 43
resizing, 20
rotating, 21
script reference, 121
scripting object, 99
scripting reference, 121
selecting, 17
sending to back, 20
types of, 125
ungrouping, 20
Display tool, 8
DisplayInfo, described, 247
displays
checking point IDs in remotely-built
display, 41
coordinates, 205
creating, 38
defining properties, 38
described, 5
exporting, 246
exporting numbered, 42
exporting system, 245
Index
file formats, 39
help, assigning, 92
linking via hypertext, 33
named versus numbered, 39
object model, 99
opening, 40
options, 36
point detail, 242
properties, 86, 88, 89, 90, 92
restricting access to, 87
saving, 38
template (point detail), 242
viewing details, 247
working with several, 40
distributing
display objects, 19
files, 41
document (help), assigning to a display,
OnClick, 181
OnConnect, 182
OnDisconnect, 183
OnDoubleClick, 184
OnDownloadBegin, 185
OnDownloadComplete, 186
OnFocus, 187
OnLoad, 188
OnMenu, 189
OnMouseEnter, 190
OnMouseLeave, 191
OnMouseMove, 192
OnNavigateComplete, 193
OnOperatorChange, 194
OnOperatorCommand, 195
OnPageComplete, 196
OnPageLoad, 197
OnPeriodicUpdate, 198
OnQuit, 199
OnRightClick, 200
OnTimer, 201
OnUnload, 202
OnUpdate, 203
OnUserObjectNotify, 204, 210
validating, 101
ExecuteOperatorCommand method, 148
93
DPToLPX method,
DPToLPY method,
146
146
drawing techniques, 16
Duplicate tool, 8
duplicating a display object,
Dynamic Shape tool, 8
20
dynamic shapes
creating, 29, 38
described, 29
linking, 30
exporting
numbered displays, 42
single displays, 246
system displays, 245
files
display, 38
distributing, 41
formats for earlier releases/products,
properties, 85
shape, 27
105
39
15
Flip tools
Horizontal, 13
Vertical, 13
flipping display objects,
19
Index
Font
tab, Properties window,
tool, 14
properties,
tool, 11
70
61
inserting
graphic, 34
text, 35
formats, display, 39
Freehand Line tool, 9
InvokeMenu method,
Italics tool, 14
Item method,
G
general scripts
described, 102
visibility, 104
General tab, Properties window,
Justify tools
Center (text), 15
Left (text), 15
Right (text), 15
71
keys
assigning action to, 88
shortcut, 240
KillTimer method, 157
Grid tool, 11
groups
creating, 20
referencing objects within, 102
tool, 12
guidelines for creating displays, 217
I
indicator
Index - 4
R400
92
33
15
17
library, shapes
registering, 31
supplied, 31
156
help
assigning to a display,
Help tool, 8
155
92
158
53
Index
M
MakeColor method,
159
Stop, 172
Update, 173
UserObjectNotify, 174, 210
using, 103
using another objects, 103
modeless window, described, 24
mouse coordinates, 205
moving display objects, 22
N
named display, described,
39
22
103
39
O
object model
Application, 98
AppWindow, 98
described, 98
Dictionary, 98
events, 99
methods, 99
Page, 98
properties, 99
objects
Application, 113
AppWindow, 117
Dictionary, 119
Display Objects, 121
number within a collection,
Objects collection, 129
Page, 131
referencing, 102
tools for creating, 9
103
66
178
Index
OnClick event,
periodic task,
181
90
Pointer tool, 9
points
checking ID on remotely-built display,
linking to a display object, 49
OnDownloadComplete event,
OnFocus event, 187
186
OnLoad event,
Polygon tool,
Polyline tool,
OnMouseEnter event,
Print tool, 8
properties
described, 24, 99
display file, 86, 88, 89, 90, 92
display object, 43
displays and shape files, 85
scripts, 99
shape file, 95
188
OnMenu event, 189
190
OnMouseLeave event, 191
OnMouseMove event, 192
OnNavigateComplete event, 193
OnOperatorChange event, 194
OnOperatorCommand event, 195
OnPageComplete event, 196
OnPageLoad event, 197
OnPeriodicUpdate event, 198
OnQuit event, 199
OnRightClick event, 200
OnTimer event,
OnUdate event,
201
203
OnUnload event, 202
OnUserObjectNotify event,
Open tool, 8
OpenHelp method,
160
10
P
Page object
described, 98
object model, 99
reference, 131
pasting
graphic, 34
text, 35
tool, 8
Index - 6
R400
Properties window
described, 24
display and shape file properties,
display object properties, 43
tool, 12
pushbutton
properties,
tool, 10
85
62
204, 210
opening a file, 40
options, display, 36
Oval tool,
10
10
Quit method,
161
R
Rectangle tool, 10
Red method, 162
Redraw method, 163
referencing
Application object, 103
attached object, 102
objects by number, 103
objects within a display, 103
objects within groups or shapes,
other objects, 102
rules for, 102
102
41
Index
shapes and shapelinks,
Refresh method, 164
registering shape folders,
writing,
105
31
41
75
75
Rotate tools
Left, 13
Right, 13
rotating display objects,
Rotator tool, 9
10
setting defaults, 16
shape files
defining properties,
properties, 95
Shape Gallery
described, 30
tool, 12
S
SafeBrowse
described, 32
properties, 64
tool, 10
URL formats, 32
38
20
21
Save tool, 8
saving a display,
97
scrollbars
controlling offset with, 66
introduction to, 65
properties, 64
range, 68
setting a value with, 66
tool, 11
selecting
display objects, 17
shapes for display, 105
39
scripts
Automation object model, 98
debugging, 108
clearing the server connection,
overview, 108
display-based, 106
examples, 206
general, 102
shape file-based, 106
Station-based, 107
understanding, 101
109
38
Index
Shell method,
170
T
tab, Properties window
Animation, 44
Appearance, 47
Custom XY Plot, 48
Data, 49
Details, 54
Font, 70
General, 71
Options, 73
Repeats, 75
XY Plot, 78
task request, specifying, 89, 90
template displays (point detail), 242
text
inserting from another application,
properties, 69
tool, 9
timers
described, 105
periodic update,
toolbars
Arrange, 12
described, 7
Format, 14
Toolbox, 9
View, 11
Toolbox toolbar,
Index - 8
R400
105
35
tools
ActiveX Document, 10
Alarm Line, 11
Align Bottom, 13
Align Center (a display object), 13
Align Left (display object), 13
Align Middle, 13
Align Right (display object), 13
Align to Page Center, 13
Align to Page Middle, 13
Align Top, 13
Alphanumeric, 10
Arc, 10
Bold, 14
Bring To Front, 12
Chart, 11
Checkbox, 11
Combobox, 11
Copy, 8
Cut, 8
Display, 8
Duplicate, 8
Dynamic Shape, 8
Even Horizontal Spacing, 13
Even Vertical Spacing, 13
Fill Color, 15
Find, 8
Flip Horizontal, 13
Flip Vertical, 13
Font, 14
Font Size, 14
Freehand Line, 9
Grid, 11
Group, 12
Help, 8
Indicator, 11
Italics, 14
Justify Center (text), 15
Justify Left (text), 15
Justify Right (text), 15
Line, 9
Line Color, 15
Lock Objects Toggle, 14
Open, 8
Oval, 10
Index
Paste, 8
Pointer, 9
Polygon, 10
Polyline, 10
Print, 8
Properties Window, 12
Pushbutton, 10
Rectangle, 10
Rotate Left, 13
Rotate Right, 13
Rotator, 9
Rounded Rectangle, 10
Rulers, 11
SafeBrowse, 10
Save, 8
Script Window, 12
Scrollbar, 11
Send To Back, 12
Shape Gallery, 12
Shape Sequence, 8
Snap-to-Grid, 11
Text, 9
Underline, 14
Undo, 8
Ungroup, 12
Video, 10
Wedge, 10
Zoomer, 9
V
validating events,
View toolbar,
41
11
W
Web browser
SafeBrowse,
tool, 10
32
Wedge tool, 10
windows
Properties, 24
Shape Gallery, 30
working with files, 40
writing scripts,
97
X
XFI, display format, 39
XSM, display format, 39
XY Plot tab, Properties window,
78
101
Zoomer tool,
125
U
Underline tool,
Undo tool, 8
14
23
Index
Index - 10
R400