You are on page 1of 410

FactoryLink ECS





























Application Editor Guide

FactoryLink ECS 6.0 / March / 1996 A


©Copyright 1984 - 1996 United States Data Corporation. All rights reserved.
- NOTICE -
The information contained herein is confidential information of United States Data Corporation, a Delaware corporation, and is
protected by United States copyright and trade secret law and international treaties. This document may refer to United
States Data Corporation as “USDATA.”
Information in this document is subject to change without notice and does not represent a commitment on the part of United
States Data Corporation (“USDATA”). Although the software programs described in this document (the “Software Programs”)
are intended to operate substantially in accordance with the descriptions herein, USDATA does not represent or warrant that
(a) the Software Programs will operate in any way other than in accordance with the most current operating instructions
available from USDATA, (b) the functions performed by the Software Programs will meet the user's requirements or will
operate in the combinations that may be selected for use by the user or any third person, (c) the operation of the Software
Programs will be error free in all circumstances, (d) any defect in a Software Program that is not material with respect to the
functionality thereof as set forth herein will be corrected, (e) the operation of a Software Program will not be interrupted for
short periods of time by reason of a defect therein or by reason of fault on the part of USDATA, or (f) the Software Programs
will achieve the results desired by the user or any third person.
U.S. GOVERNMENT RESTRICTED RIGHTS. The Software is provided with RESTRICTED RIGHTS. Use, duplication, or
disclosure by the government of the United States is subject to restrictions as set forth in subparagraph (c)(1)(ii) of The Rights
in Technical Data and Computer Software clause at DFARS 252.227-7013 or in subparagraphs (c)(1) and (2) of the
Commercial Computer Software—Restricted Rights clause at 48 CFR 52.227-19, as applicable. Contractor/Manufacturer is
United States Data Corporation, 2435 North Central Expressway, Suite 100, Richardson, TX 75080-2722. To the extent
Customer transfers Software to any federal, state or local government agency, Customer shall take all acts necessary to
protect the rights of USDATA in Software, including without limitation all acts described in the regulations referenced above.
The Software Programs are furnished under a software license or other software agreement and may be used or copied only
in accordance with the terms of the applicable agreement. It is against the law to copy the software on any medium except as
specifically allowed in the applicable agreement. No part of this manual may be reproduced or transmitted in any form or by
any means, electronic or mechanical, including photocopying and recording, for any purpose without the express written
permission of USDATA.
Trademarks. USDATA, FactoryLink and FactoryLink ECS are registered trademarks of United States Data Corporation.
Open Software Bus is a registered trademark licensed to United States Data Corporation.

All other brand or product names are trademarks or registered trademarks of their respective holders.
Application Editor in the Application Editor Application Editor in this book

Table of Contents





Application Editor

Part I Application Editor Basics


1 The Application Editor Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Graphic Elements as Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Referencing Objects in Your Drawings . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Object Attributes and Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Power Packs and Power DragOns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Starting the Application Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Using an Icon for Windows NT and Windows 95 Platforms . . . . . . . . . 24
Using the Start Menu on Windows95 Platform . . . . . . . . . . . . . . . . . . . 24
Using the Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Using the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
The Application Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Exiting the Application Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2 Working With Drawing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29


Working With Multiple Drawing Files Simultaneously . . . . . . . . . . . . . . . . 30
Opening drawing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Opening an existing drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Creating a new drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Saving a drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Saving with the original name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Saving with a new name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Deleting a drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Printing a drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Closing a drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3 Sharing Drawings Between Applications . . . . . . . . . . . . . . . . . . . . 37


Exporting files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Importing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

FactoryLink ECS / Application Editor / 3



Application Editor



4 Controlling Your View of the Drawing . . . . . . . . . . . . . . . . . . . . . . . 43
Controlling the Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Using the Grid and Snap Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Zooming On Object or Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Zooming on Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Zooming on Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Zoom Out 100% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Changing the Display Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Selecting Whole Drawing Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Viewing Actual Run-time Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Toggling Between Display Scales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Setting the Default Actual Size Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5 Configuring Run-Time Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53


Creating Run-time Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Defining Window Size and Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Setting The Top Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

6 Tag Definition Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59


Creating or Editing a Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
The Tag Definition Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Creating a Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Editing a Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Tag Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Tags Referencing Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Defining Element Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Working with Element Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Working with Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Full Template Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Simple Template Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
The Tag Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Basic Tag Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Tag Persistence Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
General Alarm Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Advanced Alarm Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Group Alarm Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

4 / FactoryLink ECS / Application Editor


Application Editor

Data-Point Logging Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87


Scaling/Deadband Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Device Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Part II Screen Construction


7 Drawing Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
The Drawing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Selecting Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Drawing Simple Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Drawing a Straight Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Drawing a Curved Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Drawing a Square or Rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Drawing a Polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Drawing a Circle or Oval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Drawing an Arc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Drawing a Parabola . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Drawing a Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Adding Text to a Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Creating Composite Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Combining Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Connecting Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Separating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

8 Editing Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115


The Editing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Setting Object Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Setting Line Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Setting Object Fill Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Setting Text Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Cutting Copying, Pasting and Deleting Objects . . . . . . . . . . . . . . . . . . . . . . 124
Cutting an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Copying an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Pasting an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Deleting an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

FactoryLink ECS / Application Editor / 5



Application Editor



Moving and Aligning Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Moving an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Aligning Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Rotating an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Snapping an Object to the Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Reshaping and Resizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Reshaping an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Resizing an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Resizing Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Object Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Moving and Object Front or Back . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Working With Object Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Renaming an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Searching for an Object in a Drawing . . . . . . . . . . . . . . . . . . . . . . . . . 135

Part III Object Animation


9 Animating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
The Animation Tools . . . . . . . . . . . . . ......... ......... ........ .... 142
Static and Animated Objects . . . . . . . ......... ......... ........ .... 143
Dynamic and Static Attributes . . . . . ......... ......... ........ .... 144
Object Level Animation . . . . . . . . . . . ......... ......... ........ .... 145
Testing the Animation of a Drawing . ......... ......... ........ .... 146
Color/analog value table . . . . . . . . . . ......... ......... ........ .... 147
Blink Rate . . . . . . . . . . . . . . . . . . . . . . ......... ......... ........ .... 150

10 Animating Input/Output Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . 151


Animating Text as an Input Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Animating Text as an Output Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

11 Creating a Real-time Trend Chart . . . . . . . . . . . . . . . . . . . . . . . . . . 163


Animating a Real-Time Only Chart Object . . . . . . . . . . . . . . . . . . . . . . . . . 164
Assigning a Pen for the Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Animating a Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

6 / FactoryLink ECS / Application Editor


Application Editor

12 Animating an Object as a Button . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

13 Paint and Bar Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181


Animating a Paint Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Animating an Object as a Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

14 Animating an Object as a Symbol . . . . . . . . . . . . . . . . . . . . . . . . . . 189


Animating Symbol Object to Represent a Value . . . . . . . . . . . . . . . . . . . . . 190
Simulate Object Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

15 Working With Power Packs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195


Guidelines for Using Template Variables ......... ......... ........ . 197
Creating a Template Object . . . . . . . . . . . ......... ......... ........ . 198
Using a Template Object . . . . . . . . . . . . . ......... ......... ........ . 200
Displaying the Template Configuration . ......... ......... ........ . 202
Combining Template Objects . . . . . . . . . . ......... ......... ........ . 203
Unresolved Template Variables . . . . . . . ......... ......... ........ . 204
Attaching Power DragOns to I/O Devices ......... ......... ........ . 205
Adding Security to Power DragOns . . . . ......... ......... ........ . 205
Print Screen Animation . . . . . . . . . . . . . . ......... ......... ........ . 208
Beep Animation . . . . . . . . . . . . . . . . . . . . ......... ......... ........ . 209
Function Key Animation . . . . . . . . . . . . . ......... ......... ........ . 210

Part IV PowerVB Animation


17 PowerVB Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Opening PowerVB from the Application Editor . . . . . . . . . . . . . . . . . . . . . . 222

18 PowerVB Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223


File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Using the Import and Export Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Search Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Event Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Help Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

FactoryLink ECS / Application Editor / 7



Application Editor



19 Attaching a Script to an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Creating a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Defining Tag Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Adding a New Tag Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Modifying an existing tag event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Deleting an Existing Tag Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Declaring Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Adding Comments to a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Removing an Event from a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Calculating Graphic Object Movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

20 PowerVB Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247


Drawing/Window Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Drawing Routines Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Mouse Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Mouse Routine Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Mouse Routines Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Troubleshooting – Overlapping Objects . . . . . . . . . . . . . . . . . . . . . . . . 255
Text Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Text Input Routines Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
RTDB Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Tag Routines Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

21 Using Variables to Declare PowerVB Objects . . . . . . . . . . . . . . . . 261


Implicit Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Arrays as Implicit Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Explicit Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
RTDBObjectValue Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Parent and Child Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Troubleshooting – Explicit Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
When to Use Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Meaningless Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

8 / FactoryLink ECS / Application Editor


Application Editor

22 Using Properties and Methods in PowerVB . . . . . . . . . . . . . . . . . 271


RTDB Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
RTDBObject.Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
RTDBObject.Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
RTDBObject.Active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
RTDBObject.Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Graphic Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
“This” Object Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
RedrawOn and RedrawOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
GraphicObject.Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
GraphicObject.Left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
GraphicObject.Bottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
GraphicObject.Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
GraphicObject.Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
GraphicObject.Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
GraphicObject.Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
GraphicObject.Bold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
GraphicObject.Italic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
GraphicObject.Underline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
GraphicObject.LineColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
GraphicObject.FillColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
GraphicObject.BackColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
GraphicObject.TextColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
GraphicObject.Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
GraphicObject.BackgroundUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
GraphicObject.ActionValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Graphic Object Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
GraphicObject.Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
GraphicObject.Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
GraphicObject.HasAnimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Drawing/Window Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Drawing Object Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Drawing.BackColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Window Object Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Window.Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Miscellaneous Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Critical/EndCritical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288

FactoryLink ECS / Application Editor / 9



Application Editor



LockRTDB/UnlockRTDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
PowerVB Variables and FactoryLink Tag Types . . . . . . . . . . . . . . . . . 291
Private Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292

23 Rotating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
GraphicObject.Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Implementing Rotation in PowerVB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Composite Object Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Sub-object Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
RedrawOn/RedrawOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Development Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301

24 Creating PowerVB Libraries and Templates . . . . . . . . . . . . . . . . 303


PowerVB Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Creating a PowerVB Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Using the PowerVB Library Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Calling a Library Function or subroutine . . . . . . . . . . . . . . . . . . . . . . 307
PowerVB Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Template Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

25 Hierarchical Graphic Object Naming . . . . . . . . . . . . . . . . . . . . . . . 311


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Object Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Naming Objects in the Application Editor . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Referencing Graphic Objects in PowerVB Scripts . . . . . . . . . . . . . . . . . . . . 313
Implicit Referencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Explicit Referencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Performance Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Object IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Finding an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

26 Debugging a PowerVB Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321


Printing PowerVB Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

10 / FactoryLink ECS / Application Editor


Application Editor

Document PowerVB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321


Printing a Single Script or Part of a Single Script . . . . . . . . . . . . . . . . . . . . 322
Other Debugging Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Error Message Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
On Error Statement at Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Using Print Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Using the BASIC Print Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Examples of Print Statements and the Output Generated . . . . . . . . . . 327
Print Statements with Multiple Running Events . . . . . . . . . . . . . . . . . 329
Header Information In Debug Output File . . . . . . . . . . . . . . . . . . . . . . 333
Location of Debug Output File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Disabling Debug Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Using LogView to Display Debug Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Starting LogView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Selecting a File to View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Using the Full Path Names Option When Viewing File Icons . . . . . . . 339
Viewing a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Refresh Rate and Updating Viewer Window’s File Contents Area . . . . 341
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Case Sensitivity Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
PowerVB Code Attached to Sub-Objects . . . . . . . . . . . . . . . . . . . . . . . . 342
Multi-threading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Endless Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Execution Order at Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343

Part V Security
27 Graphic Object Security Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Key Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Application Administrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Application User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Security Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
FLADMIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352

FactoryLink ECS / Application Editor / 11



Application Editor



Security Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Planning Security for Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Deciding How Authorized Users Will Log in and Out . . . . . . . . . . . . . 354
Determining Object Security Requirements . . . . . . . . . . . . . . . . . . . . . 354
Implementing Security in Your Application . . . . . . . . . . . . . . . . . . . . . . . . . 356
Security and Stacked Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

28 Configuring Security Using FLADMIN . . . . . . . . . . . . . . . . . . . . . 359


Accessing FLADMIN . . . . . . . . . . . . . ......... ......... ........ .... 360
Defining a Security Class . . . . . . . . . ......... ......... ........ .... 361
Defining a User . . . . . . . . . . . . . . . . . ......... ......... ........ .... 365
Setting the Password Type . . . . . . . . ......... ......... ........ .... 368
Setting the Administrator Password ......... ......... ........ .... 370

29 Setting up Security Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373


Setting Security Login Options . . . . . ......... ......... ........ .... 374
Defining Error Messages . . . . . . . . . . ......... ......... ........ .... 377
Defining Login Messages . . . . . . . . . . ......... ......... ........ .... 379
Logging Security Events . . . . . . . . . . ......... ......... ........ .... 381

Part VI DXF Converter


30 Converting and Importing DXF Files . . . . . . . . . . . . . . . . . . . . . . . 387
Conversion Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Installing the FactoryLink DXF Converter in Windows . . . . . . . . . . . . 388
Installing the DXF Converter in OS/2 . . . . . . . . . . . . . . . . . . . . . . . . . 389
Converting a Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Using the Default Conversion Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Conversion Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Customizing the Conversion Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Creating a Translate File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Using the Translate File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Conversion Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399

12 / FactoryLink ECS / Application Editor


Application Editor

Part VII Error Messages


31 Application Editor Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405

FactoryLink ECS / Application Editor / 13





14 / FactoryLink ECS / Application Editor


Data Reporting Configuration Guide

Part I






























Application Editor
Basics

15
Application Editor Basics in the Application Ed- Application Editor Basics in this book
itor Guide
Table of Contents





Application Editor
Basics

1 The Application Editor Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21


Graphic Elements as Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Referencing Objects in Your Drawings . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Object Attributes and Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Power Packs and Power DragOns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Starting the Application Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Using an Icon for Windows NT and Windows 95 Platforms . . . . . . . . . 24
Using the Start Menu on Windows95 Platform . . . . . . . . . . . . . . . . . . . 24
Using the Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Using the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
The Application Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Exiting the Application Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2 Working With Drawing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29


Working With Multiple Drawing Files Simultaneously . . . . . . . . . . . . . . . . 30
Opening drawing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Opening an existing drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Creating a new drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Saving a drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Saving with the original name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Saving with a new name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Deleting a drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Printing a drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Closing a drawing file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3 Sharing Drawings Between Applications . . . . . . . . . . . . . . . . . . . . 37


Exporting files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Importing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

FactoryLink ECS / Application Editor Guide / 17



Application Editor Basics



4 Controlling Your View of the Drawing . . . . . . . . . . . . . . . . . . . . . . . 43
Controlling the Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Using the Grid and Snap Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Zooming On Object or Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Zooming on Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Zooming on Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Zoom Out 100% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Changing the Display Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Selecting Whole Drawing Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Viewing Actual Run-time Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Toggling Between Display Scales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Setting the Default Actual Size Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5 Configuring Run-Time Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53


Creating Run-time Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Defining Window Size and Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Setting The Top Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

6 Tag Definition Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59


Creating or Editing a Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
The Tag Definition Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Creating a Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Editing a Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Tag Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Tags Referencing Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Defining Element Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Working with Element Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Working with Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Full Template Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Simple Template Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
The Tag Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Basic Tag Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Tag Persistence Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
General Alarm Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Advanced Alarm Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Group Alarm Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

18 / FactoryLink ECS / Application Editor Guide


Data-Point Logging Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Scaling/Deadband Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Device Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Application Editor
Basics

FactoryLink ECS / Application Editor Guide / 19





20 / FactoryLink ECS / Application Editor Guide


Application Editor Guide
Chapter 1





The Application Editor
Overview 1

Application Editor
Basics
Operators access data in the real-time database through graphical user-interface
screens. You illustrate a graphical user-interface screen by using the Application
Editor (APPEDIT) drawing tools—working with objects such as straight and
curved lines, circles, polygons, and text lines.

Each screen is represented by a file. These files are stored under


{FLAPP}>domain>drw, with the default domain being USER. A.g extension
identifies the files as FactoryLink application screens. A base set of graphic files is
delivered with FactoryLink. They can be used to build custom screens for your
application. See the FactoryLink On-line Release Notes for a list of the files
shipped with this version of FactoryLink.

The Application Editor is an object-oriented drawing package. This means each


graphic element (for example, a line, a circle, a piece of text) is seen as an
individual object. Each object can have assigned attributes and animation
characteristics. Attributes control the look of the object, such as its color or text
size. Animation controls the action of the object, such as a color change when a
limit is met.

This chapter describes the concepts you must understand to use the Application
Editor. The following topics will be covered:
• Graphic elements as objects.
• How to open and exit the Application Editor.
• Managing your drawing files.
• Controlling how your screens work during runtime.

FactoryLink ECS / Application Editor Guide / 21


• THE APPLICATION EDITOR OVERVIEW
• Graphic Elements as Objects


GR APHIC E LEM ENTS AS OBJE CTS
A screen usually includes several components or objects. Some objects, such as the
straight lines in the following illustration, stand alone. Others are combined into
more complex shapes.

Text lines, such as the one in the illustration, are separate objects. Each object
falls into one of the following:
• Simple objects are single objects, such as lines, circles, and text, that are not
composed of any other objects. They are the basic building blocks of a graphics
display. The top and bottom lines as well as the text are simple objects in the
illustration above.
• Composite objects are collections of objects. That is, two or more objects grouped
together to form a single object. The button in the illustration is a composite
object.
• Subobjects are the components of the composite object. Subobjects contain
either simple objects, composite objects, or both. The button above is composed
of one simple object, the octagon, and one composite object, the two rectangles.

Referencing Objects in Your Drawings


The Application Editor uses object names to reference each simple, composite, or
subobject. When an object is created, the Application Editor generates and assigns
a number, such as #00137, to the object. To help you identify the objects later, we
recommend renaming them with text based references, such as Stop App Button.
Refer to “Renaming an Object” on page 134 for details on how to do this.

Object Attributes and Animation


You can assign attributes and animation to an object. An object’s attributes
control how it is displayed, such as its color, fill pattern, or text style. Refer to
“Setting Object Attributes” on page 117 for details on defining object attributes.

An object’s animation controls the action of the object, such as a color change
when a limit is met. Refer to “Object Animation” in this guide for details on
defining object animation.

22 / FactoryLink ECS / Application Editor Guide


THE APPLICATION EDITOR OVERVIEW
Power Packs and Power DragOns

PO W ER P AC KS AND P OW ER D RA G O NS
1
Drawings containing objects animated as templates and placed in a library of
drawings are collectively known as Power Packs. You create and animate the

Application Editor
objects once and place them in Power Packs for repeated use. These drawings,
known as Power DrgOns, are then used to create applications quickly and easily.
The also help standardize the application’s appearance.

Basics
Power Pack files work just like any drawing file, except that when you open a
Power Pack file, the Application Editor is automatically in the copy/paste mode.
When you select an object from a Power Pack drawing, the Application Editor
immediately copies it into the buffer so it can be pasted into an open drawing file.
All Power Pack files have a .gp extension.

A basic set of Power Packs are included with FactoryLink. These Power Packs
include an assortment of buttons, sliders, gauges, valves, pumps, motors, and
vessels. For a complete description of the supplied Power Packs and their
associated Power DragOns refer to the FactoryLink Release Notes.

The template animation allows you to animate an object with variables. In normal
graphics drawing, when you duplicate an object, you must edit the animation for
the new object after it is duplicated. With template animation, you can define
which animation features are constant or variable for each duplicated object.
When the object is duplicated, you are prompted to provide definitions for variable
animation features.

Objects defined using variables are template objects, and the variables defined in
the object are template variables. Any object, whether simple or composite,
becomes a template object when you define one or more template variables.

Refer to “Working With Power Packs” on page 195 for details on how to create
your own Power Packs and Power DragOns.

FactoryLink ECS / Application Editor Guide / 23


• THE APPLICATION EDITOR OVERVIEW
• Starting the Application Editor


STA RTING TH E A PP LICATIO N ED ITOR
The Application Editor can be started using up to four different methods,
depending on the platform you are developing your application on.

Using an Icon for Windows NT and Windows 95 Platforms


If you are running FactoryLink on a Windows NT or Windows 95 platform, you
can start the Application Editor from the FactoryLink Program Group.

Double-click here to
open the Application
Editor

To start, double-click on the Application Editor icon for the application you would
like to work on. If you have more than one application, you may have more than
one program group. Be sure to select the program group for the desired
application.

Using the Start Menu on Windows95 Platform


Windows 95 provides an additional avenue to starting the Application Editor. Use
the Start Menu as follows to open the appropriate program group and Application
Editor.

Start>Programs>{FactoryLink ECS Program Group}> Application Editor

Using the Configuration Manager


To start the Application Editor from the Configuration Manager Main Menu,
choose Application Editor.

24 / FactoryLink ECS / Application Editor Guide


THE APPLICATION EDITOR OVERVIEW
Starting the Application Editor

Using the Command Line


1
To start the Application Editor from the command line, enter the following
command.

Application Editor
APPEDIT

Basics

FactoryLink ECS / Application Editor Guide / 25


• THE APPLICATION EDITOR OVERVIEW
• The Application Editor Window


T HE A PPLIC ATION E DITO R WIN DO W
After starting the Application Editor the following window is displayed.

The menu bar at the top of the screen provides the following menus and
commands.
• File includes commands that provide access to manipulate entire drawings.
• Edit includes commands for selecting and editing objects.
• View includes commands for controlling what you see on-screen and which tools
are available for drawing use.
• Draw includes commands for drawing all objects.
• Attributes includes commands for specifying the line, fill, text and screen styles
and for defining an objects name.
• Animation includes commands for specifying animation that will be included in
the drawing during runtime.
• Application includes commands for specifying application attributes.
• Windows includes commands to specifying the tiling or cascading of open
drawing files and a list of the open drawings to allow you to easily switch to
another open drawing.
• Help includes menu and application help.

Instructions for how to use these commands are described throughout this
manual.

26 / FactoryLink ECS / Application Editor Guide


THE APPLICATION EDITOR OVERVIEW
Exiting the Application Editor

EXITIN G THE A PPLICA TION E DITO R


1
To close the Application Editor, perform the following steps.

Application Editor
1 Choose File>Exit. The Application Editor closes.

CAUTION

Basics
This is the only correct way to exit the Application Editor. If you
use any other method to exit, you may lose or corrupt data.

2 If there are any files that were modified since the last save, the Warning! dialog is
displayed.

3 Click the appropriate command button.


Save Saves the changes before closing the file.
Discard Closes the file without saving the changes. Any element names
you created are retained in the object list.
Cancel Cancels the close of the file and returns you to the open drawing.

FactoryLink ECS / Application Editor Guide / 27


• THE APPLICATION EDITOR OVERVIEW
• Exiting the Application Editor

28 / FactoryLink ECS / Application Editor Guide


Chapter 2





Working With Drawing
Files 2

Application Editor
Basics
Each user-interface screen is a unique drawing file. Drawing files are stored in
the FactoryLink application directory structure. The drawings created in the user
domain are stored in {FLAPP}\user\drw while the drawings created in the
shared domain are stored in {FLAPP}\shared\drw. Most applications are created
with all drawings in the user domain.

CAUTION

All drawings in an application should be in a single domain,


preferably the user domain. Unpredictable results may occur if
drawings exist in more than one domain in an application.

Two different drawing file types are used within FactoryLink—standard drawing
and power pack drawings. Either type can be exported from its application and
imported into another application. FactoryLink uses the following file extensions
to identify each type of drawing file:
.g Identifies a standard drawing file.
.gp Identifies a power pack drawing file.
.gx Identifies an exported drawing file.
.gpx Identifies an exported power pack drawing file.

FactoryLink ECS / Application Editor Guide / 29


• WORKING WITH DRAWING FILES
• Working With Multiple Drawing Files Simultaneously


W ORK ING W ITH M ULTIPLE D RAW IN G F ILES SI MULTA NEO USLY
You can have multiple drawing files open at the same time; however, only one will
be active at a time. The drawing file on top of all the other files is the active
drawing file.

When you create or open a drawing file, the file name assigned to the drawing is
added to a list of open files. You can view this list from the Windows menu. The
active drawing file has a check mark next to its name.

Check mark
indicating active
window

To make a listed drawing file active, choose it from this menu. All actions
described in this manual act on the active drawing file, unless otherwise noted.

30 / FactoryLink ECS / Application Editor Guide


WORKING WITH DRAWING FILES
Opening drawing files

OPEN ING DR AW ING FILES


2
When the Application Editor is first started it opens into the User domain. If you
are developing drawings in the Shared domain you will need to change the

Application Editor
domain by choosing Switch Domain from the Application menu. For the purposes of
our discussions here, we will use the User domain unless noted otherwise.

Basics
Opening an existing drawing file
Perform the following steps to open an existing drawing file.

1 Choose File>Open to display the Open USER Domain Drawing dialog.

2 Select the drawing from the list displayed below the File Name: field. The drawing
name you select will be displayed in the File Name: field.

3 Click the OK button to complete opening the drawing.

Note

Double-clicking on the drawing name in the list will also open the
file directly.

FactoryLink ECS / Application Editor Guide / 31


• WORKING WITH DRAWING FILES
• Creating a new drawing file


C REA TING A NEW DRA WI NG FILE

Perform the following steps to open a new drawing file.

1 Choose File>Open to display the Open USER Domain Drawing dialog.

2 Double click in the File Name: field to highlight the currently selected drawing
name and enter a 1 to 8 character name in the File Name: field.

The Application Editor will add the .g extension for you.

3 Click the OK button to complete opening the newly created drawing file. The
screen will be displayed in grey, the FactoryLink screen default color. To change
the color at this time, choose Screen Color from the Attributes menu and make
your selection from the color palette displayed.

32 / FactoryLink ECS / Application Editor Guide


WORKING WITH DRAWING FILES
Saving a drawing file

SAV ING A DRA W ING FILE


2
There are two ways to save a drawing file.
Save Save retains changes you made to the active (frontmost) drawing.

Application Editor
The new version of the drawing replaces the old version.
Save As Save As allows you to save a copy of the active drawing using a

Basics
different name. If you have made changes to the drawing prior to
duplicating it, the original drawing remains unchanged when you
use Save As.

Saving with the original name


To save the drawing with its original name after making changes, perform the
following step.

1 Choose File>Save. The file that existed before you made modifications is
overwritten.

Saving with a new name


To save the drawing with a new name, perform the following steps.

1 Choose File>Save As to display the Save USER Domain Drawing As dialog, if you are
currently working in the User domain. This is the default domain for the
Application Editor.

FactoryLink ECS / Application Editor Guide / 33


• WORKING WITH DRAWING FILES
• Saving a drawing file


Choosing Save As displays the Save SHARED Domain Drawing As dialog, if you are
currently working in the Shared domain.

You can only work in one domain at a time; therefore, if you want to change
domains you will have to close all open drawings and switch domains by choosing
Application>Switch Domains. To save a drawing to a different domain, you must
export and then import into the other domain.

2 Double click in the File Name: field and enter a 1 to 8 character name. The
Application Editor will add the .g extension for you.

3 Click the OK button to complete the save.

34 / FactoryLink ECS / Application Editor Guide


WORKING WITH DRAWING FILES
Deleting a drawing file

D ELETING A DR AW ING FILE


2
Perform the following steps to delete a drawing file.

Application Editor
1 Choose File>Delete to display the Delete File dialog.

Basics
2 Select the drawing from the list displayed below the File Name: field. The files
listed are the same type as the current active window (.g for a drawing file, .gp for
a power pack window) and in the same domain.

To select a different file type press the down arrow from the scroll box in the File
Type: field. The list in the File Name: field changes to display the appropriate
drawing files.

To select a different domain choose it from the Domains: field. The list in the File
Name: field changes to display the appropriate drawing files.

3 Click the OK button to complete the deletion.

Note

When you delete a file, the elements defined in the file are also
deleted from the cross-reference list; however, the element names
remain in the object list.

FactoryLink ECS / Application Editor Guide / 35


• WORKING WITH DRAWING FILES
• Printing a drawing file


PR INTING A D RAW ING FILE

Perform the following steps to print a drawing file.

1 Choose File>Print Screen. The drawing file is sent to the default printer configured
by the operating system.

C LOSIN G A DRAW IN G FILE

Perform the following steps to close a drawing file. Only the active (frontmost
drawing is closed with this action.

1 Choose File>Close. The file closes.

2 When you close a drawing that has been modified but not saved the Application
Editor displays a Warning! dialog.

3 Choose one of the following command buttons.


Save Saves the changes before closing the file.
Discard Closes the file without saving the changes. Any element names
you created are retained in the object list.
Cancel Cancels the close of the file and returns you to the open drawing.

36 / FactoryLink ECS / Application Editor Guide


Chapter 3





Sharing Drawings
Between Applications 3

Application Editor
Basics
You share drawings between applications or domains by exporting them from one
application or domain and importing them into another.

FactoryLink ECS / Application Editor Guide / 37


• SHARING DRAWINGS BETWE EN APPLICATIONS
• Exporting files


EX PORTI NG FILES

Exporting a drawing file saves the file in a multiplatform format so it can be


easily shared between FactoryLink applications on any platform. Exporting
converts the drawing into an ASCII file. The converted ASCII file not only
includes the drawing’s objects, but it can also include the object animation and
element definitions.

The file is exported to the {FLAPP}\domain\drw directory of the current


application, where domain is the domain of the file being exported. The ASCII file
is named the same name as the selected drawing with the letter x appended to the
file extension.

For example, if you export a file named mydraw.g, the resulting ASCII file is
named mydraw.gx. This is true for power pack drawings as well. If you export a
power pack drawing named mypwrdrw.gp, the resulting ASCII file is named
mypwrdrw.gpx.

Perform the following steps to export a drawing file.

1 Choose File>Export to display the Export dialog.

2 Select the drawing from the list displayed below the File Name: field. The files
listed are the same type as the current active window (.g for a drawing file, .gp for
a power pack window) and in the same domain.

38 / FactoryLink ECS / Application Editor Guide


SHARING DRAWINGS BETWEEN APPLICATIONS
Exporting files

To select a different file type press the down arrow from the scroll box in the File
Type: field. 3
To select a different domain choose it from the Domains: field.

Application Editor
You may select multiple files for exporting by selecting more than one file name.

3 Choose the appropriate radio button in the Options field.

Basics
Graphics only Exports only the graphics of the drawing. Animation and
configuration details are not included.
Graphics + Exports the drawing graphics with the included animation. You
animation cannot import animation if it has not been saved with the export.
Graphics + all Exports the drawing graphics with the included animation and
configuration configuration settings such as alarms, scaling, I/O, etc.

4 Click the OK button to complete the export. Clicking on the Cancel button cancels
the export.

CAUTION

Do not edit the converted ASCII file.

FactoryLink ECS / Application Editor Guide / 39


• SHARING DRAWINGS BETWE EN APPLICATIONS
• Importing files


IM POR TING FILES

Importing converts the exported ASCII drawing files from other FactoryLink
applications or domains to files that are readable by this FactoryLink application
or domain. The import places the element definition information included within
the file in the object database.

The file is imported to the {FLAPP}\domain\drw directory of the current


application, where domain is the destination domain selected when importing the
files. The drawing file is named the same name as the selected import with the
letter x removed from the file extension.

Perform the following steps to import the drawing file to an application.

1 Choose File>Import to display the Import dialog.

2 Select the drive where the files to import are located from the Drives: field and the
appropriate directory from the Directory: field.

If the path shown in the directory field is not accurate, double-click the two dots
(..) in the Directory: list to display path elements.

3 Select the drawing from the list displayed below the Files field. The files listed are
the same type as the current active window (.gx for a drawing file, .gpx for a power
pack).

To select a different file type, press the down arrow from the scroll box in the File
Type: field.

40 / FactoryLink ECS / Application Editor Guide


SHARING DRAWINGS BETWEEN APPLICATIONS
Importing files

4 Select the destination domain from the Destination Domain field.


3
5 Deselect the appropriate check boxes, if you want to change the default settings
for the messages that display as files are imported.

Application Editor
Before replacing Warns if existing files will be overwritten.
files

Basics
Before creating Indicates when new tag names will be added. (This is especially
tags helpful if you are using FactoryLink Lite which only allows a
total of 1024 application defined tags.)
When tag definition Indicates these elements have already been defined with different
is different type, domain, length, or dimensions.
When tag usage is Indicates these elements have already been defined with a
different different configuration, such as alarms, I/O, etc.

6 Choose the appropriate radio button in the Options field.


Graphics only Imports the drawing graphics only. If the exported file was saved
with animation the animation will not be imported.
Graphics + Imports the drawing graphics with the animation that was saved
animation with it. If the exported file was not saved with animation no
animation will be imported.
Graphics + all Imports graphics, animation and all configuration such as
configuration alarms, scaling, I/O, etc.

7 Click on the Import button to complete the import. Clicking on the Cancel button
cancels the import.

FactoryLink ECS / Application Editor Guide / 41


• SHARING DRAWINGS BETWE EN APPLICATIONS
• Importing files

42 / FactoryLink ECS / Application Editor Guide


Chapter 4





Controlling Your View
of the Drawing 4

Application Editor
Basics
This chapter describes how to control the view of your drawing. You can control
the following features.
• How the grid is displayed
• How much of an object or area is viewed
• The display scale in which the drawing is shown
• Default actual size window for all drawings in editing session

A drawing must be open to perform these actions.

FactoryLink ECS / Application Editor Guide / 43


• CONTROLLING YOUR VIEW OF THE DRAWING
• Controlling the Grid


C ON TROLLIN G THE GRI D
The Grid is used for precision drawing. It works with the Snap option to allow you
to draw, size and place objects exactly.

Perform the following steps to turn on the Grid and define how it displays.

1 Choose View>Grid to display the Grid/Snap Options dialog.

Grid Allows you to turn on the grid and to define how it is displayed.
Snap Allows you to turn on the Snap option and define the snap
tolerance.
Logical Displays the width and height of the screen in drawing units. The
Coordinate System default is 1024 for the width and 768 for the height. Do not
change these values.

2 Select the Show Grid check box to display the grid.

3 Select the Draw with solid lines check box to display the grid with solid lines.
Deselect the check box to display the grid with dotted lines.

Define the Number of Grid Lines Displayed

4 The Make Grids Square check box is selected to display a square grid. The grid is
calculated based on the Horizontal Grids field entry. When this option is selected,
the Vertical Grids: and the Snap Points/Vertical Grid: are deactivated.

44 / FactoryLink ECS / Application Editor Guide


CONTROLLING YOUR VIEW OF THE DRAWING
Controlling the Grid

5 Deselect the check box to display the grid based on the values established in the
Horizontal and Vertical Grids: field.. 4

Application Editor
Basics
6 Enter the values to control the grid size in the Horizontal Grids: and Vertical Grids:
fields.
Horizontal Grids: Is the number of grids that are displayed in a row. This number
can be any number between 1 and the number displayed in the
Logical Coordinate System Width field. Using the default 64, the
following illustrates where the grid lines will be displayed along a
width of 1024 points.

Points 1 16 32 48 1008 1024


...
Grid Lines
1 2 3 4 63 64

Width = 1024 points

If Horizontal Grid is 64, there is a grid line every 16


for a total of 64 lines displayed (1024 ÷ 64 = 16).

Vertical Grids: Is the number of grids that are displayed in a column. This
number can be any number between 1 and the number displayed
in the Logical Coordinate System Height field. This option is not

FactoryLink ECS / Application Editor Guide / 45


• CONTROLLING YOUR VIEW OF THE DRAWING
• Controlling the Grid


available when the Make Grids Square option is activated. Using
the default 48, the following illustrates where the grid lines are
displayed along a height of 768 points.

Grid Lines Points


1 1

2 16 Height = 768 points

If Vertical Grid is 48,


3 32 there is a grid line every
16 points for a total of

...
48 lines displayed
(768 ÷ 48 = 16).

47 752

48 768

Define Snap Tolerance

7 The Enable Snap Points check box is defaulted to turn on the snap option. Enter the
values to control the tolerance of the snap in the Snap Points/Horizontal Grid: and
Snap Points/Vertical Grid: fields.
Snap Is the number of snap points within a grid box that an object will
Points/Horizontal snap to as it is moved left or right.
Grid:
Snap Is the number of snap points within a grid box that an object will
Points/Vertical snap to as it is moved up or down. Grids: field.
Grid:
Snap Point set at 2 Snap Point set at 4
(default)

1
1
2
3
2
4
1 2 1 2 3 4

46 / FactoryLink ECS / Application Editor Guide


CONTROLLING YOUR VIEW OF THE DRAWING
Using the Grid and Snap Options

U SING THE G RID AND S NAP O PTION S


4
Snap can be used in two ways—by enabling the snap function in the Grid/Snap
Options dialog as detailed in “Controlling the Grid” on page 4-44 or by selecting the

Application Editor
items to be snapped individually and applying the snap command.

To snap an object to the grid perform the following steps.

Basics
1 Select the objects you want to snap.

2 Choose Edit>Snap. This snaps the four corner’s of the object’ bounding box to the
nearest snap points.

The object is resized to fit its new bounding box.

FactoryLink ECS / Application Editor Guide / 47


• CONTROLLING YOUR VIEW OF THE DRAWING
• Zooming On Object or Area


Z OO MI NG ON O BJECT OR A RE A
The zoom feature controls how much of the object or drawing is displayed in the
graphics window. Zoom magnifies the object or area for detailed editing. This
section describes how to magnify an object or an area in the drawing.

Zooming on Object
Perform the following steps to magnify an object or group of objects in the
drawing.

1 Select the object or group of objects you want to magnify.

2 Choose View>Zoom on Object. The selected objects are magnified

3 Choose View>Zoom on Object again and the objects will be magnified again. Objects
can be magnified until they fill the entire drawing window. They will not be
magnified out of view.

4 Choose View>Zoom Out 100% to return the object to normal size.

Zooming on Area
Perform the following steps to zoom on an area in the drawing.

1 Choose View>Zoom on Area.

2 Place the cursor over the starting position of the area you want to magnify and
click and hold down the left mouse button.

3 Drag the cursor over the area you want to magnify. A box is displayed indicating
the selected area.

4 Release the mouse button. The area within the box is magnified.

5 Choose View>Zoom Out 100% to return the area to normal size.

Zoom Out 100%


Perform the following step to return a zoomed object or area to normal size.

1 Choose View>Zoom Out 100% to return the area to normal size.

48 / FactoryLink ECS / Application Editor Guide


CONTROLLING YOUR VIEW OF THE DRAWING
Changing the Display Scale

C HANG ING TH E D IS PLAY SC ALE


4
When you are creating a drawing, you can view the entire drawing using the
whole drawing scale. This view helps you make overall composition and layout

Application Editor
decisions for the drawing.

Depending on the size of your drawing window, the drawing may not necessarily

Basics
be at the same scale as it will display in the run-time application. You can view
how the drawing will display in the run-time application using the actual size
scale.

While creating a drawing, you can change between each of these scales. This
section describes how to select each scale.

Selecting Whole Drawing Scale


Perform the following steps to view the entire drawing.

1 Choose View>Whole Drawing. The entire drawing is displayed in the drawing


window. If you change the size of the window, the drawing scales to the new
window size.

Viewing Actual Run-time Size


At run time, the drawing is placed proportionally into its associated run-time
window. Perform the following steps to view the drawing as it will display at run
time.

1 Make sure you have a window defined where the drawing will be displayed. Refer
to “Configuring Run-Time Windows” on page 5-53,” for details.

FactoryLink ECS / Application Editor Guide / 49


• CONTROLLING YOUR VIEW OF THE DRAWING
• Changing the Display Scale


2 Choose View>Actual Size to display the Frame Window Selection dialog, listing the
windows available for displaying drawings at run time.

The available windows are listed in the Window: field.

3 Select the window where the drawing will be displayed from those provided in the
Window list. The drawing is displayed in the selected window.

If you resize the drawing window so it is larger than its run-time window, a line is
displayed showing where the run-time window ends.

Runtime window
size

Actual size window

Limit of run-time window


If you draw in this area, it does
not display at run time

If you draw outside the run-time window size, the objects in this area will not
display at run time.

50 / FactoryLink ECS / Application Editor Guide


CONTROLLING YOUR VIEW OF THE DRAWING
Changing the Display Scale

Resizing the actual size window during development does not change the size of
the drawing at run time. 4
If you view the drawing at actual size and then save it, the association with this

Application Editor
actual size window is saved. The next time you open it, you can press F7 (Toggle
View command) to view it in this actual size window.

Basics
Toggling Between Display Scales
All drawings are displayed in whole drawing view when you open them. For
drawings that have an association with an actual size window, you can toggle
between the full window scale and the actual size scale in one of two ways.
• Pressing the F7 function key
• Selecting View>Toggle View

FactoryLink ECS / Application Editor Guide / 51


• CONTROLLING YOUR VIEW OF THE DRAWING
• Setting the Default Actual Size Window


SE TTING THE D EFAU LT A C TU AL SIZE W INDO W
You can associate a default actual size window with all drawings for an editing
session by using the -w program argument when starting the Application Editor.
This default does not apply to drawings that already have an actual size window
association, only those that do not. This is especially useful if you have several
drawings not associated with actual size windows you want to view in the same
actual size window.

You can set this program argument starting the Application Editor from the
command line using the following command.

appedit -w actualsize_window

where actualsize_window is the name of the window where the drawing is


displayed at run time.

For example, the following command

appedit -w fl_main

defines fl_main as the default actual size window for this editing session.

If you start the Application Editor from the Configuration Manager or the
Program Manager, you cannot set a default actual size window.

52 / FactoryLink ECS / Application Editor Guide


Chapter 5





Configuring Run-Time
Windows 5

Application Editor
Basics
At run time, drawings are displayed in windows. The window controls how the
drawing is displayed; that is, its size and position. You can have multiple window
definitions, depending on how many unique types of windows you want to use to
display drawings. For example, you can have a large window to display large
drawings and a smaller window to display smaller drawings.

To display a drawing at run time, you must specify a window for displaying it.
This chapter describes how to associate a drawing with a window for run-time
display.

You can have multiple drawings displayed in the same window by configuring an
input-text field or button to permit you to change the drawing displayed in the
window.

You can have multiple windows open when the Run-Time Manager is started, and
you can specify which of these windows should be displayed on top of all the other
windows. This chapter describes how to specify which window is the top window.

FactoryLink ECS / Application Editor Guide / 53


• CONFIGURING RUN-TIME WINDOWS
• Creating Run-time Windows


C REA TING R UN - TIME W INDO W S
This section explains how to set up a run-time window and to specify the drawing
you want to display in it.

1 Choose Application>Window Setup to display the Edit Window Selection dialog.

2 Either select a window name from the Window list or enter a window name
between 1 and 16 characters in the Window field. You should restrict this to 8
characters if portability is an issue.

3 Click on OK to display the Window Configuration dialog.

Window you are configuring is


listed here

54 / FactoryLink ECS / Application Editor Guide


CONFIGURING RUN-TIME WINDOWS
Creating Run-time Windows

4 Select the Size Border check box to specify whether or not to display a sizing border
around the window. The sizing border allows you to resize the window at run 5
time. If the sizing border is present, the cursor changes to a double-sided arrow
when it crosses the window’s border.

Application Editor
If you do not specify a sizing border, you cannot adjust the size of the window
using the cursor at run time.

Basics
5 Select the Title Bar check box to specify whether or not to display a title bar
showing the name of the window. A title bar allows you to move the window at run
time.

All windows under Motif have a title bar whether or not you select this option

6 Select the Maximize Button check box to specify whether or not to display
maximize/minimize buttons. If selected, the maximize/minimize buttons are
located in the top-right corner of the window. The maximize button makes the
active window full screen; the minimize button makes the active window an icon

If you do not select this option, you cannot maximize or minimize the window at
run time.

7 Select the System Menu check box to specify whether or not to display a button
that lets you open the System Menu from this window. If selected, the System Menu
button is located at the top-left corner of the window and has a small horizontal
line.

The System Menu provides the following capabilities.


Restore Restores the window to its original size after it has been
minimized or maximized.
Move Allows you to move the window without dragging the cursor.
To move a window, choose Move and move the pointing device.
The window moves with the cursor. When the window is in the
desired location, press the left button. The window remains in its
new location.
Size Activates the window’s size borders so you can resize the window.
When the window is the desired size, press the left button. The
window remains at its new size.
Minimize Shrinks the window to an icon.
Maximize Displays the window in a full screen size.
Close This option is always disabled.

FactoryLink ECS / Application Editor Guide / 55


• CONFIGURING RUN-TIME WINDOWS
• Creating Run-time Windows


8 Select Resize Behavior>Clip to specify whether or not the objects in a window
remain the same size when you resize a window. This means the window will get
smaller but the objects will not. If you select this option and size a window too
small to hold the entire drawing, you will only be able to see part of the drawing.
Title Bar displayed
Graphic clipped during
run time when window is Maximize and Minimize
resized. buttons appear here
during run time.

9 Enter the name of the digital tag whose value enables this window in the Window
Enable Control field. When the tag’s value changes to 1, the window is enabled.
Forcewriting 1 to this tag places the window in the foreground and refreshes the
contents. The tag specified must be in the SHARED domain.

10 Enter the name of the default drawing to display in this window when the window
is enabled in the Startup Display Name: field.

11 Enter the name of a message tag that defines which drawing to display in the
Current Display/Load Display Tag: field. If you do not define this field or if the value
of this tag is blank, the default drawing is used.

If neither of these fields is defined, the RUNMGRU drawing is used. This is the
default value of the FL_MAINWINNAME tag.

12 After you complete the Window Configuration dialog, click OK to close the dialog and
save the information. If you have entered the names of any tags not already
defined, the Tag Definition dialog is displayed.

13 Enter data for any tags displayed. Refer to the field description where the tag
name was defined for details on valid data types.

56 / FactoryLink ECS / Application Editor Guide


CONFIGURING RUN-TIME WINDOWS
Defining Window Size and Placement

14 If you want to change the size and position of the window, refer to the “Defining
Window Size and Placement” on page 5-57 for details. 5

D EFINING W IN DOW SI ZE A ND PLA CEM ENT

Application Editor
Perform the following steps to change the size and position of a window.

Basics
1 Choose Animation from the Application Editor menu bar.

2 Choose Animation>Window View to display the View Window Selection dialog.

3 Select a domain from the Domain list. Any previously created windows in the
selected domain are displayed in the Window: field.

4 Select a window to view from the Window: field.

5 Click OK. A blank window is displayed.

6 Using the mouse or arrow keys, size the blank window to the desired size and
move it to the desired location.

7 Press one of the following keyboard keys.


Enter Saves a window’s new size and location. The blank window
disappears from the screen and the drawing area returns to
active. At run time, the window is displayed on the screen in the
size and location specified.
Esc Cancels the change and clears the window.

FactoryLink ECS / Application Editor Guide / 57


• CONFIGURING RUN-TIME WINDOWS
• Setting The Top Window


SE TTING T HE T O P W IN DOW
You can configure multiple windows to open when the Run-Time Manager is
started. You can also configure which window should open first and is displayed
on the top of all the other windows. The default top window is FL_MAIN. Perform
the following steps if you want to configure a different top window.

1 Open the Configuration Manager.

2 Select the USER domain.

3 Choose Window Management from the Configuration Manager Main Menu to


display the Window Management Control panel.

4 Provide the following information in this panel.


Top Tag Name of the tag that contains the name of the window that
should appear on top of all the other windows when Run-time
Manager is started. If you do not define this field, the tag
TOPWINDOW_U is used.
Default Name of the window that is displayed on top, if the value of Top
TAG is blank.

58 / FactoryLink ECS / Application Editor Guide


Chapter 6





Tag Definition Dialog
6

Application Editor
Basics
When developing a FactoryLink application, each data element stored in the
real-time database is assigned a logical name, called a tag, which is used to
reference the element. There is usually a variety of information associated with
each unique data element, such as the tag name, alarm limits, scaling, deadband,
logging, persistence and I/O information. This information must be stored in
many different tables which are accessed by FactoryLink when it is running an
application. When creating an application in the Application Editor, this
information can be automatically input to the appropriate tables when assigning a
tag name to a new data element or modifying an existing tag through the Tag
Definition dialog.

This chapter describes how to configure tag names and associated data element
information using the Tag Definition dialog.

FactoryLink ECS / Application Editor Guide / 59


• TAG DEFINITION DIALOG
• Creating or Editing a Tag


C REA TING OR E DITIN G A T AG

The Tag Definition Dialog


The Tag Definition dialog is used to create or modify tags. Separate tabs contain
information about different tag parameters. The tab options available are
dependent upon the tag type and domain chosen and the program options
installed for your system. For example, if you did not select and install the
Allen-Bradley driver option, that tab will not be displayed. To view a particular
tab, position the cursor on the tab header near the top of the dialog box and click
the mouse button. The contents of that tab will be brought to the foreground.
Some tabs (Alarms, Logging, Scale/Dead) will have two asterisks (**) in front of
the tab title if the tab is configured for the tag. Some tabs have sub-tabs which are
shown on the right side of the tab when it is in the foreground. To view the
contents of a particular sub-tab, position the cursor on the sub-tab and click the
mouse button. When all information has been entered or modified for a tag, click
on the OK button at the bottom of the dialog to save the information and exit the
Tag Definition dialog. To leave the dialog without making any changes, click on
the Cancel button. To learn more about a particular topic, click on the Help button

Subtab
Tab Header

OK Button Cancel Button Help Button

60 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Creating or Editing a Tag

Creating a Tag
6
The Tag Definition dialog is displayed in the following situations:
• When creating a new data element, if you assign a tag name that has not yet

Application Editor
been defined on the animation screen, and press OK.
• When a template item for which a tag has not yet been defined is pasted into a
screen. Refer to the section “Working with Templates” for more information on

Basics
pasting template items.

Editing a Tag
If a tag needs to be edited after it is created, the Tag Definition dialog can be
accessed in the following ways:
• When a tagged field is chosen during development, press CTRL + T.
• When Application>Tag Dictionary is chosen from the Application Editor Menu
Bar, the Tag Dictionary dialog will display. Choose the desired tag and click on
the Edit button. The Tag Definition dialog for the tag will be displayed. Refer to
the section “The Tag Dictionary” for more information about using the Tag
Dictionary.

To edit the information for an existing tag, click on the Edit button on the upper
right side of the General tab for the tag.

Apply button

Edit button

FactoryLink ECS / Application Editor Guide / 61


• TAG DEFINITION DIALOG
• Creating or Editing a Tag


When the edit function is selected, all other tabs associated with the tag will
disappear. Changes to the information on the Basic sub-tab for the tag must be
made before any other changes can be executed. If the tag is a shared domain tag
that is already used in the shared domain, the tag domain cannot be changed.
Array dimensions can be increased from the existing dimensions, or decreased if
the items being eliminated have not already been referenced in FactoryLink. If a
tag was not originally created as an array, it cannot be changed to be an array tag.
When all changes to the Basic sub-tab information are complete, press the Apply
button in the upper right corner of the dialog. The changes will be made, and all
other tabs associated with the tag will be displayed again, and can be edited.

When all editing to information for the tag has been completed, click on the OK
button at the bottom of the dialog to save all the options.

62 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Tag Parameters

T AG P ARAM ETER S
6
When developing a FactoryLink application, each data element stored in the
real-time database must be assigned a logical name, called a tag name. This tag

Application Editor
name is used by FactoryLink to reference the element during run time. A tag
name may stand for a single element or an array (group) of elements. Refer to
“Tag Persistence Definitions” for a description of when to use arrays. When

Basics
assigning a tag name, the following guidelines apply:
• 1-32 characters long, plus array delimiters of up to 16 characters.
• Valid characters are A-Z, 0-9, _, @, $, ., :.
• Tag cannot start with 0-9.
• No embedded spaces.

All data elements belong in either the shared or user domain, depending upon
whether, at run-time, they will be used by multiple users or a single individual.
Tags created in the Application Editor will default to the shared domain
configuration. Once a tag is created as a shared tag and referenced in the shared
domain, the domain for the tag cannot be changed. If the tag is created in the user
domain, the domain can be changed. Most tag options (tabs) are only available for
tags to be used in the shared domain.

The following pages contain a description of all the possible tabs. Note the tab
options available are dependent upon the tag type and domain chosen and the
program options installed for your system. For example, if you did not select and
install the Allen-Bradley driver option, that tab will not be displayed.

When all desired tag options have been defined, click on the OK button at the
bottom of the dialog to save all the options.

FactoryLink ECS / Application Editor Guide / 63


• TAG DEFINITION DIALOG
• Tags Referencing Arrays


T AG S R E FERENC ING A RR AYS

Defining Element Arrays


A tag name can be assigned to a single element or a group of elements (sometimes
called an “array”). Using a single tag to define a group of elements permits certain
FactoryLink tasks, such as Math and Logic, to perform operations on an entire
element array using only one reference to the array, rather than using separate
references to each element in the array. Arrays can be single-dimensional or
multi-dimensional.

To specify a tag as an array, enter the value(s) that define the array dimensions in
the tag name definition field when creating the tag initially. The number(s)
should be placed in square brackets [n] immediately following the tag name.
There should be no spaces between the tag name and the array dimensions, or
between any set of array dimensions for multi-dimensional arrays. Once a tag is
created as a non-array tag, it cannot be made into an array element. Once a tag is
created as an array tag, however, the number of array elements can be increased
or decreased. Therefore, if you are developing an application, and know that a tag
will be an array, and know the number of dimensions in the array, but not the
exact number of elements in each array, the tag can be created as tagname[0][0]...,
and the actual number of elements can be specified at a later time.

Specify a number one less than the number actually required, because the array
starts counting at 0. For an array with 3 elements, enter the number 2 in the
array dimensions field to receive 3 elements: 0, 1, 2.

Tag defined with one-dimensional array

64 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Tags Referencing Arrays

Defining one-dimensional arrays


6
To define a one-dimensional array, enter a single number as the array dimension
to specify the number of elements in the array. Each element will have a unique

Application Editor
identifier consisting of the tagname defined in the Tagname field and one of the
array identifier numbers: tagname[n]

For example, if 3 elements for an array are specified by entering the number 2 in

Basics
square brackets as part of the tag temp[2], the following three elements are created
in the real-time database:
• temp[0]
• temp[1]
• temp[2]

Defining multi-dimensional arrays

To define multi-dimensional arrays, enter multiple numbers in square brackets


following the tag name to specify the number of elements in the array. Up to five
dimensions can be defined for each array. Each element will have a unique
identifier consisting of the tagname defined in the Tagname field and dimensional
array identifier numbers: tagname[n1][n2] ...

Tag defined with multi-dimensional array

FactoryLink ECS / Application Editor Guide / 65


• TAG DEFINITION DIALOG
• Tags Referencing Arrays


For example, if a tag named tryp is to be an array that has two dimensions with 2
elements in the first dimension and 3 elements in the second dimension, specify
the tag name as tryp[2][3] when creating the tag. The following six elements are
created in the real-time database:
• tryp[0][0]
• tryp[0][1]
• tryp[0][2]
• tryp[1][0]
• tryp[1][1]
• tryp[1][2]

66 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Tags Referencing Arrays

Working with Element Arrays


6
Once a tag has been created as a multi-dimensional array, each element can be
accessed through the Tag Definition dialog.

Application Editor
To increase or decrease the number of elements in the array, access the Tag
Definition dialog for the tag. If the tag has already been created, click on the Edit
button on the right side of the Basic sub-tab of the General tab. Make any

Basics
necessary changes to the Array Dimensions field, and click on the Apply button.

Apply Button

Edit Button

Array Dimensions field

Note

If you are decreasing the number of elements in the array, ensure


that any of the elements being deleted have not been referenced
anywhere else in FactoryLink. If you delete a referenced tag, the
program will not compile correctly, and the run-time program will
not execute.

The information contained on the General tab must be the same for all elements
of an array. Other information pertaining to the tag, such as logging, etc. can be
configured for all elements of an array, or differently for specific array elements.
To configure information for the tag, click on the desired tab.

FactoryLink ECS / Application Editor Guide / 67


• TAG DEFINITION DIALOG
• Tags Referencing Arrays

Array Subscript field

OK Button

Use the arrows on the right side of the Array Subscript field to scroll through the
array elements. When the desired array element is displayed, enter any necessary
information or make any changes. Click on the OK button at the bottom of the
dialog, or click on a different tab.

A window will be displayed asking if you wish to apply this information to all
elements of the array. If you do, click on YES. If you wish to make this
information apply to only the specific array element you are configuring, click on
Cancel. The information will be saved for that array element only.

When viewing the tag dictionary, array tags will only be displayed once as
tagname[0][0].... To access any individual element of the array, choose the tag, click
on the Edit button, and proceed as described above to access an individual array.

68 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Working with Templates

WO RKIN G W ITH T EMP LATES


6
Template animation allows you to animate an object with variables. When
creating a template item, you define which animation features are constant or

Application Editor
variable for the object. When the object is duplicated, a prompt will ask for
definitions for the variable animation features.

Basics
Full Template Items
Any template referenced from an animation dialog is a full template and has all
the functionality described in“Guidelines for Using Template Variables” on page
15-197

Full template items


created in Animation Dialog

When you have finished defining the animation for the tag, and the OK button is
clicked, a pop-up window will appear, asking for the prompt string to be displayed
when this template item is pasted.

Prompt string for tag

FactoryLink ECS / Application Editor Guide / 69


• TAG DEFINITION DIALOG
• Working with Templates


When an object containing full template items is pasted into a drawing, a dialog is
displayed, prompting you to enter the values for all the full template items.

Prompt string created


when defining tag
appears when object
is pasted

Simple Template Items


Any template defined in the Tag Definition dialog is referred to as a“simple
template item.” When creating or editing a template in the Application Editor,
any values in the Tag Definition dialog fields except those on the Basic sub-tab
can be configured as template items if the tagname is a template. A simple
template item functions like a regular template item, but a prompt string cannot
be defined for a simple template item; it is automatically generated.

Tag name defined


as template item Simple template items
created in Tag Definition
Dialog

70 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Working with Templates

When an object containing simple template items is pasted into a screen, a dialog
is displayed, prompting you to enter the values for all the simple template items. 6

Application Editor
Tag name prompt
appears when object

Basics
is pasted

Only the template name and a field in which to enter the values is displayed.

If the object being pasted contains both full and simple template items, two
dialogs will be displayed. The first will prompt for values for the full template
items; the second will prompt for values for the simple template items.

If in the Tag Definition dialog you enter a template name already defined from an
animation dialog, it will assume the value from the full template item.

If a simple template name is assigned on one of the tabs of the Tag Definition
dialog and the same template name is used on a different tab of the same Tag
Definition dialog, the system will treat these items as two different templates.

The simple templates can be specified in one of two ways:


• The template variable can be entered in the field in braces: {port_id}. Templates
can also be entered as a combination of a template variable and text. For
example: {port}ID.
• If the field is too short to enter the template name, a ? can be placed in the field.

FactoryLink ECS / Application Editor Guide / 71


• TAG DEFINITION DIALOG
• The Tag Dictionary


T HE T AG D IC TION ARY
The tag dictionary provides a method to view all the tags in the application.

Up Arrow

Tag Name field

Function buttons

Slider bar

Down arrow

The slider bar will scroll through the tags. One hundred tags are displayed at a
time. To see another block of 100 tags, use the Up/Down Arrow buttons next to the
slider bar to move to another block of tag.

Selecting a Tag

Type the name of the desired tag in the Tag Name: field or choose the desired tag
by clicking on it with the mouse and press the ENTER key on the keyboard to
display the tag in the Tag Name: field. If unsure of the tag name, type in the first
few characters of the name (noting that the sorting is case-sensitive) and press the
ENTER key on the keyboard. That portion of the list will be displayed, and the
desired tag can be chosen.

To close the Tag Dictionary, click on the Close button.

For help about the Tag Dictionary, click on the Help button.

72 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
The Tag Dictionary

Creating a New Tag


6
To create a new tag, type in the name of the tag, and click on the New button. The
Tag Definition dialog will be displayed, and information for the tag can be

Application Editor
entered.

Editing a Tag

Basics
To edit the information for an existing tag, ensure the name of the desired tag is
in the Tag Name: field as described above and click on the Edit button. The Tag
Definition dialog for the tag will be displayed, and the information for the tag can
be edited.

Deleting a Tag

To delete an existing tag, you must first delete all references to the tag in the
application. Do this by checking the cross-reference list as described below. After
you have removed all references to the tag, ensure the name of the desired tag is
in the Tag Name: field as described above and click on the Delete button.

Cross-Referencing a Tag

To view a cross-reference list for a particular tag, ensure the name of the desired
tag is in the Tag Name: field as described above and click on the Xref button. The
cross-reference list for the tag will be displayed:

The columns on this list provide information about the tag used in the application.
Each row contains information about a particular reference to the tag:

FactoryLink ECS / Application Editor Guide / 73


• TAG DEFINITION DIALOG
• The Tag Dictionary


Tagname Lists the name of the tag for which information is displayed.
CT Name/Anim The name of the configuration table or type of animation in which
Type the tag is used.
Table Name/ The name of the table or drawing in which the tag is referenced.
Drawing
Column Name The name of the table column or animation field in which the tag
/Anim Field is referenced.

Record/Obj. Name The record number assigned to the item in a table, or the object
number assigned when animating the object.
CT Domain The domain (shared or user) in which the tag is referenced.
Tag Dimensions The dimensions of the tag if it is an array.
Task Name The name of the task (GRAPH, EDI, DISTALAOG, etc.) which
uses the information in the referenced tag.

74 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Basic Tag Definitions

B ASIC T AG D E FINITIO NS
6
When the Tag Definition dialog is displayed, the Basic sub-tab of the General tag
definition tab is displayed as the top layer. This dialog is used to enter

Application Editor
information about the tag, such as a description, tag type, domain and default
value. If the tag is an array, the array dimensions are also entered here. For
message type tags, the message length should be specified.

Basics
General selected
Basic selected

The fields on this sub-tab define general information about the tag:
Description Enter a description of up to 80 characters that defines the
purpose of the tag.
Type Choose the format for the data that will be referenced by this tag.
Valid data types may depend on the type of field being defined.
Below is a list of all valid data types:
Digital is a binary data type. Its value can be a 0 or 1.
Analog is a 16-bit, signed integer. Its value can range
between negative and positive 32,768.
Floating-point is an IEE double precision number with 31 places
to the right of the decimal.

FactoryLink ECS / Application Editor Guide / 75


• TAG DEFINITION DIALOG
• Basic Tag Definitions


Message can be any combination of alphanumeric
characters. Its length is controlled by its tag
definition.
Long analog is a 16-bit signed integer. Its value can range from
negative to positive 2 billion.
Mailbox is variable length data organized as a queue.
Domain Choose the domain in which this tag should be used:
Shared The data contained within this tag is available
from the shared or user environment. It can be
read, used and/or modified by all users.
User The data contained within this tag is available
only from the user environment.
If this tag was created as a shared tag and is referenced in the
shared domain, the domain for the tag cannot be changed. If the
tag was created in the user domain, the domain can be changed.
Most tag options (tabs) are only available for tags to be used in
the shared domain.
Array Dimensions If this tag is used to reference an array, the array dimensions will
appear in this field. This field is blank if the tag is not an array. If
this tag is defined as an array, this field is used to add or remove
elements from the array. If removing elements from an array, be
sure that the element(s) being deleted is not referenced anywhere
else in FactoryLink. Refer to “Tags Referencing Arrays” for
details on defining arrays.
Message Length This field defines the maximum length for Message tags. If you do
not specify a length, FactoryLink calculates the correct length.
Default Value This field defines the value written to the tag when FactoryLink
is started.

76 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Basic Tag Definitions

Follow Domain Choose this box to use the persistence settings defined for the
Persistence domain. The default configuration is no persistence configured for 6
either domain. Refer to the Persistence in the Core Tasks
Configuration Guide to define persistence for an entire domain.

Application Editor
Note that persistence for the domain must be configured for this
option to work.
To define tag-specific persistence parameters, use the persistence

Basics
sub-tab to define the tag-specific parameters. Refer to “Tag
Persistence Definitions” for more details on defining tag-specific
persistence.
If no persistence option is chosen for this tag, the value will not be
saved for restoration after an unexpected shutdown.

FactoryLink ECS / Application Editor Guide / 77


• TAG DEFINITION DIALOG
• Tag Persistence Definitions


T AG P ERSI STENCE D EFIN ITION S
Persistence is used to save the values of an active FactoryLink application at
predetermined times so data will not be lost if the system shuts down
unexpectedly due to events such as a power loss. Persistence can be configured for
an entire domain and/or on a per-tag-basis. For the domain, the user can specify
which elements need to be saved, and how often to save them. If certain elements
need to be saved at a different interval, the domain persistence can be superseded
for the element using this persistence function. Refer to the Persistence in the Core
Tasks Configuration Guide for a detailed description of the Persistence function.

When the Persistence sub-tab is chosen from the General tag definition tab, the
following dialog is displayed:

General selected

general selected
Persistence selected

Enter the following information for the tag:


Use Domain Choose this box to use the persistence settings defined for the
Settings domain. To check the persistence settings for the domain, access
the Configuration Manager. To define tag-specific persistence
parameters, ensure this box does not contain an X, and use the
rest of the fields on the persistence tab to define the tag-specific
parameters.

78 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Tag Persistence Definitions

Save Controls how often the element’s value is saved to a disk file. This
can be one or both of the following. If both options are chosen, the 6
element’s value is saved based on a time trigger and when it
changes.

Application Editor
On Time Saves the tag value based on a time trigger.
On Exception Saves the tag value based on a change in the data

Basics
stored in the tag.
Restoring Controls whether the element’s change status flag is set to on or
off when restoring the saved value to the element.
Status On The element’s change status flag is set to on when
restoring the saved value.
Status Off The element’s change status flag is set to off when
restoring the saved value.

FactoryLink ECS / Application Editor Guide / 79


• TAG DEFINITION DIALOG
• General Alarm Definitions


GEN ERAL A LAR M D EFINITIO NS
Before configuring alarms, refer to the Distributed Alarm Logger in the Data
Reporting Configuration Guide for an overview of alarm functionality, if
necessary. If two asterisks (**) appear in front of the word Alarm on the tab, it
indicates there is configuration information on the tab. When the Alarm tab is
chosen from the tag definition dialog, the Basic Alarm sub-tab is displayed:

Alarms selected

Basic selected

For any configured alarms, the condition, limit and group will be displayed. To
change this information, highlight the desired alarm and modify the attributes
using the Condition Attributes box at the bottom of the screen. To create a new
alarm, enter information for the alarm in the Condition Attributes box:
Condition Choose the condition under which the alarm tag type or alarm ID
will be checked. Valid values are:
HIHI, HI, GT or >An alarm is triggered when the value of the
element is greater than the value specified by the
limit.
LOLO, LO, LT or <An alarm is triggered when the value of the
element is less than the value specified by the
limit.

80 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
General Alarm Definitions

LE or <= An alarm is triggered when the value of an analog


or floating-point element is less than or equal to 6
the value specified by the limit.
GE or >= An alarm is triggered when the value of an analog

Application Editor
or floating-point element is greater than or equal
to the value specified by the limit.

Basics
EQ or = An alarm is triggered when the value of an analog
or floating-point element is equal to the value
specified by the limit.
NE or < > An alarm is triggered when the value of an analog
or floating-point element is not equal to the value
specified by the Limit.
For example, an acceptable temperature range has been
determined to be 40-100 degrees. If the temperature exceeds 90,
you want to set a HI alarm to alert the operator. If the
temperature exceeds 95, it would be considered critical, and this
could be configured as the HIHI alarm. In addition, you may want
to set an alarm when the temperature is > 85 so that the operator
could take steps to prevent the temperature from ever reaching a
dangerous level. In all 3 of these cases, the condition for the tag is
“greater than” but each alarm is differentiated from the other.
Group Choose the alarm group name from the list. Create the name of a
new alarm group by going to the Group Alarms tab.
Priority Enter a number between 1 and 9999 to specify the priority of the
alarm for filtering and sorting purposes. The default is 1, the
highest priority.
* Limit Enter the value constant or a tag name for an element against
which the condition is checked. If the condition reaches this limit,
the alarm condition occurs.
Area Enter an alphanumeric string to specify the area in which the
alarm resides for filtering and sorting purposes. If alarms are
distributed along the network, use this field to designate and sort
by server/client or local/remote.
* Deadband Enter the value constant or a tagname for an element above or
below the limit for which the alarm will remain active.

FactoryLink ECS / Application Editor Guide / 81


• TAG DEFINITION DIALOG
• General Alarm Definitions


The deadband works in conjunction with the condition and limit
specified for the alarm. Once the alarm is triggered when the tag
fulfills the condition and limit parameters, it remains active until
it moves past its limit by the deadband amount.
For example, if the alarm trigger condition is set to activate when
the tag temp_set is equal to 85 degrees F and the deadband is set
to 5, the alarm will be triggered at 85 degrees and will not return
to normal until the temperature has dropped back below 80
degrees (85 less 5 for the deadband).
If a tag is used, it must be the same data type as the tag and the
tag name referenced in the *Limit field.
A message type tag is not valid in the *Deadband field.
Valid Entry: standard element name or constant
Valid Data Type: analog, longana, float

To add an alarm to the list of configured alarms, specify the alarm condition
attributes, then click on the Add button.

To delete an alarm, select it by clicking on it in the Configured Alarms list to


highlight it and click on the Delete button.

To update an alarm, select it by clicking on it in the Configured Alarms list to


highlight it. Make any changes in the Condition Attributes box and click on the
Update button. The changes will be displayed in the Configured Alarms list.

For those items which are preceded by an asterisk (*), either a value or a tag name
can be entered in the field. If a tagname is entered in one of these items that has
not been used before, when you click on Add, Update, OK or move to another tab, a
Tag Definition dialog for the new tag will be displayed.

To clear all alarms for a tag, press the Clear button in the upper right corner of the
tab. To add an alarm to the list of configured alarms, click on the Add button.

82 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Advanced Alarm Definitions

A DVAN CED A LAR M D EFINITIO NS


6
If two asterisks (**) appear in front of the word Alarm on the tab, it indicates
there is configuration information on the tab. When the Advanced sub-tab is

Application Editor
chosen from the Alarm Definitions Tab, the Advanced Alarm sub-tab is displayed:

Basics
Alarms selected

Advanced selected

If use of the advanced alarm functions is desired, enter the following information:
Message Text Enter up to an 80 character alphanumeric string to specify the
alarm message text to be displayed for this individual alarm. This
text normally appears after the group alarm text. This message
text can be enhanced with up to 4 variables, 1-4, described below.
The variables are scanned in order, 1 to 4. The default message is
“tagname= %d”
Variable 1-4 Enter the name of the tag whose element will be used as part of
the alarm message at run time in place of the variable (1-4)
specifier indicated within the text of the Message Text. When the
message is displayed, this variable will be substituted for the
specifier at run time. The default for variable 1 is “tagname.”
ANALOG, LONGANA, FLOAT or message are valid data tag
types for this variable.

FactoryLink ECS / Application Editor Guide / 83


• TAG DEFINITION DIALOG
• Advanced Alarm Definitions


Hiding To hide the chosen alarm, place an X in the Hiding box and enter
the name of the digital tag in the user domain that hides the
alarms. If the Hiding field is left blank, the alarm will be processed
as a standard alarm.
Time-stamp Enter the format to be used by the input element in the Time
Format Stamp tag. Valid values are:
NULL Time-stamping format is not used
USA USA time format (yymmddhhmmss)
EUROPE European time format (ddmmyyhhmmss)
USA_HS USA time format with 1/1000 sec
(yymmddhhmmsstt)
EUR_HS European time format with 1/1000 sec
USA_L Long USA time format
EUROPE_L Long European time format
USA_HSL Long USA time format with 1/1000 sec.
EUR_HSL Long European time format with 1/1000 sec
Time Stamp Tag Enter the name of a message tag to specify the exact time the
alarm occurred. This message is supplied with the alarm tag
change. If no tag is supplied here, the time-stamping is
determined by when the change is detected by the Alarm Logger.
This tag should be completed with a correct value before the
alarm tag is changed.
Status Tag Enter the name of the analog or digital tag which represents the
status of this alarm in the active alarm list. Valid statuses are
Initial (INI), Acknowledged (ACK), Normal (NRM), or Idle
(IDLE).

If a tagname is entered for Variable, Hide tag or Time-stamp tag that has not been
used before, a Tag Definition dialog for the new tag will be displayed when you click
on OK or move to another tab.

84 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Group Alarm Definitions

GRO UP A LARM D EFINITIO NS


6
If two asterisks (**) appear in front of the word Alarm on the tab, it indicates
there is configuration information on the tab. When the Alarm Groups sub-tab is

Application Editor
chosen from the Alarm Definitions tab, the following is displayed:

Basics
Alarms selected

Alarm Groups
selected

Alarms can be grouped to facilitate administration or analysis. If use of the group


alarm functions is desired, enter the following information:
Alarm Group Choose a group name from the list of existing groups, or create a
new alarm group name of up to 16 alphanumeric uppercase
characters.
Message Enter a message of up to 40 alphanumeric characters to specify
the alarm message to be displayed for all alarms belonging to this
group. This text is normally placed in front of the individual
alarm text.
Hide Tag Enter the name of the tag (must be a digital type tag) that is used
to hide alarms for the group. Leave this field blank to deactivate
this feature. If a tagname is entered that has not been used
before, when you click on Add, Update, OK or move to another tab,
a Tag Definition dialog for the new tag will be displayed.

FactoryLink ECS / Application Editor Guide / 85


• TAG DEFINITION DIALOG
• Group Alarm Definitions


Audible Check this box to generate an audible signal when an alarm is
generated. If the box is not checked (default setting), no alarm is
generated.
Log Check this box to indicate an alarm belonging to this group will
be logged in the alarm table after it is removed from the active
list. If the box is not checked (default value), the alarm will not be
logged to the table after being removed from the active list.
Print Device # Enter the number of the print device where the alarm state
changes will be routed for printing. This number corresponds to
the line number of the print device identified in the Print Spooler
Information panel. The default blank or 0 disables this function.
ACK Indicate whether or not the alarms belonging to this group will
need to be acknowledged by the operator. Valid values are:
NO Operator acknowledgment is not required. The
alarm disappears from the active list when it
returns to normal. This is the default setting.
YES Operator acknowledgment is required. The
acknowledge time and operator are logged, if
configured for such.
RST The operator must acknowledge the alarm but
cannot do so until the alarm has returned to
normal.
If this field is set to YES or RST, the Unack Alarms Count Tag
field in the General Alarm Setup panel must be set for the alarms
in the unacknowledged state to be counted.
Display Attributes Set the foreground and background color and whether or not the
tag will blink for the initial, acknowledged and normal state of
the alarms on the alarm display.

Click on the ADD button in the upper right hand corner of the tab to create a new
alarm group. If you are updating existing alarm groups, click on the UPDATE
button to save modifications to the record.

86 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Data-Point Logging Definitions

D ATA -P OIN T L O GG ING D EFIN ITIONS


6
The Data-Point Logging definition tab is used to specify which FactoryLink tags
are to be written to the historical databases and what trigger causes the tag

Application Editor
element to be recorded. If two asterisks (**) appear in front of the word Logging on
the tab, it indicates there is configuration information on the tab. Data Point
Logger comes with 5 preconfigured tables to which data can be written, or the

Basics
user can create other tables as needed. For each tag element recorded, the tag
name, value and time of recording are written to the Data-Point database.

Data-Point Logging can be configured to occur based on one or more of the


following:
• A change in the tag (exception logging)
• A change in a trigger tag
• a fixed-time interval

If using multiple logging methods results in a tag value being logged more than
once during a given second, any value logged after the first recorded value is
ignored.

Refer to the Data-Point Logging in the Data Logging Configuration Guide for a
detailed description of how Data-Point Logging functions.

FactoryLink ECS / Application Editor Guide / 87


• TAG DEFINITION DIALOG
• Data-Point Logging Definitions


When the Logging tab is chosen from the Tag Definition dialog, the following is
displayed:

If use of the Data-Point Logging function is desired, enter the following


information:
Log Table Choose the name of the log table to which the tag element should
be written. Data Point Logger comes with 5 tables which are
preconfigured for efficient storage and retrieval of certain tag
types. These log tables are:
FLOATVAL Used to store floating value data.
LONGANA Used to store long analog (large integer) data.
ANALOG Used to store analog (small integer) data.
LOGDATA Used to store general log data.
TRENDATA Used to store data that will be used for trend
analysis.
To create a new table, you must use the Data-Point Schema Control
panel and the Data-Point Logger Control panel in the Configuration
Manager.
Log On Change Choose this box (click on box with arrow and an “x” is displayed in
the box) if the tag data is to be recorded to the database table
when the data in the tag changes.

88 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Data-Point Logging Definitions

Log On Trigger If the tag data is to be recorded to the database table when a
trigger occurs, enter the name of the trigger tag to be used in this 6
field. If the tagname entered has not been used before, when you
click on Apply or OK or move to another tab, a Tag Definition

Application Editor
dialog for the new tag will be displayed.
Log On Interval If the tag data is to be recorded to the database table at a specific
time interval, enter the time interval number in the Log Rate

Basics
field and use the radio buttons to indicate if the interval is
seconds, minutes, hours, or days.
For example, if the tag data should be written to the database
table every 2.5 minutes, enter the number 150 in the Log Rate
field and click on the Seconds radio button.

FactoryLink ECS / Application Editor Guide / 89


• TAG DEFINITION DIALOG
• Scaling/Deadband Definitions


SC ALING /D E ADBA ND D EFINI TI ONS
Scaling is used to convert, or scale, incoming raw data to a different value range, if
needed. Use of the scaling task eliminates the need to process data through an
intermediate routing mechanism or to write code to perform the scaling function.
The scaling task, if given the conversion factor and/or offset, perform the linear
scaling calculations automatically using the formula:
mx + b = y

where x is the raw value, m is the multiplier, b is a constant and y is the result.

Deadbanding is used to indicate a band, or area, around a value that is small


enough to be insignificant, so the value does not need to be recalculated. This
saves processing time and improves system efficiency.

If two asterisks (**) appear in front of the word Scale/Deadb on the tab, it indicates
there is configuration information on the tab.

When the Scale/Deadband tab is chosen from the Tag definition dialog, the
following is displayed:

When raw and scaled ranges are specified as a value, the system will
automatically create and define the following tags associated with the tag
tagname:

90 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Scaling/Deadband Definitions

• tagname.raw
• tagname.eumin 6
• tagname.eumax

Application Editor
• tagname.rawmin
• tagname.rawmax
• tagname.dead

Basics
• tagname.lock

For a scaled tag configured in the Application Editor, the value is calculated on
change and written to the scaled tag tagname. Note that for a scaled tag
configured in the Configuration Manager, the value is written to the tagname.raw
tag, and the scaling is performed.

The tag names assigned for the deadbanding and lock functions can be replaced
with other tag names, if desired.

Refer to Scaling & Deadbanding in the Core Tasks Configuration Guide for a more
information on the Scaling and Deadbanding function.

If use of the scaling or deadbanding function is desired, enter the following


information:
Scaling Values Enter the minimum and maximum values for the raw (incoming)
data and the minimum and maximum values for the scaled
(engineering units) data that will be displayed in FactoryLink.
For example: the temperature in a tank needs to be monitored in
a range between freezing and boiling. The tank temperature
probe records incoming (raw) data in a Celsius scale, and you
prefer to have the temperatures displayed in FactoryLink
(engineering units) of a Fahrenheit scale. Enter the following
values in the fields:
Raw High: 100 (the boiling point in the Celsius scale)
Raw Low: 0 (the freezing point in the Celsius scale)
Eng Unit High: 212 (the boiling point in the Fahrenheit scale)
Eng Unit Low: 32 (the freezing point in the Fahrenheit scale)
FactoryLink will automatically determine the appropriate scaling
values and convert incoming data to the engineering unit values.

FactoryLink ECS / Application Editor Guide / 91


• TAG DEFINITION DIALOG
• Scaling/Deadband Definitions


Disable Tag When you specify a scaling function for a tag, FactoryLink
automatically creates a tag named tagname.lock that will perform
a disabling function to temporarily disable the scaling feature for
the tag. If desired, you can enter the name of a different tag to
perform this function.
Deadbanding When you specify a scaling function for a tag, FactoryLink
automatically creates a tag named tagname.dead that will
perform a deadbanding function for the tag. Deadbanding is used
to create a band, or area, around a tag value. If the tag value
remains within this band, the value is not rewritten to the
database. If the tag value exceeds this range, the tag value is
rewritten, and a band around the new value is recalculated.
Therefore, the deadband value should be small enough that the
change would not be important enough to require attention. If
desired, you can enter the name of a different tag, or a constant
value to perform this function.
For example, if a temperature change of 2 degrees in either
direction is not considered significant, enter a 2 in the
deadbanding value field and choose the Absolute Change radio
button. If a change of 2% of the value was not considered
significant, a 2 could be entered in the deadbanding value field
and the Percent Change radio button could be chosen.

If a tagname is entered in one of these items that has not been used before, when
you click on OK or move to another tab, a Tag Definition dialog for the new tag will
be displayed.

92 / FactoryLink ECS / Application Editor Guide


TAG DEFINITION DIALOG
Device Interface

D EVICE IN TERFAC E
6
The Device Interface tabs all refer to protocol-specific tasks for external devices
that could be providing data to FactoryLink. Tabs will only be displayed for the

Application Editor
protocol-specific modules that have been installed for your particular system. The
data for this tag is either coming from or going to a device that supports the
protocol used by the task. Certain address and table information for the external

Basics
device must be entered. Choose the tab for that device, and a dialog similar to the
one below is displayed. The actual fields will vary, depending on the type of
protocol module that is used. For detailed information on each type of external
device, refer to the FactoryLink ECS Device Interface Guide.

Address Information such as the logical station number, type, port


Information number, read table name and data type will be entered for the
tag. A detailed explanation for each field is provided in the Device
Interface Guide.
Table Information Information about the selected table, such as the read and write
(read only) trigger, whether information is written automatically or on
exception, and whether or not an unsolicited read will be
performed, are displayed for the read table specified above. A
detailed explanation for each field is provided in the Device
Interface Guide.

FactoryLink ECS / Application Editor Guide / 93


• TAG DEFINITION DIALOG
• Device Interface


If a tagname is entered in one of these items that has not been
used before, when you click on OK or move to another tab, a Tag
Definition dialog for the new tag will be displayed.

94 / FactoryLink ECS / Application Editor Guide


Data Reporting Configuration Guide

Part II






























Screen Construction

95
Screen Construction in the Application Editor Screen Construction in this book
Guide
Table of Contents





Screen Construction

7 Drawing Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
The Drawing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Selecting Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Drawing Simple Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Drawing a Straight Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Drawing a Curved Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Drawing a Square or Rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Drawing a Polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Drawing a Circle or Oval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Drawing an Arc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Drawing a Parabola . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Drawing a Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Adding Text to a Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Creating Composite Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Combining Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Connecting Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Separating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

8 Editing Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115


The Editing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Setting Object Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Setting Line Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Setting Object Fill Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Setting Text Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Cutting Copying, Pasting and Deleting Objects . . . . . . . . . . . . . . . . . . . . . 124
Cutting an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Copying an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Pasting an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Deleting an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Moving and Aligning Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

FactoryLink ECS / Application Editor Guide / 97



Screen Construction



Moving an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Aligning Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Rotating an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Snapping an Object to the Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Reshaping and Resizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Reshaping an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Resizing an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Resizing Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Object Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Moving and Object Front or Back . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Working With Object Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Renaming an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Searching for an Object in a Drawing . . . . . . . . . . . . . . . . . . . . . . . . . 135

98 / FactoryLink ECS / Application Editor Guide


Chapter 7





Drawing Objects

This chapter includes instructions for drawing each of components used to develop
user-interface screens. The following topics will be covered:
• A description of the drawing tools including the Application Editor menu bar
and toolbox.
• Instructions on how to use the tools to draw objects on the screen.

Screen Construction

FactoryLink ECS / Application Editor Guide / 99


• DRAWING OBJECTS
• The Drawing Tools


T HE D RA WI NG T OO LS
The Application Editor provides a variety tools through the menus and the
Tooslbox to assist you in developing a drawing.

The Menus

The Draw, Attributes, and Edit menus are the primary menus used when first
developing your screens. The Draw menu includes includes the commands for
drawing all objects. The Attributes menu includes commands for specifying the
line, fill, text and screen styles and for defining an objects name. The Edits menu
includes commands for selecting and editing objects.

The Tools box

The tools box provides quick access to many of the drawing tools found in the
Draw and Edit menus. It also includes tools found in other menus such as
Animation and Application.

The Tools box is displayed by default. Choose View>Toolbox to toggle the Tools box
open or closed.

The following illustrates the Tools box and indentifies the tools used for drawing
and selecting objects.

Select

Text Line Polygon

Box Ellipse (circle) Arc

Parabola Spline (curve) Legend

Other tools will be identified as needed throughout this manual.

100 / FactoryLink ECS / Application Editor Guide


DRAWING OBJECTS
The Drawing Tools

Selecting Objects
Once an object is drawn, you can perform many actions on it, such as cutting,
pasting, grouping, changing their size, setting display characteristics and
animating, to name a few. Before you can perform an action on an object, it must
be selected. This section describes how to select objects.

To select an object, choose Edit>Select Object. The cursor will become an arrow.

Selecting Simple Objects

To select a single object, place the cursor inside the object and click the left mouse
button. Eight solid blocks or handles appear around the object, indicating it is
selected. An additional handle appears in the middle of the object. This handle is
used for moving the object.

7
Move Handle

Screen Construction
Selection
Handles

Selection Cursor Tool

Selecting a Group of Objects

To select a group of objects, press and hold the left button and drag a border
around the objects you want to select, then release the mouse button. The border
must completely enclose every object you want to select. Handles appear around
the group.

Drag a border
around the objects Selection
to be selected Handle

FactoryLink ECS / Application Editor Guide / 101


• DRAWING OBJECTS
• The Drawing Tools


Selecting a Composite Object

Composite objects are two or more subobjects grouped together. To select a


composite object, place the cursor inside the object and click the left mouse button.
Hollow blocks or handles appear around the object, indicating it is selected.

Composite Select Handle

If the selected object site is on top of another object site and you select again, the
Application Editor displays the composite selection handles for the next layered
object.

Selecting a Subobject

You select individual sub-objects contained within the composite object without
ungrouping the composite by choosing Edit>Select Subobject from the Edit menu.
Perform the following steps to select subobjects comprising a composite object.

1 Select a composite object. Composite select handles appear around the entire
object.

2 Hold the Ctrl key down while clicking on the subobject with the selection tool. A
solid line borders the composite object and selection handles appear around the
selected subobject.

Optionally, you choose Edit>Select Subobject and then click on the subobject to
select it.

Subobject Select Handle

102 / FactoryLink ECS / Application Editor Guide


DRAWING OBJECTS
The Drawing Tools

If the selected subobject is a simple object, its handles are solid. If the selected
subobject is another composite, its handles are hollow. You can repeat this
procedure to go a layer deeper until there are no more composite objects to select.

As you select different subobjects within the composite, the selection handles
relocate to the selected subobject.

To select a composite object in an overlapping layer, click outside the a subobject


but within its composite. The solid border around the composite changes to the
composite selection handles. To deselect the composite entirely, click anywhere
outside of the composite. The composite selection handles disappear.

Undo
To reverse the last action performed in the active drawing, choose Edit>Undo.
Undo operates on a per drawing basis. You can undo the last action performed in
each open drawing after making the drawing active. The last action performed is 7
displayed next to the Undo option when you access the Edit menu.

Screen Construction
The Undo option does not undo any element names created with the last action.
The element names remain in the object list.

If the last action performed cannot be reversed, the Undo option is displayed gray
and cannot be selected.

FactoryLink ECS / Application Editor Guide / 103


• DRAWING OBJECTS
• Drawing Simple Objects


D RAW IN G SIM PLE OB JE CTS
Simple objects are single objects, such as lines, circles, and text, that are not
composed of any other objects. They are the basic building blocks of a graphics
display. For example, the following are simple objects.

TextString

You must select each object individually to perform an action on it, such as to
move it.

D RAW IN G A S TRA IGH T L IN E


1 Choose Draw>Line.

2 Place the cursor where you want the line to start and press the left mouse button.

3 Drag the cursor to draw a line in the drawing area. Continue dragging the cursor
until the line is the desired length, then release the mouse button.

D RAW IN G A S PLIN E (C U RVED L IN E )


1 Choose Draw>Spline.

2 Place the cursor where you want the curved line to start and press the left mouse
button.

104 / FactoryLink ECS / Application Editor Guide


DRAWING OBJECTS
Drawing a Square or Rectangle

3 Drag the cursor to draw a line in the drawing area. Continue dragging the cursor
until the line has the same endpoint as the desired curve, then release the mouse
button.

4 Move the cursor to another position and press the left mouse button. The end
point of the line moves to the point where you released the button, making a
best-fit curve based on the starting point of the cursor, the first point where you
released the mouse button, and the second point where you released the mouse
button.
7

Screen Construction
5 Repeat Step 4 until the curve is the desired shape.

6 Press the right mouse button to end drawing of the curved line.

D RAW ING A S QU ARE OR R EC TANG LE


1 Choose Draw>Box.

2 Place the cursor where you want the rectangle or square to start and press the left
mouse button.

FactoryLink ECS / Application Editor Guide / 105


• DRAWING OBJECTS
• Drawing a Polygon


3 Drag the cursor to draw a box in the drawing area. Continue dragging the cursor
until the box is the desired shape, then release the left mouse button.

D RAW IN G A P O LYGO N
1 Choose Draw>Polygon.

2 Place the cursor where you want the polygon to start and press the left mouse
button.

3 Drag the cursor to draw a line in the drawing area. You must draw the first line
by dragging the cursor or it will disappear when you press the right mouse button
to complete the polygon.

4 Release the left mouse button.

5 Move the cursor to another position in the drawing area and press the left button.
Another line is displayed that connects the current point to the previous point.
Repeat this step until the polygon is the desired shape.

6 Press the right mouse button to end drawing of the polygon.

106 / FactoryLink ECS / Application Editor Guide


DRAWING OBJECTS
Drawing an Ellipse (Circle or Oval)

D RAW ING AN ELLIPS E (C IR CLE OR OV AL )


1 Choose Draw>Ellipse.

2 Place the cursor where you want the ellipse or circle to start and press the left
mouse button.

3 Drag the cursor to draw an ellipse or circle in the drawing area. Continue
dragging the cursor until the object is the desired shape, then release the left
mouse button.

Screen Construction
D RAW ING AN A RC
1 Choose Draw>Arc.

2 Place the cursor where you want the arc to start and press the left mouse button.

3 Drag the cursor to draw an ellipse or circle in the drawing area.

4 Continue dragging the cursor to enlarge or shrink the ellipse or circle to the
desired size, then release the mouse button.

5 Press and hold the left mouse button down. The ellipse or circle disappears. Drag
the cursor to display a pie-shaped wedge with the same radius as the ellipse.

FactoryLink ECS / Application Editor Guide / 107


• DRAWING OBJECTS
• Drawing a Parabola


6 Drag the cursor until the arc is the desired size

7 Release the mouse button. The sides of the wedge disappear leaving an arc in the
drawing area.

D RAW IN G A P AR ABO LA
1 Choose Draw>Parabola.

2 Place the cursor where you want the parabola to start and press the left mouse
button.

3 Drag the cursor to draw a line in the drawing area. Continue dragging the cursor
until the line has the same end point as the desired parabola, then release the
mouse button.

4 Place the pointer anywhere on the line and press the left mouse button. Drag the
cursor until the parabola is the desired shape, then release the left mouse button.

108 / FactoryLink ECS / Application Editor Guide


DRAWING OBJECTS
Drawing a Legend

D RAW ING A L E GEND


A legend is a rectangle that is already scaled with division marks and labeled
from 0 to 100. You can use legends as labels for the axes of graphs and charts or
with movable objects, such as a slider.

Perform the following steps to draw a ruled legend.

1 Choose Draw>Legend.

2 Place the cursor where you want the legend to appear and click the left mouse
button.

3 Drag the cursor to draw a box in the drawing area.

Screen Construction
4 Continue dragging the cursor until the box is the desired shape, then release the
left mouse button. A rectangle is displayed with a scale that is divided into five
equal units and each unit is divided into quarters. The scale is labeled from 0 to
100.

The scale grows and shrinks with the size of the rectangle. If you draw the
rectangle vertically, the scale is displayed on the right; and if you draw the
rectangle horizontally, the scale is displayed along the top.

FactoryLink ECS / Application Editor Guide / 109


• DRAWING OBJECTS
• Adding Text to a Drawing


A DDIN G T EXT TO A D RAW ING
When drawing objects to be animated as data input fields (such as text objects),
the order in which you draw the objects determines the order in which the cursor
moves to each field when the T AB key is pressed.

1 Choose Draw>Text.

2 Place the cursor where you want the text to appear and click the left mouse
button. A text bar is displayed.

3 Type the text you want to appear in the drawing.

110 / FactoryLink ECS / Application Editor Guide


DRAWING OBJECTS
Creating Composite Objects

C REATIN G C OM POS ITE O BJECTS


Composite objects are collections of objects. That is, two or more objects grouped
together to form a single object.

You can group simple objects into composite objects in one of two ways.
• Combining—Groups two or more objects as a composite object retaining their
original shape and position.
• Connecting—Groups two or more objects as a composite object and connects
their points. The look of the object will change based on its point locations.

Combining Objects
The combining method groups two or more objects as a composite object, retaining
their original shape and position. You can combine objects in one of two ways:
using the Edit menu or from the toolbar. This section describes how to combine 7
objects using the Edit menu.

Screen Construction
Perform the following procedure to combine objects.

1 Select the objects you want to group.

2 Choose Edit>Combine.

The chosen objects are combined. The attributes, name and animation for each
individual object are preserved. A new object name is assigned to the composite
object.

FactoryLink ECS / Application Editor Guide / 111


• DRAWING OBJECTS
• Creating Composite Objects


Connecting Method
The connecting method joins two or more objects to form a single object. It does
this by adding a line from one end point to another end point until the group forms
a single object. Connection starts with the object closest to the lower-left corner of
the selected group. For example, if you draw two of the lines needed to form a
triangle like that shown below, the third line is drawn to connect the two lines.

Before connect After connect

You can connect objects in one of two ways: through the Edit menu or from the
toolbar. Perform the following procedure to connect objects.

1 Select the objects you want to connect.

2 Choose Edit>Connect.

A new object name is assigned to the composite object.

112 / FactoryLink ECS / Application Editor Guide


DRAWING OBJECTS
Creating Composite Objects

Separating Objects
When two or more objects have been combined or connected to comprise a
composite object, you can separate them as individual objects. Perform the
following procedure to separate objects.

1 Select the objects you want to ungroup. Refer to “Selecting Objects” on page 101
for details.

2 Choose Edit>Separate.

The name, attributes and animation for each individual object are preserved, but
the composite object name is discarded. Note that when a composite object is
created, each individual object can be defined to have the same or different
attributes and animation. When a composite object is separated, each individual
object maintains the attributes and animation that were defined for it.
7

Screen Construction

FactoryLink ECS / Application Editor Guide / 113


• DRAWING OBJECTS
• Creating Composite Objects

114 / FactoryLink ECS / Application Editor Guide


Chapter 8





Editing Objects

Once an object is selected, you can perform many actions upon it. This chapter
describes how to perform these actions.
• Setting object attributes
• Copying an object
• Pasting an object
• Deleting an object
• Aligning an object
• Moving an object to front or back 8
• Reshaping an object

Screen Construction
• Moving the placement of an object
• Rotating an object
• Resizing an object
• Resizing text
• Reversing last action

FactoryLink ECS / Application Editor Guide / 115


• EDITING OBJECTS
• The Editing Tools


T HE E DITING T O OLS
The Application Editor provides a variety tools through the menus and the Tools
box to assist you in editing a drawing.

The Menus

The Attributes and Edit menus are the primary menus used for editing the
components of your screens. The Attributes menu includes commands for
specifying the line, fill, text and screen styles and for defining an objects name.
The Edits menu includes commands for selecting and editing objects.

The Tools box

The Tools box provides quick access to many of the drawing tools found in the
Attributes and Edit menus. It also includes tools found in other menus such as
Draw and Animation.

The Tools box is displayed by default. Choose View>Toolbox to toggle the Tools box
open or closed.

The following illustrates the Tools box and indentifies the tools used for editing
and selecting objects.

Select Reshape Rotate

Cut Copy Paste

Align Bring to Front Send to Back

Combine Connect Separate

Line Attributes Fill Attributes Text Attributes

Other tools will be identified as needed throughout this manual.

116 / FactoryLink ECS / Application Editor Guide


EDITING OBJECTS
Setting Object Attributes

SETTIN G OBJEC T A TTR IBUTES


You can assign attribute and animation to an object. An object’s attributes control
how it is displayed, such as its color, fill pattern, or text style. The chart below
shows the attributes associated with each object type.

Table 8-1 Attributes Associated with each Object Type

Attributes

Line Fill Text


Object
Color Style Color Style Font Color Style

Line X X X X

Arc X X X X
8

Screen Construction
Parabola X X X X

Box X X X X

Ellipse X X X X

Polygon X X X X

Spline X X X X

Text X X X X X X X

Legend X X X X X X X

The rest of the chapter describes how to set or change these attributes for objects
included in your drawings.

FactoryLink ECS / Application Editor Guide / 117


• EDITING OBJECTS
• Setting Line Attributes


SE TTING L INE A TTRI BUTES
Each time you start the Application Editor, the line color is set to white, and the
line style to solid. This section describes how to change the color and style (solid or
dash) of a line. Once set, any new lines drawn inherit the existing attributes. If
you want to change the color or style of an existing line, you must select the line
before performing the following procedure.

1 If you are changing the color and style attributes of existing lines, choose the
object containing the lines; otherwise, proceed to the next step.

2 Choose Attributes>Lines to display the Line Attributes dialog. The Sample field shows
the current settings. This field changes when you make a new selection.

3 Make a choice in each of the following fields.


Color Select the line color. This palette provides 64 colors. For VGA
monitors that can display only 16 colors, unavailable colors show
as multi-colored dots. If you choose a dithered color, the line is
shown in the closest solid color available.
Style Choose a line style. Your options are a solid or a dashed line.
Visible Specify whether or not the line is visible. If the line is chosen it is
visible.

4 Choose OK to save the line attributes. Any chosen lines and any new lines drawn
acquire these attributes.

118 / FactoryLink ECS / Application Editor Guide


EDITING OBJECTS
Setting Object Fill Attributes

SETTIN G OBJEC T F I LL A TTRIB UTES


Each time you start the Application Editor, the fill style is set to transparent, the
foreground fill color to white, and the background fill color to black. This section
describes how to change the fill color and transparency of an object.

Once set, any new objects drawn inherit the existing attributes. If you want to
change the fill color or transparency of an existing object, you must select the
object before performing the following procedure.

1 If you are changing the fill color and transparency attributes of an existing object,
select it; otherwise, proceed to the next step.

2 Choose Attributes>Fillto display the Fill Attributes dialog. The Sample field shows the
current settings. This field changes when you make a new selection.

3 Select a fill style from the Style palette. This can be one of the following. Screen Construction
Solid Fills objects with the color chosen in the Foreground color palette.
Any background color chosen is ignored.
Transparent Makes objects transparent so only the object’s outline is visible.
The color used is the color chosen for displaying lines.
Hatch Fills objects with a pattern of lines or dots (depending on the
platform) in the foreground and background colors chosen.

FactoryLink ECS / Application Editor Guide / 119


• EDITING OBJECTS
• Setting Object Fill Attributes


4 Select a foreground color from the Foreground color palette. This palette provides
64 colors. For VGA monitors that can display only 16 colors, the other 48 colors
show as multi-colored dots.

5 If you select hatch as the fill style, select a background color from the Background
color palette. This palette provides 64 colors. For VGA monitors that can display
only 16 colors, unavailable colors show as multi-colored dots.

6 Chose OK to save the attributes. Any chosen objects and any new objects drawn
acquire these attributes.

120 / FactoryLink ECS / Application Editor Guide


EDITING OBJECTS
Setting Text Attributes

SETTIN G T EXT A TTRIBU TES


You can set the text attributes of font, font height, color, style, and alignment for
new text, or change these attributes for existing text. The font, font height, color,
and style attributes apply to all text, static or animated. The alignment attribute
applies only to animated text.

Each time you start the Application Editor, the text color is set to white, the font
size is set to 16-point, and the font style is set to System. This section describes
how to change these attributes for a text object.

Once set, any new text objects drawn inherit the existing attributes. If you want
to change the attributes of an existing text object, you must select the object
before performing the following procedure.

1 If you are changing the attributes of an existing text object, select it; otherwise,
proceed to the next step. 8
2 Choose Attribute>Text to display the Text Attributes dialog. The current settings

Screen Construction
show in the Preview box at the bottom of this box.

3 Choose from the following attributes.


Font Name Select the font you want to use from the available typefaces. Use
the scroll bar to display all the options. For portability to other
platforms, use True Type or Type 1 fonts.
Font Size Select the size of the font ranging between 4 to 128 points.

FactoryLink ECS / Application Editor Guide / 121


• EDITING OBJECTS
• Setting Text Attributes


Text Color Select the color of the text. This palette provides 64 colors. For
VGA monitors that can display only 16 colors, unavailable colors
show as multi-colored dots.
Background Color Select the color that is displayed behind the text. This palette
provides 64 colors. For VGA monitors that can display only 16
colors, the other 48 colors show as multi-colored dots.
Style Choose a text style. This can be one of the following.
Bold Displays text in boldface type.
Italic Displays text in italicized type.
Underline Displays text with a line under it.
Opaque Places a solid background behind the text to hide
anything behind the text. Animated text always
receives an opaque background.
Border Places a box around the text in the color and style
chosen for line attributes.
Variable Enables resizing using the resize handles. This
option is only used in OS/2 and we recommend
that you do not use it because of portability issues.
Other platforms let you proportionally resize text
without this option chosen.
Clip Hides the end of static text at runtime when the
text exceeds its bounding box. (Static text is text
that is not animated.) For example, if the window
is slightly larger at runtime than when you
created it, the text size may increase to maintain
the same proportions. In some cases the new font
size is larger than the size of the bounding box,
causing the text to exceed its bounding box.
Alignment Select the alignment of animated text within the text field. This
applies only to text animated as input text or output text and can
be one of the following.
Left Left-justifies the text within the field. You must
specify this option for text fields that contain
messages.
Center Centers text horizontally within the field.

122 / FactoryLink ECS / Application Editor Guide


EDITING OBJECTS
Setting Text Attributes

Right Right-justifies the text within the field. You must


specify this option for text fields that contain
analog text.
Top Places the text at the top of the field.
Middle Centers the text vertically within the field.
Bottom Places the text at the bottom of the field.

4 Choose OK to save the attributes. Any chosen objects and any new objects drawn
acquire these attributes.

Screen Construction

FactoryLink ECS / Application Editor Guide / 123


• EDITING OBJECTS
• Cutting Copying, Pasting and Deleting Objects


C UTTING C O PYIN G , P ASTIN G AND D ELETIN G OB JE CTS

Cutting an Object
This section describes how to cut objects. Perform the following procedure to cut
objects.

1 Select the objects you want to cut.

2 Choose Edit>Cut.

The name, attributes and animation for each individual object are preserved with
the object.

Copying an Object
This section describes how to copy objects. Perform the following procedure to copy
objects.

1 Select the objects you want to copy.

2 Choose Edit>Cut.

The name, attributes and animation for each individual object are preserved with
the object.

Pasting an Object
This section describes how to paste objects that have been copied or cut. Perform
the following procedure to paste objects.

1 Cut or copy the objects you want to paste, as described above.

2 Choose Edit>Paste. The cursor changes to a crosshair (+).

3 Position the cursor in the in the area of the drawing where you would like to place
the objects and press the left mouse button. The objects are pasted into the
drawing.

The name, attributes and animation for each individual object are preserved with
the object.

The Application Editor will remain in paste mode until a different function is
chosen. Repeated clicks of the left mouse button will result in additional pastes

124 / FactoryLink ECS / Application Editor Guide


EDITING OBJECTS
Cutting Copying, Pasting and Deleting Objects

Deleting an Object
This section describes how to delete objects. Perform the following procedure to
delete objects.

1 Select the objects you want to delete.

2 Choose Edit>Delete. The objects are removed from the drawing area.

Screen Construction

FactoryLink ECS / Application Editor Guide / 125


• EDITING OBJECTS
• Moving and Aligning Objects


M OVIN G AND A LIG NING O BJECTS

Moving an Object
When you select an object, eight handles appear around the object and one is
displayed in the middle of the object. You can use the middle handle to move the
object to another location.

Move Handle

Perform the following steps to move an object.

1 Select the object you want to move.

2 Place the cursor on the middle handle, then press and hold the left mouse button.
The handles disappear.

3 Drag the object to its new location, then release the mouse button.

126 / FactoryLink ECS / Application Editor Guide


EDITING OBJECTS
Moving and Aligning Objects

Aligning Objects
The Application Editor aligns objects based on their bounding boxes. You can
align objects along a vertical line (left, center, or right), along a horizontal line
(top, center, or bottom) or equidistantly so they have an equal amount of space
between them. Perform the following steps to align objects.

1 Select the objects you want to align.

2 Choose Edit>Align to display the Align, Space, and Size dialog.

Alignment 8
Optionas

Screen Construction
Equidistant
Spacing
Options

Sizing
Options

This dialog provides options that control:


• Horizontal and vertical alignment
• Space between objects
• Size of objects

FactoryLink ECS / Application Editor Guide / 127


• EDITING OBJECTS
• Moving and Aligning Objects


3 Select the box next to the horizontal and vertical alignment you want. An X is
displayed in the box. If you do not define an alignment for either horizontal or
vertical, the objects keep their current alignment.
Left side alignment
Vertical (column) Center column alignment
alignment
Right side alignment

Bottom alignment

Horizontal (row)
alignment Center row alignment
Top alignment

4 Select the box next to the equidistant spacing you want. An X is displayed in the
box.

Equidistant
horizontal Equidistant vertical (column) spacing
(row) spacing

5 Select the box next to the sizing you want. An X is displayed in the box. Sizing
stretches or shrinks all chosen objects to the same size, either horizontally or
vertically.
Vertical (column)
stretching
Vertical (column) shrinking

Horizontal (row) shrinking


Horizontal (row)
stretching

128 / FactoryLink ECS / Application Editor Guide


EDITING OBJECTS
Moving and Aligning Objects

6 Click OK. The chosen group of objects align accordingly.

Note

If you use the vertical Space option with text objects whose bounding
boxes are larger than the text, then the space between the text is
unequal, although the space between the bounding boxes is equal. To
ensure equal vertical spacing between text objects whose bounding
boxes are larger than the text, first use the Grow/Shrink option on the
chosen text objects to shrink the bounding boxes to the text. Then, use
the vertical Space option.

Screen Construction

FactoryLink ECS / Application Editor Guide / 129


• EDITING OBJECTS
• Rotating an Object


R OTA TING AN O BJECT
The rotate command allows you to rotate a polygon, line, box, ellipse, arc,
parabola, or spline 90 degrees in a clockwise direction. Composite objects made up
of any of the previously mentioned simple objects can also be rotated.

The pivot point is always set to the bounding box center.

1 Select the object you want to rotate

2 Choose Edit>Rotate. This turns the object 90 degrees clockwise.

3 Choose Edit>Rotate to turn the object again.

130 / FactoryLink ECS / Application Editor Guide


EDITING OBJECTS
Snapping an Object to the Grid

SNA PPING AN OBJEC T TO THE G RID


This section describes how to snap an object to the grid.

1 Select the objects you want to snap.

Screen Construction
2 Choose Edit>Snap. This snaps the four corners of the object’s bounding box to the
nearest grid points. The object is resized to fit in its bounding box.

FactoryLink ECS / Application Editor Guide / 131


• EDITING OBJECTS
• Reshaping and Resizing


R ESHA PING A ND R ESIZING

Reshaping an Object
This section describes how to reshape an object.

1 Select the object you want to reshape.

2 Choose Edit>Reshape. The object’s outline is displayed with handles.

3 Point to a handle, press and hold the left mouse button and drag it. Notice the
object changes shape in response to the direction you drag the mouse. Release the
mouse button when you finish.

4 Repeat Step 3 for the other handles to adjust the shape of the object.

5 When the shape is satisfactory, choose the Select mode to cancel the Reshape
mode.

Resizing an Object
When you select an object, eight handles appear around the object and one is
displayed in the middle of the object. You can use the eight handles surrounding
the object to stretch or shrink the object.

Resize handles

Use the resize handles to stretch or shrink objects in the following directions. You
cannot use the resize handles to change the shape of the object.
• Vertically—To resize vertically, use any of the three resize handles above or
below the object.
• Horizontally—To resize horizontally, use any of the three resize handles at the
left or right of the object.
• Vertically and horizontally—To resize both vertically and horizontally, use the
corner resize handles.

You can also use handles to proportionally resize text objects. You cannot resize
text nonproportionally.

132 / FactoryLink ECS / Application Editor Guide


EDITING OBJECTS
Reshaping and Resizing

Perform the following steps to resize an object.

1 Select an object. Handles appear around the object.

2 Place the cursor on one of the handles and press the left mouse button. The
handles disappear.

3 Drag the cursor in the direction you want to stretch or shrink it until you have
achieved the desired size, then release the mouse button.

When you resize an object smaller than its handles, it may be difficult to select the
object without selecting the handles. In this case, drag a border around the object
to select it.

You can stretch text until it reaches its maximum font size. Once you reach a
font’s maximum size, further stretching only increases the size of the text’s
bounding box. The text remains at its maximum size.
8
Stretching a text bounding box beyond the text’s maximum font size affects the

Screen Construction
vertical spacing between text objects.

Resizing Text
Occasionally, the beginning or end of text disappears when text is resized. This
can happen when you resize a window at development or runtime, or when
FactoryLink resizes a drawing to fit inside its runtime window.

Before After

To fix this problem, press F8 or choose Recalc Text Clip from the Edit menu. This
recalculates the text’s bounding box so that all the text is displayed.

To avoid text clipping:


• Create your drawings in actual size view and choose Recalc Text Clip from the
Edit menu before saving the drawing.

4 If your platform supports scalable fonts such as True Type or Type 1 fonts, use
them. Fonts that only come in predefined sizes are more likely to clip.

FactoryLink ECS / Application Editor Guide / 133


• EDITING OBJECTS
• Object Placement


OB JE CT P LAC EME NT

Moving and Object Front or Back


This section describes how to move an object in front of or behind another object.

1 Select the objects you want to move to the front or back.

1 Choose Move to Front or Move to Back from the Edit menu, or choose the Move to
Front or Move to Back tools from the toolbar. The object will be moved in front of
or behind all other objects.

W ORK ING W ITH OBJE CT N A MES

Renaming an Object
When objects are drawn, there are given a numerical object name. Perform the
following steps to assign your own name to an object.

1 Select the object you want to rename.

2 Choose Object Name from the Attributes menu. The Object Name panel is
displayed.

3 Enter the name you want to assign to the object.

4 Choose OK.

134 / FactoryLink ECS / Application Editor Guide


EDITING OBJECTS
Working With Object Names

Searching for an Object in a Drawing


This section describes how to find an object in a drawing using its object name.

1 Choose Find from the Edit menu. The Select Object Name dialog box is displayed,
listing all of the top-level objects in the active drawing.

8
2 Select an object name from the list or enter an object name in the Find Object

Screen Construction
field.

Click OK. The object with that name is surrounded by handles, indicating its
location.

FactoryLink ECS / Application Editor Guide / 135


• EDITING OBJECTS
• Working With Object Names

136 / FactoryLink ECS / Application Editor Guide


Data Reporting Configuration Guide

Part III






























Object Animation

137
Object Animation in the Application Editor Object Animation in this book
Guide
Table of Contents





Object Animation

9 Animating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141


The Animation Tools . . . . . . . . . . . . . . . . ......... ......... ........ 142
Static and Animated Objects . . . . . . . . . . ......... ......... ........ 143
Dynamic and Static Attributes . . . . . . . . ......... ......... ........ 144
Object Level Animation . . . . . . . . . . . . . . ......... ......... ........ 145
Testing the Animation of a Drawing . . . . ......... ......... ........ 146
Color/analog value table . . . . . . . . . . . . . . ......... ......... ........ 147
Blink Rate . . . . . . . . . . . . . . . . . . . . . . . . . ......... ......... ........ 150

10 Animating Input/Output Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151


Animating Text as an Input Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Animating Text as an Output Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

11 Creating a Real-time Trend Chart . . . . . . . . . . . . . . . . . . . . . . . . . . 163


Animating a Real-Time Only Chart Object . . . . . . . . . . . . . . . . . . . . . . . . . 164
Assigning a Pen for the Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Animating a Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

12 Animating an Object as a Button . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

13 Paint and Bar Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181


Animating a Paint Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Animating an Object as a Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

14 Animating an Object as a Symbol . . . . . . . . . . . . . . . . . . . . . . . . . . 189


Animating Symbol Object to Represent a Value . . . . . . . . . . . . . . . . . . . . 190
Simulate Object Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

FactoryLink ECS / Application Editor Guide / 139



Object Animation



15 Working With Power Packs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Guidelines for Using Template Variables . . . . . . ......... ........ .... 197
Creating a Template Object . . . . . . . . . . . . . . . . . ......... ........ .... 198
Using a Template Object . . . . . . . . . . . . . . . . . . . ......... ........ .... 200
Displaying the Template Configuration . . . . . . . ......... ........ .... 202
Combining Template Objects . . . . . . . . . . . . . . . ......... ........ .... 203
Unresolved Template Variables . . . . . . . . . . . . . ......... ........ .... 204
Attaching Power DragOns to I/O Devices . . . . . . ......... ........ .... 205
Adding Security to Power DragOns . . . . . . . . . . ......... ........ .... 205
Print Screen Animation . . . . . . . . . . . . . . . . . . . . ......... ........ .... 208
Beep Animation . . . . . . . . . . . . . . . . . . . . . . . . . . ......... ........ .... 209
Function Key Animation . . . . . . . . . . . . . . . . . . . ......... ........ .... 210

140 / FactoryLink ECS / Application Editor Guide


Chapter 9





Animating Objects

You can animate objects in a graphics file to perform an action, such as to change
color, size, and position, or to display information. The action occurs based on the
value of an element in the real-time database. Animating objects links the object
to the data element that controls its action. There are two levels of animation.
• Object level—Animation is defined for a single object. You can apply the
following types of animation to an object.
• Input text—Operator can write values to a real-time database element.
• Output text—Displays current value of a real-time database element.
• Chart—Graphically displays element values on a strip chart.
• Legend—Displays the chart range.
• Pen—Draws the element value on a chart.
• Paint—Changes color based on limits.
• Bar—Graphically displays element values on a bar chart.
• Symbol—Graphically displays element values as symbols.
• Button—Performs an action, such as displaying another drawing.
• Template—Preserves objects, their attributes and animation for repeated use
as a baseline.
• Power VB—Allows animation scripts to be attached to FactoryLink ECS
graphic objects.
• Drawing level—Animation is defined for the drawing. You can apply the 9
following types of animation to a drawing.
• Print screen—Prints the contents of a drawing window.
• Beep—Produces an audible beep.
Object Animation
• Function key—Performs an action in response to pressing a key.

This chapter discusses the concepts you must understand to animate objects. The
remainder of this part describes how to animate objects for each animation type.

FactoryLink ECS / Application Editor Guide / 141


• ANIMATING OBJECTS
• The Animation Tools


T HE A NIM ATIO N T OO LS
The Application Editor provides a variety tools through the menus and the Tools
box to assist you in editing a drawing.

The Menus

The Animation menu is the primary menu used foranimating the components of
your screens. It includes commands for animating bars, buttons, symbols, charts,
legends, painting, and specifying text as input or output fields.

The Tools box

The Tools box provides quick access to many of the drawing tools found in the
Animate menu. It also includes tools found in other menus such as Draw and Edit.

The Tools box is displayed by default. Choose View>Toolbox to toggle the Tools box
open or closed.

The following illustrates the Tools box and indentifies the tools used for animating
and selecting objects.

Select

Output Text Input Text Paint

Bar Symbol Chart

Button Legend

Test

Other tools will be identified as needed throughout this manual.

142 / FactoryLink ECS / Application Editor Guide


ANIMATING OBJECTS
Static and Animated Objects

STATIC A ND A NIM ATED O BJECTS


Objects not animated are considered static. A drawing can contain a combination
of both object types. If you overlap an animated object with a static object, you
may get unwanted results. For example, if you place a static object on top of an
animated object, the animated object moves in front of the static object when the
value of the element associated with the animated object changes.

To prevent this from happening, insert the -o1 flag in the Program Arguments field
for the Application Editor task from the System Configuration Information panel.

The argument causes the static object to be redrawn when the value of the
animated object it overlaps changes.

Object Animation

FactoryLink ECS / Application Editor Guide / 143


• ANIMATING OBJECTS
• Dynamic and Static Attributes


D YNA MIC AN D S TATIC A TTR IBUTES
Some of the animation dialogs in the Application Editor have optional fields that
let you assign attributes associated with these fields to an object at run time.
Attributes you can assign to an object at run time are called dynamic attributes.
The following table lists these optional fields and their associated attributes.

Table 9-1 Object Attributes

Optional field Associated attribute

Foreground Color Control The object’s foreground color

Background Color Control The object’s background color

X Position Control The object’s horizontal position in the


application drawing

Y Position Control The object’s vertical position in the


application drawing

Dynamic attributes override static attributes. Perform the following steps to


assign an attribute to an object at run time.

1 Enter a tag name referencing an element in the appropriate optional field during
animation.

2 Configure another task, such as Math and Logic, to change the value of the
element. Run-time graphics reads this value and uses it to display the object in
the application drawing.

3 Set the -t flag in the Program Arguments field for the Application Editor task from
the System Configuration Information panel to control which attributes are
displayed (static or dynamic) when a screen is redrawn.
• If you set the -t flag, static attributes are displayed after a screen is redrawn.
• If you do not set the -t flag, the dynamic attributes are displayed after a screen
is redrawn.

144 / FactoryLink ECS / Application Editor Guide


ANIMATING OBJECTS
Object Level Animation

OBJEC T L EV EL A N IMA TION


Not all objects can be animated with all animation types. The following table lists
the animation types permitted for each object type.

Table 9-2 Animation Types for Each Object Type

Animation
Object
Input Out
Lgnd Paint Bar Chart Sym Button PwrVB
Text Text

Line X X X X X

Arc X X X X X

Parabola X X X X X

Box X X X X X X

Ellipse X X X X X

Polygon X X X X X

Spline X X X X X

Text X X X X X X X

Legend X X

When you open a drawing and open the Animation menu without an object
selected, a check mark is displayed next to the animation characteristic selected 9
for the drawing.

When you select an animated object and open the Animation menu, a check mark
is displayed next to each animation characteristic selected for the object. The Object Animation
animation also shows as a check mark on the toolbar.

FactoryLink ECS / Application Editor Guide / 145


• ANIMATING OBJECTS
• Testing the Animation of a Drawing


T ESTIN G THE A NIM ATION OF A D RA W ING
Perform the following steps to test the animation and attributes assigned to an
object.

1 Choose Animation>Test to display all static and animated objects in its window. If
desired, resize the window in which the drawing is displayed.

2 Choose Test Cycle (or press Enter) to test the animation of objects other than
buttons, function keys, or Power VB. Each animated object makes a single step
through its animation limits.

This tests each animated object except for those animated as buttons or function
keys by stepping once through its animation limits.

3 Choose a button or press a function key to test its animation. A dialog is displayed
indicating the action taken and tag name associated with the button or function
key.

Button or Function Key Detected


Key: key_name, Action: action,
!Tagname: name

where
key_name is the key selected from the F-KEY field on the Button or Function
Key dialog. If a key combination is used, key_name is the
combination of keys from the F-KEY field and the Shift field.
action is the selected for the button or function key from the Action field
on the Button or Function Key dialog.
name is the name of the element defined for the button or function key.

When this box is displayed, it demonstrates that the button or function key
performs as animated.

4 Choose OK to clear the box from the screen.

5 To end the test at any time, choose Test again to return to the drawing mode.

146 / FactoryLink ECS / Application Editor Guide


ANIMATING OBJECTS
Color/analog value table

C OLOR /A NALO G VALUE TAB LE

This section provides the analog values of the colors in the color palette shown
below.

0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23
24 25 26 27 28 29 30 31
32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47
48 49 50 51 52 53 54 55
56 57 58 59 60 61 62 63

The names of the colors in the color palette and their associated analog values are
displayed in the following table.

Table 9-3 Color Analog Values

Analog Analog
Color Color
Value Value 9
0 Red 1 Orange-Red

2 Orange-Red 3 Yellow Orange Object Animation


4 Yellow 5 Green-Yellow

6 Yellow-Green 7 Pale Green

8 Green 9 Lime Green

10 Sea Green 11 Aquamarine

FactoryLink ECS / Application Editor Guide / 147


• ANIMATING OBJECTS
• Color/analog value table


Table 9-3 Color Analog Values (Continued)

Analog Analog
Color Color
Value Value

12 Cyan 13 Light Blue

14 Sky Blue 15 Medium Blue

16 Blue 17 Midnight Blue

18 Cornflower Blue 19 Orchid

20 Magenta 21 Pink

22 Coral 23 Firebrick

24 Indian Red 25 Sienna

26 Brown 27 Sandy Brown

28 Khaki 29 Light Olive Green

30 Med Olive Green 31 Dark Olive Green

32 Spring Green 33 Forest Green

34 Dark Green 35 Dark Aquamarine

36 Turquoise 37 Cadet Blue

38 Slate Blue 39 Steel Blue

40 Navy Blue 41 Blue-Violet

42 Violet 43 Dark Orchid

44 Red-Violet 45 Plum

46 Maroon 47 Dark Maroon

48 Black 49 Dark Gray-4

50 Dark Gray-3 51 Dark Gray-2

52 Dark Gray-1 53 Med. Gray-6

148 / FactoryLink ECS / Application Editor Guide


ANIMATING OBJECTS
Color/analog value table

Table 9-3 Color Analog Values (Continued)

Analog Analog
Color Color
Value Value

54 Med. Gray-5 55 Med. Gray-4

56 Med. Gray-3 57 Med. Gray-2

58 Med. Gray-1 59 Light Gray-4

60 Light Gray-3 61 Light Gray-2

62 Light Gray-1 63 White

Object Animation

FactoryLink ECS / Application Editor Guide / 149


• ANIMATING OBJECTS
• Blink Rate


B LINK R ATE
Each animation type that allows for the blinking of an object provides a rate
choice of slow or fast blink. The fast blink speed within an application is controlled
by setting the -bxxxx parameter in the System Configuration panel where xxxx is
the period of blinking in milliseconds. The default is 1000 ms if this parameter is
not set.

150 / FactoryLink ECS / Application Editor Guide


Chapter 10





Animating
Input/Output Fields

You can animate text objects in two ways.


• As output fields—Displays numeric values or text messages.
• As input fields—Accepts input from the keyboard and writes it to a real-time
database element.

This chapter describes how to animate text objects as input or output fields.

10

Object Animation

FactoryLink ECS / Application Editor Guide / 151


• ANIMATIN G INPUT/OUTPUT FIELDS
• Animating Text as an Input Field


A NIM ATING T EXT A S A N I NP UT F I ELD
A text object animated as an input field accepts input from the keyboard and
writes it to a real-time database element. At run time, a reverse video cursor is
displayed in the input text field. If more than one field is animated as input text,
the cursor is displayed in input fields based on the object name or alphabetical
order.

At run time:
• Press Tab to move through the fields alphabetically according to the input text’s
object name.
• When positioned in a field, press Esc to delete old data from the field before
typing new data.
• When you enter an out-of-range value in a field, a message is displayed
notifying you of the error. Until you acknowledge the error, the system will not
update animated objects. When you acknowledge the error, the system
positions the cursor in the field containing the error.

Perform the following steps to animate a text object as an input field.

1 Choose Draw>Text.

2 Place the cursor where you want the text to be displayed and click the left mouse
button. A text bar is displayed.

3 Type the format of the text to be entered in this field. Type an uppercase X for
each character position. For example, type XXXXX for a five-character field. Input
is compared to this format. If any text is entered in this field that exceeds the
limits set by this format, the entry is rejected.

If the text to be entered in this field will contain a decimal point, you must include
a decimal in the text format, as in XXX.XXX. Input is compared to this format. If
the number of digits entered to the left of the decimal exceed the number of digits
defined in the format, the entry is rejected and asterisks are written to the
element. If the number of digits entered to the right of the decimal exceed the
number of digits defined in the format, the entry is accepted; however, it is
truncated to fit in the available positions.

If the text to be entered in this field defines the name of a window and the name of
a drawing to open in that window, use the following format if the specified action
for this field is TOP.

XXXXXXXXX[:XXXXXX]

152 / FactoryLink ECS / Application Editor Guide


ANIMATING INPUT/OUTPUT FIELDS
Animating Text as an Input Field

where the Xs before the colon define the window name. You can specify up to 16
positions to hold the window name. The Xs after the colon define the drawing
name. You can specify up to 8 positions to hold the drawing name. The drawing
name is optional.

If the text to be entered in this field defines the name of a window and the name of
a drawing to open in that window, use the following format if the specified action
for this field is DRW.

[XXXXXXXXX]:XXXXXXX

where the Xs before the colon define the window name. You can specify up to 16
positions to hold the window name. The window name is optional. The Xs after the
colon define the drawing name. You can specify up to 8 positions to hold the
drawing name.

4 The Application Editor remains in text mode so you can place the cursor in
multiple locations to add text. Change to select mode to exit text mode.

5 Select the text you want to animate.

6 Choose Animate>Input Text to display the Input Text Animation dialog. The name of
the object selected is displayed in the title.

10

Object Animation

7 Provide the following information in this panel.


Tag Enter a name to reference the element that will receive the input.
Valid Entry: standard element tag name
Valid Data Type: digital, analog, longana, float, message

FactoryLink ECS / Application Editor Guide / 153


• ANIMATIN G INPUT/OUTPUT FIELDS
• Animating Text as an Input Field


Range Check Range check parameters define the numerical limits of the
Parameters element. The operation defined in the Action field of this dialog is
not performed if the result of the operation exceeds these limits.
These fields do not apply if the tag defined in the Tag field is a
message. This field is optional.
Maximum Enter a number to indicate the high range for
the limit.
Minimum Enter a number to indicate the low range for the
limit.
Action Defines the action taken when text is entered in this field. This
can be one of the following.
SET Writes the value entered in the input field to the
real-time database element referenced by the
name defined in the Tag field on this dialog. This
action and the NUL action are the only two actions
that are valid for a message tag.
ADD Adds the value entered in the text input field to
the current value of the database element
referenced by the name defined in the Tag field on
this dialog.
SUB Subtracts the value entered in the text input field
to the current value of the database element
referenced by the name defined in the Tag field on
this dialog.
TOP Opens the window specified in the input field and
moves it to the top.
If a drawing is also specified, the drawing is
displayed in the window.
If a drawing is not specified, the default drawing
specified for the window is displayed.

154 / FactoryLink ECS / Application Editor Guide


ANIMATING INPUT/OUTPUT FIELDS
Animating Text as an Input Field

DRW Opens a drawing and places it in a window. The


DRW action only loads a drawing into a window. It
does not change the order of windows or make a
window active.
If a window is also specified, the drawing is
displayed in the specified window.
If a window is not specified, the drawing is
displayed in the current window (the window
where the operator types the window name).
PAN Moves back and forth along a chart using the
numeric range as the panning distance. This is
valid only if you are showing chart data in
historical mode. Refer to the task where you have
configured your chart for more details.
ZM Zooms in or out to expand or reduce the time
period viewed on a chart. This is valid only if you
are showing chart data in historical mode. Refer to
the task where you have configured your chart for
more details.
MOD Switches between real-time and historical mode
when displaying data on a chart. If the tag is set to
0, real-time mode is displayed. If it is set to 1,
historical mode is displayed.
NUL No action is taken. This action and the SET action
are the only two actions valid for a message tag.

The actions ON, OFF, TGL (toggle), ENB (enable), MON (momentary on), MOF 10
(momentary off), and STP (stop) are available but rarely used as actions for input
text. If any of these actions are defined, the action occurs whenever text is entered
into the input text field. For example, if the input text tag action is ON, anytime Object Animation
text is entered in the input field, the tag is set to ON.
Options> Choose this option if you want to use the field as both an input
Background text and an output text field. If this option is not selected, the
updates field can only be used to enter text.
Color Controls Defines the text foreground and background colors and blink rate
of the text field.

FactoryLink ECS / Application Editor Guide / 155


• ANIMATIN G INPUT/OUTPUT FIELDS
• Animating Text as an Input Field


Foreground Enter the name of an analog tag that defines the
color of choice for this text field at run time.
When the Tag Definition dialog is displayed, enter
the analog in the Value field that corresponds to
the desired color. Refer to Chapter 9, “Animating
Objects” for a list of analog values that correspond
to colors on the color palette.
Background Enter the name of an analog tag that defines the
color of choice for the text field background at run
time.
When the Tag Definition dialog is displayed, enter
the analog in the Value field that corresponds to
the desired color. Refer to Chapter 11, “Animating
Objects,” for a list of analog values that correspond
to colors on the color palette.
Blink Enter the name of a digital tag that controls the
blink rate of the input text. This tag is initialized
with a value according to the blink speed chosen.
This can be one of the following.
None Text does not blink. This is the default.
Slow Text blinks slowly.
Fast Provides a blink every second.
Position Controls Defines the horizontal and vertical location of the text field in the
drawing.
X Enter the name of an analog tag that controls the
horizontal location of the object in the drawing.
The value of the left side of the drawing is 0 and
the value of the right side of the drawing is 32000.
If you leave the field blank, the text is displayed
where you drew it. If you specify a tag without
writing a value to it, the value defaults to the
default value of the tag you entered.
To write a numerical value to this element,
configure a function key, the Math and Logic task,
or another real-time input so the object moves
horizontally within the display.

156 / FactoryLink ECS / Application Editor Guide


ANIMATING INPUT/OUTPUT FIELDS
Animating Text as an Input Field

Y Enter the name of an analog tag that controls the


vertical location of the object in the drawing. The
value of the bottom of the drawing is 0 and value of
the top of the drawing is 32000.
If you leave the field blank, the text is displayed
where you drew it. If you specify a tag without
writing a value to it, the value defaults to default
value of the tag you entered.
To write a numerical value to this element,
configure a function key, the Math and Logic task,
or another real-time input so the object moves
vertically within the display.
Object Security Defines the security of the object. Refer to “Security in this book”
for details on defining security classes and logins.
Security class Select the appropriate security class from the
pull-down list field.
Log Message Enter a text string to identify the object for the
security log.

8 Choose OK to save the animation information.

10

Object Animation

FactoryLink ECS / Application Editor Guide / 157


• ANIMATIN G INPUT/OUTPUT FIELDS
• Animating Text as an Output Field


A NIM ATING T EXT AS AN OUTPU T F I ELD
A text object animated as an output field can display the value of a real-time
database element. Perform the following steps to animate a text object as output
text.

1 Choose Draw>Text.

2 Place the cursor where you want the text displayed and click the left mouse
button. A text bar is displayed.

3 Type the format of the text to be displayed in this field. Type an uppercase X for
each character position. For example, type XXXXX for a five-character field.
Output is compared to this format. If the output exceeds the limits set by this
format, the displayed text is truncated; however, the total width of the field must
be enough to accommodate the longest possible entry.

FactoryLink uses proportional font spacing in displaying the text. More space is
required to display the letter w as the letter i. The Xs used to mark the text output
set the character count and width of the field. If the displayed output is within the
character count but the size of the characters displayed exceeds the width of the
field, the text displayed will be truncated.

Include a decimal in the text format, as in XXX.XXX if the text to be displayed in


this field will contain a decimal point. Output is compared to this format.

If the field is not large enough to display a particular floating-point value and only
least-significant digits up to the decimal are truncated, the task writes the value
in the number of available character positions.

If the task truncates the decimal or any digits to the left of the decimal, the task
does not write the value. Instead, it writes asterisks indicating significant digits
are lost.

If you do not specify a decimal in the field, the task writes floating-point values
with all of the digits to the left of the decimal and as many digits as possible to the
right of the decimal.

If the text to be displayed in this field is the date and time, you can enter the
format you want to use to display this information. You can specify any
combination of the following. Separate formats with the spaces and punctuation
marks (colons, dashes, commas) you want shown at run time.

158 / FactoryLink ECS / Application Editor Guide


ANIMATING INPUT/OUTPUT FIELDS
Animating Text as an Output Field

year Displays a four-digit year (1995)


yr Displays a two-digit year (95)
mon Displays an alpha month abbreviation (Feb)
mo Displays a two-digit month (01-12)
dy Displays a two-digit day of month (01-31)
hr Displays military hours (0-23)
ah Displays hour of day (1-12)
mi Displays minute
sc Displays second
ap Displays two-character am/pm indicator

4 The Application Editor remains in text mode so you can place the cursor in
multiple locations to add text. Change to select mode to exit text mode.

5 Select the text you want to animate.

6 Choose Animation>Output Text to display the Output Text Animation dialog.

10

Object Animation

7 Specify the following information:


Tag Enter a name to reference the element displayed in the text field.
To display the start time for a chart, this must be the same name
defined in the Starting Time field on the Chart Animation dialog.

FactoryLink ECS / Application Editor Guide / 159


• ANIMATIN G INPUT/OUTPUT FIELDS
• Animating Text as an Output Field


To display the end time for a chart, this must be the same name
defined in the Ending Time field on the Chart Animation dialog.
If you leave this field blank, the static text does not change. Place
a tag in the Alternate Comparison field to change the color of static
text.
The tag specified must be one of the following types: digital,
analog, longana, float, or message.
Color Changes The fields in this area define color changes when limits are met.
To define a color, you must double-click the color button to
display the color palette and select the desired color. The color
button reflects the color selected. Specify the following to effect
color changes. Do this for each limit you want to set. You can
specify up to 16 limits.
FG Specify the text color used when the limit is met.
BG Specify the background color of the text field
when the limit is met.
Blink Specify the blink animation used when the limit
is met. This field toggles through none (no
blink), slow (slow blink), or fast (fast blink).
None is the default.
*Limit Enter the limit where the change occurs. This
can either be a numeric value or the name of a
tag whose value defines the limit.
The tag specified must be one of the following
types: analog, longana, or float.
Alternate Name of the tag to compare with the defined limits to determine
Comparison Tag the text and background color. You can use the same tag name as
the one used in the Tag field of this dialog unless the tag type is
message. If you leave this field blank, no limit changes are
performed.
The tag specified must be one of the following types: digital,
analog, longana, or float.
Foreground Enter the name of an analog tag that defines the
color of choice for this text field at run time.
When the Tag Definition dialog is displayed, enter
the analog in the Value field that corresponds to
the desired color. Refer to Chapter 11, “Animating

160 / FactoryLink ECS / Application Editor Guide


ANIMATING INPUT/OUTPUT FIELDS
Animating Text as an Output Field

Objects,” for a list of analog values that correspond


to colors on the color palette.
Background Enter the name of an analog tag that defines the
color of choice for the text field background at run
time.
When the Tag Definition dialog is displayed, enter
the analog in the Value field that corresponds to
the desired color. Refer to Chapter 11, “Animating
Objects,” for a list of analog values that correspond
to colors on the color palette.
Blink Enter the name of a digital tag that controls the
blink rate of the input text. This tag is initialized
with a value according to the blink speed chosen.
This can be one of the following.
None Text does not blink. This is the default.
Slow Text blinks slowly.
Fast Provides a blink every second.
Position Controls Defines the horizontal and vertical location of the text field in the
drawing.
X Enter the name of an analog tag that controls the
horizontal location of the object in the drawing.
The value of the left side of the drawing is 0 and
the value of the right side of the drawing is 32000.
If you leave the field blank, the text is displayed
where you drew it. If you specify a tag without 10
writing a value to it, the value defaults to the
default value of the tag you entered.
To write a numerical value to this element, Object Animation
configure a function key, the Math and Logic task,
or another real-time input so the object moves
horizontally within the display.
Y Enter the name of an analog tag that controls the
vertical location of the object in the drawing. The
value of the bottom of the drawing is 0 and value of
the top of the drawing is 32000.

FactoryLink ECS / Application Editor Guide / 161


• ANIMATIN G INPUT/OUTPUT FIELDS
• Animating Text as an Output Field


If you leave the field blank, the text is displayed
where you drew it. If you specify a tag without
writing a value to it, the value defaults to default
value of the tag you entered.
To write a numerical value to this element,
configure a function key, the Math and Logic task,
or another real-time input so the object moves
vertically within the display.

8 Choose OK to save the animation information.

162 / FactoryLink ECS / Application Editor Guide


Chapter 11





Creating a Real-time
Trend Chart

You can graphically display data on charts using chart animation. Chart
animation is used in trending data and in showing statistical data.

You can chart trending data from the real-time database or a relational database.
This chapter describes how to animate chart objects for showing data from the
real-time database. Refer to Trending in the Data Reporting Configuration Guide
for details for specific details on animating charts to show trending data from a
relational database. Refer to the PowerSPC Configuration Guide for details for
details on animating charts to show statistical data.

The steps involved in creating and animating a real-time trend chart are
described below. References are made to sections of this manual that provide the
details for performing each step.

1. Draw a rectangle to contain the chart and at least one legend object next to it
or under it.

2. Animate the rectangle as a chart. Refer to “Animating a Real-Time Only Chart


Object” on page 164 for details on animating a chart.

3. Assign a pen. Refer to “Assigning a Pen for the Chart” on page 167 for details
on animating a pen.

4. Animate the legend. Refer to “Animating a Legend” on page 170 for details on
animating a legend.
11
Note
Object Animation
Trending performance is affected if the chart object is partially
covered by another window, or if the chart is only partially visible
in a window. If only a part of the chart object is visible, the chart
must be redrawn each time it is updated. This slows performance,
especially if the chart is updated frequently.

FactoryLink ECS / Application Editor Guide / 163


• CREATING A REAL-TIME TREND CHART
• Animating a Real-Time Only Chart Object


A NIM ATING A R EA L -T IM E O NLY C HAR T O BJECT
This section describes how to animate a rectangle as a chart object. The drawing
shown below is the sample chart you will animate using this procedure.

Legend

1 Select the object you want to animate as a chart. In this case, select the box to the
right of the legend.

2 Following the Attributes>Fill path, define a foreground color for the chart. You
cannot use a transparent or hatch fill style in a trend chart.

3 Choose Animation>Chart to display the Chart Animation dialog.

164 / FactoryLink ECS / Application Editor Guide


CREATING A REAL-TIME TREND CHART
Animating a Real-Time Only Chart Object

4 Complete the following required areas of the dialog.


Data Source or Enter the name of the tag that triggers one pen movement in the
Scroll Trigger Tag specified direction.
Scroll Direction Select the direction you want the trend to move. This can be up,
down, right, or left.
Initial Chart Select a scale for the chart and enter the amount of time the chart
Duration can display. For example, if you type 2 in the field and choose
Hours, the chart displays two hours of data.
Chart Scroll Enter the frequency for plotting data, expressed as unit of time
Frequency per data point. For example, type 1 and choose Secs to plot a
point every second.
Starting Time Leave this field blank. This field is not used for real-time only
trending.
Ending Time Leave this field blank. This field is not used for real-time only
trending.
Zoom Leave this field blank. This field is not used for real-time only
trending.
Pan Leave this field blank. This field is not used for real-time only
trending.
Mode Leave this field blank. This field is not used for real-time only
trending.
Cursor Position Enter an analog tag that controls the location of the value cursor
on the chart. A value cursor is a vertical or horizontal line,
depending on the trending direction, indicating the value of the
pen where it intersects the value cursor.
Chart Color Enter an analog tag that contains the value of the chart’s 11
background color.
Refer to Chapter 11, “Animating Objects” for a list of analog
values that correspond to colors on the color palette. If you leave Object Animation
this field blank, use the Fill Attributes dialog to define the
background color.
# of X Enter a positive integer to indicate the number of grid lines on
the horizontal (X) axis. If you use zero or if the Grid On/Off element
is set to 0, grid lines are not drawn.

FactoryLink ECS / Application Editor Guide / 165


• CREATING A REAL-TIME TREND CHART
• Animating a Real-Time Only Chart Object


# of Y Enter a positive integer to indicate the number of grid lines on
the vertical (Y) axis. If you use zero or if the Grid On/Off element is
set to 0, grid lines are not drawn.
Enter an analog tag that contains the value of the chart’s grid
color. Refer to Chapter 11, “Animating Objects” for a list of analog
values that correspond to colors on the color palette.
Grid Color Select a color for the grid. If the grid and the chart background
colors are the same, the grid is invisible.
Grid On/Off Enter a digital tag to turn the grid on and off. If the value of the
tag is 1 (ON), a grid is displayed on the chart. If the tag is 0
(OFF), no grid is displayed. If you leave this field blank, the grid
cannot be activated.

5 Assign a pen to the chart. Refer to “Assigning a Pen for the Chart” on page 167 for
details.

166 / FactoryLink ECS / Application Editor Guide


CREATING A REAL-TIME TREND CHART
Assigning a Pen for the Chart

A SSIGN ING A P EN FO R THE C HAR T


A trend chart uses pens to draw lines and plot data received from a database.
Each pen retrieves data from an element in the database.

You can create as many pens as you need to correspond to different sources of data
you want to trend. You can usually distinguish up to 15 pen colors, but a more
practical number is about 8 pens per chart.

Pen
Each pen draws a different trend
line. This chart uses two pens.

Pen 2

You can change the appearance of a trend line by changing the pen’s style. For
example, you can set the color of the line to blue, change the line style to dotted,
and place circles where points are plotted.

Each pen operates independently of the other pens. Pens within a single chart can
use different scales.

Perform the following steps to assign pens to a chart.

1 Choose Edit Pens from the Chart Animation dialog to display the Select Pen dialog.

2 To create a new pen, type the name of the pen object to be defined in the Pens
field. To edit a previously defined pen, select a pen from the pen list.

11

Object Animation

FactoryLink ECS / Application Editor Guide / 167


• CREATING A REAL-TIME TREND CHART
• Assigning a Pen for the Chart


3 Choose OK to display the Pen dialog.

4 Define the data to trend. One pen can trend one data element. Provide the
following information for each pen used to trend data.
Tag Tag name assigned to the real-time database element trended by
this pen. The tag specified must be one of the following types:
analog, longana, or float.
Database Leave this field blank. This field is not used for real-time only
trending.
Table Leave this field blank. This field is not used for real-time only
trending.
Column Leave this field blank. This field is not used for real-time only
trending.
Maximum Enter the maximum value the pen can plot. Values above this
limit are not plotted on the trend chart.
Minimum Enter the minimum value the pen can plot. Values below this
limit are not plotted on the trend chart.

168 / FactoryLink ECS / Application Editor Guide


CREATING A REAL-TIME TREND CHART
Assigning a Pen for the Chart

Max Tag Optionally enter the name of a tag that defines the maximum
value the pen can plot. This value replaces the value specified in
the Maximum field. Values above the limit specified in this tag are
not plotted on the trend chart.
Min Tag Optionally enter the name of a tag that defines the minimum
value the pen can plot. This value replaces the value specified in
the Minimum field. Values below the limit specified in this tag are
not plotted on the trend chart.
Color Enter the color used to display the pen. Choose a pen color by
double-clicking the color button, and then double-clicking the
color you want to use on the color palette.
Limit Define the limit at which the pen color changes. This can either
be a number or the name of a tag that contains the limit value. If
you use a tag, you can dynamically change the limit at run time.
Line Style Select the style of line drawn by the pen.
Marker Style Select the graphical symbol to display at each plotted point.
Symbols are the same color as the pen with which they are
associated.
Interpolation Style Select the type of line to use to connect points drawn by the pen.
Choose Across Gaps to connect gaps in the trending data using the
specified interpolation style. In a time-based chart, gaps occur
when a sample does not get logged at the expected frequency. In
an event chart, gaps occur when you forcibly create them.
Cursor Value Tag Enter the name of the tag that defines the plotted point of the pen
line that it intersects. The tag specified must one of the following
types: analog, longana, or float.

5 Choose OK to save the information. This returns you to the Chart Animation dialog. 11
6 Choose OK to save the information.

7 Animate the legend using the information provided in “Animating a Legend” on Object Animation
page 170.

FactoryLink ECS / Application Editor Guide / 169


• CREATING A REAL-TIME TREND CHART
• Animating a Legend


A NIM ATING A L E GEND
Perform the following steps to animate a legend for a real-time only trend chart.
Real-time only charts can only be animated based on time.

1 Select the legend object you want to animate. Verify no other objects overlap the
legend object.

2 Choose Animation>Legend to display the Legend Animation dialog.

3 Provide the following information.


Direction Select the direction in which to display the legend’s scale (major
and minor division marks).
Parent Chart Reserved for future use.
Legend Type Choose Time as the mode for the scale of the legend.
Division Type Select the scale to display between the minimum and maximum
values. This can be one of the following:
Count The legend’s scale is divided equally by the
number specified in the Major Divisions field or the
value that the operator writes to this tag at run
time. The formula used to calculate this value is:
(Maximum - Minimum) ÷ Major Divisions

170 / FactoryLink ECS / Application Editor Guide


CREATING A REAL-TIME TREND CHART
Animating a Legend

Units The legend’s scale is incremented by the number


specified in the Major Divisions field or the value the
operator writes to this tag at run time from the
minimum to the maximum.
Refer to the following example for both count and units legends
with a maximum of 100 and a minimum of 0 and 5 major
divisions. For the count legend, FactoryLink divides the scale
between 0 and 100 into 5 equal parts. For the units legend,
FactoryLink increments the scale between 0 and 100 by 5.

Count Legend Units Legend

Maximum Value = 100 100 100


95
Minimum Value = 0 90
85
Major Divisions = 5 80 80
75
Minor Divisions = 0 70
65
60 60
55
40
35
40 30
25
20
15
20 10
5
0
0
Scale Maximum Enter a maximum value for the trend chart legend. This can be
one of the following.
Value Enter a maximum value for the legend. This can
be any positive or negative integer or 11
floating-point numeric constant.
Tag Enter the tag name specified in the Ending Time
field on the Chart dialog to synchronize the time Object Animation
displayed on the legend with the time displayed on
the chart object.
Scale Minimum Enter a minimum value for the trend chart legend. This can be
one of the following:
Value Enter a minimum value for the legend. This can be
any positive or negative integer or floating-point
numeric constant.

FactoryLink ECS / Application Editor Guide / 171


• CREATING A REAL-TIME TREND CHART
• Animating a Legend


Tag Enter the tag name specified in the Starting Time
field on the Chart dialog to synchronize the time
displayed on the legend with the time displayed on
the chart object.
Number of Major Enter the number of major divisions for the trend chart legend.
Divisions This can be one of the following:
Value Enter a positive or negative integer or
floating-point numeric constant. This field works
with the Division Type field to determine how the
number of major divisions are displayed.
Tag Enter the name of a tag whose value dynamically
updates the major divisions of the legend. To
change the number of major divisions, animate an
input-text field that writes to this tag.
For example, a metric ruler 5 centimeters long
would have 5 major divisions—one for each
centimeter. This ruler would have also have 25
minor divisions—one every 2 millimeters.
Minor divisions

1 2 3 4 5
Major divisions

Number of Minor Enter the number of minor divisions for the trend chart legend.
Divisions The minor divisions are displayed between the major divisions on
the trend chart legend. This can be one of the following:
Value If the division type is count, enter any positive
integer, including zero. If the division type is
units, enter any positive or negative number.
Tag Enter the name of a tag whose value dynamically
updates the minor divisions of the legend. To
change the number of minor divisions, configure
an input animation or other task that writes to
this tag.

172 / FactoryLink ECS / Application Editor Guide


CREATING A REAL-TIME TREND CHART
Animating a Legend

Format Enter the formatting characteristics for the legend’s scale. This
can be one of the following.
year Year with four digits, for example, 1997
yr Year with two digits, for example, 97
mon Alphabetical month abbreviation, for example,
Jan, Feb, or Mar
mo Month numerically, for example, 5 (for May)
dy Day of the month using two digits, for example, 09,
10, 11, and so on
hr Hour of the day in 24-hour format (military time),
for example, 09 or 21 (9:00 am and 9:00 pm,
respectively)
ah Hour of the day in 12-hour format, for example, 9
is displayed for both 9:00 am and 9:00 pm
mi Minute, for example, 07 is displayed for seven
minutes past the hour
sc Second, for example, 07 is displayed at seven
seconds past the minute
ap am and pm
You can combine time formats, separating them
with spaces and punctuation marks as necessary.
For example, enter mon day, year to show the date
as Jan 03, 1997. Type ah:mi ap to show the time as
9:07 pm.
11
4 Choose OK when you have completed entering all the information on this panel to
save the data and return to the legend object.
Object Animation

FactoryLink ECS / Application Editor Guide / 173


• CREATING A REAL-TIME TREND CHART
• Animating a Legend

174 / FactoryLink ECS / Application Editor Guide


Chapter 12





Animating an Object as
a Button

You can animate an object so, when selected, it performs an action. For example,
you can animate a button that opens another window or closes the application.
Perform the following steps to animate a button object to perform an action.

1 Select the object you want to animate.

2 Choose Animation>Button to display the Button Animation dialog.

12
3 Fill out this panel. Provide the following information to animate the object.
Mouse Click or Select the mouse button or keystroke that activates the button. Object Animation
Key This works in conjunction with the left mouse button; that is, you
can use this method to activate the button in addition to clicking
the left mouse button.
For example, if you choose F1, you can activate the button by
pressing the F1 function key or by clicking on the button object
using the left mouse button. The following table lists the possible
options and defines the key sequence that corresponds to the
option.

FactoryLink ECS / Application Editor Guide / 175


• ANIMATING AN OBJECT AS A BUTTON



Table 12-1 Mouse or Key Options

Option Key sequence Option Key sequence

NUL None PDN Page Down

BT1 Reserved END End

BT2 Reserved HME Home

BT3 Reserved LFT Left arrow

BRK Break UP Up arrow

BSP Backspace RGT Right arrow

TAB Tab DWN Down arrow

BTB Shift+Tab PSC Print Screen

NL Enter (OS/2 only) INS Insert

ALGA Alt-Graph DEL Delete

PSE Pause SCR Scroll Lock

CLK Caps Lock ENT Enter

ESC Esc SYS SysReq

PUP Page Up F1 - F24 Function keys 1 to 24

Alt, Ctrl and Shift Select one of these to add to the alternate key sequence defined to
activate the mouse button. For example, if you specify INS in the
Mouse Click or Key field and choose Alt, you must press Alt+Insert to
use the alternate method to activate the button.

176 / FactoryLink ECS / Application Editor Guide


ANIMATING AN OBJECT AS A BUTTON

Action Defines the action taken when the button is activated. This can
be one of the following.
SET Writes the value of the Value or Tag field to the
real-time database element referenced by the
Destination Tag field on this panel.
You can use this action to open a new drawing in a
specified window. Define the name of the drawing
to display in the Value field and the name of the
window to use in the Destination Tag field.
ADD Adds the value of the Value or Tag field to the
real-time database element referenced by the
Destination Tag field on this panel.
SUB Subtracts the value of the Value or Tag field from
the real-time database element referenced by the
Destination Tag field on this panel.
TOP Opens the window specified in the Value field and
displays the drawing currently defined for the
window.
If you want to specify a different drawing, define
both the window name and drawing name
separated by a colon in the Value field, using the
following format.
window_name:drawing_name
Refer to Step 3, Animating Text as an Input Field,
for details ontext formatting.
DRW Opens a drawing and places it in the current
12
window.
MON Sets digital tag to ON when mouse is placed over Object Animation
object with left mouse button depressed. Sets tag
to OFF when the button is released.
MOF Sets digital tag to OFF when mouse is placed over
object with left mouse button depressed. Sets tag
to OFF when the button is released.
NUL No action is taken.

FactoryLink ECS / Application Editor Guide / 177


• ANIMATING AN OBJECT AS A BUTTON



Source Value or Enter the value to use to perform the action. This can either be a
Tag constant defined in the Value field or a variable defined in the Tag
field. You can only specify one of these fields.
Value Fixed constant to combine with the value in the
Destination Tag field to perform the action specified
in the Action field.
Tag Name of the tag that contains the value to combine
with the Destination Tag field to perform the action
specified in the Action field. The tag specified must
be one of the following types: digital, analog,
longana, float, or message.
Destination Tag Tag name used to reference the real-time database element that
receives the action. The tag specified must be one of the following
types: digital, analog, longana, float, or message.
Range Check Range check parameters define the numerical limits of the
Parameters element. The operation defined in the Action field of this panel is
not performed if the result of the operation exceeds these limits.
These fields do not apply if the tag defined in the Tag field is of
type message.
Maximum Enter a number to indicate the high range for
the limit.
Minimum Enter a number to indicate the low range for the
limit.
Position Controls Defines the horizontal and vertical location of the text field in the
drawing.
X Enter the name of an analog tag that controls the
horizontal location of the object in the drawing.
The value of the left side of the drawing is 0 and
the value of the right side of the drawing is 32000.
If you leave the field blank, the text is displayed
where you drew it. If you specify a tag without
writing a value to it, the value defaults to the
default value of the tag you entered.
To write a numerical value to this element,
configure a function key, the Math and Logic task,
or another real-time input so the object moves
horizontally within the display.

178 / FactoryLink ECS / Application Editor Guide


ANIMATING AN OBJECT AS A BUTTON

Y Enter the name of an analog tag that controls the


vertical location of the object in the drawing. The
value of the bottom of the drawing is 0 and value of
the top of the drawing is 32000.
If you leave the field blank, the text is displayed
where you drew it. If you specify a tag without
writing a value to it, the value defaults to default
value of the tag you entered.
To write a numerical value to this element,
configure a function key, the Math and Logic task,
or another real-time input so the object moves
vertically within the display.
Object Security Defines the security of the object.
Security class Select the appropriate security class from the
pull-down list field.
Log Message Enter a text string to identify the object for the
security log.

4 Choose OK to save the animation information.

12

Object Animation

FactoryLink ECS / Application Editor Guide / 179


• ANIMATING AN OBJECT AS A BUTTON


180 / FactoryLink ECS / Application Editor Guide


Chapter 13





Paint and Bar
Animation

This chapter describes how to:


• Animate an object with paint. You can change the color of an object as the value
of a real-time database element changes using Paint animation.
• Animate a bar object. Bar animation lets you graphically represent the value of
an element. You can change the movement and color of the bar as the value of a
real-time database element changes.

Animating a Paint Object


Perform the following steps to assign color changes to an object.

1 Select the object to be animated.

2 Choose Animation>Paint to display the Paint Animation dialog.

13

Object Animation
3 Specify the following information.
Tag Enter a name to reference the element that affects the object’s
color. The tag specified must be one of the following types: digital,
analog, longana, float, or message.
Color Changes The fields in this area define color changes when limits are met.
To define a color, you must double-click the color button to display
the color palette and choose the desired color. The color button

FactoryLink ECS / Application Editor Guide / 181


• PAINT AND BAR ANIMATION



reflects the color selected. Specify the following to effect color
changes. Do this for each limit you want to set. You can specify up
to 16 limits.
Foreground Enter the name of an analog tag that defines the
color of choice for this text field at run time.
When the Tag Definition dialog is displayed, enter
the analog in the Value field that corresponds to
the desired color. Refer to Chapter 11, “Animating
Objects,” for a list of analog values that correspond
to colors on the color palette.
Background Enter the name of an analog tag that defines the
color of choice for the text field background at run
time.
When the Tag Definition dialog is displayed, enter
the analog in the Value field that corresponds to
the desired color. Refer to Chapter 11, “Animating
Objects,” for a list of analog values that correspond
to colors on the color palette.
Blink Enter the name of a digital tag that controls the
blink rate of the input text. This tag is initialized
with a value according to the blink speed chosen.
This can be one of the following.
None Text does not blink. This is the default.
Slow Text blinks slowly.
Fast Provides a blink every second.
Position Controls Defines the horizontal and vertical location of the text field in the
drawing.
X Enter the name of an analog tag that controls the
horizontal location of the object in the drawing.
The value of the left side of the drawing is 0 and
the value of the right side of the drawing is 32000.
If you leave the field blank, the text is displayed
where you drew it. If you specify a tag without
writing a value to it, the value defaults to the
default value of the tag you entered.

182 / FactoryLink ECS / Application Editor Guide


PAINT AND BAR ANIMATION

To write a numerical value to this element,


configure a function key, the Math and Logic task,
or another real-time input so the object moves
horizontally within the display.
Y Enter the name of an analog tag that controls the
vertical location of the object in the drawing. The
value of the bottom of the drawing is 0 and value of
the top of the drawing is 32000.
If you leave the field blank, the text is displayed
where you drew it. If you specify a tag without
writing a value to it, the value defaults to default
value of the tag you entered.
To write a numerical value to this element,
configure a function key, the Math and Logic task,
or another real-time input so the object moves
vertically within the display.

4 Choose OK to save the animation information.

13

Object Animation

FactoryLink ECS / Application Editor Guide / 183


• PAINT AND BAR ANIMATION
• Animating an Object as a Bar


A NIM ATING AN OBJEC T AS A B AR
Perform the following steps to animate an object as a bar.

1 Select the object to be animated.

2 Choose Animation>Bar to display t he Bar Animation dialog.

3 Specify the following information.


Tag Enter a name to reference the element that affects the object’s
movement and color. The tag specified must be one of the
following types: digital, analog, longana, float, or message.
Maximum Enter the maximum value that can display on the uni-directional
bar. This field does not apply to bi-directional bars.
You can enter either a constant value or name of a tag that
contains the maximum value. If you enter a tag name, the upper
limit can be changed during run time. The tag specified must be
one of the following types: analog, longana, or float.
Minimum Enter the minimum value that can display on the uni-directional
bar. This field does not apply to bi-directional bars.
You can enter either a constant value or name of a tag that
contains the minimum value. If you enter a tag name, the lower
limit can be changed during run time. The tag specified must be
one of the following types: analog, float, or longana.

184 / FactoryLink ECS / Application Editor Guide


PAINT AND BAR ANIMATION
Animating an Object as a Bar

Direction Direction the color moves when the value of the tag specified in
the Tag field of this panel increases or decreases. You can
configure bars to grow either horizontally or vertically and in one
or two directions.
If you want the color movement to occur uni-directionally, choose
one of the first four options. Uni-directional bars move in only one
direction from the point of origin.
If you want the color movement to occur bi-directionally, choose
one of the last two options. Bi-directional bars move in both a
positive and negative direction from the point of origin.

The following table shows how uni-directional and bi-directional bars work.

Table 13-1 Unidirectional and Bidirectional Bars

Unidirectional Bars Bidirectional Bars

If the Tag field If the Tag field


Then the bar is: Then the bar is:
element value is: element value is:

< the Min. value not colored < the anchor moves in a
point negative
direction
(toward the
Min. value)

> the Min. value colored to the = the anchor is a single line at
and value of the Tag point the anchor
< the Max. value field element point

= the Max. value completely > the anchor moves in a 13


colored point positive
direction
(toward the Object Animation
Max. value).

Bidirectional Enter the value from which the color in a bi-directional bar
Anchor Point grows. The anchor point has no effect on uni-directional bars.
Color Changes The fields in this area define color changes when limits are met.
To define a color, you must double-click the color button to
display the color palette and select the desired color. The color

FactoryLink ECS / Application Editor Guide / 185


• PAINT AND BAR ANIMATION
• Animating an Object as a Bar


button reflects the color selected. Specify the following to effect
color changes. Do this for each limit you want to set. You can
specify up to 16 limits.
Foreground Enter the name of an analog tag that defines the
color of choice for this text field at run time.
When the Tag Definition dialog is displayed, enter
the analog in the Value field that corresponds to
the desired color. Refer to Chapter 11, “Animating
Objects,” for a list of analog values that correspond
to colors on the color palette.
Background Enter the name of an analog tag that defines the
color of choice for the text field background at run
time.
When the Tag Definition dialog is displayed, enter
the analog in the Value field that corresponds to
the desired color. Refer to Chapter 11, “Animating
Objects,” for a list of analog values that correspond
to colors on the color palette.
Blink Enter the name of a digital tag that controls the
blink rate of the input text. This tag is initialized
with a value according to the blink speed chosen.
This can be one of the following.
None Text does not blink. This is the default.
Slow Text blinks slowly.
Fast Provides a blink every second.
Position Controls Defines the horizontal and vertical location of the text field in the
drawing.
X Enter the name of an analog tag that controls the
horizontal location of the object in the drawing.
The value of the left side of the drawing is 0 and
the value of the right side of the drawing is 32000.
If you leave the field blank, the text is displayed
where you drew it. If you specify a tag without
writing a value to it, the value defaults to the
default value of the tag you entered.

186 / FactoryLink ECS / Application Editor Guide


PAINT AND BAR ANIMATION
Animating an Object as a Bar

To write a numerical value to this element,


configure a function key, the Math and Logic task,
or another real-time input so the object moves
horizontally within the display.
Y Enter the name of an analog tag that controls the
vertical location of the object in the drawing. The
value of the bottom of the drawing is 0 and value of
the top of the drawing is 32000.
If you leave the field blank, the text is displayed
where you drew it. If you specify a tag without
writing a value to it, the value defaults to default
value of the tag you entered.
To write a numerical value to this element,
configure a function key, the Math and Logic task,
or another real-time input so the object moves
vertically within the display.

4 Choose OK to save the animation information.

13

Object Animation

FactoryLink ECS / Application Editor Guide / 187


• PAINT AND BAR ANIMATION
• Animating an Object as a Bar

188 / FactoryLink ECS / Application Editor Guide


Chapter 14





Animating an Object as
a Symbol

You can use symbol animation for two purposes.


• To represent the values of an element
• To create a moving image

This chapter describes how to achieve both of these purposes.

You can use either of two methods to display symbols at run time.
• Method 1—Erases the existing symbol by redrawing the symbol’s background
(the part of the screen behind the symbol) then draws the new symbol.
Because Application Editor spends time redrawing the background to mask the
previously displayed symbol, this method affects system performance.
To use Method 1, insert a -p (not case-sensitive) in the Application Editor task
row of the Program Arguments column in the System Configuration
Information panel.
• Method 2—Draws only the new symbol.
Method 2 requires you to combine a solid object, such as a box or a circle, with
the symbol to serve as the symbol’s background. Because Application Editor
does not redraw the part of the screen behind the symbol to mask the previous
symbol, the symbol must have its own background to mask the previous symbol.
Therefore, as the new symbol is drawn on the screen, its background object
masks the previously displayed symbol.
Do not enter the -p argument in the System Configuration Information panel to 14
use Method 2.

Object Animation

FactoryLink ECS / Application Editor Guide / 189


• ANIMATING AN OBJECT AS A SYMBOL
• Animating Symbol Object to Represent a Value


A NIM ATING S YM BO L O BJECT TO R EPRE SENT A V ALU E
Perform the following steps to animate an object to represent the value of an
element.

1 Select the object you want to animate.

2 Choose Animation>Symbol to display the Symbol Animation dialog.

3 Specify the following information.


Tag Enter a name to reference the element controlling the symbol for
this object. The tag specified must be one of the following types:
digital, analog, longana, float, or message.
Shape Changes The fields in this area define the changes for this object when
limits are met. Define these for each limit you want to set. You
can specify up to 8 limits.
Blink Specify the blink animation used when the limit is
met. This field toggles through none (no blink),
slow (slow blink), or fast (fast blink). Fast blink is
the default.
Name Name of symbol to display when limit is met. This
name must match the name of an object in the
SYMBOLS.G file for this application.
Limit Enter the limit where the change occurs. This can
either be a positive or negative numeric value or
the name of a tag whose value defines the limit.

190 / FactoryLink ECS / Application Editor Guide


ANIMATING AN OBJECT AS A SYMBOL
Animating Symbol Object to Represent a Value

The tag specified must be one of the following


types: analog, longana, or float.
X Enter the name of an analog tag that controls the horizontal
location of the object in the drawing. The value of the left side of
the drawing is 0 and the value of the right side of the drawing is
32000.
If you leave the field blank, the text is displayed where you drew
it. If you specify a tag without writing a value to it, the value
defaults to the default value of the tag you entered.
To write a numerical value to this element, configure a function
key, the Math and Logic task, or another real-time input so the
object moves horizontally within the display.
Y Enter the name of an analog tag that controls the vertical
location of the object in the drawing. The value of the bottom of
the drawing is 0 and value of the top of the drawing is 32000.
If you leave the field blank, the text is displayed where you drew
it. If you specify a tag without writing a value to it, the value
defaults to default value of the tag you entered.
To write a numerical value to this element, configure a function
key, the Math and Logic task, or another real-time input so the
object moves vertically within the display.
Width Name of analog tag that contains a value that controls the width
of the symbol. The maximum width value is 32000, which makes
the symbol as wide as the display.
To configure a task to write a numerical value to this element,
configure a function key, Math and Logic, or other real-time input
so the width of the symbol changes. If no task writes a value to
this element, the symbol is displayed in its drawn width. 14
Height Name of analog tag that contains a value that controls the height
of the symbol. The maximum height value is 32,000 which makes Object Animation
the symbol as tall as the display.
To configure a task to write a numerical value to this element,
configure a function key, Math and Logic, or other real-time input
so the height of the symbol changes. If no task writes a value to
this element, the symbol is displayed in its drawn width.

4 Click OK to save the information after you complete the Symbol Animation dialog.

FactoryLink ECS / Application Editor Guide / 191


• ANIMATING AN OBJECT AS A SYMBOL
• Simulate Object Rotation


SIM ULA TE O BJECT R OTA TION
Because symbols represent the value of an element, you can use them to simulate
object rotation at run time.

PowerVB can also be used to rotate an object during run time. Refer to PowerVB
Animation in this guide for more information.

Perform the following steps to simulate object rotation.

1 Draw one symbol for each incremental position of the object’s rotation in the file
SYMBOLS.G. These symbols represent the object at run time. You can draw up to
eight symbols to represent a single object.

The following example of the SYMBOLS.G file shows a propeller drawn in four
positions so it appears to rotate in 45 degree increments.

Each of the four symbols represent the propeller object.

2 Draw a bounding box to locate the object on the drawing. The object in the
SYMBOLS.G file is sized to this object.

3 Configure an area on an Application Editor screen in which the object rotates.

4 Animate this area as a Symbol, linking the symbols drawn in the SYMBOLS file
to this area using the procedure provided in the “Animating Symbol Object to
Represent a Value” on page 190.

192 / FactoryLink ECS / Application Editor Guide


ANIMATING AN OBJECT AS A SYMBOL
Simulate Object Rotation

5 Configure a task so the element is set to the next consecutive number based on
another element, such as a timer.

As each incremental position of the propeller is displayed, the propeller appears to


rotate.

14

Object Animation

FactoryLink ECS / Application Editor Guide / 193


• ANIMATING AN OBJECT AS A SYMBOL
• Simulate Object Rotation

194 / FactoryLink ECS / Application Editor Guide


Chapter 15





Working With Power
Packs

Template animation allows you to animate an object with variables. In normal


graphics drawing, when you duplicate an object, you must edit the animation for
the new object after it is duplicated. With template animation, you define which
animation features are constant or variable for each duplicated object. When the
object is duplicated, you are prompted to provide definitions for variable
animation features.

Objects defined using variables are template objects, or Power DragOns, and the
variables defined in the object are template variables. Any object, whether simple
or composite, becomes a template object when you define one or more template
variables. They are used to perform graphical, logical, process and communication
operations and incorporate all the information necessary to display and control
automation equipment. They can define I/O communication, scaling, alarming,
logging, and security as well as define the graphical rendering of the device.

You enter a template variable in any field of an Animation dialog box that accepts
text input. You cannot enter template variables in fields where you choose
information, such as radio buttons, check boxes, list boxes and palettes.

You place Power DragOns in a library of drawings collectively known as Power


Packs. Power Pack files work just like any drawing file, except that when you
open a Power Pack file, the Application Editor is automatically in the copy/paste
mode. When you select an object from a Power Pack drawing, the Application
Editor immediately copies it into the buffer so it can be pasted into an open
drawing file. All Power Pack files have a .gp extension. 15
The Power Packs are designed to be sized to any display and provide a clear
resolution at edit and run-time. The architecture of power packs provide for easy
expansion and enhancement. Object Animation
Power DragOns fall into two general categories:
• Those that produce no tags—Many Power DragOns implement animation by
using PowerVB to directly set window, drawing, and graphic object properties,
or there may be no pre-designed animation associated with the Power DragOn.
• Those that create or reference tags—Power DragONs can create and reference
scalar or structured tags. If the prompt reads “Tag Name”, the Power DragOn
can create a scalar tag, reference an existing scalar tag or reference any

FactoryLink ECS / Application Editor / 195


• WORKING WITH POWER PACKS



memvber of an existing structured tag. If the prompt reads “Process tag name”,
it can only create or reference a structured tag.

Customization of Power DragOns is easily accomplished using the Application


Editor drawing and animation. If your customization is only desired on a single
use of the Power DragOn, you should modify the pasted Power DragOn in the
drawing. If you will be using the customized Power DragOn multiple times, either
customize the original in the Power Pack or make a copy in the Power Pack and
custoumize it.

196 / FactoryLink ECS / Application Editor


WORKING WITH POWER PACKS
Guidelines for Using Template Variables

GUID ELINES FO R U S ING T EM PLATE V ARIA BLES


This section lists the guidelines to use when defining template variables.
• The format for a template variable is a character string enclosed in braces
{ }. A template variable name has the same syntax as an element name.
• You can specify multiple template variables within a field.
For example,
{assy_line}{mach_no}
• You cannot nest template variables; that is, enclose a template variable within
another template variable. For example, the following entry is not a valid use of
a template variable.
{tnum{valvnum}}
• You can specify multiple template variables within an object’s animation
configuration. For example, you can specify both the Minimum and Maximum
fields as template variables.
• You can use the same template variable in more than one field in an object’s
animation. For example, in the Bar Animation dialog box, you can use the same
template variable for the Minimum field and the first Limit field, because the
initial value of the bar and its first limit are equal.
• You can use the same template variable in more than one object within a
composite object. For example, given a composite object that contains a bar
object and an output-text object, you can specify both objects to have the same
template variable in the Tag field of their animation dialog boxes. The text field
displays the value associated with the variable numerically, and the bar
displays the same value graphically.
• You can use template animation with object-level animation options, but not
with drawing-level animation.
15

Object Animation

FactoryLink ECS / Application Editor / 197


• WORKING WITH POWER PACKS
• Creating a Template Object


C REA TING A T EM PLATE OB JE CT
Perform the following procedure to animate an object as a template.

1 Select the object you want animate.

2 Choose Animation>Object Level Animation you wish t .

Do not choose any Drawing Level Animation types (Print Screen, Beep, or Function Key)
because template animation does not apply to these animation types.

3 Animate the object as required, but enter template variables in the fields where
you want values to be different for each instance of the object. Refer to the
appropriate section in this manual for details on each animation type.

You must enclose template variables in braces { }, and use the same syntax as an
element name. Variable names can be from 1 to 30 characters long counting the
braces, which count as two characters.

4 Click OK. The Define Template Variable dialog is displayed.

5 The name of the variable you are defining is displayed in the Variable field.

6 Specify the following information.


Prompt String Message to display to prompt for this variable definition when
this template object is duplicated. This can be a 1 to 64 character
alphanumeric string.
If you leave this field blank, the name of the template variable is
used as the prompt string.

7 Choose OK. If you entered a template variable in a field that expects a tag name,
the Tag Definition dialog is displayed.

198 / FactoryLink ECS / Application Editor


WORKING WITH POWER PACKS
Creating a Template Object

8 If you want to define this fields now, enter data for any tags that appear. Specify
the following for each tag.
• Domain
• Element type
• Dimension (if an element array)
• Default value
• Description

If you want to define these fields when you paste the object, choose Cancel.

15

Object Animation

FactoryLink ECS / Application Editor / 199


• WORKING WITH POWER PACKS
• Using a Template Object


U SING A T EM PLA TE O BJECT
Perform the following steps to duplicate a template object.

1 Select the template object.

2 Choose Edit>Copy to copy the object into the buffer.

3 Choose Edit>Paste. Place the cursor where the object is to be pasted and press the
mouse button. The Template dialog is displayed.

4 Specify the following information.


Name Lists the prompt strings you entered for the template variables.
Value Values substituted for template variables for this object. Enter a
value for each prompt string.
The number of characters in the value depends on the number of
characters in the “static” portion (characters other than the
template variable) of the variable name. This is because the
maximum number of characters in an element name is 32. For
example, if the variable name is tank{tnum}level, the static
portion of the variable name is tanklevel. Because there are 9
characters in tanklevel, the maximum number of characters that
can be substituted for tnum is 23.
[32 (maximum characters in an element name) - 9 (number of
characters in tanklevel) = 23]

200 / FactoryLink ECS / Application Editor


WORKING WITH POWER PACKS
Using a Template Object

Class: Type of template object used to create this new object. Use this
field to establish classes for your template objects, associating
each object with its source template. The system does not use this
information—it is for your reference.
You can enter an alphanumeric string from 1 to 16 characters.
Description: Description of the template object. This is for your reference only.
You can enter an alphanumeric string from 1 to 64 characters.

5 Click OK to save the information. If you created a template variable requiring


element definition information but did not enter it, the Tag Definition dialog is
displayed now, prompting you for that information.

If the Tag Definition dialog does not display, the system pastes the new object and
substitutes the values you entered for each prompt string into their associated
template variables.

After you click OK, if FactoryLink generates a new element, it uses the element
definition information supplied with the template variable for the new element
without prompting you.

6 Specify the domain, element type, dimension (if an element array), default value,
and description of the element, and click OK. The Tag Definition dialog closes and
the system pastes the new object, substituting the values you entered for each
prompt string into their associated template variables.

15

Object Animation

FactoryLink ECS / Application Editor / 201


• WORKING WITH POWER PACKS
• Displaying the Template Configuration


D ISPLAY ING THE T EM PLATE C O NFIGU RATIO N
You can display the template configuration for objects you created from template
objects on the animation dialog box in one of two ways.
• As template variables from the source template object
• As element names/values resulting from template variable substitutions

To display the template configuration as template variables, choose Template


Variables from the View menu. To display the template configuration as element
names/values, deselect the Template Variables option. Each time the Application
Editor is started, it will default to displaying the element names/values in the
animation dialog boxes.

If you choose to display the template configuration as element names/values, the


Application Editor allows you to distinguish which element names/values on the
animation dialog box result from template variable substitutions and which do
not. Element names/values which result from template variable substitutions
display in a different text/background color combination than the other fields on
the dialog.

The Template Variables option applies globally to all drawings; therefore, you do
not need to open a drawing to set this option.

202 / FactoryLink ECS / Application Editor


WORKING WITH POWER PACKS
Combining Template Objects

C OM BININ G T EM PLATE OB JE CTS


When combining template objects that use the same variables, the Application
Editor checks for conflicts in the prompts for those variables. If the prompts for
the variables are the same in each object that is to be combined, the Application
Editor completes the Combine operation.

If the prompts differ (you entered different prompts for the same variable in
different objects), the Application Editor displays an error in the Variable Conflict
dialog box.

The Application Editor displays the first prompt you entered for the displayed
variable. If you click OK, the Application Editor resolves the prompt conflict by
assigning this prompt to the variable wherever the variable is used in the
composite. However, you can change the prompt for this variable. After you click
OK, the Application Editor displays the next variable that has a prompt conflict, if
one exists. When you have resolved all prompt conflicts, the Application Editor
completes the Combine operation.

Click Abort to cancel the Combine operation.

15

Object Animation

FactoryLink ECS / Application Editor / 203


• WORKING WITH POWER PACKS
• Unresolved Template Variables


U NRE SOLVED T E MPLA TE V AR IABLES
Whenever you save a drawing or perform an animation test on a drawing, the
Application Editor checks it for variables that do not have a value entered in the
Template dialog box. When a variable does not have a value, it is called
“unresolved.”

Perform the following steps to resolve unresolved template variables.

1 To locate the object in the drawing, use the Find command on the Edit menu,
entering the object name given in the Animation error dialog.

2 Choose Animation>Template.

3 Enter the missing value for the variable’s prompt string.

The Application Editor completes the save whether or not you resolve the
variables.

If you do not enter values for all of the template variables in drawing, then at run
time, the system will not load the drawing containing the unresolved variables.
Instead, the system displays the following message:

Unable to load (drawing name) because of Unresolved


Template Variables.

To resolve the variables, open the drawing in the Application Editor and perform
an animation test. The Application Editor displays an error message indicating
the object name with the unresolved variable. Follow the steps above for resolving
variables.

204 / FactoryLink ECS / Application Editor


WORKING WITH POWER PACKS
Attaching Power DragOns to I/O Devices

A TTACHI NG PO W ER D RAG ON S TO I/O D E VICES


The Power DragOns supplied with FactoryLink do not request information about
I/O devices. You can add prompts that will complete the device interface tables. If
your customization is only desired on a single use of the Power DragOn, you
should fill our the specific I/O address information in the pasted Power DragOn in
the drawing. If you will be using the customized power DragOn multiple times,
either customize it and enter a template variable like {IO} instead of a specific I/O
address.

A DDIN G SEC URITY TO P OW ER D RA G O NS


Security can be configured by applying the desired security class to the button
animation of the Power DragOn.

15

Object Animation

FactoryLink ECS / Application Editor / 205


• WORKING WITH POWER PACKS
• Adding Security to Power DragOns

206 / FactoryLink ECS / Application Editor


Chapter 16





Drawing-Level Animation

Drawing-level animations are not linked to an object in the drawing. Instead, they
are linked to a real-time element that executes the action when changed. You can
configure drawing-level animation to perform the following actions.
• Print the screen
• Beep when a condition occurs
• Respond to a key press

This chapter describes how to configure these actions.

To activate these options, you must first open a drawing. Drawing-level


animations do not use an object but rather define an element so when the
element’s value is 1 (ON), it causes the animation to occur. Although you define
this element for the drawing, you can associate it with an animated object. For
example, you can animate a button object using the same element defined for the
Print Screen option so when the operator selects the button object at run time, it
prints the screen.

The Function Key command on the Animation menu allows you tie real-time
elements to keyboard function keys. Then, at run-time, the operator can press the
associated function key to perform the action. FactoryLink performs the specified
operation, such as changing the active drawing in a window or shutting down a
task.

16

Object Animation

FactoryLink ECS / Application Editor / 207



• Print Screen Animation


PR INT SCR EEN A NIM ATIO N
After selecting an object, perform the following steps to animate an object to print
the contents of a screen.

1 Select the object you want to animate.

2 Choose Animation>Print Screen to display the Print Screen Animation dialog.

3 Specify the following information.


Enable Tag Enter the name of the digital tag that controls screen printing.
The screen is printed when the tag’s value changes to 1.

4 Choose one of the following.


OK Saves the information
Cancel Discards the information
Delete Deletes the tag definition

208 / FactoryLink ECS / Application Editor


Beep Animation

B EEP A NIM ATION


Beep animation allows you to configure the computer to beep on conditions at run
time. This is useful for alerting the operator of a change in conditions requiring
immediate attention.

For example, you can use the name of the element specified in a Math and Logic
procedure that sets the element’s value to 1 when a particular process value is
reached, thereby causing the computer to beep.

Perform the following steps to configure a tag to beep.

1 Select the object you want to animate.

2 Choose Animation>Beep to display the Beep Animation dialog.

3 Provide the following information.


Enable Tag Enter the name of the digital tag that causes the computer to
beep. When the tag’s value is 1, the computer beeps.

4 Choose one of the following.


OK Saves the information
Cancel Discards the information
Delete Deletes the tag definition 16

Object Animation

FactoryLink ECS / Application Editor / 209



• Function Key Animation


F UN CTION K EY A NIM ATIO N
Function key animation animates a key on the keyboard or a button on the
pointing device to execute an action when it is pressed. Function Key animation is
like Button animation except function key animation is used to animate actual
buttons (keyboard keys or pointing device buttons) while button animation is used
to animate button objects on the display.

Perform the following steps to animate a function key.

1 Select the object you want to animate.

2 Choose Animation>Function Key to display the Select Function Key dialog listing all
defined function keys. If none are defined, the box is blank.

3 Provide the following information.


Function Key Abbreviation of the function key you want to perform the action.
This can be one of the following.

Table 16-1 Function Key Abbreviations

Keystroke Keystroke
Description Description
options options

No key NUL Page Up PUP

Reserved BT1 Page Down PDN

Reserved BT2 End END

Reserved BT3 Home HME

Break BRK Left arrow LFT

210 / FactoryLink ECS / Application Editor


Function Key Animation

Table 16-1 Function Key Abbreviations (Continued)

Keystroke Keystroke
Description Description
options options

Backspace BSP Up arrow UP

Shift + Tab BTB Right arrow RGT


(back tab)

Enter NL Down arrow DWN

Alt graph ALG Scroll Lock SCR

Pause PSE Enter ENT

Caps Lock CLK SysRq SYS

Escape ESC Delete DEL

Print Screen PSC Tab TAB

Insert INS Function F1 to F24


keys F1 -
F24

16

Object Animation

FactoryLink ECS / Application Editor / 211



• Function Key Animation


4 Choose OK. The Button Animation dialog is displayed.

5 Complete the dialog. Refer to “Animating an Object as a Button” on page 12-175


for detailed instructions.

6 Choose OK to save the animation information.

212 / FactoryLink ECS / Application Editor


Data Reporting Configuration Guide

Part IV






























PowerVB Animation

213
PowerVB Animation in the Application Editor PowerVB Animation in this book
guide
Guide
Table of Contents





PowerVB Animation

17 PowerVB Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221


Opening PowerVB from the Application Editor . . . . . . . . . . . . . . . . . . . . . 222

18 PowerVB Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223


File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Using the Import and Export Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Search Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Event Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Help Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

19 Attaching a Script to an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237


Creating a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Defining Tag Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Adding a New Tag Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Modifying an existing tag event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Deleting an Existing Tag Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Declaring Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Adding Comments to a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Removing an Event from a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Calculating Graphic Object Movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

20 PowerVB Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247


Drawing/Window Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Drawing Routines Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Mouse Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Mouse Routine Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Mouse Routines Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Troubleshooting – Overlapping Objects . . . . . . . . . . . . . . . . . . . . . . . . 255
Text Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

FactoryLink ECS / Application Editor Guide / 215



PowerVB Animation



Text Input Routines Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
RTDB Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Tag Routines Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

21 Using Variables to Declare PowerVB Objects . . . . . . . . . . . . . . . . 261


Implicit Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Arrays as Implicit Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Explicit Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
RTDBObjectValue Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Parent and Child Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Troubleshooting – Explicit Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
When to Use Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Meaningless Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

22 Using Properties and Methods in PowerVB . . . . . . . . . . . . . . . . . 271


RTDB Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
RTDBObject.Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
RTDBObject.Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
RTDBObject.Active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
RTDBObject.Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Graphic Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
“This” Object Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
RedrawOn and RedrawOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
GraphicObject.Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
GraphicObject.Left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
GraphicObject.Bottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
GraphicObject.Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
GraphicObject.Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
GraphicObject.Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
GraphicObject.Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
GraphicObject.Bold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
GraphicObject.Italic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
GraphicObject.Underline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
GraphicObject.LineColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
GraphicObject.FillColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

216 / FactoryLink ECS / Application Editor Guide


GraphicObject.BackColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
GraphicObject.TextColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
GraphicObject.Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

PowerVB Animation
GraphicObject.BackgroundUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
GraphicObject.ActionValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Graphic Object Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
GraphicObject.Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
GraphicObject.Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
GraphicObject.HasAnimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Drawing/Window Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Drawing Object Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Drawing.BackColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Window Object Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Window.Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Miscellaneous Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Critical/EndCritical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
LockRTDB/UnlockRTDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Public Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
PowerVB Variables and FactoryLink Tag Types . . . . . . . . . . . . . . . . . 291
Private Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292

23 Rotating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
GraphicObject.Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Implementing Rotation in PowerVB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Composite Object Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Sub-object Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
RedrawOn/RedrawOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Development Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301

24 Creating PowerVB Libraries and Templates . . . . . . . . . . . . . . . . 303


PowerVB Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Creating a PowerVB Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Using the PowerVB Library Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Calling a Library Function or subroutine . . . . . . . . . . . . . . . . . . . . . . . 307

FactoryLink ECS / Application Editor Guide / 217






PowerVB Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Template Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

25 Hierarchical Graphic Object Naming . . . . . . . . . . . . . . . . . . . . . . 311


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Object Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Naming Objects in the Application Editor . . . . . . . . . . . . . . . . . . . . . . . . . 313
Referencing Graphic Objects in PowerVB Scripts . . . . . . . . . . . . . . . . . . . 313
Implicit Referencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Explicit Referencing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Performance Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Object IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Finding an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

26 Debugging a PowerVB Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321


Printing PowerVB Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Document PowerVB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Printing a Single Script or Part of a Single Script . . . . . . . . . . . . . . . . . . . 322
Other Debugging Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Error Message Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
On Error Statement at Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Using Print Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Using the BASIC Print Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Examples of Print Statements and the Output Generated . . . . . . . . . 327
Print Statements with Multiple Running Events . . . . . . . . . . . . . . . . 329
Header Information In Debug Output File . . . . . . . . . . . . . . . . . . . . . 333
Location of Debug Output File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Disabling Debug Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Using LogView to Display Debug Output . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Starting LogView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Selecting a File to View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Using the Full Path Names Option When Viewing File Icons . . . . . . . 339
Viewing a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Refresh Rate and Updating Viewer Window’s File Contents Area . . . 341

218 / FactoryLink ECS / Application Editor Guide


Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Case Sensitivity Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342

PowerVB Animation
PowerVB Code Attached to Sub-Objects . . . . . . . . . . . . . . . . . . . . . . . . 342
Multi-threading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Endless Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Execution Order at Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343

FactoryLink ECS / Application Editor Guide / 219





220 / FactoryLink ECS / Application Editor Guide


Application Editor

GuideCore





Chapter 17
PowerVB Overview 17

PowerVB Animation
PowerVB allows Microsoft Visual Basic® -compatible animation scripts to be
attached to FactoryLink graphic objects. Scripts can incorporate drawing events,
mouse events, text events, and RTDB change events. PowerVB’s event
capabilities make it possible to manipulate objects in many ways during run time.
These events may manipulate any of the following four types of
FactoryLink-specific basic objects.
• Tags (RTDB elements)
• Graphic objects
• Windows
• Drawings

PowerVB events may be attached to whole composite graphic objects, individual


graphic objects, or any piece of a composite graphic object.

PowerVB can be used to configure graphic animation because routines that act on
a particular graphic object can be attached to that object. Script subroutines may
be created to call other subroutines or functions. The operations for each object
are triggered by various events during run time.

Complex reusable graphic objects can be created using PowerVB on Power Packs.
Refer to “Working with Power Objects and Power Packs” on page 9-139 in this
manual for information on Power DragOns.

Use PowerVB to incorporate the following operations at run time.


• Processes that operate on a graphic object or tag
• Graphic object rotation
• Graphic event responses that would not be possible or that would not be as
advanced using another type of animation

FactoryLink ECS / Application Editor Guide / 221


• POWERVB OVERVIEW
• Opening PowerVB from the Application Editor


PowerVB is not recommended for use in some cases. These include:
• If the script will be lengthy enough to require significant debugging.
• For computation-complex executions because PowerVB is slower than
IML/CML.
• If only tags are manipulated and only tag events are used (IML).

Be familiar with programming in BASIC or Visual Basic® before using PowerVB.


Refer to the, “PowerVB Language Reference Guide” for specific syntax
information.

OPE NING P OW ER VB FRO M THE A PPLICA TION E DITO R


Select a graphic object; then open the PowerVB animation editor by choosing
Animation>PowerVB or by clicking the PowerVB icon on the Application Editor
Toolbar.

Choose File>Open PowerVB Lib to open a PowerVB library.

222 / FactoryLink ECS / Application Editor Guide


Chapter 18





PowerVB Editor
18

PowerVB Animation
This section explains the various menu options available in the PowerVB
animation editor. Because PowerVB has no configuration panels, PowerVB
animation is set up by entering code in the editor window.

F ILE M ENU
Use the File menu to validate and save a script, to import or export information,
to delete PowerVB animation from a graphic object, and to close the PowerVB
animation editor.

FactoryLink ECS / Application Editor Guide / 223


• POWERVB EDITOR
• File Menu


Choose one of the following options from the File menu.
Validate Checks this object’s script for errors. If the script is valid, a
message is displayed in the bottom left of the window. If the
script contains an error, an alert window is displayed. The text
where the error occurs is displayed in the bottom left of the
window, and the line containing the error is highlighted in the
animation editor.
Save Saves this object’s script.
Import Allows you to import ASCII text into the current editor window.
Refer to “Using the Import and Export Dialog” on page 18-226 for
a description of fields in the Import dialog.

224 / FactoryLink ECS / Application Editor Guide


POWERVB EDITOR
File Menu

Export Allows you to export either the selected text in this object’s script
or the entire script to a text file. This is useful for printing the 18
script or attaching the script to another object.

PowerVB Animation
Refer to “Using the Import and Export Dialog” on page 18-226 for
a description of fields in the Export dialog.
Delete Deletes all of the PowerVB animation for this object. A message
window is displayed to verify the script should be deleted.
Close Closes the PowerVB animation editor. If changes have been made
to the script since it was last saved, the editor prompts to see if
the changes should be saved.

FactoryLink ECS / Application Editor Guide / 225


• POWERVB EDITOR
• File Menu


Using the Import and Export Dialog
The Import and Export dialogs operate similarly. Each dialog consists of the
following components:
• Menubar
• Current path combo box
• Files area
• Chosen file text box
• Open or Save button
• Apply button
• Cancel button

The Export dialog follows.

Menubar

Current Path Combo Box

Files Area

Chosen File Text Box

Open/Save, Apply, and


Cancel Buttons

226 / FactoryLink ECS / Application Editor Guide


POWERVB EDITOR
File Menu

History Menu
18
The History menu is used to change to a specific path. The top section, above the
horizontal line, is the recent files list. The bottom section is the marked directories

PowerVB Animation
list.

Recent Files List

Marked Directories List

Recent Files List Marks recently selected directory paths. Choose a path in this list
to change the chosen path.
Marked Shows directory paths that have been marked with the Mark
Directories List option under the Special menu. Choose a path in this list to
change the chosen path.

Special Menu

This menu is used to change to the home directory, insert the current directory in
the marked directories list, or remove the current directory from the marked
directories list.

Home Changes the current path to the home path. For example, on
Windows NT a user’s home path is defined in the environment
variables HOMEDRIVE and HOMEPATH. This is the path
holding the user’s log-in script and other information.
Mark Adds the current path to the marked directories list under the
History menu.
Unmark Removes the current path from the marked directories list under
the History menu.

FactoryLink ECS / Application Editor Guide / 227


• POWERVB EDITOR
• File Menu


View Menu

This menu is used to change the order of the files and directories shown in the file
area of the dialog.

By Name Sorts files in the file area by their names.


By Date Modified Sorts files in the file area by the date they were last modified.
Files are sorted from least recently modified to most recently
modified.
By Date Created Sorts files in the file area by the date they were created. The files
are sorted from the oldest to the newest.

Volumes Menu

This menu is used to display the current directory for each drive.

Current Paths List Choose a path in this list to change the current path.

Current Path Combo Box

Box below menu bar that displays a list of the components of the current path and
backs up the current path to one of its parent directories.

Files Area

List below Current Path Combo Box that displays the files and directories in the
current path. The top left button changes the current path to its parent path. The
bottom left button changes the current path down one level to the directory chosen
in the files list, if a directory is selected. The list shows the files and directories
according to the order chosen under the View Menu. The scrollbar on the right of
the list shows more files if too many files exist to display at once.

228 / FactoryLink ECS / Application Editor Guide


POWERVB EDITOR
File Menu

Chosen File Text Box


18
The chosen file text box displays the name of the file to be opened or saved. The
text above the entry field is either Open: or Save as:, depending on whether text is

PowerVB Animation
being imported or exported. This box is filled in automatically when a file is
chosen in the Files Area. Typing a name into the entry field selects a file without
having to use the Files Area list.

Open or Save Button

This button is in the lower-left corner of the dialog and is used to open (import) or
save (export) text. This button says Open when importing or Save when exporting.
No importing or exporting actually occurs until this button is pressed.

Apply Button

The Apply button imports or exports the selected text. Chosing Open or Save also
achieves this result.

Cancel Button

This button is in the lower-right corner of the dialog and is used to cancel the
import or export operation. When this button is pressed, no text is imported or
exported.

FactoryLink ECS / Application Editor Guide / 229


• POWERVB EDITOR
• Edit Menu


ED IT M EN U
Use the Edit menu to cut, copy, paste, or delete code in an object’s script.

Choose the following options from the Edit menu.


Undo Erases the previous action(s) performed in PowerVB. Undo as
many actions as needed from the time the script was last saved.
Redo Repeats the action previously completed.
Cut Cuts the selected text and posts it to the clipboard.
Copy Copies the selected text to the clipboard.
Paste Pastes the text from the clipboard to the PowerVB animation
editor. If the text is selected in the editor, the pasted text replaces
the selected text.
Delete Deletes the selected text without pasting it to the clipboard.

230 / FactoryLink ECS / Application Editor Guide


POWERVB EDITOR
Search Menu

SEA RCH M ENU


18
Use the Search menu to locate specific text in an object’s script.

PowerVB Animation
Choose the following options from the Search menu.
Find Finds the first occurrence of the designated text in this object’s
script. If the text is found, the cursor moves to the location. A
beep sounds if no matching text can be found. The Find option
operates only the animation or library script being edited.
Find Next Finds the next occurrence of the designated text in the object’s
script. If no other occurrence exists beyond the current location of
the cursor in the editor, a beep sounds.

PowerVB’s Search options search the script from the current location of the cursor
to the end of the code. To ensure the entire script is searched, move the cursor to
the beginning of the script before using these options.

FactoryLink ECS / Application Editor Guide / 231


• POWERVB EDITOR
• Event Menu


EV ENT M E NU
Use the Event menu to choose the type of event routine incorporated into an
object’s script. A sub-menu listing specific events is displayed for each event
category available for the selected object.

Depending on the type of object selected, all types of routines may not be
available. For example, text input routines are not available unless the current
object is a text object that has input animation.

Choose from the following options.


Drawing Routines Displays a list of drawing events. Specific drawing subroutine
options are discussed in the “Drawing/Window Events” on page
20-247.
Mouse Routines Displays a list of mouse events. Specific mouse subroutine options
are discussed in the “Mouse Events” on page 20-250.
Text Input Displays a list of text input events. Specific text input subroutine
Routines options are discussed in the “Text Events” on page 20-256.

232 / FactoryLink ECS / Application Editor Guide


POWERVB EDITOR
Event Menu

Tag Routines Displays a list of defined tag events. Specific tag subroutine
events are discussed in the “RTDB Events” on page 20-259. 18
Define Tag Event Allows you to define tag events. Tag events trigger an event

PowerVB Animation
during run time based on the value of one or more tags changing.

FactoryLink ECS / Application Editor Guide / 233


• POWERVB EDITOR
• Help Menu


H ELP M ENU
Use the Help menu for online information about menu options, using the
PowerVB animation editor, event routines, and object properties.

Choose from the following options:


Menubar Options Displays online help about the menu options available in the
PowerVB animation editor.
PowerVB Editor Displays online help about the PowerVB editor.
Event Routines Displays online help about the event routines that may be
attached to an object in PowerVB.

234 / FactoryLink ECS / Application Editor Guide


POWERVB EDITOR
Help Menu

Object Properties Displays a list of the properties available for the object whose
script is being edited. 18

PowerVB Animation
If text is selected in the editor when this menu option is chosen,
the selected text is interpreted as a graphic object name and
properties for that object are displayed. For example, if the script
for an object named Box is being edited and Object Properties is
chosen when no text is selected, then Box’s PowerVB properties
are displayed. If the text \Rectangle is selected and the drawing
has a top-level object named Rectangle, then Rectangle’s
PowerVB properties are displayed.

FactoryLink ECS / Application Editor Guide / 235


• POWERVB EDITOR
• Help Menu

236 / FactoryLink ECS / Application Editor Guide


Chapter 19





Attaching a Script to
an Object 19

PowerVB Animation
This section details the procedure for attaching a PowerVB script to an object.
This procedure is used for any type of event routine coded in an object’s script.
Specific information about each of the events, variables used in their subroutines,
and examples of PowerVB code for specific events follow this procedure.

C REA TING A SC RIPT


1 Create an object in the Application Editor.

2 Select the object.

3 Choose Attributes>Object Name. Name the object and click OK to accept the new
name.

This step is optional, but it is a good idea to name objects that will be referenced
from other objects because the object name serves as its reference in the
subroutine code. Refer to Chapter 25, “Hierarchical Graphic Object Naming” for
more information on naming objects.

FactoryLink ECS / Application Editor Guide / 237


• ATTACHING A SCRIPT TO AN OBJECT
• Creating a Script


4 Open PowerVB using one of the methods discussed in “Opening PowerVB from
the Application Editor” on page 17-222. The PowerVB animation editor window is
displayed.

5 Choose the type of event routine to be attached to the object from the Event menu.

When an event routine is selected, its beginning and ending statements are
displayed in the PowerVB animation editor window. The beginning statement will
be Sub <drawing>_<object id>_<event>. The ending statement will always be End
Sub.

238 / FactoryLink ECS / Application Editor Guide


ATTACHING A SCRIPT TO AN OBJECT
Creating a Script

6 Add the necessary PowerVB code in the PowerVB animation editor window.
Typically this code opens FactoryLink properties. Information on each type of 19
PowerVB event follows this procedure.

PowerVB Animation
Troubleshooting

Be careful in statements used that may be ported to a FactoryLink


application containing PowerVB on a different platform. Several
statements in the BASIC language PowerVB supports are only
available on PC operating systems - Windows NT, Windows 95,
and OS/2. Also be aware that some BASIC statements are
restricted to Windows NT or Windows 95. The PowerVB Language
Reference Guide provides information on which statements are
restricted to which platforms, syntax, and commands.

Tip: Click on a checked item in the Event pull-down menu to jump the cursor to
the location of the subroutine in the script. This is helpful when navigating
through a lengthy script.

7 After entering the necessary code, validate it to ensure the script can be executed
at run time. Choose File>Validate to validate the code. If the code contains an
error, a message is displayed and the first incorrect line of code is highlighted.
Correct any errors and repeat this step until validation is successful.

To print the script, follow one of the procedures below:


• Export the text
• Select the text to be printed.
• Choose File>Export. Enter a name for the ASCII-format file.
• Print the code.
• Document PowerVB
• ChooseFile>Document PowerVB in the Application Editor. A message box is
displayed with the name of the report that will be generated.
• Open the report through a text editor.
• Print the report.
• Copy the text directly into a text editor using the clipboard.

Refer to Chapter 26, “Debugging a PowerVB Script” for more information on


printing PowerVB scripts.

FactoryLink ECS / Application Editor Guide / 239


• ATTACHING A SCRIPT TO AN OBJECT
• Creating a Script


8 Choose File>Save to save the object’s script and close the PowerVB animation
editor.

Closing the PowerVB animation editor is optional. Remember that leaving the
PowerVB animation editor open while writing code requires frequent saving until
the drawing is closed. If the PowerVB animation editor is open, toggle to the
Application Editor before proceeding to Step 9.

9 Choose File>Save in the Application Editor to save the drawing. This is important
because both the PowerVB code and the object must be saved for proper execution
of the object’s script.

10 Run the application to test the animation.

Note

The Test command in the Application Editor cannot test PowerVB


functions. The application must be run to test the PowerVB code.

11 Debug the script if necessary. Refer to Chapter 26, “Debugging a PowerVB Script”
for information on debugging PowerVB code.

240 / FactoryLink ECS / Application Editor Guide


ATTACHING A SCRIPT TO AN OBJECT
Defining Tag Events

D EFINING T AG E VENTS
19
Tags are used to trigger certain FactoryLink or custom-created events at run time
when one or more tag value change.

PowerVB Animation
Adding a New Tag Event
1 Choose Event>Define Tag Event in the PowerVB animation editor to display the
Define Tag Event window.

2 Enter a name for this event in the Event Name field of the dialog.

3 Enter the applicable tag in the Tag List Edit field.

4 Click Add, or press return, to add the tag to the trigger list.

5 Click OK to accept the new tag event information. The beginning and ending
statements for the subroutine are created in the PowerVB animation editor
window.

FactoryLink ECS / Application Editor Guide / 241


• ATTACHING A SCRIPT TO AN OBJECT
• Defining Tag Events


6 Enter the code for this event in the PowerVB animation editor window.

The example below outlines the procedure for creating and implementing an event
that occurs once each second. A tag event named onesecond using the tag A_SEC
is used to implement an analog clock. The object SecondHand rotates 6 degrees
every second (variables ClockFaceHorizCenter and ClockFaceVertCenter would
have been previously calculated).

sub drawing_object_onesecond
\SecondHand.rotate ClockFaceHorizCenter,_
ClockFaceVertCenter, 6
end sub

Tag events are defined at the object level. It is possible to have a tag defined as
part of more than one tag event. Also, more than one tag can be used as a trigger
for a single tag event. Repeat Steps 3 and 4 in the example to add as many tags as
desired to a tag event’s trigger list.

Modifying an existing tag event


To change the name of an existing tag event or change the list of tags used to
trigger it, use the Define Tag Event Window.

1 Choose Event>Define Tag Event to display the Define Tag Event window.

2 Click on the arrow next to the Event Name field to display a list of the existing tag
events.

3 Select a tag event from this list. Its name is displayed in the Event Name field.

4 Alter the tag event as necessary.

Renaming a Tag Event

To rename the tag event, click Rename. A message box is displayed, prompting for
a new name. Once a new name has been entered, the tag event’s code in the
animation editor changes to use the new name.

242 / FactoryLink ECS / Application Editor Guide


ATTACHING A SCRIPT TO AN OBJECT
Defining Tag Events

Adding a Tag
19
To add a tag to the tag list for the tag event, enter the tag’s name in the entry field
above the Add button. Click Add. The tag will be inserted into the list.

PowerVB Animation
Removing a Tag

To remove a tag from the tag list for the tag event, select the tag in the tag list or
click Remove to delete the tag from the list.

5 Once a tag event has been altered in the Define Tag Event window, click OK to
apply the changes to the code in the editor or press Cancel to discard the changes.

Note

Once the tag event has been altered, the PowerVB editor’s script
must still be saved to make the change permanent.

Deleting an Existing Tag Event


To delete an existing tag event, use the Define Tag Event window.

1 Choose Event>Define Tag Event to display the Define Tag Event window.

2 Click on the arrow next to the Event Name field to display a list of the existing tag
events.

3 Select a tag event from this list. Its name is displayed in the Event Name field.

4 Click Delete to remove this tag event. The event, as well as all the code in its
subroutine, will be deleted.

FactoryLink ECS / Application Editor Guide / 243


• ATTACHING A SCRIPT TO AN OBJECT
• Declaring Events


D ECLA RING E VENTS
Declaration of event routines are generated when a routine is chosen from the
event menu. All events in PowerVB have the same declaration statement format:

sub drawing_object_event [(arguments)]

where
• drawing is the name of the drawing to which the PowerVB animation is
attached
• object is the ID of the object to which the PowerVB event is attached
• event is the event name
• [(arguments)] is the list of arguments for the event, if any

For example, the MouseMove event for object z1002 on drawing button.g is
declared as:

sub button_z1002_MouseMove (x as long, y as long)

A statement declaration in a PowerVB script is highlighted in the following


example.

244 / FactoryLink ECS / Application Editor Guide


ATTACHING A SCRIPT TO AN OBJECT
Declaring Events

Do not change the declaration text of FactoryLink-created subroutine statements


or the routine will not be triggered properly. 19
Adding Comments to a Script

PowerVB Animation
Add an apostrophe to the beginning of text that serves as a comment in the script.
A comment can be displayed on a line by itself or after a BASIC statement.
Comments can also begin with the word REM, if no BASIC statement precedes
the comment on the same line. Another alternative is enclosing the comment with
a slash and the * character, as shown in the following example. Refer to the
“PowerVB Language Reference Guide” for more information on coding subroutines
in PowerVB.

Sub cj1_g1145_MouseMove [(X As Long, Y As Long)]


‘Comment: Move this object where the mouse was moved
this.Left = X ‘Comment: Move object horizontally
this.Bottom = Y ‘Move object vertically
REM this is also a comment
/*This is also a comment.*/
End Sub

Removing an Event from a Script


If an event has been defined for a graphic object, remove the event by selecting it
in the editor and deleting it. Press Delete in the Tag Event Definition dialog to delete
a tag event.

FactoryLink ECS / Application Editor Guide / 245


• ATTACHING A SCRIPT TO AN OBJECT
• Calculating Graphic Object Movement


C ALCU LATING G RAP HIC OB JE CT M O VEM ENT
The coordinate location and anchor points of an object are important when
considering and calculating object movement. Unlike Microsoft Visual Basic®,
PowerVB uses the same coordinate system as other types of animation.

Coordinates for an object are defined with the Left and Bottom properties.
FactoryLink coordinates are numbered from the bottom-left corner. The
bottom-left corner of a drawing will be 0,0, and the numbers will increase as you
move upward or to the right. It is simple to calculate the right (object.Left +
object.Width) and top (object.Bottom + object.Height) coordinates of the object if
necessary.

All coordinates are relative to the bottom left corner of the drawing, not the
bottom left corner of the selected object. The coordinate range is approximately
32,000 horizontal (along the X axis) and 24,000 vertical (along the Y axis),
depending on the properties of the specific display and the shape of the window in
which the drawing is displayed.

246 / FactoryLink ECS / Application Editor Guide


Chapter 20





PowerVB Events
20

PowerVB Animation
D RAW IN G /WI NDO W E VENTS
Drawing/Window events can be used to perform the following types of operations
at run time:
• Events that happen when a drawing is loaded or unloaded from memory
• Events that happen when a window gains or loses focus

Open these events from the Drawing Routines sub-menu.

Drawing Routines Menu


The Drawing Routines sub-menu is displayed below. Explanations of each
drawing event follow.

DrawUnload

This event occurs when the drawing is about to be unloaded from memory. This
event occurs every time the drawing is unloaded from a window whether it is
loaded in other windows or not.

FactoryLink ECS / Application Editor Guide / 247


• POWERVB EVENTS
• Drawing/Window Events


Example Code:
sub mouse_g1005_DrawUnload
window.title = old_title ‘reset windows title
end sub

DrawLoad

This event occurs when the drawing is loaded into memory. The DrawLoad event
occurs every time the drawing is loaded into a window whether it is already
loaded in other windows or not.

Example: In this example, the ceramic injection drawing’s title will be changed
with the code that follows.

248 / FactoryLink ECS / Application Editor Guide


POWERVB EVENTS
Drawing/Window Events

Example Code:
sub mouse_g1006_DrawLoad
20

PowerVB Animation
old_title = window.title ‘save window’s previous
‘title
window.title = “Mouse Events” ‘change window’s title

WinLostFocus

This event occurs when a window loses input focus or is no longer the top window.

Example Code:
sub misc1_g1020_WinLostFocus
this.text = “Window Lost Focus”
end sub

WinGotFocu

This event occurs when a window receives input focus or becomes the top window.

Example Code:
sub misc1_g1001_WinGotFocus
this.text = “Window Got Focus”
end sub

Tip

Debug windows focus events carefully. If an error occurs in a


window focus event, the error pop-up message causes another
window focus event, which may cause another error, resulting in
an infinite loop.

FactoryLink ECS / Application Editor Guide / 249


• POWERVB EVENTS
• Mouse Events


M OUS E E VEN TS
Mouse events are used in PowerVB to perform the following types of operations.
• Click and drag objects
• Animate an object to show when the user presses and releases a mouse button
• Indicate when the mouse is passed over an object

For non-rectangular objects, mouse events are captured within the bounding box
of the object (defined as an imaginary rectangle enclosing the object).

Open mouse events through the Mouse Routines sub-menu.

Mouse Routine Arguments


All of the mouse routines take either two arguments (X As Long, Y As Long) or
three arguments (Button As Integer, X As Long, Y As Long).

The Button As Integer argument defines which button was pressed, released or
clicked to cause an event. The value of Button can be checked against the
pre-defined constants as in the following example:

Sub drwg_g1003_MouseDown (Button As Integer, X As Long, _


Y As Long)
if Button and Left_Button then
REM left button pressed, released, or clicked
elseif Button and Right_Button then
REM right button pressed, released, or clicked
elseif Button and Middle_Button then
REM middle button pressed
end if
End Sub

The X As Long and Y As Long arguments define the horizontal and vertical
coordinates of the mouse at the time the event occurred.

250 / FactoryLink ECS / Application Editor Guide


POWERVB EVENTS
Mouse Events

Mouse Routines Menu


20
The Mouse Routines menu is displayed. Descriptions of each mouse event are
provided below.

PowerVB Animation
MouseMove (x as long, y as long)

This event occurs when the mouse is moved over an object.

Example Code:
sub mouse_g2001_MouseMove(X As Long, Y As Long)
if mouse_button_state = 1 then
This.Left = X - XOffset.value
This.Bottom = Y - YOffset.value
end if
end sub

FactoryLink ECS / Application Editor Guide / 251


• POWERVB EVENTS
• Mouse Events


MouseUp (button as integer, x as long, y as long)

This event occurs when a mouse button is released. This event occurs even if the
mouse cursor is moved off the object before the button is released.

Example Code:
sub Drawing_Object_MouseDown(Button As Integer, X As Long,_
Y As Long)
' This code gives the effect of a button being pressed
This.c(“LeftLine”).linecolor = 57
This.c(“TopLine”).linecolor = 57
This.c(“RightLine”).linecolor = 63
This.c(“BottomLine”).linecolor = 63
end sub
sub Drawing_Object_MouseUp(Button As Integer, X As Long, _
Y As Long)
' This code gives the effect of a button being released
This.c(“LeftLine”).linecolor = 63
This.c(“TopLine”).linecolor = 63
This.c(“RightLine”).linecolor = 57
This.c(“BottomLine”).linecolor = 57
end sub

252 / FactoryLink ECS / Application Editor Guide


POWERVB EVENTS
Mouse Events

MouseDown (button as integer, x as long, y as long)


20
This event occurs when a button on the mouse is pressed. An example of PowerVB
code using this event is illustrated in the discussion of the MouseUp event.

PowerVB Animation
Tip – Dragging an Object

Use the MouseDown and MouseUp routines to identify whether the object is
selected. Use MouseMove to drag the selected object to a new location on the
screen. The following example illustrates PowerVB code to achieve this
animation.

Private Mouse_Is_Down As Integer, X_Offset As Integer,_


Y_Offset As Integer
sub Drawing_g1002_MouseMove(X As Long, Y As Long)
If Mouse_Is_Down then
' Move object while mouse button is down
This.Left = X - X_Offset
This.Bottom = Y - Y_Offset
End If
end sub
sub Drawing_g1002_MouseUp(Button As Integer, X As Long, Y As_
Long)
Mouse_Is_Down = FALSE
end sub
sub Drawing_g1002_MouseDown(Button As Integer, X As Long,_
Y As Long)
If Button = LEFT_BUTTON Then Mouse_Is_Down = TRUE
' Calculate where user clicked on object
X_Offset = X - This.Left
Y_Offset = Y - This.Bottom
end sub

FactoryLink ECS / Application Editor Guide / 253


• POWERVB EVENTS
• Mouse Events

Troubleshooting

When a mouse button is pressed while the mouse cursor is over an


object that responds to the MouseDown, MouseMove, or MouseUp
events, that object gains mouse focus. All MouseMove events will
go to an object with mouse focus even if the mouse cursor moves off
the object. Mouse focus will be lost when the button is released.

EndPointedAt (x as long, y as long)

This event occurs when the mouse stops being over an object.

Example Code:

sub Drawing_Object_EndPointedAt(X As Long, Y As Long)


' Change this object back to gray when the cursor moves away
This.Fillcolor = GRAY
end sub

Click (button as integer, x as long, y as long)

The click event occurs when the mouse button is pressed and released while over
an object. A click event does not occur if the mouse is moved off of the object before
the button is released. A click event does occur if the mouse is moved off of the
object and back onto the object before the button is released.
Example Code:
Click (button as integer, x as long, y as long)
'Force tag 'ThisTag' to 1
ThisTag.Force 1
end sub

254 / FactoryLink ECS / Application Editor Guide


POWERVB EVENTS
Mouse Events

BeginPointedAt (x as long, y as long)


20
This event occurs when the mouse initially moves over an object.

PowerVB Animation
Example Code:
sub Drawing_Object_BeginPointedAt(X As Long, Y As Long)
' Change this object to red when the cursor is over it
This.Fillcolor = RED
end sub

Troubleshooting – Overlapping Objects


If objects are overlapping, the top-most object with a mouse event defined receives
all mouse events of that type, as demonstrated in the following example.

ObjectA

ObjectB

If both ObjectA and ObjectB have Click events and you click on ObjectB, ObjectB’s
Click routine will run but not ObjectA’s. If this type of behavior is required, put all
of the Click event code in ObjectA and based on the X and Y parameters in the
Click event, determine where the Click occurred.

If ObjectA has a MouseMove event but ObjectB does not, ObjectA receives the
MouseMove events even if the mouse is pointing at ObjectB.

FactoryLink ECS / Application Editor Guide / 255


• POWERVB EVENTS
• Text Events


T EXT EV ENTS
Text events in PowerVB code are used to perform various operations. Only text
objects with input text animation can have these events. If a text event is defined
for another object, the event subroutine is never invoked.

Text Input Routines Menu


The Text Input Routines menu is displayed below. The following paragraphs
explain the text input events.

EnterKey

This event occurs when the enter key is pressed if the contents of the edit field
have not been written to the RTDB.

Example Code:
sub Drawing_Object_EnterKey
' Change the contents of this field to uppercase
This.Text = UCase(This.Text)
end sub

256 / FactoryLink ECS / Application Editor Guide


POWERVB EVENTS
Text Events

LostFocus
20
This event occurs when a text object loses keyboard focus.

PowerVB Animation
Example Code:
sub Drawing_Object_LostFocus
‘Indicate that this field no longer has focus by changing
‘text to black
This.Textcolor = BLACK
end sub

GotFocus

This event occurs when a text object gets keyboard focus. For example, an input
text field has focus at run time when the cursor is positioned in that field. To gain
focus, the user clicks on the field or tabs to the field.

Example Code:
sub Drawing_Object_GotFocus
‘Indicate that this field has focus by
‘changing text to red
This.Textcolor = RED
end sub

FactoryLink ECS / Application Editor Guide / 257


• POWERVB EVENTS
• Text Events


Change

This event occurs when the contents of a text object change.

Example Code:
sub Drawing_Object_Change
‘Update the window title with the contents of this
‘text object
Window.Title = This.Text
end sub

258 / FactoryLink ECS / Application Editor Guide


POWERVB EVENTS
RTDB Events

RTDB E VEN TS
20
RTDB events are used to perform various operations. These events do not have
pre-defined names. Define the name of a RTDB event and its trigger elements in

PowerVB Animation
the PowerVB animation editor. RTDB events do not take any arguments. A list of
the tag routines defined is available in the Tag Routines menu. Click on the name
of a routine to jump to the appropriate place in the script for that routine.

The combination of all of the tag events for an object can have a maximum of 50
different tags in the trigger lists.

Tag Routines Menu


The Tag Routines menu is displayed.

This example uses a user-created tag routine called SecondChanged.

sub concurr_box_SecondChanged
Print “...A_SEC is now...” & CStr(A_SEC.Value)
end sub

FactoryLink ECS / Application Editor Guide / 259


• POWERVB EVENTS
• RTDB Events

260 / FactoryLink ECS / Application Editor Guide


Chapter 21





Using Variables to
Declare PowerVB 21
Objects

PowerVB Animation
Declare an object for RTDB and graphics objects in PowerVB code in one of
following two ways.
• Implicit
• Explicit

IM PLICIT V ARIA BLES


If the RTDB or graphics object name is used as a variable name in an object’s
PowerVB code, a connection is made automatically to the object. This works with
FactoryLink defined names as well as user-created names. For example, the
following code integrates the meaning of the FactoryLink tag A_SEC and a
graphic object named \graphname.

Sub Somedwg_someobj_DrawLoad
dim I% as integer
‘set I equal to the current second value
I% = A_SEC.Value

‘move the box to the right 20 units


\graphname.Left = \graphname.Left + 20
End Sub

When this code is validated or saved in the PowerVB editor, PowerVB recognizes
A_SEC as a FactoryLink tag and \graphname as a graphics object and uses these
variables with the appropriate meaning.

FactoryLink ECS / Application Editor Guide / 261


• USING VARIABLES TO DECLARE POWERVB OBJECTS
• Implicit Variables


However, if a local variable is defined with the same name as a RTDB or graphics
object, the variable overrides the implicit meaning. For example, the variable
A_SEC has no special tag meaning in the following code.

Sub somedwg_someobj_DrawLoad
Dim A_SEC As Integer, I As Integer

I = A_SEC ‘Not a RTDB element


End Sub

Troubleshooting
PowerVB recognizes RTDB or graphic object names only if they are defined before
they are used in a script. For example, if you create a script that refers to a
variable named PumpMotor without explicitly defining the variable, saving the
drawing and then defining a tag named PumpMotor, the variable in the script has
no special tag meaning. However, if you alter the script later, re-save the drawing,
or export and then import the drawing or application to which the script is
attached, PowerVB detects that PumpMotor is an RTDB element and uses it as
such.

Avoid using variable names that are the same as tag names because this makes
the PowerVB script difficult to debug and maintain.

Implicit variable names are case-sensitive. Graphic object names must be


displayed in the correct case every time they are used. RTDB element names must
be displayed in the correct case at least once in a script.

For example, the name A_SEC is recognized as a tag in both places in the
following code (when used as a_Sec and A_SEC) because it is spelled with the
correct case at least once.
a_Sec = 5
A_SEC = 20

Do not create two tags whose names vary only by case. Both tags could not be used
as implicit variables in PowerVB.

262 / FactoryLink ECS / Application Editor Guide


USING VARIABLES TO DECLARE POWERVB OBJECTS
Implicit Variables

Arrays as Implicit Variables


21
Tag arrays are partially supported when using implicit tag variables. Use array
dimensions with the BASIC array syntax, but do not use remote node prefixes or

PowerVB Animation
dot property suffixes. Use the tag properties with tag arrays.

The following example illustrates legal uses of an array.

‘Set Motors [3] [2] to 20


Motors (3, 2) = 20

‘If Motors [4] [1] has changed, do something


If Motors (4,1) .Changed Then
‘other part of the code
End If

‘Force write the value 50 into Motors [5] [5]


Motors (5,5) .Force 50

The following code illustrates illegal uses of tag arrays as implicit variables.

‘Can’t use remote node (PowerNet) syntax


remote_node:some_tag = 20

‘Can’t use square brackets - use SomeTag (5,6)


SomeObj [5] [6] = 20

‘Can’t use “dot properties” like “.Raw” implicitly


SomeObj.Raw = 30

FactoryLink ECS / Application Editor Guide / 263


• USING VARIABLES TO DECLARE POWERVB OBJECTS
• Explicit Variables


EX PLICIT VA RIAB LES
Explicit declarations provide flexibility in PowerVB coding, although using them
requires extra typing. Explicit declarations are necessary to use properties of a
tag or PowerNet tags. The following example illustrates the use of explicit
variable declaration.

dim x as RTDBObject
set x = RTDBObjectValue (“A_SEC”)
x.Value = 5

RTDBObjectValue Function
Although an explicit drawing or window variable cannot be set as the output of a
function like RTDBObjectValue, a variable of type DrawingObject or
WindowObject can be explicitly defined. This is mainly used for passing drawing
and window objects to subroutines in a library like the following example.

Sub SetDrawingColorToCommonColor (d as DrawingObject)


d.BackColor = BLUE
‘blue is the common color to use for all drawing
backgrounds)

The special function RTDBObjectValue associates explicit RTDB object variables


with the actual RTDB elements. The string used in these functions does not have
to be a simple string literal. It can be any variable expression that evaluates to a
string.

264 / FactoryLink ECS / Application Editor Guide


USING VARIABLES TO DECLARE POWERVB OBJECTS
Explicit Variables

For example, the following code sets all the RTDB elements in the given array to
the given value. 21
Sub SetRTDBObjs (names () as string, new_value as long)

PowerVB Animation
Dim RTDB_var as RTDBObject, I as Integer
For I = 1 to Ubounds (names)
‘link variable to a tag
Set RTDB_var = RTDBObjectValue (names (I%))
rtdb_var = new_value ‘change value of tag
Next I
End Sub

When using the RTDBObjectValue function, use the same case as when the RTDB
object was defined.

For example, the code below refers to the same tag value because PowerVB is not
case-sensitive regarding variable names.

x = thistag.value
y = THISTAG.value

The following code, however, refers to different tags.

private tagval as RTDBObject


set tagval=RTDBObjectValue(“thistag”)
x = tagval.value
set tagval=RTDBObjectValue(“THISTAG”)
y = tagval.value

FactoryLink ECS / Application Editor Guide / 265


• USING VARIABLES TO DECLARE POWERVB OBJECTS
• Explicit Variables


Arrays as Explicit Variables

Unlike implicit array references, use brackets to indicate array subroutines when
defining a tag array element explicitly with the RTDBObjectValue function.

Example Code:
'These two sets of code have the same result

'Explicitly declared object array


dim x as RTDBObject
dim i as Integer
For i = 0 to 10
set x = RTDBObjectValue(“arraytag[“ & trim(str$(i))_
& ”]”)
x.Value = 5
Next i

' Implicitly declared object array


For i = 0 to 10
arraytag(i).Value = 5
Next i

266 / FactoryLink ECS / Application Editor Guide


USING VARIABLES TO DECLARE POWERVB OBJECTS
Explicit Variables

Explicit Variables vs. Implicit Variables


21
The following code example illustrates the difference between explicit and implicit
variable declaration.

PowerVB Animation
Example Code:
' This code (5 lines) is the same as...
dim x as RTDBObject
dim i as Integer
For i = 0 to 10
set x = RTDBObjectValue(“tag” & trim(str$(i)))
x.Value = 5
Next i

' this code (10 lines).


tag0.value = 5
tag1.value = 5
tag2.value = 5
tag3.value = 5
tag4.value = 5
tag5.value = 5
tag6.value = 5
tag7.value = 5
tag8.value = 5
tag9.value = 5
tag10.value = 5

FactoryLink ECS / Application Editor Guide / 267


• USING VARIABLES TO DECLARE POWERVB OBJECTS
• Explicit Variables


Parent and Child Methods
The Drawing.Child method associates explicit graphic object variables with the
actual grapic objects.

The .parent and .child methods of graphic objects can also link explicit graphic
object variables with actual graphic objects.

Refer to Chapter 25, “Hierarchical Graphic Object Naming,” for more information
on parent and child graphic object relationships.

268 / FactoryLink ECS / Application Editor Guide


USING VARIABLES TO DECLARE POWERVB OBJECTS
Troubleshooting – Explicit Variables

T ROU BLESH OO TING – E XPLICI T V ARIA BLES


21
When to Use Set

PowerVB Animation
Verify you are using the Set statement when using explicit variables.

Example Code:
dim tag as RTDBObject

Set tag = A_SEC


tag = A_SEC

The first statement lets the variable tag represent the RTDB element called
A_SEC. The second statement sets the value of whatever RTDB element tag
refers to the current value of A_SEC. Use set only to refer a tag variable to a
specific RTDB element or the resulting error can be difficult to identify and
correct.

Meaningless Values
It is possible to set explicit RTDB and graphic object variables to a meaningless
value.

Example Code:
Sub SomeDrawing_SomeObjectID_SomeEvent
Dim Tag As RTDBObject

Set Tag = RTDBObjectValue(“WHOOPIE”)


Tag.Value = 50
End Sub

FactoryLink ECS / Application Editor Guide / 269


• USING VARIABLES TO DECLARE POWERVB OBJECTS
• Troubleshooting – Explicit Variables


In the preceding example, the set statement would put the special value nothing
into the variable Tag because the FactoryLink application did not have an RTDB
element named WHOOPIE. The next statement, which sets the value of Tag at 50
would cause a run-time error. Trap this error using the On Error functionality of
BASIC or using code like the following.

Sub SomeDrawing_SomeObjectID_SomeEvent
Dim Tag As RTDBObject

Set Tag = RTDBObjectValue(“WHOOPIE”)


If Tag Is Not Nothing Then
' now we're sure tag is a valid variable
Tag.Value = 50
End If
End Sub

The run-time error could also be trapped using the following code.

Sub someDrawing_SomeObjectID_SomeEvent
Dim O As GraphicObject

Set O = Drawing.Child(“JOE”)

If O Is Nothing Then
MsgBox “Uh oh, the drawing has no child named JOE”
Exit Sub
End If
End Sub

Refer to the PowerVB Language Reference Guide for more information on set and
nothing.

270 / FactoryLink ECS / Application Editor Guide


Chapter 22





Using Properties and
Methods in PowerVB 22

PowerVB Animation
A property is an attribute of the object that can be read from and, unless
designated as read-only, written to. A method is an action on an object.

RTDB O BJEC T P RO PERTIES


RTDB object properties allow manipulation of certain aspects of an RTDB object
(tag) during run time.

RTDBObject.Value
RTDBObject.Value is a read/write variant property that holds the value of the
RTDB element. Use .Value after a tag name to utilize the value of the tag. For
example, in the statement if old_value = A_SEC, A_SEC could be either a tag or a
declared variable within the subroutine. If the same statement read if
old_value = A_SEC.Value then, there is no confusion that the value the code should
identify is that of a tag. RTDBObject.Value is the default property for a tag
variable and can be referred to in any of the following ways.

‘set RTDB element x’s value to 10


x.Value = 10

‘read value of the RTDB element x


I% = x.Value

‘now set x’s value to 20


x = 20

‘read value of RTDB element x again


I% = x

FactoryLink ECS / Application Editor Guide / 271


• USING PROPERTIES AND METHODS IN POWERVB
• RTDB Object Properties

Although the .Value property is not required, use it to distinguish between
• references to local variables and tags in order to make the code more readable.

RTDBObject.Type
RTDBObject.Type is a read-only integer property that tells the type of the RTDB
element. This type can be compared to one of the following constants.
• FL_DIGITAL
• FL_ANALOG
• FL_LONGANA
• FL_FLOAT
• FL_MESSAGE

Mailbox RTDB elements are not supported in PowerVB code.

Example Code:
sub DisplayType (Name as string)
dim obj as RTDBObject
dim typ as string

set obj = RTDBObjectValue (Name)


select case obj.type
case FL_DIGITAL
typ = “digital”
case FL_ANALOG
typ = “analog”
case FL_FLOAT
typ = “float”
case FL_MESSAGE
typ = “message”
case FL_LONGANA
typ = “long analog”
case else
typ = “unknown and unsupported”
end select

msgbox “The RTDB element” & Name & “ is a “ & typ &
“RTDB element”
end sub

272 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
RTDB Object Properties

RTDBObject.Active
22
RTDBObject.Active is a read-only integer property that is true if the tag is
triggered for the current RTDB event subroutine. When a tag event can be

PowerVB Animation
triggered by several different tags, it is possible for more than one tag to be Active
at the same time. This value can be true only inside an RTDB event subroutine.

Example Code:

sub Drawing_Object_TagEvent
If A_SEC.Active Then
\txtMessage.Text = “This event triggered by A_SEC”
If OTHER_TAG.Active then
\otherTxtMessage.Text = “This event also_
triggered by OTHER_TAG
End If
End If
end sub

RTDBObject.Force
RTDBObject.Force writes a value into an RTDB element and sets the element’s
change flag even if the value did not change. By contrast, a regular write with the
statement rtdb_obj = newvalue or rtdb_obj.Value = newvalue, sets the changed
flag for this RTDB object only if newvalue is different from the previous value.

Example Code:
‘turn the motor on by forcing its RTDB element to 1
Motor.Force 1

‘force a new string into ErrorMessage object


ErrorMessage.Force “New Error Message”

FactoryLink ECS / Application Editor Guide / 273


• USING PROPERTIES AND METHODS IN POWERVB
• Graphic Object Properties


GR APHIC O BJECT PR OPE RTIES
Graphic object properties are used to manipulate certain aspects of an object
during run time. Some graphic object properties may only be used for specific
types of graphics objects. A BASIC run-time error results if properties are used
with an object of the wrong type.

“This” Object Variable


The “this” variable is a special graphics object variable available when a PowerVB
subroutine is attached to a graphic object in a drawing. The “this” variable is a
convenient way to access the graphics object to which the subroutine is attached.
Use the “this” variable in place of the object name when assigning variable
properties in PowerVB. Because “this” always refers to the currently-selected
object, code using the “this” variable is portable and can be copied, called, or
imported, and applied to several different objects. This means code would not need
to be modified if the name of the current graphics object is changed.

RedrawOn and RedrawOff


Normally, visible changes to a graphic object take place immediately. If a graphic
object is moved diagonally towards the lower left corner of the screen by changing
its left property and then its bottom property, the object moves left across the
screen and then vertically down the screen during run time. The RedrawOff
statement makes the movement across the screen invisible during run time.
Using the RedrawOn statement after moving the graphic means the graphic is
displayed in the new location with no visible movement across the screen.

Issue the RedrawOn statement as many times as the RedrawOff statement


during the execution of an event routine or redrawing will be turned off until the
event routine finishes.

Example Code:

RedrawOff ‘don’t show changes in Box01’s position


‘Move the box to the left and down
Box01.left = Box01.left - 200
Box01.bottom = Box01.bottom - 200
RedrawOn ‘show Box01 in its new position

274 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
Graphic Object Properties

GraphicObject.Type
22
GraphicObject.Type is a read-only integer property that defines the type of the
graphics object. The constants available to check this value against are:

PowerVB Animation
• FL_DRAWING
• FL_BOX
• FL_ELLIPSE
• FL_POLYGON
• FL_TEXT
• FL_COMPOSITE
• FL_LEGEND
• FL_LINE
• FL_PARABOLA

Example Code:
if this.type = FL_BOX then
msgbox “This PowerVB code is attached to a_
Box object.”
end if

GraphicObject.Left
GraphicObject.Left is a read/write long property that defines the left position of
the object along the x axis. Use this property to move an object along the x axis.

Coordinates in PowerVB are discussed in “Calculating Graphic Object Movement”


on page 19-246.

Example Code:

‘Move the box to the right a little.


Box01.left = Box01.left + 100

An object can become invisible if its left value is set out of the range of 0 to 32000.
For example, changing the left value to 40000 would make an object invisible.

FactoryLink ECS / Application Editor Guide / 275


• USING PROPERTIES AND METHODS IN POWERVB
• Graphic Object Properties


GraphicObject.Bottom
GraphicObject.Bottom is a read/write long property that defines the bottom
position of the object along the y axis. Use this property to manipulate the location
of an object on the y axis.

Example Code:

‘Move the box up a little


Box01.bottom = Box01.bottom + 100

Moving the bottom outside this range can make the object invisible.

GraphicObject.Width
GraphicObject.Width is a read/write long property that defines the width of an
object. Use this property to make an object narrower or wider.

Example Code:

‘Make the ellipse wider


Ellipse01.Width = Ellipse01.Width + 200

GraphicObject.Height
GraphicObject.Height is a read/write long property that defines the height of an
object. Use this property to make a graphic object shorter or taller.

Example Code:

‘Make the parabola shorter


Parab.height = parab.height - 100

Text within an object must remain proportional. Changing the width or height of
a text object can change the font size and the other dimension (height or width) of
the object.

276 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
Graphic Object Properties

GraphicObject.Text
22
GraphicObject.Text is a read/write string property that holds the text contained in
a text object. This property is only valid for text object variables. One use of this

PowerVB Animation
property is to read the unprocessed text in a text object that has input animation
attached.

Example Code:

msgbox “Input field contains “ & InputFld.text

‘now clear the input field


InputFld.text = “ “

GraphicObject.Font
GraphicObject.Font is a read/write string property that contains the name of the
font used for a text object. This property is valid only for text object variables and
is restricted to the fonts on the user’s system.

Example Code:
‘Change to Courier New font
InputFld.font = “Courier New”

Font substitutions on a user’s system might result in a point-size change. If the


font name is changed to one that is invalid, the text is displayed in the previous
font.

GraphicObject.Bold
GraphicObject.Bold is a read/write integer string property. When this property’s
value is true (non-zero), the text is bold. If the property’s value is false, the text is
not bold. This property is valid only for text object variables.

FactoryLink ECS / Application Editor Guide / 277


• USING PROPERTIES AND METHODS IN POWERVB
• Graphic Object Properties


Example Code:
‘Toggle the bold attribute of the text object

if Txt.bold then
Txt.bold = False ‘bold off
else
Txt.bold = True ‘bold on
end if

GraphicObject.Italic
GraphicObject.Italic is a read/write integer property that italicizes text if the
property value is true (non-zero). If the value is false, the text is not italicized.
This property is valid only for text object variables.

Example Code:

‘Make the text italicized


Txt.italic = True

GraphicObject.Underline
GraphicObject.Underline is a read/write integer property. If the property value is
true, the text is underlined. This property is valid for only text object variables.

Example Code:

‘Make the text underlined


Txt.underline = True

278 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
Graphic Object Properties

GraphicObject.LineColor
22
GraphicObject.LineColor is a read/write integer property used to set or retrieve
the line color of a graphics object.

PowerVB Animation
Example Code:
‘Make the line color red
Box.linecolor = 0 ‘zero is red

The valid range of colors is 0 to 63 which corresponds to the color palette in the
color dialogs in the Application Editor. Any value less than 0 or more than 63 is
read as 0 or 63, respectively. These limits are the same for all ...Color properties.

Pre-defined constants are available for the more common colors, so you need not
reference them using their numbers. These constants are:
• RED
• ORANGE
• YELLOW
• GREEN
• CYAN
• BLUE
• MAGENTA
• PURPLE
• BLACK
• GRAY (or GREY)
• SILVER
• WHITE

Any color property used with a composite object affects all of the child objects of
the composite.

FactoryLink ECS / Application Editor Guide / 279


• USING PROPERTIES AND METHODS IN POWERVB
• Graphic Object Properties


GraphicObject.FillColor
GraphicObject.FillColor is a read/write integer property used to set or retrieve the
fill color of a graphics object.

Example Code:
‘Make the fill color white for the composite and all its
‘child objects
Comp.fillcolor = WHITE

GraphicObject.BackColor
GraphicObject.BackColor is a read/write integer property used to set or retrieve
the background color of a graphics object.

Example Code:
‘Make the background color black
Box.backcolor = BLACK

280 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
Graphic Object Properties

GraphicObject.TextColor
22
GraphicObject.TextColor is a read/write integer property used to set or retrieve
the text color for a graphics object. This property is valid only for text object

PowerVB Animation
variables.

Example Code:
‘If this script is attached to a text object, change the
‘object’s text color

if this.type = FL_TEXT then


this.textcolor = GREY
else
msgbox “Not a text object - can’t change text color”
end if

GraphicObject.Name
GraphicObject.Name is a read-only string property used to retrieve the basic
name of a graphic object.

Example Code:

‘Let the user know this object’s name


MsgBox “Hi, I am object” & This.Name

FactoryLink ECS / Application Editor Guide / 281


• USING PROPERTIES AND METHODS IN POWERVB
• Graphic Object Properties


GraphicObject.BackgroundUpdate
GraphicObject.BackgroundUpdate is a read/write integer property used to set or
retrieve the BackgroundUpdate flag value for a text graphics object with input
text animation. If this property is set to true (non-zero), the object responds to
background updates.

Example Code:
‘Toggle background update setting

if InputFld.BackgroundUpdate then
InputFld.BackgroundUpdate = false
else
InputFld.BackgroundUpdate = true
end if

GraphicObject.ActionValue
GraphicObject.ActionValue is a read/write string property used to set or retrieve
the value field for objects with button animation.

Example Code:
‘If an object has button animation with action set to
DRW,
‘the actionvalue property can be changed to load
different

282 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
Graphic Object Methods

GRA PHIC OB JECT M ETHOD S


22
Graphic object methods are used to affect a particular graphics object during run
time.

PowerVB Animation
GraphicObject.Rotate
GraphicObject.Rotate is a subroutine used to rotate a graphics object around a
specified point by a specified number of degrees.

Refer to Chapter 23, “Rotating Objects” for information about rotating graphic
objects.

Example Code:
`This RTDB event is triggered once per second
private center_x as long, center_y as long

sub Drawing_Object_onesecond
`determine the center of the clock
center_x = \Clock.left + (\Clock.width / 2)
center_y = \Clock.bottom + (\Clock.height / 2)

`move the second hand on the clock one second


`forward, which is 6 degrees out of 360 degrees.
\SecondHand.rotate center_x, center_y, 6
end sub

Note

Rotating complex objects can be processor-intensive and may


adversely affect system performance.

FactoryLink ECS / Application Editor Guide / 283


• USING PROPERTIES AND METHODS IN POWERVB
• Graphic Object Methods


GraphicObject.Reset
GraphicObject.Reset is a subroutine that returns a graphics object to its original
state as it was drawn in the Application Editor. This will undo the effects of
moving and rotating an object.

Example Code:
‘move the box back to its starting position
Box.reset

GraphicObject.HasAnimation
GraphicObject.HasAnimation is an integer function used to show if a given
graphics object has a certain type of animation. The return value is true
(non-zero) if the object has the type of animation passed as the argument to this
function.

Use pre-defined constants as the argument to this function.


• FL_PAINT
• FL_BAR
• FL_SYMBOL
• FL_INPUT_TEXT
• FL_OUTPUT_TEXT
• FL_BUTTON
• FL_CHART
• FL_LEGEND
• FL_PEN
• FL_POWERVB

Example Code:
‘Don’t try to set the ActionValue property of this
‘object unless it has button animation. Otherwise,
‘a run time error will occur.

if this.hasanimation (FL_BUTTON) then


this.actionvalue = “ALOG”
end if

284 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
Drawing/Window Object Properties

D RAW ING /W IN DOW OB JE CT P RO PERTI ES


22
This section details when to use a drawing or window property in PowerVB code.

PowerVB Animation
Drawing Object Variable
Because drawing objects cannot be declared explicitly like RTDB and graphics
object variables, a predefined variable called drawing is used to access the
properties of the drawing to which the PowerVB code is attached. These
properties are specific to a drawing within one window and do not affect the same
drawing when it is loaded in other windows.

The drawing variable is not available for code in PowerVB libraries. However,
subroutines in PowerVB libraries can have a drawing variable passed to them as
in the following example.

Sub ChangeColor (d as DrawingObject)


d.BackColor = RED
End Sub

The drawing object can also be stored but this may be dangerous unless
invalidated upon drawing unload, as shown in the following example.
private sdrawing as DrawingObject
sub save drawing (x as DrawingObject)
set sdrawing = x
end sub

FactoryLink ECS / Application Editor Guide / 285


• USING PROPERTIES AND METHODS IN POWERVB
• Drawing/Window Object Properties


Drawing.BackColor
Drawing.BackColor is a read/write integer property used to set or retrieve the
background color of a drawing. The color value limits are 0 to 63 as in the
Application Editor and they work like the color values for graphic object color
properties.

Example Code:

‘set the drawing’s background to white


Drawing.backcolor = WHITE

Window Object Variable


Because window objects cannot be declared explicitly like RTDB and graphics
objects, the predefined variable window is used to access the properties of the
window to which PowerVB code is attached.

The window variable is not available for code in PowerVB libraries except when
explicitly passed as an argument as in this example.

Sub FormatWindowTitle (w as Window Object)


w.Title = “FactoryLink” & w.Title
End Sub

286 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
Drawing/Window Object Properties

Window.Title
22
Window.Title is a read/write string property used to set or retrieve the text in the
title bar of the window.

PowerVB Animation
Example Code:
‘Change the title of the FL_MAIN window to “Main Window”
‘if this subroutine is running on a graphic object in a
‘drawing in the FL_MAIN window.

if Window.title = “FL_MAIN” then


Window.title = “Main Window”
end if

FactoryLink ECS / Application Editor Guide / 287


• USING PROPERTIES AND METHODS IN POWERVB
• Miscellaneous Statements


M ISCELLA NEO US STATE MEN TS
Miscellaneous statements are not attached to variables but are used in PowerVB
code to perform global actions.

Critical/EndCritical
Normally, FactoryLink allows several active event routines to run concurrently.
Refer to “Multi-threading” on page 26-342 for more information.
Critical/EndCritical is used to give one event subroutine the right to run
uninterrupted by any other event routines. For example, one line from one event
routine might run, followed by one line from a different routine, and so on unless
the Critical statement was in effect.

When a Critical statement is issued in PowerVB code, only the statements from
the current event routine runs. Lines from other event routines will not run until
the EndCritical statement in the code is reached or until the event routine ends.
An EndCritical statement must be issued for every Critical statement in the
subroutine or lines from other event routines will not run until the event routine
ends.

Critical/EndCritical applies only to other PowerVB routines; other FactoryLink


tasks or applications are not affected.

288 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
Miscellaneous Statements

Example Code:
sub drawing_object_SomeTagEvent
22

PowerVB Animation
dim I as Integer

‘We want this section of code to run, and we don’t want


‘any other PowerVB code running while this code runs.
Critical
For I = 1 to 100
SomeTag = I * 1000
Next I
‘Now we want other PowerVB code to run
EndCritical

‘Again, only this part of the code should run


Critical
set_another_tag ‘call subroutine defined below
For I = 1 to 1000
SomeOtherTag = I ** 2 ‘I squared
Next I
‘Issuing the following EndCritical statement will NOT let
‘other PowerVB code run, because the set_another_tag
‘subroutine contains a Critical statement.
EndCritical
End Sub ‘The event is over; exclusive running ends.

Sub set_another_tag
Critical
Another_Tag.Value = 25
‘No End Critical to match the Critical
End Sub

FactoryLink ECS / Application Editor Guide / 289


• USING PROPERTIES AND METHODS IN POWERVB
• Miscellaneous Statements


LockRTDB/UnlockRTDB
Normally, FactoryLink allows several different tasks to read and write tag values
to the RTDB at the same time. Use LockRTDB/UnlockRTDB statements to give
one event routine exclusive access to the RTDB. When the LockRTDB statement
is issued in PowerVB code, the routine used to issue the statement has exclusive
access to the RTDB. Execution of other PowerVB code is suspended inside
LockRTDB/UnlockRTDB statements (same as Critical/EndCritical). Other tasks
and other animation in Run-Time Graphics cannot read or write tags. This event
routine has exclusive access to tags until the UnlockRTDB statement is reached
or until the event routine ends.

An UnlockRTDB statement must be issued for every LockRTDB statement in the


subroutine or the RTDB will be locked until the event routine ends.

Example Code:

LockRTDB
Some_Tag = 20
UnlockRTDB

290 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
Public Variables

PUB LIC VA RIAB LES


22
Public variables, also referred to as global variables, are variables available to all
PowerVB scripts in an application. It is a good idea to avoid the use of public

PowerVB Animation
variables. Private variables together with access subroutines and functions can
usually suffice.

Example Code:

Public SetVal As Integer

PowerVB Variables and FactoryLink Tag Types


PowerVB has several variable types that can represent the value property of
certain FactoryLink tag types.

PowerVB Variable Types FactoryLink Tag Types

String Message

Boolean Digital

Integer Analog

Long LongAnalog

Double Float

FactoryLink ECS / Application Editor Guide / 291


• USING PROPERTIES AND METHODS IN POWERVB
• Private Variables


PR IVATE VA RIAB LES
Private variables are variables assigned exclusively within a graphic object or
library script. Declare private variables in the beginning of the routine, as shown
in the following subroutine.

private mbtn as graphicobject


private mact as graphicobject
private mact2 as graphicobject
private mx as graphicobject
private my as graphicobject
sub mouse_rectangle1_DrawLoad
set mbtn = Drawing.Child(“txtMouseButton”)
set mact = Drawing.Child(“txtMouseAction”)
set mact2 = Drawing.Child(“txtMouseAction2”)
set mx = Drawing.Child(“txtMouseX”)
set my = Drawing.Child(“txtMouseY”)
mbtn.text = " "
mact.text = " "
mact2.text = " "
mx.text = " "
my.text = " "
drawing.c(“txtScrollValue”).text = “52”
end sub

If the same variable name is used privately in multiple scripts, those variables are
completely independent. If a script has a private variable with a name that is used
in other scripts as a public variable, those variables are completely independent,
and the script with the private variable cannot access the public variable with the
same name.

292 / FactoryLink ECS / Application Editor Guide


USING PROPERTIES AND METHODS IN POWERVB
Private Variables

Both public and private variables must be declared before they are referenced.
Refer to PowerVB Language Reference Guide for more information on declaring 22
variables.

PowerVB Animation

FactoryLink ECS / Application Editor Guide / 293


• USING PROPERTIES AND METHODS IN POWERVB
• Private Variables

294 / FactoryLink ECS / Application Editor Guide


Chapter 23





Rotating Objects
23

PowerVB Animation
OVE RVIEW
FactoryLink allows rotation of graphic objects during development time or run
time. Run-time rotation can occur on the following types of graphic objects.
• Primitive objects
• Composites
• Sub-objects of composites

Text or objects containing text cannot be rotated. The following types of objects
cannot be rotated and are considered illegal objects.
• Text objects
• Legend objects
• Objects with bar animation
• Objects with chart animation
• Objects with symbol animation
• Composite objects containing one or more of the above objects

Definitions
Primitive A single drawn object such as a polygon, line, box, ellipse, arc,
Objects parabola, or spline.
Composite A container of primitive objects and/or other composites.
Sub-objects Either primitive objects or other composites inside a composite
object.
Original The initial orientation of the object before rotation, translation, or
Orientation scaling.
Current The orientation of an object or composite at the present time.
Orientation
Rotation Angle The degree of rotation of an object relative to its current
orientation.
Pivot Point The central point about which an object or composite is rotated.

FactoryLink ECS / Application Editor Guide / 295


• ROTATING OBJECTS
• Overview


Legal Rotation A primitive object or composite not one of the illegal rotation
Object objects previously listed.
Illegal Rotation Any object not a legal rotation object. The objects in this list.
Object

296 / FactoryLink ECS / Application Editor Guide


ROTATING OBJECTS
GraphicObject.Rotate

GRA PHIC O BJEC T .R O TATE


23
The syntax for rotating an object at run time is as follows.

PowerVB Animation
objectname.rotate x, y, #ofdegrees

where:
• x - horizontal center of rotation
• y - vertical center of rotation
• degrees - rotation amount

Specifying a positive value for angle results in clockwise rotation; a negative value
for angle results in counter-clockwise rotation.

Rotation is cumulative, not absolute, which means a value of 30 for angle does not
necessarily rotate the object to 30 degrees. If the object has been rotated
previously, this rotates the object an additional 30 degrees clockwise.

If a rotation amount greater than 360 degrees is given, it is divided by 360 and the
remainder is used. For example, rotation amounts of 10 degrees and 370 degrees
have the same result. To use an absolute value for rotation, use the Reset method
prior to rotate. The following example illustrates how a line could be used as an
analog meter.

sub Drawing_Object_tempchange
' Set this object back to original rotation
\Meter.Reset

' Rotate this object to the degree value in


‘the tag temp_value
\Meter.Rotate x_pivot, y_pivot, temp_value
end sub

FactoryLink ECS / Application Editor Guide / 297


• ROTATING OBJECTS
• Implementing Rotation in PowerVB


IM PLEM ENTIN G R OTATIO N IN PO W ER VB
1 Create an object in the Application Editor.

2 Select the object.

3 Open the PowerVB animation editor.

4 Enter the necessary PowerVB code to rotate the object. The following example
rotates the graphic object 180 degrees clockwise in 20-degree increments and then
back to the original orientation.

Private x_pivot As Integer, y_pivot As Integer

sub Drawing_Object_DrawLoad
' Determine the center of the object
x_pivot = this.left + (this.width / 2)
y_pivot = this.bottom + (this.height / 2)
end sub

sub Drawing_Object_Click(Button As Integer, X As Long,_


Y As Long)
dim i as Integer
‘Rotate 180 degrees clockwise at 20 degree increment
For i = 1 to 9
this.rotate x_pivot, y_pivot, 20
Next i

‘Rotate 180 degrees counter-clockwise in 20 degree increment


For i = 1 to 9
this.rotate x_pivot, y_pivot, -20
Next i
end sub

The smoothness of an object’s rotation depends on the rotation angle and the
system hardware. A small rotation angle makes the rotation appear smooth but
may be slower and more processor intensive.

298 / FactoryLink ECS / Application Editor Guide


ROTATING OBJECTS
Implementing Rotation in PowerVB

5 Choose File>Validate to test the script. A message is displayed if the script is


executable. 23
6 Choose File>Save to save the script.

PowerVB Animation
7 Run the application to test the animation. If the object, sub-object, or composite is
not legal for rotation, an error message is displayed.

Keep in mind that the bounding box changes sizes for an object as it is rotated.
This could make the object rotate and move around on the screen simultaneously.
To prevent this, calculate the pivot point once (as in the following DrawLoad event
example) instead of in the event that triggers the rotation.

Example Code:

‘Use this code –


Private x_pivot As Integer, y_pivot As Integer

sub Drawing_Object_DrawLoad
x_pivot = this.left + (this.width / 2)
y_pivot = this.bottom + (this.height / 2)
end sub

sub Drawing_Object_Click(Button As Integer, X As Long, Y_


As Long)
this.rotate x_pivot, y_pivot, 20
end sub

‘Instead of this –

sub Drawing_Object_Click(Button As Integer, X As Long, Y_


As Long)
x_pivot = this.left + (this.width / 2)
y_pivot = this.bottom + (this.height / 2)
this.rotate x_pivot, y_pivot, 20
end sub

FactoryLink ECS / Application Editor Guide / 299


• ROTATING OBJECTS
• Implementing Rotation in PowerVB


Calculate the rotation point of an object based on another object. For example, to
create a clock, draw a circle for the clock face and a line for a second hand and
rotate the second hand about the center of the clock face as shown below.
Private x_pivot As Integer, y_pivot As Integer

sub Drawing_Object_DrawLoad
' Determine the center of the circle Clockface
x_pivot = \ClockFace.left + (\ClockFace.width / 2)
y_pivot = \ClockFace.bottom + (\ClockFace.height / 2)
end sub

sub Drawing_Object_onesecondevent
this.rotate x_pivot, y_pivot, 6
end sub

Composite Object Rotation


Composite graphic objects can be rotated only if all of their child objects are legal
rotation objects.

Sub-object Rotation
PowerVB subroutines can be attached to sub-objects inside a composite or inside
another sub-object. Multiple rotations utilizing objects, sub-objects, and
composites can occur in any order.

Rotating large or complex objects might have adverse affects on system


performance.

RedrawOn/RedrawOff
Use RedrawOff/RedrawOn statements to make object movement appear smoother
if several objects are being rotated. Refer to “RedrawOn and RedrawOff” on page
22-274 for more information.

300 / FactoryLink ECS / Application Editor Guide


ROTATING OBJECTS
Development Rotation

D EVELOP MEN T R O TATIO N


23
Objects can be rotated in 90-degree clockwise increments during development
time in the Application Editor. Perform the following steps to rotate an object

PowerVB Animation
during development time.

1 Create an object, sub-object, or composite in the Application Editor or open an


existing object.

2 Select the object, sub-object, or composite to be rotated.

3 Rotate the selected object using one of the methods below:


• Press Ctrl-R.
• Choose Edit>Rotate.
• Click on the rotate icon on the toolbar.

If the selected object is a legal rotation object, it rotates clockwise by 90 degrees.


Otherwise an error message is displayed. To rotate an object more than 90
degrees, repeat this step until the object is rotated to the desired orientation.

The pivot point for development rotation is the center of the object’s bounding box.

FactoryLink ECS / Application Editor Guide / 301


• ROTATING OBJECTS
• Development Rotation

302 / FactoryLink ECS / Application Editor Guide


Chapter 24





Creating PowerVB
Libraries and 24
Templates

PowerVB Animation
PO W ER VB L IBRA RIES
A PowerVB Library, comparable to a module in Microsoft Visual Basic®, is used to
store PowerVB functions and/or subroutines that may be called from a PowerVB
script attached to any graphic object within the application. Libraries are used to
store simple calculations and basic subroutines that are used many times
throughout several applications. Library scripts can also contain their own
private variables.

Library routines are loaded at run-time when the application starts. Libraries are
accessible from any script on any object on any drawing; however, drawings are
not directly accessible from a library.

As with drawings, libraries can be exported from one application and imported
into another. To open an existing PowerVB library not created in the current
application, it must first be imported — choose File>Import and then choose file
type Exported Libraries (*.plx).

FactoryLink ECS / Application Editor Guide / 24-303


• CREATING POWERVB LIBRARIES AND TEMPLATES
• PowerVB Libraries


Creating a PowerVB Library
The following procedure outlines how to create a PowerVB library. Refer to the
other PowerVB chapters and to the PowerVB Language Reference Guide for more
specific information on syntax, commands, and variables.

1 Choose File>Open PowerVB Library from the Application Editor. A window with the
names of all accessible libraries is displayed. The Open PowerVB Library dialog is
displayed.

24-304 / FactoryLink ECS / Application Editor Guide


CREATING POWERVB LIBRARIES AND TEMPLATES
PowerVB Libraries

2 Enter the name of the new library and choose Open to display the PowerVB
library editor. 24

PowerVB Animation

FactoryLink ECS / Application Editor Guide / 24-305


• CREATING POWERVB LIBRARIES AND TEMPLATES
• PowerVB Libraries


3 Enter the PowerVB variables, subroutines, or functions to be included in the
library.

Unlike event routines, beginning and ending statements for functions and
subroutines must be manually entered in libraries. Verify each statement has a
matching end statement.

For example, to implement a function to convert Fahrenheit temperatures to


Celsius in a library, enter the following code.

Function FtoC (Fdegrees as Integer) As Integer


‘Convert Fahrenheit to Celsius
FtoC = (Fdegrees - 32) * 5/9
End Function

4 Choose File>Validate from the PowerVB library editor. A message is displayed if a


syntax error is detected.

5 Choose File>Save.

Using the PowerVB Library Editor


The PowerVB library editor works very much like the PowerVB Animation Editor.
The main differences are in the options on the menu bar. The File Menu has an
extra option and the Event menu does not exist because event routines cannot be
defined in a PowerVB library.

The File Menu has one extra option — Save As. Also, the Save option works
differently. Since a PowerVB library is held in a separate file, Save writes the
PowerVB code to the file, as opposed to putting the code into a drawing when
editing graphic object PowerVB animation. The Save As option brings up a File
Save dialog similar to the one used for exporting text from the PowerVB editor.
Using this option, a separate copy of a PowerVB library can be created under a
new name.

24-306 / FactoryLink ECS / Application Editor Guide


CREATING POWERVB LIBRARIES AND TEMPLATES
PowerVB Libraries

Calling a Library Function or subroutine


24
To use a library function or subroutine in an object’s event routine, first declare it
in the object’s script outside of an event subroutine; then it can be used anywhere

PowerVB Animation
in the object’s code. The function or subroutine must be declared in each script in
which it is referenced.

The only difference between a function and a subroutine is a function returns a


value and a subroutine does not. Both functions and subroutines can pass
arguments when the function or subroutine is called. See the PowerVB Language
Reference Guide for more information on defining and calling functions and
subroutines.

For example, if the following function and subroutine were in an existing


library,

Function FtoC (Fdegrees As Integer) As Integer


' Convert fahrenheit to celsius
FtoC = (Fdegrees - 32) * 5/9
End Function
Sub SetAlarmTrigger
‘ Set a digital tag that has been configured as
‘ an alarm trigger
AlarmTrig.Force 1
End Sub

FactoryLink ECS / Application Editor Guide / 24-307


• CREATING POWERVB LIBRARIES AND TEMPLATES
• PowerVB Libraries


they could be called from an object script as follows.

Declare Function FtoC(FDegrees As Integer) As Integer


Declare Sub SetAlarmTrigger ( )
sub drawing_object_Click(Button As Integer, X As_
Long, Y As Long)
\txtCelsiusTemp.text = str$(FtoC(intFahrenheitTemp))
If \txtCelsiusTemp.text > 100 then
SetAlarmTrigger
End If
end sub

24-308 / FactoryLink ECS / Application Editor Guide


CREATING POWERVB LIBRARIES AND TEMPLATES
PowerVB Templates

PO W ER VB T EM PLA TES
24
When creating PowerVB code for an object in a Power Pack, templates can be used
as placeholders for specific values provided when the object is pasted into a

PowerVB Animation
drawing. Common code can also be set up for use as a template. This is helpful
when attaching code to an object that will be used in several different applications
because the code will be copied and pasted with the object.

Templates are applicable in PowerVB code or in a tag event trigger list. The
format for a template variable in PowerVB is the same as with other types of
animation ({variablename}).

Template Variables
As with other types of animation, the same template variable can be used multiple
times within an object’s animation. For example, if the template variable
{alarmtag} is used in paint animation, it can also be used in a tag event trigger
list.

Note

Template variables cannot be used in PowerVB libraries.

The following paragraphs provide more information on using template variables.

Template Variables in Tag Event Definitions

When defining a tag event, specify one or more template variables in the tag list
instead of tags. When the object’s code is saved, the user is prompted to define the
template variables. When the object containing the tag event is pasted, the user is
prompted to enter values for the template variables. If values entered for the
template variables are not valid tags, they will be ignored.

Template variables in PowerVB Code

Example Code:
sub Drawing_Object_Click(Button As Integer, X As Long,_
Y As Long)
this.fillcolor = {newcolor}
end sub

FactoryLink ECS / Application Editor Guide / 24-309


• CREATING POWERVB LIBRARIES AND TEMPLATES
• PowerVB Templates


If a template variable is specified in PowerVB code, the user is prompted to define
the template variables when the code is saved.

When an object containing the code is pasted, the user is prompted to enter values
for the template variables.

Template variables in PowerVB code are always displayed as variable names.


Choose Animation>Template... to view the values of template variables.

The maximum length of a template variable name is 30 characters.

24-310 / FactoryLink ECS / Application Editor Guide


Chapter 25





Hierarchical Graphic
Object Naming 25

PowerVB Animation
OVE RVIEW
Since graphic objects can be combined to create new objects, all objects in the
Application Editor are part of a hierarchical graphic object naming system. Each
object has an assigned ID and a name.

An object is a parent, child, or sibling, depending on its relationship to other


objects. Definitions of these three types of objects are:
Parent A composite object.
Child An object that is part of a composite; sub-object; a composite
object.
Siblings Objects at the same hierarchical level.

Object names will not change unless the object is pasted into a drawing that has a
top-level object with the same name as the object in the paste-buffer or unless the
user changes the name in the Application Editor (CTRL-N).

OB JE CT N A MES
Assign an object name for any object that will be copied and pasted into another
drawing or application. For example, a dial that has been created in the
Application Editor might contain objects named as follows:

Dial

DialFace

Objects are referred to by their IDs except in PowerVB code. It is a good idea to
rename objects to reflect their usage. For example, it is easier to reference object
txtInputName than h1234.

FactoryLink ECS / Application Editor Guide / 311


• HIERARCHICAL GRAPHIC OBJECT NAMING
• Object Names


Default object names will not change unless an object is pasted and another object
on the drawing already exists with the same name. In such a case, the object being
pasted is re-named.

312 / FactoryLink ECS / Application Editor Guide


HIERARCHICAL GRAPHIC OBJECT NAMING
Naming Objects in the Application Editor

N AMI NG OB JE CTS IN TH E A PPLICA TION ED ITOR


25
1 Create an object in the Application Editor or open an existing drawing containing
the object to be named.

PowerVB Animation
2 Select the object to be named.

3 Choose Attributes> Object Name.

4 Name the object and click OK to accept the new name.

This is the object’s ID.

R EFEREN CING G RAP HIC OB JE CTS IN P O WE R VB S CRIP TS

Implicit Referencing
When referencing an object in a PowerVB script, refer to it in the context of the
current object (object this script is attached to) or in its context as a descendant of
the drawing’s top level. The following diagram illustrates this concept.

Drawing

Object1 Object2 Object3

ObjectA ObjectB ObjectC ObjectD ObjectA ObjectB

A discussion of some of the relationships in the diagram follows.

FactoryLink ECS / Application Editor Guide / 313


• HIERARCHICAL GRAPHIC OBJECT NAMING
• Referencing Graphic Objects in PowerVB Scripts


• Object2 is a parent to ObjectC.
• ObjectC and ObjectD are child objects of Object2.
• Object1, Object2, and Object3 are siblings. ObjectA and ObjectB are siblings,
but ObjectA is not a sibling to Object1.

All objects are descendants of the drawing. Object1, Object2, and Object3 are
composite objects each with two sub-objects. Both Object1 and Object3 have child
objects named ObjectA and ObjectB (names of sub-objects must be unique only to
the parent object, not the drawing).

If ObjectC was a composite object, it would be a parent relative to its child objects
but a child relative to Object2.

Syntax

Syntax is important when referencing an object in PowerVB code because it tells


PowerVB the path to the object. The correct syntax for referencing objects is:
• .. — move one level up the hierarchy
• \ — separator for object names

314 / FactoryLink ECS / Application Editor Guide


HIERARCHICAL GRAPHIC OBJECT NAMING
Referencing Graphic Objects in PowerVB Scripts

The code samples below illustrate changing the fillcolor property of an object from
another object’s code in the context of the diagram on the previous page. The 25
same syntax is applicable to read or write other object properties.

PowerVB Animation
Code in Object1:
‘Declare an object variable for a sibling
dim g as GraphicObject
set g=..\Object2

‘Declare an object variable for a child


dim g as GraphicObject
set g=ObjectA

‘Declare an object variable for a child of a sibling


dim g as GraphicObject
set g=..\Object2\ObjectC

‘Reference a property of a child


ObjectA.FillColor=20

‘Reference a property of a top-level object (child of


‘a drawing)
\Object3.FillColor=20

‘Reference a property of a parent


...FillColor=20

‘Reference a property of a child of a sibling


..\Object2\ObjectC.FillColor=20

FactoryLink ECS / Application Editor Guide / 315


• HIERARCHICAL GRAPHIC OBJECT NAMING
• Referencing Graphic Objects in PowerVB Scripts


Code in ObjectA (sub-object of Object1):

‘Declare an object variable for a sibling


dim g as Graphic Object
set g=..\ObjectB

‘Declare an object variable for a parent


dim g as GraphicObject
set g=..

‘Reference a property of a parent (Object1)


...FillColor=20

A child object name must always follow an instance of the backslash character (\).
If referencing the current object in a script, it is better to use the keyword this
instead of the specific object name.

Explicit Referencing
This alternate method of referencing objects requires more typing than the above
method but provides the ability to use string variables to specify object names.
Since the string variables can be built up in code, any errors in object names are
not detected until run time.

Example Code:
‘In a script for a composite object that has child
‘objects Object1, Object2, Object3, Object4, and
‘Object5
dim i as Integer
For i = 1 to 5
' Change child object fillcolors
this.c("Object" & trim(str$(i))).fillcolor = i
Next i

316 / FactoryLink ECS / Application Editor Guide


HIERARCHICAL GRAPHIC OBJECT NAMING
Referencing Graphic Objects in PowerVB Scripts

Syntax for Explicit Referencing Method:


• . – Separator for parent/child references 25
• P (or Parent) – Move one level up the hierarchy (note that the object name is not

PowerVB Animation
specified for the parent since an object only has one parent)
• C (or Child) - Move one level down the hierarchy (note that the object name
must be specified for the child since an object could have several children)

Code in Object1:

drawing.c("Object2").c("ObjectC").FillColor = BLUE
this.c("ObjectA").fillcolor = BLUE

Code in ObjectA (sub-object of Object1):

this.p.Fillcolor = BLUE 'change fillcolor of Object1

drawing.c("Object3").c("ObjectB").Fillcolor = BLUE
‘same as
..\..\Object3\ObjectB.Fillcolor = BLUE

When using the alternate method, graphic object references must begin with
drawing or this or some explicit graphic object variable.

FactoryLink ECS / Application Editor Guide / 317


• HIERARCHICAL GRAPHIC OBJECT NAMING
• Referencing Graphic Objects in PowerVB Scripts


The following table includes examples of correct hierarchical object naming in
PowerVB.

Table 25-1 Hierarchical Object Names

Object Hierarchical Syntax Comment to Explain Hierarchy

dim g as GraphicObject ‘This has a sibling named


‘shadow.
set g = ..\shadow

myComp\ell3.FillColor = 21 ‘This is a composite, with a


‘composite child named myComp.
‘myComp has a child named
ell3.

J% = ..\..\c1\c2\b3.Height ‘This has a composite parent


‘who has a composite sibling
‘named c1. c1 has a composite
‘child named c2, and c2 has a
‘child named b3.

\topComp\twirly.reset ‘topComp is a top-level


‘composite, with a child named
‘twirly.

kiddo.rotate 6000 7000 15 ‘this is a composite, with a


‘child named kiddo.

\TopObj or ..\brother cannot be used in PowerVB libraries. However, graphic


objects and drawing objects can be passed into library routines and used with the
explicit method using .parent and .child. For example, the following PowerVB
library subroutine could manipulate a child object of the given drawing.

Sub MakeObjectRed (dwg as DrawingObject, name as string)


dwg.child(name).fillcolor = RED
End Sub

This library function is called from an object’s script as follows.

MakeObjectRed (drawing, “TopLevelObject”)

318 / FactoryLink ECS / Application Editor Guide


HIERARCHICAL GRAPHIC OBJECT NAMING
Performance Considerations

PER FORM AN CE C ONS IDERA TIONS


25
At run time, hierarchical graphic object names must be bound to objects on the
drawing. This binding takes some time.

PowerVB Animation
Knowing this, performance of some operations can be improved, as illustrated in
the example below.

‘Slower
for i% = 1 to 500
\obj1\obj2\obj3.left = \obj1\obj2\obj3.left + 10
next i%

‘Faster
dim obj as GraphicObject
set obj = \obj1\obj2\obj3
for i% = 1 to 500
obj.left = obj.left + 10
next i%

FactoryLink ECS / Application Editor Guide / 319


• HIERARCHICAL GRAPHIC OBJECT NAMING
• Object IDs


OB JE CT ID S
Each object is assigned an ID when it is created. Object ID’s are unique within a
drawing and the user cannot change them. Unlike object names, new object IDs
are always assigned when an object is pasted. Event subroutine names in the
pasted object are updated with the new object ID automatically. To keep event
routines names unique throughout a drawing, object IDs are used in the names
instead of object names. This is the only place PowerVB uses object IDs.

Finding an Object

Within a Script

Using the text searching capabilities in the PowerVB animation editor, search for
either ID in an event name, object name, or any other text. Remember that object
IDs are only used in event routine names. All other references to objects are by
their names.

Within a Cross Reference

The cross-reference list is used only for finding references to tags (RTDB
elements). To find where tags are used in PowerVB tag event trigger lists or
PowerVB code, search for the object’s ID, not its name.

Within a Drawing

ChooseEdit>Find in the Application Editor to display a list of all object IDs and go
to a specific object based on its ID. Use Find by Name to find the first object having
a given name and then use Find Next to find other objects on the drawing that have
the same name.

Note

PowerVB will not allow the user to change an object ID.

320 / FactoryLink ECS / Application Editor Guide


Chapter 26





Debugging a PowerVB
Script 26

PowerVB Animation
PR INTING P OW E R VB C O DE
There are two ways to review PowerVB code in printed form:
• Use the Document PowerVB menu option in the Application Editor.
• Print a single script or part of a single script.

D OC UME NT P O WE R VB
The Document PowerVB command writes a text file to show the PowerVB code for
all objects in a drawing. ChooseFile> Document PowerVB in the Application Editor
to create a text file listing the following information.
• All of the objects in the current drawing that have PowerVB animation defined
• The event subroutines defined for each object
• Trigger tags for tag events
• Other types of animation defined for each object
• All of the variables and/or tags referenced in each object’s code
• Listing of code by object with line numbers

This text file is named drawingname.src and is saved in the FLAPP\USER\DRW


directory. A window is displayed to confirm the name and location of the file.

Note

The Document PowerVB report is export only—it cannot be edited


and imported back into an application.

FactoryLink ECS / Application Editor Guide / 321


• DEBUGGING A POWERVB SCRIPT
• Printing a Single Script or Part of a Single Script


The Document PowerVB report does not include routines in libraries. To create a
listing of the code in a library, choose File>Export on the PowerVB animation
editor after opening the library.

Highlight the desired code and choose File>Export in the PowerVB animation
editor to create a text file listing all or part of the code in an object.

The Document PowerVB report and exported code listings are in ASCII text
format and can be viewed and printed from any text editor.

PR INTING A S ING LE S CR IPT OR PA RT OF A S ING LE S CRI PT


1 Select the text to be printed.

2 ChooseFile> Export. The file is exported to a text file with a name specified by the
user.

3 Open the file through a text editor.

4 Print the code.

OTH ER D EBUG GIN G M ETHOD S


Several tools are available to assist with resolving problems in PowerVB code:
• Error message box
• Handling run-time errors with the On Error statement
• Using Print statements

322 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Error Message Box

ERR OR M ESSA GE B OX
26
Use a message box to show the values of variables at run time. Be sure to remove
or comment out any message boxes added for debugging purposes before

PowerVB Animation
implementing the application.

Example Code:

Global Setting1, Setting2 As Integer

sub Drawing_Object_Click(Button As Integer, X As Long, Y As


Long)
If Setting1 > 50 then
Setting2 = 100
End If
MsgBox “Setting1: “ & str$(Setting1) & “Setting2: “ &_
str$(Setting2)
end sub

Message boxes are system-modal. When a message box is displayed, other


applications, including run-time graphics, are suspended until the message box is
dismissed. Be careful when using message boxes in applications that run
unattended.

Message boxes are only available on Windows NT, Windows 95, and OS/2
platforms. Refer to the PowerVB Language Reference Guide for more information
on the Msgbox statement.

Variations on this method include:


• Writing this data to the Window.Title instead of a message box
• Writing this data to a message tag and adding this tag to a Watch List in
Run-Time Monitor
• Creating a temporary text field on a drawing and write status information in
the text field

FactoryLink ECS / Application Editor Guide / 323


• DEBUGGING A POWERVB SCRIPT
• On Error Statement at Run Time


ON E RRO R STATE MEN T AT R UN T IM E
Trap run-time errors using the On Error and Resume BASIC statements. The
following example shows the basics of using these statements.

Sub SomeDrawing_SomeObjectID_Click(Button As Integer, X_


As Long, Y As Long)
On Error Goto Error_Handler_Section
' regular code goes here
Exit Sub

Error_Handler_Section:
'Handle the error however you like. You can "Resume Next"
‘to continue working or "Exit Sub" to stop the event or do
‘something else...

End Sub

Refer to the PowerVB Language Reference Guide for a detailed explanation of


run-time error trapping with the On Error and Resume... statements.

If run-time errors are not trapped in code with the On Error statement, PowerVB
detects these errors. When PowerVB detects a run-time error, it stops the event
routine the error occurred in and displays a message box listing the details of the
error. This message box is modal. Unless someone is monitoring the application,
it could wait a long time for a response to this message box. So, by trapping these
errors yourself, you can control whether the event routine can continue or not.
You can also control where error information is logged so users of the application
are not presented with cryptic error information they do not understand and so
the application is not hung up waiting for a user to respond to the error.

324 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Using Print Statements

U SING P RINT S TATEM ENTS


26
Overview

PowerVB Animation
The Print statement in the PowerVB version of BASIC prints to a file named
vbdebug.log. Use the Print statement to provide primitive debugging capabilities
for a FactoryLink application and for putting Print statements in an application
that prints information at run time about the current state of the application.

Using the BASIC Print Statement


The syntax of the Print statement is:
Print [[{Spc(n) | Tab(n)}][expressionlist][{; | ,}]]

Output from the Print statement is sent to the vbdebug.log file.

Table 26-1 Data Output Formats

Data Type Description

String Printed in its literal form, with no enclosing quotes.

Any numeric type Printed with an initial space reserved for the sign. If the
number is positive, a space is left before the digits of the
number. If the number is negative, a negative sign is
printed before the digits of the number. Also, a space is
printed after each number.

Boolean Printed as “True” or “False.”

Date Printed using the short date format. If either the date or
time component is missing, only the provided portion is
printed. This is consistent with the “general date” format
used by the Format and Format$ functions.

Empty Nothing is printed.

Null Prints “Null.”

User-defined Printed as “Error <code>,” where “<code>” is the value of


errors the user-defined error. The word “Error” is not translated.

FactoryLink ECS / Application Editor Guide / 325


• DEBUGGING A POWERVB SCRIPT
• Using Print Statements


Each expression in expressionlist is separated with either a comma or a
semicolon. A comma means the next expression is output in the next print zone. A
semicolon means the next expression is output immediately after the current
expression. Print zones are defined every 14 spaces. If the last expression in the
list is not followed by a comma or a semicolon, then a carriage return is printed to
the file. The next Print statement outputs information on the next line of the file.
If the last expression ends with a semicolon, no carriage return is printed. The
next Print statement will output information immediately following the
expression on the same line of the file. If the last expression in the list ends with
a comma, the next Print statement outputs information at the start of the next
print zone on the current line.

The Tab and Spc functions provide additional control over the column position.
The Tab function moves the output position to the specified column. The Spc
function outputs the specified number of spaces. Refer to the PowerVB Language
Reference Guide for more information on the Print, Tab, and Spc functions.

326 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Using Print Statements

Examples of Print Statements and the Output Generated


26
The following examples illustrate the output for the vbdebug.log file for several
different print statements in PowerVB code.

PowerVB Animation
Statement:
Print “Hello”; “world”

Output:
Helloworld

Statement:
Print “Hello”, “world”

Output:
Hello world

Statement:
Print “The value of i=”;i%,”The value of s=”;s$

Output:
The value of i= 10 The value of s=This is a test.

FactoryLink ECS / Application Editor Guide / 327


• DEBUGGING A POWERVB SCRIPT
• Using Print Statements

Statement:
Print i%,,s$

Output
20 This is a test too.

Statement:
Print i%; Spc(10); s$

Output:
30 Testing...

Statement:
Print i%; Tab(30); s$
Print i%; Tab(10); j%; Tab(30); s$

Output:
50 PowerVB
50 500 PowerVB

328 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Using Print Statements

26
Statement:

PowerVB Animation
Print i%; s$,
Print 67;
Print "Goodbye"

Output:
-1001 computer 67 Goodbye

Print Statements with Multiple Running Events


PowerVB code for two or more PowerVB-animated graphic objects can run at the
same time. For example, suppose two box objects on a drawing both have tag
events triggered by the same tag. When the tag’s value changes, the tag
subroutines for both boxes start running at approximately the same time. This
has an impact on the Print statement. If two or more PowerVB subroutines
execute a Print statement at about the same time, the output from the Print
statements will not normally be intermingled.

For example, suppose object box1 had the following event routine triggered by
changes in the A_SEC tag.

sub Drawing_1001_ASecChanged
print “ABCDEFG”
end sub

Also, suppose object box2 had the following event routine also triggered by
A_SEC.

sub Drawing_1003_ASecChanged
print “TUVWXYZ”
end sub

FactoryLink ECS / Application Editor Guide / 329


• DEBUGGING A POWERVB SCRIPT
• Using Print Statements


If both of these event routines ran at the same time, the output to vbdebug.log
could be:

ABCDEFG
TUVWXYZ

or it could be:

TUVWXYZ
ABCDEFG

but it could not be this:

ABCTUVDEFWGXYZ

There is one circumstance in which Print statement output from two or more
routines can intermingle on the same line in vbdebug.log. This is when one or
more of the Print statements ends with a comma or semicolon which tells
PowerVB to start printing the output of the next Print statement on the same
line.

For example, if we changed box1’s tag event code from above to the following,

sub Drawing_1001_ASecChanged
' end the following Print statement with a semicolon so the
' next print statement prints on the same line
print "ABCDEFG(";
print “)HIJKLMNOP”
end sub

then the output to vbdebug.log could be:

ABCDEFG()HIJKLMNOP
TUVWXYZ

330 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Using Print Statements

or it could be:
26
TUVWXYZ

PowerVB Animation
ABCDEFG()HIJKLMNOP

or it could be:

ABCDEFG(TUVWXYZ
)HIJKLMNOP

The output from the two Print statements running at the same time can only
intermingle at the position where the comma or semicolon occurs. For example,
the output from the sample code above could not be

ABCDEFG()HIJKTUVWXYZLMNOP

because the two Print statements in box1’s tag event code are separated between
ABCDEFG and HIJKLMNOP.

FactoryLink ECS / Application Editor Guide / 331


• DEBUGGING A POWERVB SCRIPT
• Using Print Statements


Use Critical and EndCritical statements to prevent intermingling and still use
Print statements ending with a comma or semicolon. For example, if we wrap
box1’s tag event Print statements from the above example with Critical and
EndCritical statements as follows,

sub Drawing_1001_ASecChanged
' end the following Print statement with a semicolon so the
' next print statement prints on the same line. By
' enclosing the two Print statements in
' Critical/EndCritical statements,
' no intermingling of output can occur.
Critical
print “ABCDEFG”;
print “HIJKLMNOP”
EndCritical
end sub

then no intermingling can occur. The output from this tag event routine’s Print
statements would always occur on the same line with no other Print statement
output between these statements’ output. Recall that the Critical and EndCritical
statements tell PowerVB that the code between them must be allowed to run
without being interrupted by code from any other event routines.

332 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Using Print Statements

Header Information In Debug Output File


26
Every time FactoryLink application executes its first Print statement, header
information is appended to the vbdebug.log file. This information shows where

PowerVB Animation
each separate run of the application occurs. The information written in each
header section includes a row of asterisks to visually separate output from
different application runs and the date and time. For example, a header section
might look like this:

output from previous run of FactoryLink application

***************************************************************
*
Logging session started: Sun Jan 14 13:09:38 1996
output from new run of FactoryLink application

Location of Debug Output File


As stated earlier, the output from the Print statements goes to a file named
vbdebug.log. The location path of this file is:
{FLAPP}\{FLNAME}\{FLDOMAIN}\{FLUSER}\log\vbdebug.log

The {FL...} portions of this path are environment variables defined for every
FactoryLink application. For example, suppose a FactoryLink application was in
directory C:\ECS\APPS, the FLAPP value. Suppose the values of FLNAME,
FLDOMAIN, and FLUSER were FLAPP1, USER, and JOHN, respectively. In
this case, the full path to the vbdebug.log file would be:
C:\ecs\apps\flapp1\user\john\log\vbdebug.log

If a different user named SALLY used the same application, thus changing
FLUSER to SALLY, then this user’s vbdebug.log file would be in the following
path:
C:\ecs\apps\flapp1\user\sally\log\vbdebug.log

Including the domain, FLDOMAIN, in the path allows different vbdebug.log files
for graph to be running in different domains. Including the user name, FLUSER,
in the path lets different users of the same application have different vbdebug.log
files.

FactoryLink ECS / Application Editor Guide / 333


• DEBUGGING A POWERVB SCRIPT
• Using Print Statements


If for any reason one of the environment variables used to create the path to the
vbdebug.log file does not exist, then trying to use the Print statement in PowerVB
code will cause a run-time error. The exception to this rule is if the FLUSER
environment variable is not defined, a default value of shared is used in its place.

Disabling Debug Output


Once the PowerVB code in the application has been debugged, the Print
statement output may no longer need to go to the vbdebug.log file. PowerVB has a
way to turn off the output of Print statements so they can remain in the code and
dormant debugging is not necessary. Two global tags are defined for every
FactoryLink application. Their names are VBLOGDISABLE_S and
VBLOGDISABLE_U. Their default values are zero. When VBLOGDISABLE_S
is set to one, Print statement output for graph running in the SHARED domain is
disabled. Nothing will go to the vbdebug.log file. When graph is running in the
USER domain, setting VBLOGDISABLE_U to one will disable Print statement
output to vbdebug.log. For example, suppose the following code was executed by
graph running in the USER domain:

VBLOGDISABLE_U.Value = 0 'turn on output


Print “Line 1"
VBLOGDISABLE_U.Value = 1 'turn off output
Print “Line 2"
VBLOGDISABLE_U.Value = 0 'turn on output
Print “Line 3"

The output from this PowerVB code to vbdebug.log would be:

Line 1
Line 3

The Print statement that tried to output Line 2 would be disabled because the tag
VBLOGDISABLE_U had the value one at the time the Print statement was
executed.

334 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Using Print Statements

After debugging, set the default value of these two tags in the Application Editor
or Configuration Manager to one so the Print statements will be ignored. 26

PowerVB Animation
Note

When graph is running in the USER domain, changing the value of


tag VBLOGDISABLE_S has no impact. Likewise, changing the
value of tag VBLOGDISABLE_U when graph is running in the
SHARED domain has no effect. Remember to change the correct
tag to turn off Print statement output for the domain in which
graph is running. To be safe, set both tags to one to make sure
Print statement output is disabled for any domain.

Examples of the Print statement used with objects unique to FactoryLink include:
• RTDBObject:
• GraphicObject:
• DrawingObject:
• WindowObject:

Refer to Chapter 22, “Using Properties and Methods in PowerVB,” for more
information on PowerVB variables and FactoryLink tag types.

FactoryLink ECS / Application Editor Guide / 335


• DEBUGGING A POWERVB SCRIPT
• Using LogView to Display Debug Output


U SING L O G V IEW TO D ISPLAY D EB UG OU TPUT
LogView provides a convenient means for viewing the vbdebug.log files created in
PowerVB.

Overview
Any text editor can be used to view a vbdebug.log file. However, LogView was
designed specially for this task. It offers the following advantages over most text
editors:
• The view of the vbdebug.log file is periodically updated to show any new output
from Print statements in a running FactoryLink ECS application.
• LogView has the ability to view files of any size.
• The GUI interface for LogView is user friendly.
• LogView is a file viewer and not an editor, so it is impossible to accidentally
overwrite information in the vbdebug.log file.
• LogView is available on all platforms FactoryLink ECS runs on and operates
the same on each of these platforms.

Starting LogView
LogView can be started using the GUI method appropriate to the operating
system you are using:
• Windows NT — select the LogView icon from the FactoryLink section of the
Programs section of the Start menu.
• Windows 95 — double-click the LogView icon in the FactoryLink program group
in Program Manager.
• OS/2 — double-click the LogView icon in the FactoryLink folder.

LogView can also be launched from the command line. To do so, enter the
following command at the command line:

logview [filename(s)] [-refresh nnn]

The optional filename(s) part of the command identifies one or more files to select.
The optional -refresh nnn part of the command lets you define the refresh rate to
use. The refresh rate is described further below.

336 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Using LogView to Display Debug Output

When you start-up LogView, the first window you see identifies LogView and
displays copyright information followed by LogView’s main window. 26

PowerVB Animation
This window has a menu bar and toolbar for selecting performance commands. It
has a files area in the middle with horizontal and vertical scroll bars to display
icons for the files that are selected for viewing. The menus on the main window
and their options are detailed on the following pages.

File Menu

Use the File menu to open a file in LogView and to exit LogView.

Open Brings up the Open File dialog to open a file for viewing.
Exit Exits the LogView application.

FactoryLink ECS / Application Editor Guide / 337


• DEBUGGING A POWERVB SCRIPT
• Using LogView to Display Debug Output


Options Menu

The Options menu allows you to change the name of the file icons to the full path
name or the file name. A check mark is displayed next to Full Path Name when it is
enabled.

Full Path Name Displays the full name of the file icons shown in the LogView
main window files area.

Help Menu

The Help menu option About LogView ... re-displays the window giving copyright
and version information for the LogView application.

Selecting a File to View


1 Choose File>Open in the main LogView window to display the Open File dialog.

2 Select a file for viewing from the Open File dialog. Usually, you will select the
vbdebug.log file in the appropriate directory, but you are not limited to viewing
vbdebug.log. Any text file can be viewed with LogView. The Open File dialog looks
very similar to the Import and Export dialogs in the PowerVB animation editor.
Refer to Chapter 18, “PowerVB Editor,” for descriptions of each menu item.

If you select a file with the Open File dialog and press the Open button, an icon for
the file is displayed in the main LogView window’s file area. You can open several
files using the Open File dialog which will put several icons in the files area of
LogView’s main window.

338 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Using LogView to Display Debug Output

Using the Full Path Names Option When Viewing File Icons
26
If several files are opened and have the same name but reside in different
directories, the names of their icons will be the same which can be confusing. If

PowerVB Animation
you select Full Path Name from the Options menu, the files’ full paths will be
displayed under their icons as in the following example.

This lets you see exactly which file is represented by each icon. Choosing
Options>Full Path Name again will change the icons’ names back to the basic name
and extension.

Viewing a File
Once one or more file icons are in the main window’s files area, double-click an
icon and view the file’s contents. The sections of this window are detailed in the
following paragraphs.

Title Ba

Has the text LOGVIEW: filename in it where filename is the full name of the file
being viewed.

FactoryLink ECS / Application Editor Guide / 339


• DEBUGGING A POWERVB SCRIPT
• Using LogView to Display Debug Output


Menu and Toolbar

The following commands are available on the menu and toolbar.


Refresh If automatic refreshing is off indicated by a clock on the toolbar
button, this menu option turns it on. If the button has a stop sign
on it, automatic refreshing is enabled. When the button is
pressed, its appearance changes to the clock image above to
indicate automatic refreshing is disabled. Pressing the button
again changes it back to a stop sign to indicate automatic
refreshing is enabled.
Help About LogView — displays the window showing copyright
information for the LogView application.

File Contents Area

Displays the contents of the file being viewed. A vertical scroll bar lets you scroll
to lines in other parts of the file. A horizontal scroll bar lets you scroll sideways to
see more of a line when lines in a file are wider than the contents area. Select and
copy lines in the file to the clipboard so they can be pasted into another
application.

Status Area

Tells the number of the first line selected in the viewer and the total number of
lines in the file being viewed. If you have not selected any lines in the file, the
first number is zero.

Refresh Rate

Adjusts how often the viewer’s file information is refreshed. This rate is specified
in seconds with a valid range of 1 to 100 seconds. To use the Refresh Rate section
of the window, drag the rate indicator to the left or right to decrease or increase
the rate or press the left and right arrows. If you click on the left or right arrow
once, the refresh rate decreases or increases by one second. If you press the left or
right arrow with the left mouse button and hold the button down, the refresh rate
will constantly decrease or increase until you release the button or reach an end of
the valid range.

340 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Using LogView to Display Debug Output

Heart Beat Indicator


26
This section of the viewer window updates the color of the bars periodically to
show the LogView viewer window has not locked up. Like a heart beat monitor,

PowerVB Animation
this section shows the application is running correctly. If automatic file refreshing
is disabled, the “Heart Beat” indicator will stop. It will not restart until automatic
refreshing is again enabled.

Refresh Rate and Updating Viewer Window’s File Contents Area


If you are viewing the contents of the vbdebug.log file while the FactoryLink
application is running, then Print statements might be still changing the file. So,
LogView has the automatic refresh ability — the ability to periodically refresh its
view of the file’s contents. In other words, periodically it rereads the file’s
contents and displays them in the file contents area of the viewer window.
Without this ability, you would have to close and reopen the file every time you
wanted to see changes in it.

Control the rate at which LogView refreshes by using the Refresh Rate section of
the viewer window and/or specifying a refresh rate on the command line when you
start LogView. The default refresh rate is 10 seconds meaning LogView will check
for changes in the file every ten seconds. The refresh rate can change from 1
second or up to 100 seconds.

When automatic refreshing is turned on and the viewer window detects that the
file has changed, it re-reads the contents of the file and forces you to view the last
section of the file. This is where the changes would be in a vbdebug.log file. Turn
off automatic refreshing by pressing the stop sign button on the viewer window’s
toolbar. Turn off automatic refreshing to scroll up in the file contents and not be
forced to the bottom of the file when changes are detected in the file. Turn
automatic refreshing back on by clicking the toolbar button again. When
automatic refreshing is off, the button contains a picture of a clock to let you
know.

FactoryLink ECS / Application Editor Guide / 341


• DEBUGGING A POWERVB SCRIPT
• Troubleshooting


T RO UBLES HOO TING
The following paragraphs outline troubleshooting tips for programming code in
PowerVB.

Case Sensitivity Issues


When you enter code, it is executed verbatim at run time. Watch for spacing. Note
that PowerVB is not case-sensitive except for object names in explicit
declarations.

Reserved Words
All statement and function names in the PowerVB Command Reference as well as
the properties and methods described here are considered reserved words. These
words cannot be used as variable names in PowerVB code.

PowerVB Code Attached to Sub-Objects


Care must be taken when using PowerVB on the sub-objects of a composite object.
When a mouse event occurs, only the top-most object that responds to mouse
events will be notified of the event. For example, if a composite object has a child
that responds to mouse down events and the child has a child that responds to
them as well, the grandchild will never receive any mouse down events.

Multi-threading
When PowerVB lets more than one event routine execute at the same time, this is
called multi-threading. This is different from Visual Basic, where only one event
routine at a time can execute. Allowing multi-threading makes PowerVB more
flexible but also makes coding more complicated in several ways.

Do not rely on a specific execution order for events on different objects in a


drawing. Even if you create object A in the Application Editor before you create
object B, this doesn’t mean object A’s DrawLoad event will run before object B’s
DrawLoad event. Even if drawing X loads before drawing Y, you cannot be sure
that DrawLoad events for objects on drawing X will execute before those on
drawing Y. To ensure a certain execution order for statements in DrawLoad
events, put all the statements in one DrawLoad event on one object.

342 / FactoryLink ECS / Application Editor Guide


DEBUGGING A POWERVB SCRIPT
Troubleshooting

Just as multiple events for different objects can run at the same time, multiple
events for a single object can be running at the same time with some restrictions. 26
All tag events for an object can run at the same time. However, all other types of
events (drawing, mouse — commonly referred to as GUI events) occur one at a

PowerVB Animation
time in the order they were detected.

Endless Loops
Watch for endless loops. A FactoryLink application will not shut down until all
event routines that are running end. So, an application could be frozen until you
forcibly terminate it using whatever method the operating system provides. The
same problem can occur when you try to unload a drawing from memory. The
application will wait for the PowerVB event routines running on that drawing to
end before closing the drawing.

For example, the following code would be an endless loop. (Since A_SEC is a
counter for the number of seconds since the last minute, its value will always be
less than 61.).
While A_SEC.value < 61 ‘A bad thing
x = x + 1
Wend

Execution Order at Run Time


A drawing will not be unloaded until all PowerVB scripts in all of its objects have
terminated.

Multiple DrawLoad event procedures can exist in multiple objects. If multiple


DrawLoad events exist for a drawing, they are executed in the order the objects
are saved in the .g file. If the execution order of the DrawLoad code is important,
put all of the DrawLoad code in a single object. It will then execute sequentially as
expected.

FactoryLink ECS / Application Editor Guide / 343


• DEBUGGING A POWERVB SCRIPT
• Troubleshooting

344 / FactoryLink ECS / Application Editor Guide


Data Reporting Configuration Guide

Part V






























Security

345
Security in the Application Editor Guide Security in this book

Table of Contents





Security

27 Graphic Object Security Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 349


Key Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Application Administrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Application User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Security Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
FLADMIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Security Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Planning Security for Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Deciding How Authorized Users Will Log in and Out . . . . . . . . . . . . . 354
Determining Object Security Requirements . . . . . . . . . . . . . . . . . . . . . 354
Implementing Security in Your Application . . . . . . . . . . . . . . . . . . . . . . . . 356
Security and Stacked Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

28 Configuring Security Using FLADMIN . . . . . . . . . . . . . . . . . . . . . 359


Accessing FLADMIN . . . . . . . . . . . . . . . . ......... ......... ........ 360
Defining a Security Class . . . . . . . . . . . . . ......... ......... ........ 361
Defining a User . . . . . . . . . . . . . . . . . . . . . ......... ......... ........ 365
Setting the Password Type . . . . . . . . . . . ......... ......... ........ 368
Setting the Administrator Password . . . . ......... ......... ........ 370

29 Setting up Security Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373


Setting Security Login Options . . . . . . . . ......... ......... ........ 374
Defining Error Messages . . . . . . . . . . . . . ......... ......... ........ 377
Defining Login Messages . . . . . . . . . . . . . ......... ......... ........ 379
Logging Security Events . . . . . . . . . . . . . ......... ......... ........ 381

FactoryLink ECS / Application Editor Guide / 347



Security


348 / FactoryLink ECS / Application Editor Guide


Chapter 27





Graphic Object
Security Overview

As you set up applications in FactoryLink, you may want to control who has
access to the functions within the application. For example, you may want to
ensure a particular part of your application is not available to all users.
FactoryLink’s Security feature allows you to restrict access so unauthorized users
cannot access certain functions, while authorized users are granted access to
these functions.

In FactoryLink, security focuses on graphic input objects—that is, when you


create a FactoryLink graphic object, you can enter a specific security class for the
graphic object. If a user does not have access to the specified security class, the 27
user cannot access the graphic object.

Security can be assigned to each of the three input object types:


• Buttons

Security
• Text input fields
• Function keys.

These objects have one thing in common—they are objects an operator will use to
interact with an application.

In addition, Security allows you to determine the type of user required to access a
graphic object or application screen and the type of feedback displayed if a user is
not authorized to access it. It also allows you to record information about who is
accessing—or attempting to access—the application.

To control application security, you must be familiar with:


• The concepts of being an application administrator, being an application user,
and using security classes
• The FLADMIN function, which allows the administrator to set up application
security
• The Security options available from the Application menu within the
Application Editor
• How to plan Security for your application

FactoryLink ECS / Application Editor / 349


• GRAPHIC OBJECT SECURITY OVERVIEW



This chapter introduces you to the concepts you must understand to configure
Security for your applications.

350 / FactoryLink ECS / Application Editor


GRAPHIC OBJECT SECURITY OVERVIEW
Key Concepts

K EY C O NC EPTS
To understand how FactoryLink’s Security features work, you need to understand
the following basic concepts:
• Application administrator
• Application user
• Security class

Application Administrator
The application administrator is responsible for establishing and maintaining
FactoryLink Security for an application. The application administrator:
• Creates and maintains records for all application users
• Creates and maintains records of all security classes.
27
By controlling who can access the system (application users) and what type of
access the users have (security classes), the application administrator plays the
key role in maintaining security within a FactoryLink application.

To ensure that only the application administrator can access security information,

Security
the administrative part of the security function (called FLADMIN) is
password-protected. The administrator can modify the administrator password
as needed.

Application User
A application user is simply anyone authorized to access FactoryLink screens.
The application administrator establishes who is an application user by creating a
security record for each user. This security record includes:
• The user’s name
• The user’s password
• The security classes the user can access.

If at run-time a user tries to access a graphic object assigned to a security class,


the system verifies that the user has access to this security class. If the user does
not have access to the security class, the user cannot access the graphic object. In
this way, FactoryLink controls who can access the different parts of the
application.

Before a user can access any security class, the user must log in (by entering a
user name and password).

FactoryLink ECS / Application Editor / 351


• GRAPHIC OBJECT SECURITY OVERVIEW
• Key Concepts


Users can be assigned to multiple security classes. For example, an employee
might be assigned to only one security class to limit the employee’s access to the
application. At the same time, a supervisor might be assigned to all available
security classes, so the supervisor can access all features within the application.

Security Class
A security class is defined by the application administrator. Each input graphic
object can be assigned to one security class. Each application user then can be
granted access to any or all security classes.

A class may be created:


• For a particular kind of operation
• To control a single machine
• To access a particular screen or set of screens
• To control any other aspect of your application security.

The precise meaning of each security class is determined by the needs of the
application. Since users can be assigned to any set of classes, you can use this
approach to create a hierarchical security scheme, where users with “higher
access” have access to the same classes as users who have “lower access”. Or, if
desired, you can tailor security so that each user has access only to an appropriate
set of classes. You can even set up a hierarchical structure and allow deviations to
the hierarchy as needed.

In a simple scenario, a application administrator may decide to create two classes


of Security: one class named Operator and another class named Supervisor.
When the application is created, the application developer assigns input graphic
objects to a particular security class—e.g., a particular menu button may be
assigned to the Operator security class, while a specific text input field might be
assigned to the Supervisor security class. When the application runs, only those
users who have access to the security class associated with the object can access
the object.

The application administrator can create up to 32 security classes.

Note

To assign security classes, you need a development license with


Application Editor. To associate users with security classes, you
need a run-time license.

352 / FactoryLink ECS / Application Editor


GRAPHIC OBJECT SECURITY OVERVIEW
FLADMIN

FLADMIN
FLADMIN is the FactoryLink function that allows the application administrator
to set up application security. FLADMIN provides options that allow you to:
• Define security classes
• Define application users
• Specify the type of password to be used for the application
• Change the application administrator password.

FLADMIN can be accessed from the Application Editor, from the FLADMIN icon,
or from the command line. To see how to access FLADMIN and use its options,
refer to Chapter 28, “Configuring Security Using FLADMIN,” in this manual.

Note
27
Before you run FLADMIN for the first time, you must first run the
Application Editor.

Security

FactoryLink ECS / Application Editor / 353


• GRAPHIC OBJECT SECURITY OVERVIEW
• Security Options


SE CURI TY O PTION S
Along with the Security functions available within FLADMIN, FactoryLink also
provides some Security options that can be accessed from the Application Editor.
These Security options allow you to:
• Define login options for your application
• Define error messages that will display after a failed security login
• Define login messages
• Log security events within your application.

These Security options are available from the Application menu within the
Application Editor. To see how to use these options, refer to Chapter 29, “Setting
up Security Options,” in this manual.

354 / FactoryLink ECS / Application Editor


GRAPHIC OBJECT SECURITY OVERVIEW
Planning Security for Your Application

PLAN NING S ECU RITY FOR Y OUR A P PLICATIO N


To configure Security for your application, you must develop a plan to ensure that
your application will provide the proper level of security. Specifically, you need to:
• Decide how authorized users will log in and out
• Determine object security requirements

Deciding How Authorized Users Will Log in and Out


To use anything in an application that is Security-protected, users need to be able
to log in to show that they have the proper Security access. Users can log in two
ways:
• You can assign keys on the keyboard as hot-keys for Security. When the user
presses the key or key combination defined as the hot-key, a login dialog box is
displayed, prompting the user to log in. These hot-keys can be used to log in any
time from any part of the running application.
27
• A login dialog box can be assigned to the object. When the user tries to access
the object, the system displays a dialog box prompting the user to log in.

To prevent authorized access to objects or actions that have Security attached, you

Security
also need to set up a logout process. The logout process can be defined as follows:
• As with logging in, users can use hot-keys to log out. If you assign hot-keys, you
can optionally include a dialog box that will confirm that the user really wants
to log out.
• You can configure logout to occur after a certain amount of time has passed.
This prevents unauthorized access to the application if a user forgets to log out.

If desired, you can use a combination of the above logout procedures—for example,
by setting up hot-keys for normal logout, but also configuring automatic logout in
case users forget to logout.

Determining Object Security Requirements


After you’ve determined how login and logout will occur, you need to identify
which objects need to have Security added. This step allows you to identify the
windows (screens) you may want to disable through buttons, and the keys or fields
you want to disable.

To determine your object Security requirements, you need to:


• Plan your Security classes
• Determine actions that will occur if unauthorized access occurs

FactoryLink ECS / Application Editor / 355


• GRAPHIC OBJECT SECURITY OVERVIEW
• Planning Security for Your Application


Planning Security Classes

As discussed earlier, security classes are a key to specifying who has access to a
particular object. Remember the following key points about security classes:
• An object can only have one security class assigned to it.
• All users that have access to the object must be a member of the security class.
• Up to 32 security classes may be defined in an application.

Also, remember that FactoryLink’s security classes provide great flexibility in


allowing users to have common security classes assigned or completely unique
security privileges. Instead of using a strict hierarchical structure (for example,
where Level 1 users get access to all functions and Level 10 users get access to
only a few functions), FactoryLink allows you to tailor security to meet your
application needs.

Determining Access Error Actions and Logging

Once Security is added to an object, the authorized security class will be assigned.
The next question is what action will occur if an unauthorized user tries to access
the object. FactoryLink provides security attributes that allow you to determine
what will occur when unauthorized users try to access the object. You can even
keep a log of unauthorized access attempts, if desired.

FactoryLink’s security attributes fall into two categories:


• Class Logging—Allows you to specify if you want to log attempts to access a
graphic object (failed or successful accesses).
• Access Error Action—Allows you to determine what will happen when an
access attempt fails. You can choose to provide a dialog box, a prompt, a beep,
or no action.

Remember that you can combine Class Logging and Access Error Action options to
provide the type of security information you want.

356 / FactoryLink ECS / Application Editor


GRAPHIC OBJECT SECURITY OVERVIEW
Implementing Security in Your Application

IM PLEM ENTING S ECU RITY IN YO UR A PPLIC ATION


When you’re ready to set up Security for your application, you may want to use
the following steps to guide you:

Note

Remember—the Security options are available from the


Application menu within the Application Editor. Specific steps for
using the Security options are provided in Chapter 28,
“Configuring Security Using FLADMIN,” and Chapter 29, “Setting
up Security Options.”

1 From the Application menu in the Application Editor, select Assign Users and
Classes.
27
• Change the Administrator Password for Security.
• Set the Password Verification Type (local or system).

2 Create and define application classes.

Security
• Assign access error action
• Assign class logging.

3 Create and define application users.


• Set up user passwords.
• Assign class(es) to users.

4 Set up login/logout options.


• Define login hot-keys (if using hot-keys for login).
• Define the user Name tag, Password tag, and Trigger tag for logging in.
• Define Logout hot-keys and indicate whether to confirm logout with a dialog
box.
• Define the logout Trigger tag.
• Optionally, define the window and drawing to return to upon logout, thus
preventing unauthorized access to drawings. If nothing is specified, the window
and drawing the user logs out from will remain active.
• If you want to change the text used in either login or error dialog boxes, change
the contents of the files that contain the text.

FactoryLink ECS / Application Editor / 357


• GRAPHIC OBJECT SECURITY OVERVIEW
• Implementing Security in Your Application


5 Set up the event logging configuration.
• Select the events to log, including user login/logout and system
start-up/shutdown.
• If you are logging any of the above events, define the Mailbox tag, optional
Disable tag, and Database Alias.Logging Table.

6 Assign Security to objects.

Note

When developing Security for an application, you may want to


disable the Security function while you are developing the
application (using the Disable Security option available from the
FLADMIN menu). Otherwise, you’ll need to constantly sign in to
each object as you create your application.

Once you complete your application, you can enable Security


(using the Enable Security option on the FLADMIN menu) and
test the application to ensure that you implemented Security
correctly.

358 / FactoryLink ECS / Application Editor


GRAPHIC OBJECT SECURITY OVERVIEW
Security and Stacked Buttons

SEC URITY AN D S TAC KED B UTTO NS


Stacked buttons are multiple button objects stacked on top of each other to
perform specific tasks within your application. Before you begin adding Security
to stacked buttons within your application, you need to consider how Security will
affect operation of the stacked buttons.

Consider the following information related to Security and stacked buttons:


• Avoid adding security to stacked buttons within an application. If stacked
buttons contain different security classes, the buttons may not operate properly
(if the user login fails for some buttons in the stack but not for other buttons in
the stack).
• Do not add security to stacked buttons that include momentary action buttons.
The momentary action button may begin to operate properly but then stop
operation when the security login is displayed.
• If you must have security on stacked buttons, ensure that all buttons in the 27
stack have the same security class. Also, use classes that do not require display
of a login or error dialog box.

Security

FactoryLink ECS / Application Editor / 359


• GRAPHIC OBJECT SECURITY OVERVIEW
• Security and Stacked Buttons

360 / FactoryLink ECS / Application Editor


Chapter 28





Configuring Security
Using FLADMIN

The FLADMIN function allows the application administrator to set up application


security. Through FLADMIN, the administrator can:
• Define security classes
• Define application users
• Set the password type for the application
• Set the administrator password.

This chapter describes how to access FLADMIN and configure each of these
FLADMIN options. 28

Security

FactoryLink ECS / Application Editor / 359


• CONFIGURING SECURITY USING FLADMIN
• Accessing FLADMIN


A CCE SSING FLADMIN
To set up security, you must access FactoryLink’s FLADMIN function. You can
access FLADMIN in any of three ways:
• Select Assign Users/Classes from the Application menu within the Application
Editor, or
• Select the FLADMIN icon, or
• Enter FLADMIN from the command line.

When you access FLADMIN, the FLADMIN menu is displayed.

The FLADMIN menu allows you to choose the Security option you want to
perform.

In this chapter, the first method shown above—accessing FLADMIN from the
Application Editor—is used. Remember that you can use either of the other two
methods, as desired.

360 / FactoryLink ECS / Application Editor


CONFIGURING SECURITY USING FLADMIN
Defining a Security Class

D EFINING A S ECU RITY C LASS


The application administrator must set up the security classes that control
security within the FactoryLink application. Each graphic object to be secured
must be assigned to a security class. The Application Classes option within
FLADMIN allows you to set up your security classes.

Follow the instructions below to define a security class.

1 Choose Assign Users/Classes from the Application menu of the Application Editor.
The system asks you to enter your administrator password.

28

Security
The default administrator password is “Password.” Passwords are not
case-sensitive.

Note

Remember—you can also access FLADMIN by selecting the


FLADMIN icon or by entering FLADMIN from the command line.

FactoryLink ECS / Application Editor / 361


• CONFIGURING SECURITY USING FLADMIN
• Defining a Security Class


2 Enter your administrator password and click on OK. The FLADMIN menu is
displayed.

3 Click on Application Classes. The Application Security Classes dialog is displayed.

362 / FactoryLink ECS / Application Editor


CONFIGURING SECURITY USING FLADMIN
Defining a Security Class

4 Enter the new security class name, and click on New. The Security Class
Attributes dialog is displayed.

28

Security
5 Fill out the Security Class Attributes dialog. Provide the following information.
Log Access Click this button if you want the system to keep a record of every
Failure failed attempt to access a graphic object within this security
class. If a user attempts to use an input object with this class and
does not have correct privilege, the system will write a message to
the Historian mailbox (if configured) and last event tag.
Log User Click this button if you want the system to log successful
Action attempts to access a graphic object within this security class. If a
user attempts to use an input object with this class and has the
correct privilege, the system will write a message to the Historian
mailbox (if configured) and last event tag.
Error Dialog Click on this button if you want the user to receive an error dialog
when failing to access a graphic object.
Login Prompt Click on this button if you want the user to receive a login prompt
when failing to access a graphic object.
Beep Click on this button if you want the system to “beep” when the
user fails to access a graphic object.

FactoryLink ECS / Application Editor / 363


• CONFIGURING SECURITY USING FLADMIN
• Defining a Security Class


None Click on this button if you don’t want to provide any feedback
when the user fails to access a graphic object.

6 When you finish entering information, click OK. The security class is created, and
the Application Security Classes dialog is displayed.

364 / FactoryLink ECS / Application Editor


CONFIGURING SECURITY USING FLADMIN
Defining a User

D EFINING A U SE R
The application administrator sets up security records for each authorized
application user. These records are set up using an option within FLADMIN.

Follow the instructions below to set up a security record and define an application
user.

1 Choose Assign Users/Classes from the Application menu of the Application Editor.
The system asks you to enter your administrator password.

2 Enter your administrator password and click on OK. The FLADMIN menu is
displayed.

3 Click on Application Users. The Application Users dialog is displayed.

28

Security

FactoryLink ECS / Application Editor / 365


• CONFIGURING SECURITY USING FLADMIN
• Defining a User


4 Click on New. The New Application User dialog is displayed.

5 Fill out the New Application User dialog. Provide the following information.
User Name Enter the name of the user you want to create.
User names can be up to 32 characters, but certain operating
systems may only support a limited number of characters as a
user name. Thus, user names should normally be limited to eight
characters, including spaces.
Valid Entry: alphanumeric string of up to 32 characters
Description Enter the user’s full name (up to 32 characters, optional).
Valid Entry: alphanumeric string of up to 32 characters
Auto Logout (in Enter the number of minutes that the system will sit idle before
minutes): the user is automatically logged out. The system will
automatically log out the user if the user does not select an input
object within this time period.
If you enter 0 or leave this field blank, the user will not be logged
out automatically.
Valid Entry: 0-99
Modify Password Click in this box if you want to modify the user’s password.

366 / FactoryLink ECS / Application Editor


CONFIGURING SECURITY USING FLADMIN
Defining a User

This field is not available if you have selected System Password


Verification as the Password Verification type (see the “Setting
the Password Type” on page 368).
New: If you choose to modify the user’s password, enter the new
password here.
The system saves the password with case preserved, but
FactoryLink ignores case. Certain operating systems may use
case-sensitive passwords.
This field is not available if you have selected System Password
Verification as the Password Verification type (see the “Setting
the Password Type” on page 368).
Valid Entry: alphanumeric string of up to 32 characters
Confirm: If you choose to modify the user’s password, enter the new
password again here. This field is used to verify your input in the
New field.
28
Valid Entry: alphanumeric string of up to 32 characters
Available Class(es) Lists the available security classes so you can specify the security
class (or classes) you want to assign to the user. Highlight the

Security
security class you want to assign and click the forward arrow
button to move the class to the Assigned Class(es) list box. You
can also use the ALL forward arrow to move all security classes to
the Assigned Class(es) list box.
Assigned Shows the security class(es) you have assigned to the user. If you
Class(es) want to delete the user’s access to one of these security classes,
highlight the security class and click the backward arrow button
to move the class back to the Available Class(es) box. You can
also use the ALL backward arrow to delete all security classes
from this list box and move them back to the Available Class(es)
box.

6 When you finish entering information, click OK. The user record is created, and
the Application Users dialog is displayed.

FactoryLink ECS / Application Editor / 367


• CONFIGURING SECURITY USING FLADMIN
• Setting the Password Type


SE TTING THE PA SSW OR D T YPE
The Password Verification Type option allows the application administrator to
change the password verification type from local (internal FactoryLink
verification) to system (platform system dependent). System password
verification may be allowed depending on the operating system you are using.

This option is not user-specific, but is applicable to the entire FactoryLink


application. For example, if you choose system password verification, all users are
subject to system password verification to access FactoryLink graphic objects.

Follow the instructions below to set the password verification type.

1 Choose Assign Users/Classes from the Application menu of the Application Editor.
The system asks you to enter your administrator password.

2 Enter your administrator password and click on OK. The FLADMIN menu is
displayed.

3 Click on Password Verification Type. The Password Verification Type dialog is


displayed.

368 / FactoryLink ECS / Application Editor


CONFIGURING SECURITY USING FLADMIN
Setting the Password Type

4 Fill out the Password Verification Type dialog. Provide the following information.
Local Password Click this button if you want Security to recognize the user’s
Verification FactoryLink password.
System Password Click this button if you want Security to recognize the user’s
Verification system password. This option may be used if your operating
system allows use of a system password.

5 When you finish entering information, click OK. The FLADMIN menu is
displayed.

28

Security

FactoryLink ECS / Application Editor / 369


• CONFIGURING SECURITY USING FLADMIN
• Setting the Administrator Password


SE TTING THE A DM INISTR ATOR P ASS WO RD
To access the FLADMIN features, the application administrator must enter a
application administrator password. This password ensures that only the
application administrator can access system security features, such as defining
users and setting up security classes.

The default administrator password is “PASSWORD.” As an administrator, you


must change this password as soon as possible to prevent unauthorized system
access.

Follow the instructions below to change your administrator password.

1 Choose Assign Users/Classes from the Application menu of the Application Editor.
The system asks you to enter your administrator password.

2 Enter your administrator password and click on OK. The FLADMIN menu is
displayed.

3 Click on Administrator Password. The Administrator Password dialog is displayed.

4 Fill out the Administrator Password dialog. Provide the following information.
Old password Enter your current administrator password.
New Enter the new administrator password you want to use. A valid
password password is a string of alphanumeric characters with no
embedded spaces.

370 / FactoryLink ECS / Application Editor


CONFIGURING SECURITY USING FLADMIN
Setting the Administrator Password

Valid Entry: alphanumeric string of 6 to 32 characters


Confirm To confirm the new password, again enter the new administrator
password password you want to use. This field is used to verify your input
in the New Password field.
Valid Entry: alphanumeric string of up to 32 characters

5 When you finish entering information, click OK to save the new password. The
FLADMIN menu is displayed.

28

Security

FactoryLink ECS / Application Editor / 371


• CONFIGURING SECURITY USING FLADMIN
• Setting the Administrator Password

372 / FactoryLink ECS / Application Editor


Chapter 29





Setting up Security
Options

Along with the FLADMIN options, FactoryLink also provides some security
options available from the Application menu within the Application Editor. These
Security options allow you to control how security will work within your
application.

You can use these options to:


• Set the login options
• Define error messages
• Define login messages 29
• Log security events.

This chapter describes how you can configure these Security options.

Security

FactoryLink ECS / Application Editor / 373


• SETTING UP SECURITY OPTIONS
• Setting Security Login Options


SE TTING SE CUR ITY L O GIN O PTION S
FactoryLink’s Security options allow you to control how users can log in and log
out of the security system. These options are controlled through the Login Options
dialog .

You can use Login Options to:


• Allow users to login and/or logout via a hotkey combination
• Allow users to login and/or logout automatically via a tag trigger
• Display a particular window after the user logs out.

Follow the instructions below to configure your security login options.

1 Choose Security Options from the Application menu of the Application Editor.

2 Choose Login Options. The Login Options dialog is displayed.

374 / FactoryLink ECS / Application Editor


SETTING UP SECURITY OPTIONS
Setting Security Login Options

3 Specify the following information:


Login Hotkey Specify a keystroke combination the user can use to begin the
security login process. This keystroke will be active no matter
what graphics screen is currently displayed. If you choose a login
hotkey, the user can press the hotkey combination and then
complete a dialog to login to the application.
If you want to permit use of a hotkey to allow security login,
select a key from the drop-down list and then click ALT, CTRL,
and/or SHIFT as needed to specify the hotkey combination.
The hotkey login method works independent from the tag trigger
login method. You can specify one or both methods, as desired.
Name Tag Used in conjunction with the Password Tag and Trigger fields to
allow automatic login based on a tag trigger. Enter the name of
the tag that will be used to automatically enter the user’s name.
Valid Entry: standard element tag name
29
Valid Data Type: message
Password Tag Used in conjunction with the Name Tag and Trigger fields to
allow automatic login based on a tag trigger. Enter the name of
the tag that will be used to automatically enter the user’s

Security
password.
Valid Entry: standard element name
Valid Data Type: message
Trigger Used in conjunction with the Name Tag and Password Tag fields
to allow automatic login based on a tag trigger. Enter the name of
the tag that will be used to trigger the login process. When the
value of this tag changes to 1, the security login process will
begin.
The tag trigger login method works independent from the hotkey
login method. You can specify one or both methods, as desired.
Valid Entry: standard element tag name
Valid Data Type: digital
Logout Hotkey Specify a keystroke combination the user can use to log out.
If you want to permit use of a hotkey to allow logout, select a key
from the drop-down list and then click ALT, CTRL, and/or SHIFT
as needed to specify the hotkey combination.
A confirmation message will be displayed if the Confirm Logout
box is checked.

FactoryLink ECS / Application Editor / 375


• SETTING UP SECURITY OPTIONS
• Setting Security Login Options


The hotkey logout method works independent from the tag
trigger logout method. You can specify one or both methods, as
desired.
Trigger Enter the name of the tag that will be used to log out the user.
When the value of this tag changes to 1, the user will be logged
out without a confirmation.
The tag trigger logout method works independent from the
hotkey logout method. You can specify one or both methods, as
desired.
Valid Entry: standard element tag name
Valid Data Type: digital
Home Display Enter the name of the window you want displayed when the user
logs out. When the user logs out (either voluntarily or by timing
out), this window will become the top window, and the drawing
will be loaded, if necessary.
If this field is blank, the current display will not change when the
user logs out.
Valid Entry: WINDOW:DISPLAY

4 When you finish entering information, click OK. The login/logout options you
specified are saved, and the Application Editor is displayed.

376 / FactoryLink ECS / Application Editor


SETTING UP SECURITY OPTIONS
Defining Error Messages

D EFINING E RR OR M ESSA GES


The Error Dialog option allows you to control the error message that will display
after a failed security login. The error message will display on five lines; this
option allows you to specify the content of each line.

Follow the instructions below to specify the Error Dialog message.

1 Choose Security Options from the Application menu of the Application Editor.

2 Choose Error Dialog. The Error Dialog dialog is displayed.

29

Security
3 Specify the following information:
Lines 1-5 For each line, enter the format line in the graph.txt file that
corresponds to the line you want to display in the error message.
Graph.txt is the standard FactoryLink graphics translation file in
FLINK\msg\graph.txt. You can create an application graphics
translation file in FLAPP\msg\graph.txt. You can then
customize this file to produce appropriate translations. The
translated line can contain up to three format specifiers.
Line 1 represents the first line of the error message, Line 2
represents the second line of the error message, etc.
Optional Value Enter the name of the first tag that will be used to insert some
Tag 1 information into the appropriate line of the error message.
Valid Entry: standard element tag name

FactoryLink ECS / Application Editor / 377


• SETTING UP SECURITY OPTIONS
• Defining Error Messages


Optional Value Enter the name of the second tag that will be used to insert some
Tag 2 information into the appropriate line of the error message.
Valid Entry: standard element tag name
Optional Value Enter the name of the third tag that will be used to insert some
Tag 3 information into the appropriate line of the error message.
Valid Entry: standard element tag name

4 When you finish entering information, click OK. The error dialog options you
specified are saved, and the Application Editor is displayed.

378 / FactoryLink ECS / Application Editor


SETTING UP SECURITY OPTIONS
Defining Login Messages

D EFINING L OG IN M E SSAG ES
The Login Dialog option allows you to control the message that will display during
a user login attempt. The message will display on five lines; this option allows you
to specify the content of each line.

Follow the instructions below to specify the Login Dialog message.

1 Choose Security Options from the Application menu of the Application Editor.

2 Choose Login Dialog. The Login Dialog dialog is displayed.

29

Security
3 Specify the following information:
Lines 1-5 For each line, enter the format line in the graph.txt file that
corresponds to the line you want to display in the login message.
Graph.txt is the standard FactoryLink graphics translation file in
FLINK\msg\graph.txt. You can create an application graphics
translation file in FLAPP\msg\graph.txt. You can then
customize this file to produce appropriate translations. The
translated line can contain up to three format specifiers.
Line 1 represents the first line of the login message, Line 2
represents the second line of the login message, etc.
Optional Value Enter the name of the first tag that will be used to insert some
Tag 1 information into the appropriate line of the login message.
Valid Entry: standard element tag name

FactoryLink ECS / Application Editor / 379


• SETTING UP SECURITY OPTIONS
• Defining Login Messages


Optional Value Enter the name of the second tag that will be used to insert some
Tag 2 information into the appropriate line of the login message.
Valid Entry: standard element tag name
Optional Value Enter the name of the third tag that will be used to insert some
Tag 3 information into the appropriate line of the login message.
Valid Entry: standard element tag name

4 When you finish entering information, click OK. The login dialog options you
specified are saved, and the Application Editor is displayed.

380 / FactoryLink ECS / Application Editor


SETTING UP SECURITY OPTIONS
Logging Security Events

L OG GING S EC URITY EV ENTS


The Event Log Config option allows you to control what security-related events
can be recorded in a Historian file. You can use this option to specify the system
events you want to record and the Historian file that will store the log records.

Follow the instructions below to set the security logging options.

1 Choose Security Options from the Application menu of the Application Editor.

2 Choose Event Log Config. The Event Logging Configuration dialog is displayed.

29

Security
3 Specify the following information:
User Login Click this box if you want to record all user login events.
User Logout Click this box if you want to record all user logout events.
System Startup Click this box if you want to record when the Run-Time Graphics
task is started.
System Shutdown Click this box if you want to record when the Run-Time Graphics
task encounters a shutdown request.

FactoryLink ECS / Application Editor / 381


• SETTING UP SECURITY OPTIONS
• Logging Security Events


Historian Mailbox Enter the name of the Historian mailbox where you want to store
the log records. If you do not enter a mailbox in this field, event
logging will be disabled.
Valid Entry: standard element tag name
Valid Data Type: mailbox
*Disable Enter the tag name or numerical constant that can be used to
enable or disable event logging. If this tag has a FALSE value (0
or not defined), event logging will be written to the Historian. If
this tag has a TRUE value (any value other than 0), event logging
will not be written to the Historian. If no tag is defined and a
Historian mailbox is identified, event logging will always be
written to the Historian.
Valid Entry: standard element tag name or numeric constant
Valid Data Type: digital
Event log Table Enter the name of the Alias.Table used within the Historian
mailbox to store the event logging information. This table
corresponds to an entry in the Historian Mailbox Information
panel for the selected mailbox.

4 When you finish entering information, click OK. The event logging options you
specified are saved, and the Application Editor is displayed.

382 / FactoryLink ECS / Application Editor


Data Reporting Configuration Guide

Part VI






























DXF Converter

383
DXF Converter in the Application Editor Guide DXF Converter in this book

Table of Contents





DXF Converter

30 Converting and Importing DXF Files . . . . . . . . . . . . . . . . . . . . . . . 387


Conversion Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Installing the FactoryLink DXF Converter in Windows . . . . . . . . . . . . 388
Installing the DXF Converter in OS/2 . . . . . . . . . . . . . . . . . . . . . . . . . 389
Converting a Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Using the Default Conversion Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Conversion Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Customizing the Conversion Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Creating a Translate File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Using the Translate File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Conversion Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399

FactoryLink ECS / Application Editor Guide / 385



DXF Converter


386 / FactoryLink ECS / Application Editor Guide


Chapter 30





Converting and
Importing DXF Files

FactoryLink allows you use AutoCAD drawings in your FactoryLink application.


The DXF Converter is used to convert original AutoCAC drawings into a .gx file
(an ASCII text-based file) that FactoryLink can import. FactoryLink does not
directly import DXF drawing files. After conversion you can import the .gx file
into your FactoryLink application.

You can edit an imported drawing just as you would any other FactoryLink
drawing.

This chapter contains information about the following topics:


• Conversion Considerations
• Installing the FactoryLink DXF Converter
• Converting Colors, Fonts, and Line Styles
• Converting a Drawing
• Conversion Defaults
• Customizing the Conversion Settings
• Creating and Using a Translate File
• Troubleshooting and error messaes

30

DXF Converter

FactoryLink ECS / Application Editor Guide / 387


• CONVERTING AND IMPORTING DXF FILES
• Conversion Considerations


C ON VERSIO N C ON SIDERA TION S
Most AutoCAD drawings appear just as you drew them after you convert and
import them into FactoryLink. You can use the default conversion settings
discussed in the section “Using the Default Conversion Settings” on page 392, or
you can customize how the Converter converts colors, fonts, and so on as discussed
in the section “Customizing the Conversion Settings” on page 395.

Keep the following limitations in mind when you prepare to convert an AutoCAD
drawing to use in FactoryLink:
• Only AutoCAD files through Version 12 are converted. (If AutoCAD 12 cannot
import and open your drawing, the Converter cannot convert it.)
• DXF drawings created with products other than AutoCAD, Generic CADD, and
AutoSketch may not convert properly.
• Set the viewport before exporting the DXF file from AutoCAD.
• Extended entity data is not converted.
• Lines less than one pixel are converted to one pixel.
• Only solid fills are converted (hatch patterns, for example, are not converted).
• Objects that were mirrored (flipped over) or rotated in the original AutoCAD
drawing might be misplaced in the converted drawing.
• Drawings with nested inserts are not converted.
• Dimensions on drawings are not converted.
• Symbol files cannot be converted unless the text version of the file exists.
• Text less than one pixel in height is not converted.
• Layers are flattened so that all objects are placed on a single layer.

Installing the FactoryLink DXF Converter in Windows


Refer to the “Installation Guide” for details on adding supplemental tasks. After
you install the Converter, follow the steps below to add the icon to the
FactoryLink program group.

1 Double-click the FactoryLink program group icon to open the FactoryLink


program group.

2 Open the File menu and select New. The New Program Object dialog opens.

3 Select Program Item and click OK.

4 Type the description “DXF Converter” to label the icon. Press Tab.

388 / FactoryLink ECS / Application Editor Guide


CONVERTING AND IMPORTING DXF FILES
Conversion Considerations

5 Type the path and file name of the Converter utility. The utility filename is
“dxfwrap.exe” and resides in /{FLINK}/BIN. For example:
“c:\flwin\bin\dxfwrap.exe.”

6 Click OK. The Converter icon appears in the FactoryLink program group.

7 Double-click the DXF Converter icon to start the Converter.

Installing the DXF Converter in OS/2


Refer to the “Installation Guide” for details on adding supplemental tasks.

30

DXF Converter

FactoryLink ECS / Application Editor Guide / 389


• CONVERTING AND IMPORTING DXF FILES
• Converting a Drawing


C ON VERTIN G A D R AW ING
Convert drawings from DXF format so you can import them into FactoryLink
using FactoryLink’s .gx format.

To convert a drawing:

1 Double-click the DXF Converter icon in the FactoryLink program group to open
the DXF Converter.

2 Change to the drive and directory of the AutoCAD drawing you want to convert.

3 Click to select the files you want to convert in the File area. To deselect a file, click
it again.

4 To customize the conversion settings, type the translate path and filename in the
Translate file box. See the section “Creating a Translate File” on page 395 for
more about using translate files to customize conversion settings. Leave this box
blank to use the default settings.

5 Click Convert. The selected files are converted and placed in the current directory.
For example, in the screen above, the converted files are placed in the c:\acad
directory.

If there were errors during the conversion of any of the files, the Converter creates
a separate error file for each drawing that caused a conversion error. See page
30399 for more information.

To import a drawing into your FactoryLink application:

390 / FactoryLink ECS / Application Editor Guide


CONVERTING AND IMPORTING DXF FILES
Converting a Drawing

1 Double-click Graphics Editor in the Configuration Manager Main Menu to open


the Graphics/Animation editor (if necessary).

2 Open the File menu and select Import. The Import dialog box opens.

3 Select Exported Drawings as the file type.

4 Change to the drive and directory of the converted drawings.

5 In the Files area, click to select the files you want to convert. To deselect a file,
click it again.

6 Click Import to import the drawings into your application. 30

DXF Converter

FactoryLink ECS / Application Editor Guide / 391


• CONVERTING AND IMPORTING DXF FILES
• Using the Default Conversion Settings


U SING TH E D EFA ULT C ONV ERSIO N SETTIN GS
FactoryLink maintains the original AutoCAD file’s drawing characteristics
whenever possible. For example, the color red converts to red and solid lines stay
solid.

If FactoryLink cannot reproduce a style found in the original drawing, it


substitutes the closest available style. For example, the AutoCAD color light red
converts to the FactoryLink color orange-red, and AutoCAD’s phantom line style,
converts to dash-dot.

You can use a translate file to change the conversion settings for graphics and
text. See the section “Customizing the Conversion Settings” for more about
customizing the conversion settings.

Conversion Defaults
The conversion defaults are shown in the charts below. The default screen width
and height is 1023 x 767 pixels.

Text Conversions

FactoryLink converts text into non-text graphic elements such as lines and arcs
unless you use customize the conversion settings (see pages 395-396).

Color Conversions

The following table shows the default conversions for AutoCAD colors. Each
program uses numbers to designate colors. For example, the Converter converts
AutoCAD’s color number 6 (magenta) to FactoryLink’s color number 20
(magenta).

Table 30-1 Default Conversions for AutoCAD colors

AutoCAD color number and FactoryLink color number and


description description

1 Red 0 Red

2 Yellow 4 Yellow

3 Green 8 Green

4 Cyan 12 Cyan

392 / FactoryLink ECS / Application Editor Guide


CONVERTING AND IMPORTING DXF FILES
Using the Default Conversion Settings

Table 30-1 Default Conversions for AutoCAD colors (Continued)

AutoCAD color number and FactoryLink color number and


description description

5 Blue 16 Blue

6 Magenta 20 Magenta

7 White 63 White

8 Black or Gray 48 Black

9 Light Red 1 Orange-Red

10 Brown 26 Brown

11 Light Green 7 Pale Green

13 Light Blue 13 Light Blue

15 Light Gray 59 Light Gray

If you want to see exactly how AutoCAD colors will convert, use the FactoryLink
color palette. For example, AutoCAD color 11, light green, converts to
FactoryLink’s color number 7, light green. You can compare FactoryLink’s color 7
in the color palette to your original AutoCAD drawing to be sure that the
conversion is acceptable. Although basic color conversions are usually very close
to the original, there may be some differences—especially with non-primary
colors.

You can view the FactoryLink color palette in most Graphics Editor Attributes
dialog boxes where color is one of the attributes. For example, open the Attributes 30

DXF Converter

FactoryLink ECS / Application Editor Guide / 393


• CONVERTING AND IMPORTING DXF FILES
• Using the Default Conversion Settings


menu and choose Fill. The Fill Attributes dialog box opens with the FactoryLink
color palette displayed twice.

0-7 The FactoryLink color palette contains 64 colors. The


8-15 colors are numbered beginning with zero (red) at the
16-23 upper left corner, and ending with 63 (white) at the
24-31 lower right corner.
32-39
40-47
48-55
56-63

Line Conversions

The following table shows the default conversions for AutoCAD line styles:

Table 30-2

AutoCAD line style: FactoryLink line style:

Continuous (any thickness) Solid

Border, Border2, BorderX2 DashDot

Center, Center2, CenterX2 DashDot

Dashdot, Dashdot2, DashdotX2 DashDot

Dashed, Dashed2, DashedX2 Dash

Divide, Divide2, DivideX2 DashDot

Dot, Dot2, DotX2 Dot

Hidden, Hidden2, HiddenX2 Dash

Phantom, Phantom2, PhantomX2 DashDot

394 / FactoryLink ECS / Application Editor Guide


CONVERTING AND IMPORTING DXF FILES
Customizing the Conversion Settings

C USTOM IZIN G THE C ONVE RSIO N S ETTIN GS


You can specify how FactoryLink converts some or all of the drawing and text
styles in an AutoCAD drawing. For example, you can specify that the green
converts to white.

To customize the conversion settings, create a standard (ASCII) text file, called a
translate file, that contains the customizations. Then, whenever you want to use
those customizations, enter the translate file’s filename in the Translate file area
of the FactoryLink DXF Import dialog box.

Creating a Translate File


A translate file is a collection of conversion customizations. You can create a
translate file using any (ASCII) text editor. Also, you can give the file any name
and extension. For the purposes of this example, we’ll use an XLT extension.

A translate file can contain up to four sections corresponding to the four types of
styles that can be customized: font, color, screen, and lines. The sections can be
organized in any order and you only need to include the ones that you want to
customize, the rest use the defaults.

Tip

Use the translate file to convert fonts whenever possible. It speeds


the conversion, and the final text quality is usually superior.

30

DXF Converter

FactoryLink ECS / Application Editor Guide / 395


• CONVERTING AND IMPORTING DXF FILES
• Customizing the Conversion Settings


The following is an example of a translate file:

Start the font section with the word “FONT” and enter the conversion
FONT instructions on the next lines. The format for conversion instructions is:
Helv,txt,20; FactoryLink FONT,AUTOCAD FONT,HEIGHT;
Helv,complex,10; Height is the maximum height of the text to convert. Text above this height
is converted to line segments and arcs.
Times,romans,20;
Courier,monotext,20 Start the color section with the word “COLOR”. The format is:
COLOR FactoryLink COLOR,AUTOCAD COLOR;
See the tables on pages 392 and 394 for color numbers.
48,7;
63,8; Start the screen section with the word “SCREEN”. It defines the display
SCREEN screen’s width and height in pixels. The format is:
SCREEN HEIGHT,SCREEN WIDTH;
1023,767;
LINES The Lines section begins with the word “LINES”. The format is:
solid,hidden; FactoryLink LINE STYLE,AUTOCAD LINE STYLE;
See the table on page 394 for a list of line styles.
dash,phantom;

Translate File Guidelines

Use the following guidelines when you create a translate file:


• Do not insert blank line spaces between sections or after the last section.
• The FactoryLink font is case-sensitive. Be sure to type it using the font’s
original capitalization. For example, “Courier,” not “COURIER” or “courier.”
Use the Font Attributes dialog box to view the correct case and spelling.
• The section names (FONT, COLOR, SCREEN, and LINES), AutoCad fonts, and
AutoCad lines are not case-sensitive.
• Type the FactoryLink font using the font’s original spacing. For example,
“Times New Roman,” not “TimesNewRoman.”

To create a translate file:

1 Open a text editor.

396 / FactoryLink ECS / Application Editor Guide


CONVERTING AND IMPORTING DXF FILES
Customizing the Conversion Settings

2 Type the sections and styles you want to translate. Use the example on the
previous page as a guide. Be sure to spell the section heading correctly and end
each style conversion with a semi-colon (;).

Tip

You can enter several conversions on one line, instead of using a


different line for each (do not use spaces). For example:

Helv,txt,20;Helv,complex,10;Times,romans,20;

Table 30-3 Standard AutoCAD Fonts

Standard AutoCAD Fonts

txt italicc gothice symap

monotxt italict gothicg synath

romans scripts gothici symeteo

romand scriptc cyrillic symusic

romanc greeks cyriltlc complex

romant greekc syastro

3 Save the translate file as an ASCII text file. You can use any filename and
extension. For example, CUSTOM.XLT 30
If you do not specify a method for converting fonts in a translate file, they are
converted and imported as graphics.
DXF Converter

FactoryLink ECS / Application Editor Guide / 397


• CONVERTING AND IMPORTING DXF FILES
• Customizing the Conversion Settings


Using the Translate File
The custom conversions you set up in a translate file are only used when you
specify the file in the DXF Converter dialog box.

Type the full pathname of the


translate file if you want to use it to
specify how AutoCAD styles are
converted to
FactoryLink styles.

If you only type the translate file’s filename, the Converter uses the current path
shown in the Directory box. If you leave the Translate file box blank, the
Converter uses the default conversion settings. The DXF Converter uses the
translate file for all of the DXF files that you highlighted.

398 / FactoryLink ECS / Application Editor Guide


CONVERTING AND IMPORTING DXF FILES
Troubleshooting

T ROU BLESH OO TING

Conversion Errors
Errors can occur during a file conversion if there is a discrepancy in the DXF file
format, such as missing information, or if the DXF file contains unknown data
elements. If errors occur, the DXF Converter creates a file that contains the
conversion errors. The name of the file is filename.err where “filename” is the
name of the DXF file being converted.

The error file is located in the same directory as the original DXF file and gives
the DXF filename, FactoryLink filename, and error message for each error.
Possible error messages and their descriptions are listed below.

To view an error file, open it in an ASCII text editor.

Error Messages
If there is a conversion error, one or more of the following error messages appear
in the error file.

Abnormal End of File Encountered


Cause: The DXF file ends abnormally.
Action: Save the file again in AutoCAD; then try to convert it.

Cannot Find DXF File


Cause: The DXF file indicated could not be found.
Action: Be sure that the path and filename are correct.
30
Cannot Find Response File
Cause: The response file indicated could not be found.
Action: Correct the name of the file. DXF Converter

Could Not Find Blocks Section


Cause: The Blocks section of a DXF file is missing.
Action: No action is necessary.

FactoryLink ECS / Application Editor Guide / 399


• CONVERTING AND IMPORTING DXF FILES
• Troubleshooting


Could Not Find Entities Section
Cause: The Entities section of a DXF file is missing.
Action: The file is corrupt, and cannot be converted.

Could Not Find Header Section of DXF File


Cause: The Header section of the DXF file is missing.
Action: No action is necessary; the DXF Converter uses the default
values.

Could Not Find Table Section of DXF File


Cause: The Table section of DXF file is missing.
Action: No action is necessary; the DXF Converter uses the default table
values.

Could Not Open File


Cause: The DXF Converter could not open a file. The path may not exist
or the filename may be wrong.
Action: Correct the name of the file.

Memory Allocation Error


Cause: The system ran out of memory while trying to convert the DXF
file.
Action: Close any unnecessary windows or programs. If this error
persists, add more memory to the system.

No APPID Table Found


Cause: The APPID table of the DXF file is missing.
Action: No action is necessary. This is an information message only.

No DIMSTYLE Table Found


Cause: The Dimension Style table of the DXF file is missing.
Action: No action is necessary. This is an information message only.

No LAYER Table Found


Cause: The Layer table of the DXF file is missing.
Action: No action is necessary. This is an information message only.

400 / FactoryLink ECS / Application Editor Guide


CONVERTING AND IMPORTING DXF FILES
Troubleshooting

No LTYPE Table Found


Cause: The Line Style table of the DXF file is missing.
Action: No action is necessary. This is an information message only.

No STYLE Table Found


Cause: The Style table in the DXF file is missing.
Action: No action is necessary. This is an information message only.

No VIEW Table Found


Cause: The View table of the DXF File is missing.
Action: No action is necessary. This is an information message only.

No VPORT Table Found


Cause: Viewport table of the DXF file is missing.
Action: No action is necessary. This is an information message only.

No UCS Table Found


Cause: The User Coordinate System Table of the DXF file is missing.
Action: No action is necessary. This is an information message only.

Unknown Entity Encountered


Cause: An unknown AutoCAD drawing entity was encountered. The
DXF Converter ignores the entity.
Action: Contact Customer Support.

Unknown Group Code Encountered 30


Cause: An unknown AutoCAD drawing group code was encountered.
Action: The DXF Converter ignores the group code, but the conversion DXF Converter
might be corrupted. Contact Customer Support.

Unknown Table Type Encountered


Cause: An unknown AutoCAD table was encountered.
Action: The DXF Converter ignores the table, but the conversion might
be corrupted. Contact Customer Support.

FactoryLink ECS / Application Editor Guide / 401


• CONVERTING AND IMPORTING DXF FILES
• Troubleshooting

402 / FactoryLink ECS / Application Editor Guide


Data Reporting Configuration Guide

Part VII






























Error Messages

403
Chapter 31





Application Editor
Messages

If any problems are encountered by the Application Editor during run time, an
error message is displayed in the Run-Time Manager screen next to the name of
the Application Editor task.

This chapter lists all messages that can occur during run time, describes their
possible causes, and provides corrective actions.

Can't locate options key


Cause: The option key may not be installed, or the license may not be
enabled.
Action: Check to make sure the key is installed. Run the KEYINST and
FLKEYVAL utilities to make sure that the license is enabled.

Can't open FL.OPT file


Cause: The FL.OPT file has become corrupt or has been deleted, or the
FLINK environment variable is not set.
Action: Check the value of the FLINK environment variable. Check to
see that the FL.OPT file exists in the directory /FLINK/OPT.

Can't read options key


Cause: The option key file FL.OPT has become corrupt. 31
Action: Copy the file FLNEW.OPT from the install diskette to the file
FL.OPT in the directory /FLINK/OPT.
Error Messages
!!CAUTION!!
Deleting animation
Do you wish to continue?
Cause: You selected Delete Object from the Edit menu, which deletes
the object from the drawing area, as well as the object's
animation from the database.
Action: To delete the object from the drawing and its animation from the
database, choose Yes. To cancel the operation, choose No.

FactoryLink ECS / Application Editor Guide / 405


• APPLICATION EDITOR MESSAGES



Deleting Animation
Deleting animation type animation for this object.
Cause: You selected the Delete box on an animation panel, which
deletes the object's animation from the database.
Action: To delete the animation from the database, choose OK. To cancel
the operation, choose Cancel.

Drawing has unsaved changes


Cause: You made changes to a drawing and are trying to close the
drawing or exit the Application Editor without saving the
changes.
Action: To close the drawing or exit the Editor and save the changes,
choose Save. To close the drawing or exit the Editor without
saving the changes, choose Discard. To cancel the close or exit
and remain in the current drawing, choose Cancel.

Error deleting file.


File not part of current application.
Cause: You attempted to delete a file that is not part of the current
application. The Application Editor can only delete files that are
part of the current application.
Action: To delete a graphic file that is not part of the current application,
exit the Application Editor and delete the file from the operating
system prompt or from a file management utility.

Error importing file.


Cannot delete open drawing
drawing file_name
Cause: You tried to import a file that is open.
Action: Close the open file and retry the import operation.

Error importing file.


Error opening file file_name for xref update
Cause: There may not be enough free disk space to delete both a file and
its cross-reference. The file was successfully deleted, but not the
cross-reference.
Action: Delete unneeded files to free up disk space.

406 / FactoryLink ECS / Application Editor Guide


APPLICATION EDITOR MESSAGES

Flags must be vbru


Cause: A flag of other than v, b, r, or u was found in the .AC file.
Action: Delete the invalid flag.

Grace period has expired. Software must be registered


Cause: FactoryLink was installed without registering it within the 10
day grace period.
Action: Run FLKEYVAL and follow the instructions for registration.

Missing KEY file


Cause: The system can't find the KEY file /FLINK/KEY/XXX.KEY.
Action: Enter the correct key file name in .AC or create the required key
file.

No RAM for options key


Cause: There is not enough memory to read the options key.
Action: Close any unnecessary windows or programs.

Object name
Object must have a name.
Cause: You have assigned a blank name to an object - the object does not
have a name.
Action: Assign a unique name to the object.

Out of RAM 31
Cause: Not enough memory is available.
Action: Close any unnecessary windows or programs. If this occurs often, Error Messages
add memory to the system.

Run-time only license. Development option not installed.


Cause: A task may not be loaded and/or configured because it is not in
the option key.
Action: Check the master and option key contents by typing UKEY -l.

FactoryLink ECS / Application Editor Guide / 407


• APPLICATION EDITOR MESSAGES



Software has not been enabled
Cause: An error has occurred with the f1.key file in the opt directory.
Action: Run KEYINST and if an invalid or archaic agreement is found,
re-enter the configuration information.
Action: Run FLKEYVAL and follow the instructions for registration.

Warning: Name: Copy Ctrl + Ins, Class XmPushButtonGadget, Illegal mnemonics


character; Could not convert X KEYSYM to a keycode.
Cause: Your keyboard cannot use the keyboard combination you
selected.
Action: None. Do not use the selected keyboard combination.

408 / FactoryLink ECS / Application Editor Guide

You might also like