Client Builder Manual
Client Builder Manual
Version 7.0
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Client Builder Reference Manual
•
•
•
•
© Copyright 2000 United States Data Corporation. All rights reserved.
NOTICE:
The information contained in this document (and other media provided herewith) constitutes confidential
information of United States Data Corporation (“USDATA”) and is protected by copyright laws and
international copyright treaties, as well as other intellectual property laws and treaties. Such information is
not to be disclosed, used or copied by, or transferred to, any individual, corporation, company or other entity,
in any form, by any means or for any purpose, without the express written permission of USDATA.
The information contained in this document and related media constitutes documentation relating to a
software product and is being provided solely for use with such software product. The software product was
provided pursuant to a separate license or other agreement and such information is subject to the restrictions
and other terms and conditions of such license or other agreement.
The information contained in this document and related media is subject to change without notice and does
not represent a commitment on the part of USDATA. Except for warranties, if any, set forth in the separate
license or other agreement relating to the applicable software product, USDATA makes no warranty, express
or implied, with respect to such information or such software product.
USDATA and FactoryLink are registered trademarks of United States Data Corporation in the United States
and/or other countries. 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.
Contents
Chapter 1 Overview.................................................................................................... 9
Chapter 6 Servers..................................................................................................... 93
Servers and Clusters ........................................................................................................... 93
Setting Up The OPC Server Type ........................................................................... 93
Adding a New Server .............................................................................................. 94
Chapter 1
Overview
Client Builder is both the run-time and the design-time tool for FactoryLink graphics.
You can use Client Builder to create and maintain graphics for your FactoryLink application
(FLAPP). Graphics can be animated by linking to a Tag in a running FLAPP. Client Builder
can display data or information obtained from a FLAPP, as well as represent real world objects
such as tanks, pumps, or anything else you want to represent. Real world objects can be drawn
using the Client Builder drawing tools, or by inserting graphic images. Alarms can be
displayed. Trends can be recorded and charted.
Client Builder is also the run-time environment for FactoryLink graphics. During run-time, a
user can respond to alarms, view status or data, and interact with the graphic environment
through animation, buttons, etc. Security can be set for individual users so only certain parts of
the run-time environment can be accessed.
The Workspace
The Workspace is the name given to the main area of the Client Builder frame that occupies
the screen of your PC. The workspace contains all the tools necessary to develop client
applications and is the container for the child windows which form the User Interface at
runtime. Within the workspace you will find the following features:
• Menu Bar
• Toolbars
• Scrollbars
• Status Bar
• Cursor Position
• Zoom Level
You can customize the workspace through the Workspace Properties. To display the
Workspace Properties, either select the option from the Display menu, or right-click anywhere
on the workspace background and select Workspace Properties.
Workspace Properties
Workspace Properties can be viewed from the Display menu. On the Workspace Properties
dialog box, you can customize how the workspace looks and behaves. The workspace
properties box has two tabs, Main Window and Regions.
On the Main Window tab, you can customize
• Position
• Size
• Appearance
• Title Bar
• Behavior
• Title
Menu Bar
The menu bar provides access, using either the keyboard or the mouse, to all the development
tools. The menu bar, like all other toolbars in Client Builder, is dockable. The menu bar can be
dragged with the mouse and docked to any outside edge of the workspace, or it can be left
anywhere in the middle as a floating menu bar.
To turn the menu bar off, right-click anywhere on the workspace background and select the
Menu Bar option. A checkmark indicates the menu bar is visible.
The menu bar contains the following menu items:
• File
• Edit
• Display
• Insert
• Draw
• Arrange
• Animate
• Mode
• Tools
• Window
• ? (Help)
Toolbars
The toolbars give you instant access, via the mouse, to the most commonly used tools for
mimic development and tools at runtime by the user. The toolbars can be floating or docked -
that is locked to one of the borders of the workspace. Any toolbar can be dragged with the
mouse and docked to any outside edge of the workspace, or it can be left anywhere in the
middle as a floating toolbar.
You can specify which toolbars are available by right-clicking anywhere on the menu bar and
selecting which toolbars you want to be visible. A check mark next to the name indicates a
toolbar that is currently visible.
The available toolbars are:
• Standard
• Draw
• Mode
• Arrange
• Layers
• Animations
Scrollbars
The scrollbars are used to pan around a window when it is larger than the workspace.
Status Bar
The status bar is located at the bottom of the workspace, above any toolbars you may have
docked there. It provides information on the current state of the workspace.
Cursor Position
The cursor position is located on the right of the status bar, just before the zoom level
indicator. It gives you the X and Y coordinates in pixels of the current location of the cursor.
Zoom Level
The zoom level is located on the far right of the status bar and displays the percentage zoom of
the active mimic.
Menu Commands
File Menu
The File menu gives you various options for working with drawing files.
Parameter Definition
Note: Many of these options are also available on the Standard toolbar.
Edit Menu
The Edit menu lets you select various options for manipulating the selected drawing objects.
Parameter Definition
Undo Reverses the last change you have made, such as drawing, changing properties,
moving, or copying. This option is also available on the Standard toolbar.
Redo Reverses the changes made by Undo. This option is also available on the Standard
toolbar.
Cut Cut the drawing element and place it on the clipboard. This option is also available
on the Standard toolbar.
Copy Copy the drawing element to the clipboard. This option is also available on the
Standard toolbar.
Paste Paste any drawing elements from the clipboard to the selected mimic. Pasted
drawing elements will appear in the exact same location in the selected mimic as the
elements that were cut or copied to the clipboard. This option is also available on the
Standard toolbar.
Delete Deletes the drawing element.
Select All Selects all drawing elements in the selected mimic.
Group Creates a drawing group from the selected elements. This option is also available on
the Arrange toolbar.
Ungroup Returns a drawing group to its individual elements. This option is also available on
the Arrange toolbar.
Lock Locks the drawing element. When a drawing element is locked, no changes can be
made to it. The element cannot be moved, resized, or deleted. This option is also
available on the Arrange toolbar.
Unlock Unlocks the drawing element. This option is also available on the Arrange toolbar.
Create Symbol Creates a symbol using the selected drawing elements. To include more than one
drawing element in the symbol, the elements must be grouped.
When you create symbols, they are stored in a "library" of symbols you have
created. You can then add symbols to any mimic by dragging and dropping them
from the Library. The Library can be viewed by using the Display menu or by
inserting a symbol from the Insert menu or from the button on the Draw toolbar.
OLE Links Used for embedding and linking objects such as a Word document or an Excel
spreadsheet.
Properties Displays the drawing element’s properties box.
Note: Many of these options are also available on the drawing popup menu which
can be accessed by right-clicking on a drawing element.
Display Menu
The Display menu lets you display various tools.
Parameter Definition
Color Palette Opens the Color Palette. This option is also available on the Standard toolbar.
Graphic Opens the Graphic Explorer. This option is also available on the Standard toolbar.
Explorer
Properties List Displays the properties list for the selected drawing element or mimic. This is
similar to the Properties list used in many programming applications such as
Microsoft Visual Basic or Visual C++. This list should only be used by more
advanced users.
You can also bring up the properties list from the Draw toolbar.
Library Displays a "library" of symbols you have created. You can then add symbols to any
mimic by dragging and dropping them from the Library.
Symbols must first be created by using the Create Symbol option on the Edit menu.
Warnings If Warnings is selected, various warning symbols may appear adjacent to drawings
with animation. These symbols indicate that an animation has been applied, but a
problem exists. Problems could include the variable name being unresolved, the
variable name incorrectly spelled, or the server unavailable. If this option is not
selected, warnings for unresolved animation will not appear.
Advanced Mode If this option is checked, the Advanced Properties will be displayed every time you
view a drawing element’s properties. Otherwise, you will have to click on the down
arrow in the properties box to display an element’s advanced properties.
Status Bar If this option is checked, the status bar will be visible at the bottom of the
workspace. If this option is unchecked, the status bar will not be visible.
Arrange Indicates where you want iconized windows to be stacked. When you minimize
Iconized windows, they can be minimized to the right, bottom, left, or top of the workspace.
Windows
Script Editor Opens the Script Editor for VBA-like scripting. This option is also available on the
Standard toolbar.
Workspace Displays the workspace properties dialog box.
Properties
Refresh Refreshes the screen. As sometimes happens in Windows, the screen may not
repaint itself properly. Use the Refresh option to correct this.
Insert Menu
The Insert menu allows you to insert various images, objects, and controls.
Parameter Definition
Symbol Inserts a symbol. Symbols must first be created by using the Create Symbol option
on the Edit menu.
Image Inserts an image such as a bitmap.
Draw Menu
The Draw menu lets you select all the commonly used tools to produce drawing elements.
(The Arrange menu may be used to align and manipulate drawing elements once they are
produced.)
Parameter Definition
Note: These same options can be selected from the Draw toolbar instead of the
menu.
Arrange Menu
The Arrange menu lets you select all the commonly used tools for arranging and sizing
drawing elements.
More than one drawing element can be selected at one time by holding the Shift key while
selecting the drawing elements with the left mouse button.
Note: When more than one element is selected, the last one selected is used as the
"reference" for some of these Arrange options.
Parameter Definition
Note: These same options can be selected from the Arrange toolbar instead of the
menu.
Animate Menu
The Animate menu provides all the available commands to create animation. The Animate
menu has the following seven menu items:
• Color
• Text
• Symbols
• Position
• Send
• Run
• Link
Under each of these menu items, a number of options are available. Each of these options is
also available as a button on the Animations toolbar. For a more thorough description of these
commands, see the section on the specific types of animation.
Mode Menu
The Mode menu is used to switch a mimic between run and design modes, and to zoom the
view in and out.
Parameter Definition
Note: These same options can be selected from the Mode toolbar instead of the
menu.
Tools Menu
The Tools menu lets you select various options, preferences, and settings for Client Builder.
Parameter Definition
Expression Launches the Expression Editor which can be used to create mathematical
Editor expressions. You can assign an alias to each expression for easy use.
Servers From the Servers menu item, you can configure FactoryLink servers and clusters for
connection with Client Builder.
Options From the Options menu item, you can specify how Client Builder handles various
activities. For example, you can set whether files are saved in ASCII or Binary
format.
Toolbars
Click anywhere in the toolbar (outside of the buttons) and drag the toolbar to either the left,
right, top or bottom edges.
Click anywhere in the toolbar (outside of the buttons) and drag the toolbar to its new location.
Position the cursor on one of the toolbar’s borders. Click and drag the border. The width and
height of the toolbar will change together within the limitations of the buttons it is displaying.
Standard Toolbar
The Standard toolbar provides quick access to many of the commonly used
options.
Parameter Definition
Creates a new mimic for drawing. This option is also available on the File menu.
Opens a mimic previously saved to disk. This option is also available on the File
menu.
Saves the selected mimic. This option is also available on the File menu.
Saves all open mimics. This option is also available on the File menu.
Closes the selected mimic. This option is also available on the File menu.
Closes all open mimics. This option is also available on the File menu.
Shows a preview of what the selected mimic will look like when printed. This option
is also available on the File menu.
Prints the selected mimic. This option is also available on the File menu.
Reverses the last change you have made, such as drawing, changing properties,
moving, or copying. This option is also available on the Edit menu.
Reverses the changes made by Undo. This option is also available on the Edit menu.
Cuts the drawing element and place it on the clipboard. This option is also available
on the Edit menu.
Copies the drawing element to the clipboard. This option is also available on the Edit
menu.
Pasts any drawing elements from the clipboard to the selected mimic. Pasted drawing
elements will appear in the exact same location in the selected mimic as the elements
that were cut or copied to the clipboard. This option is also available on the Edit
menu.
Opens the Color Palette. This option is also available on the Display menu.
Opens the Graphic Explorer. This option is also available on the Display menu.
Opens the Script Editor for VBA-like scripting. This option is also available on the
Display menu.
Draw Toolbar
The Draw toolbar provides quick access to all the commonly used tools to produce drawing
elements. (The Arrange toolbar may be used to align and manipulate drawing elements once
they are produced.)
Parameter Definition
Draws a rectangle. Hold down the Shift key while drawing, to constrain the drawing
to a perfect square.
Draws a rounded rectangle. Hold down the Shift key while drawing, to constrain the
drawing to a perfect rounded square.
Draws an ellipse or a circle. Hold down the Shift key while drawing, to constrain the
drawing to a perfect circle.
Draws a 1/4 ellipse Hold down the Shift key while drawing, to constrain the drawing
to a perfect 1/4 circle.
Draws an arc. You can specifiy the Start and End angles of the arc on the Aspect tab.
If the Start and End angles are both 0, the arc will be a complete ellipse.
Draws a polygon.
Draws a polyline.
Inserts text.
Inserts a symbol. Symbols must first be created by using the Create Symbol option
on the Edit menu.
Note: The drawing tools can also be selected from the Draw menu instead of the
toolbar. The tools for inserting images, ActiveX controls, etc. can be selected
from the Insert menu.
Mode Toolbar
The Mode tool bar is used to switch a mimic between run and design modes, and to zoom the
view in and out.
Parameter Definition
Switches the selected mimic to test mode. In test mode, the real-time value of the
database variables used in any animation may be forced without changing the value
in the database.
Activates the zoom-in tool. Clicking the zoom-in tool will change the cursor shape
to a magnifying glass with a plus sign in the center. When you then click an opened
mimic, the view will zoom in. To de-select the zoom-in cursor, click on the tool
again.
Activates the zoom-out tool. Clicking on the zoom-out tool will change the cursor
shape to a magnifying glass with a minus sign in the center. When you then click an
opened mimic, the view will zoom out. To de-select the zoom-out cursor, click on
the tool again.
Returns the selected mimic to normal view (1:1).
Note: These same tools can be selected from the Mode menu instead of the toolbar.
Arrange Toolbar
The Arrange toolbar provides quick access to all the commonly used tools for arranging and
sizing drawing elements.
More than one drawing element can be selected at one time by holding the Shift key while
selecting the drawing elements with the left mouse button.
Note: When more than one element is selected, the last one selected is used as the
"reference" for some of these Arrange options.
Parameter Definition
Groups the selected drawing elements into one object. This single object can then be
moved and resized like a single element.
Ungroups a previously grouped object. This separates the group back into the
original individual drawing elements.
Locks the selected drawing element or group in place. Locked items cannot be
moved, resized, or deleted.
Turns grid alignment on or off. If grid alignment is on, drawing elements that are
moved or resized with "snap" to the grid.
Moves the selected drawing element to the back of all overlapping elements.
Moves the selected drawing element in front of the element immediately on top of it.
Moves the selected drawing element behind the element immediately under it.
Aligns elements horizontally so that the left edge aligns with that of the reference.
Aligns elements horizontally so that the right edge aligns with that of the reference.
Aligns elements vertically so that the top edge aligns with that of the reference.
Aligns elements vertically so that the bottom edge aligns with that of the reference.
Aligns elements vertically so that the center aligns with that of the reference.
Aligns elements horizontally so that the center aligns with that of the reference.
Resizes elements so the width and height match that of the reference.
Note: The arrange tools can also be selected from the Arrange menu instead of the
toolbar. The tools for grouping, ungrouping, locking, and unlocking can be
selected from the Edit menu.
Layers Toolbar
The Layers toolbar lets you toggle among which layers are visible. By default, all layers are
visible on a new mimic.
Animations Toolbar
The Animations toolbar is a shortcut for all the available commands on the Animate menu.
The Animations tool bar has the following seven tabs:
• Color
• Text
• Symbols
• Position
• Send
• Run
• Link
On each of these tabs, a number of buttons are available. Each button corresponds to a
command on the Animate menu. For a more thorough description of these commands, see the
section on the specific types of animation.
Chapter 3
Mimics, Windows, and Grids
Using Mimics
The User Interface for your SCADA project is developed as a number of mimics. Windows
are easily and quickly developed to form Menus, Overviews, Plant Mimics, Trend Displays,
Alarm Displays, Reports and so on.
Normally, a hierarchical display structure is created by linking the mimics together with a
special type of animation. This animation creates command buttons that are used at runtime to
open and close mimics.
The properties of each mimic are individually selected including the size and position on the
screen, the ability to move or resize the mimic, and the access level. Window properties may
be changed at any time by any user with the necessary access rights.
Operational Modes
Each mimic you create may be displayed in one of two modes selected from the Mode toolbar:
• Run Mode - In run mode, the animated properties of drawing elements in the mimic are
updated in real-time. It is not possible to change a mimic's properties or any drawing in it.
This is the normal mode in which a mimic is opened by a user.
• Design Mode - In design mode, the properties of drawing elements do not update in
real-time. The mimic properties may be changed and drawing elements added, modified,
and deleted. This is the mode of operation used while developing a mimic.
It is possible to have multiple views of the same mimic open at the same time in both design
and run mode.
Note: Besides using the Mode toolbar, you can also switch a mimic between design
and run modes by right-clicking anywhere on the mimic background and
making your selection from the popup menu.
Options
Folder Where the mimic files are stored. In your project’s folder, there is a place to
store Mimics and Mimic Templates. Use this drop-down list to select
between these two locations.
Normal mimic files should be stored in the folder for mimics. Files saved as
a mimic template can be used to apply properties (such as size, position,
background color, etc.) from the template to other mimics. For more
information on applying templates to other mimics, see the section on
templates under Window Properties.
Library The name of the library in which the mimic file is to be saved or opened
from. Shared libraries, which are available to multiple projects, can be setup
under Project on the Tools menu.
Name The name of the mimic to be opened or saved. You may type the name
directly into this field or select it by clicking in the list.
Filter Narrows the list of mimics displayed. The filter uses standard wildcard
characters.
Opening a Mimic
To open a mimic, perform the following steps:
1 Click the OPEN button on the Standard toolbar or select the command from the File
menu.
2 Select the name of the mimic you want to open from the window management box.
Closing a Mimic
To close a mimic, click the CLOSE button on the Standard toolbar or select the command from
the File menu.
If changes have been made to the mimic since it was opened and they have not been saved,
you will be asked if you want to save the changes.
Note: If a mimic view is not displayed at 100% (normal) magnification, any
changes to window size and position are not saved.
Saving a Mimic
To save a mimic, click the SAVE button on the Standard toolbar or select the command from
the File menu.
If you are saving a mimic for the first time (one that you have just created) then the window
management box will be displayed and you must enter a mimic name. This name will be used
in the future when opening the mimic and is also the name of the file in which the mimic will
be saved. Because it is also the name of the file, it must adhere to the file naming scheme of
the operating system.
To save an existing mimic with a different name, use the Save As command on the File menu.
To save all open mimics, click the SAVE ALL button on the Standard toolbar or select the
command from the File menu.
To Iconize a Window
Window Properties
The Window Properties box may be displayed either by selecting the option from the Window
menu, or by right-clicking anywhere on a window’s background and selecting Window
Properties.
The window properties box has 5 tabs.
• Display
• Access Rights
• Included Window
• Links
• Template
• Advanced
Display Tab
The Display tab contains the main window properties that affect the window's appearance and
behavior.
On the display tab, you can customize the following areas of a window:
• Position
• Size
• Background
• Title
• Style
• Grid
• Layers
• Decluttering
The File field lists the directory path and filename of the mimic. This field
cannot be altered on the display tab.
The Access Rights tab contains window properties that determine how the user may
manipulate the window at runtime.
On the access rights tab, you can grant rights for the following:
• Level
• Zoom
• Layers
• Unauthorized Signal
This tab for window properties determines how the mimic behaves when it is opened as a child
of another window or opened as a context window.
On the Included Mimic tab, the following options can be customized:
• Popup Behavior
• Opening Position
Links Tab
The window property options available from this tab determine which mimics are opened
from link - open animations when using the substitution characters #M1 to #M10.
For more information, see the section on opening and closing windows under Control Zone
Animation.
Template Tab
On this window property tab, you can select a mimic that has been saved as a
template and then specify which properties should be inherited from from the
template by the current mimic.
In the Template field, enter the name of the template file to use. Or, click on
the down arrow to select from a list of saved template files.
After providing the name of the template to use, put a check in the box next
to each property you want inherited from the template.
Options
The Advanced tab lets you associate a bit with the window. When the bit changes to 1 or 0 it
will produce a beep, depending on the settings you specify.
Drawing
Understanding Drawing
Drawing is the process by which you transform your blank windows into Menus, Overviews,
Process Mimics, etc. You can draw in a window using three different mechanisms.
Using the workspace tools you can create mathematically defined drawing elements
(geometric shapes) including rectangles, ellipses, lines, polygons, and text. Each element has a
wide range of properties which allow you to quickly and easily change the appearance.
For example, a rectangle can appear as a button.
By importing bitmaps in BMP, JPG, or WMF format, you can display scanned images,
standard Windows icons, etc.
Using OLE (Object Linking & Embedding) you can include information created in other
applications, such as charts, graphics, and spreadsheet data.
You display the process you are supervising by attaching properties of the drawing elements to
the real-time value of variables in the database.
For example, a polygon representing a valve can change color depending on the valve
position. Attaching properties of drawing elements to the real-time value of variables is known
as animation.
Geometric Shapes
The drawing elements produced by the workspace tools are defined as a set of coordinates plus
properties describing color and style. They are, in effect, geometric shapes. The properties of
geometric shapes are much easier to change and to attach to the value of variables in the
database.
Pros
• Easy to draw and change.
• Very wide range of possibilities for dynamically changing properties.
• Window definition files containing only geometric shapes are very compact.
• Geometric shapes use memory efficiently when they are displayed.
Cons
• Pictures created with just geometric shapes do not normally look as "pretty" as those using
bitmaps.
Bitmaps
A bitmap is literally a map of the area it occupies on the screen, with the color of each pixel
(picture element) described by a number of digital bits. The number of bits used to define each
pixel will depend on how many colors the picture is using. Eight bits per pixel can define 256
colors, 16 bits per pixel can define 64,000 colors, etc. Once a bitmap is created, there is very
little that can be done to change it dynamically. You cannot, for example, attach an area of a
bitmap to a database variable so that it changes color according to the value of the variable.
Pros
• There are many drawing and paint packages able to produce stunning pictures in bitmap
format.
• Bitmaps may be created from "scanned in" pictures of real world objects.
• The number of colors which may be displayed in a bitmap is limited only by the capability
of the host PC.
Cons
• Bitmaps, particularly those with lots of colors, need very large files to store them and use
considerable amounts of memory (RAM) when they are displayed.
• Once they are created, bitmaps are difficult to change except in a paint or drawing
package.
• Very limited possibilities for dynamically changing bitmaps according to the value of
database variables.
Note: See also the section on Inserting an Image.
OLE
When linking or embedding information from another application, the information is
displayed in the mimic in the same form as it would be in the original application.
For example, you could display a Word document. When you double-click on the object in
design mode, the application in which the object was originally created is automatically
opened with the object displayed and is ready for editing. When you return to Client Builder,
the mimic reflects any changes you’ve made to the object.
Pros
• You can display information in virtually any form, as long as there is a Windows
application, supporting OLE, capable of editing it.
Cons
• You must use the original application to change the object.
• Very limited possibilities for dynamically changing OLE objects according to the value of
database variables.
Options
Drawing Grid
The grid is a tool to help you precisely position your drawing elements. It is an imaginary
matrix of coordinates within each window.
When you create a drawing element, if grid alignment is turned on, the size and position of the
drawing element will automatically adjust so that each of its corners is located on the nearest
grid point.
When you move a drawing element, as you release the mouse button, the top left hand corner
will automatically move to the nearest grid point.
The grid visibility can be turned on or off using one of the following methods:
• Use the GRID button on the Arrange toolbar.
• Right-click on the window background and select Grid from the popup menu.
• Check or uncheck grid Visible on the display tab of the window properties box.
Note: Whether the grid is visible or not, does not affect its operation. If grid
alignment is enabled, drawing elements will still snap to the grid even if the
grid is not visible.
For normal drawing, it is highly recommended that the grid alignment is always turned on.
However, there are occasions when you may need to position a drawing in a location not on a
grid point.
The grid alignment can be turned on or off using one of the following methods:
• Use the ALIGN button on the Arrange toolbar.
• Right-click on the window background and select Align from the popup menu.
• Check or uncheck grid Enabled on the display tab of the window properties box.
The standard grid resolution of 8 pixels is suitable for most applications. However, if you have
a special requirement, you can change the X and Y pixel resolution from the display tab of the
window properties box.
Chapter 4
Graphics, Drawing Elements,
and Text Elements
Inserting an Image
Client Builder supports the use of images in standard BMP, JPG, WMF, or EMF format. The
use of images can considerably enhance the appearance of your application. However, before
using them, you should view the pros and cons of using bitmapped images.
Before you can insert an image, you must move it to the correct directory using the Windows
Explorer or another file management tool. The image must reside in the "Bitmap Files" folder
of your project directory.
An image is inserted as a reference. In other words, the name of the image is inserted in the
window definition file. This means that even when it has been inserted into a window, an
image may still be edited by Paint or any other drawing package. Any changes made will be
visible the next time the window is opened. Therefore, if you need to make changes to an
image that is used in several different locations, after you have made the changes, you will not
need to re-insert the image.
To Insert an Image
4 Click the Insert button to insert the image. The image will be placed at the top left hand
corner of the mimic. Drag the image to move it to the desired location.
Note: HINT: To insert an image directly into the required location, drag the
name of the image from the list, or drag the thumbnail of the image, and
drop it on the desired location in the mimic.
Graphic Explorer
The Graphic Explorer provides a hierarchical view of all drawing elements, texts, animations,
library objects, ActiveX controls, etc. forming a mimic. You can display the Graphic Explorer
from the Display menu or from the Standard toolbar.
The Graphic Explorer provides the following information:
• A list of all mimics currently open.
• For each mimic, a list of drawing elements and the coordinates of their anchor point.
• For each drawing element, any animation that has been applied.
• For each animation, the name of any database variables used.
You can also display and change the properties for any drawing element by double clicking on
its entry in the Graphic Explorer.
Renaming Elements
When you create drawing elements, text, etc. in a mimic, each item is given an internal default
name (Shape1, Shape2, etc.) You can change these default names in the Graphic Explorer by
selecting an element, waiting a moment, and clicking on the element again. Type in the new
name and press Enter.
Color
Color Palette
The color palette is displayed each time you select a color property from any mimic or
drawing element properties box. You can also view the color palette by selecting it from the
Display menu.
You should understand how to use each area of the Color Palette before starting any drawing.
Selected Colors - This top portion of the Color Palette shows the colors
currently in use.
Indexed Colors - When you color a drawing using one of the colors from
this area, the color is saved in the drawing. If you change the color in the
palette, the color in the drawing is not affected.
Custom Colors - Clicking this button will show or hide a palette for custom
colors. When you color a drawing using one of the colors from this area, the
color is inserted as a reference. That is, if you change the color in the
palette, the color of all drawings using it will also change.
Some drawing elements support blinking colors. A blinking color contains two color
selections. At runtime the affected part of the drawing element will alternate between them at a
predefined rate.
To select a blinking color, perform the following steps:
When a transparent color is applied to a drawing element, the affected property becomes
invisible and the background or any drawing elements under it may be seen.
To define a color as transparent, perform the following steps:
1 Check the Transparent Color check box.
2 Click OK to apply the color.
Coloring a Drawing
The Color Palette may be used to Color a drawing directly or by changing the colors using the
drawing’s properties box.
Note: If you select more than one drawing, the color changes will be applied to all
the selected drawings.
To copy the colors from an existing drawing, perform the following steps:
1 Open the Color Palette.
2 Click on the drawing element from where the colors are to be copied. Subsequent
drawings will be initially created using these colors
Note: The physical color which appears on the screen can vary slightly according
to the graphic board and screen resolution of the PC. Therefore, for 100%
accuracy, it is best to develop an application on a PC with the same
specification as the one that will be used in the final system.
Rectangles, rounded rectangles, ellipses, 1/2 ellipses, 1/4 ellipses, and arcs use the same basic
drawing element but with different properties. The procedure to draw them all is as follows.
1 Click on the relevant button on the Draw toolbar.
2 Position the cursor on the screen where the drawing is to start.
3 Click and drag the cursor until the drawing is the required size.
4 Release the mouse button.
Note: If you hold down the Shift key while drawing a rectangle or ellipse, the height
and width will be the same. Doing this lets you draw a perfect square or circle.
The method to draw a 1/2 ellipse or 1/4 ellipse is the same. The only difference is that the point
at which the drawing is started will determine the orientation of the drawing element.
After drawing an arc, open the properties box and on the Aspect tab, specify the Start and End
angles of the arc. If the Start and End angles are both 0, the arc will be a complete ellipse.
Drawing a Line
To draw a line, perform the following steps:
1 Select the Line button from the Draw toolbar.
2 Position the cursor on the screen where the drawing is to start.
3 Click and drag the cursor until the line is of the required length.
4 Release the mouse button.
Drawing Properties
Properties Box
Note: Some of the drawing elements have properties that are not frequently used.
To keep things simple, these are not normally displayed in the properties box.
If advanced properties are available, there will be a large button with a down
arrow on it at the bottom of the properties tab. Clicking here will increase
the size of the tab to display the Advanced Properties.
Pattern
The pattern properties define the fill of a solid drawing element such as a rectangle or polygon.
• Color - The color for the lines of a pattern or the fill color if the pattern is solid.
• Style - The pattern with which the shape is filled. The pattern can be
• Solid
• Diagonal 45° or -45°
• Vertical or Horizontal hatch
• Vertical & Horizontal hatch
• Diagonal + and - 45°
• Invisible
• Background - The color for the background if any pattern other than solid or transparent is
selected.
Line
The line properties define the appearance of the outline or edge of a solid drawing element
such as a rectangle or ellipse, and of a line or polyline.
• Color - The color of the line.
• Style - The style of the line. The style can be:
• Solid
• Invisible
• Dashed
• Dotted
• Dash dot
• Dash dot dot
• Invisible
• Thickness - The width of the line in pixels.
Note: Only the solid line style is available for line thicknesses greater than 1.
The position is the X and Y location from the top left hand corner in pixels.
The size is the width and height of the drawing in pixels.
For a polygon or polyline, the position and size refer to an imaginary rectangle drawn around
its extremities.
From the Aspect tab in the properties box, you can display and modify the properties that
define the shape of the drawing element (rectangle, circle, etc.) and its appearance (button,
shadow, etc.).
The Aspect tab is only available for two dimensional drawing elements.
Shape
• Shape - The shape of the selected drawing element. The drawing element can be one of the
following:
• Rectangle
• Rounded Rectangle
• Ellipse
• 1/2 Ellipse
• 1/4 Ellipse
• Arc
• Curvature - The radius of corners of the shape.
Note: The curvature option is only available if the shape is a rounded rectangle.
For more information, see Changing the Corner Radius of a Rounded
Rectangle.
• Border - The border of a 1/2 or 1/4 ellipse or an arc can be Open or Closed. An open
border leaves the ends of the ellipse or arc open. A closed border makes the ellipse or arc
appear more like a solid shape.
• Angles - The Start and End Angles are used when drawing an arc. Specify the points on a
360º circle where the arc should start and end. If both are set to 0, the arc will be a
complete ellipse.
Appearance
Appearance - Lets you quickly modify the appearance of a rectangle to one of the following:
• Shadow
• Button
• Colored Button
• Relief
• Inverse Relief
Note: To make buttons or colored buttons with text, use the Aspect Tab for Text.
Advanced Properties
Most of the drawing elements and text support additional advanced properties which are not
normally displayed in the properties box. To display the advanced properties, click the down
arrow button at the bottom of a property box. The box will change to show the advanced
properties for that specific drawing element.
Note: To make these advanced properties always visible, select Advanced Mode
from the Display menu. The advanced properties will be displayed every
time you view a drawing element's properties.
Under the Advanced Properties, you can change any of the following:
• Visibility Bound
• Anchor
• Layers
• Rotation Angle
• Locked or Unlocked
Visibility Bound
The display of drawing elements may be linked to a zoom level. That is, the drawing elements
are not visible unless the mimic is displayed within a certain zoom range.
The main use of this technique is to keep large or complex mimics less cluttered. For example,
if you have a mimic that is 1600 x 1200 pixels in size, you might normally move around it
using the scroll bars. You can also zoom out so that the entire mimic is visible. In this case,
you may now have so much activity on the screen that the most important information is no
longer obvious. By linking some of the drawing elements to, for example, 100% (normal)
view you can automatically reduce the amount of information visible so that the most
important information is readily seen.
Anchor Point
The X, Y coordinates represent the anchor point of a drawing element. The anchor point is the
point around which the element can be rotated. In design mode, you can rotate lines, polygons,
polylines, bézier curves, and text. In run mode, you can rotate all drawing elements except
text. You can move the anchor point by using the mouse, or you can specify specific X, Y
coordinates for the location of the anchor point.
Layers
Each mimic contains 16 display layers. At runtime, you can select which of the layers are
displayed either manually, using the Layers toolbar, or automatically according to defined
criteria (the current User, process conditions, etc.) The layers are completely independent of
one another and you can choose to display one or more layers at any one time.
Each drawing element is placed in a layer. Any drawing elements not placed in the selected
layers are not visible in the mimic.
By default, when a mimic is created, it displays all layers. Layer 0 is the default in which
drawing elements are placed when they are first created. Therefore, if you do not intend to use
layers, there is no action you need to take.
Rotation Angle
Rotation is the process of rotating a drawing element about its anchor point. You can rotate
polygons, polylines, bézier curves, and text. You can rotate these drawing elements freely
using the Rotate command on the Draw toolbar or the Draw menu. Or you can provide an
exact angle in degrees of rotation under Advanced Drawing Properties.
Locked or Unlocked
A drawing element that has been locked cannot be moved or changed. A drawing element can
be locked or unlocked from the Edit menu, the Arrange toolbar, or the drawing popup menu.
Or drawing elements can be locked or unlocked from the Advanced Drawing Properties box.
To lock and unlock a drawing element from Advanced properties, perform the following steps:
1 Display the drawing element's advanced properties.
2 Put a check in the box labeled Locked to lock the drawing element. Uncheck the box to
unlock the drawing element.
3 Click OK to confirm the change.
Selecting
A drawing element must be selected before you can do anything to it. A selected drawing
element is surrounded by a number of small blocks known as handles. An anchor point, about
which certain drawing elements may be rotated, is also displayed. The anchor point appears as
a small black circle with a white center. The location of the anchor point may be changed by
using the mouse.
1 Choose the Select tool from the Draw toolbar or the Draw menu.
2 Point to the drawing element and click.
1 Choose the Select tool from the Draw toolbar or the Draw menu.
2 Hold down the Shift key on the keyboard, then point and click on each drawing element
you want to select.
OR
1 Choose the Select tool from the Draw toolbar or the Draw menu.
2 Click anywhere in the blank area of the mimic. As you drag the mouse, a box appears that
you can drag around the elements you want to select. In some drawing applications, this is
known as "rubberbanding." All drawing elements totally or partially within the rectangular
area will be selected.
When selecting several drawing elements, each one is surrounded by handles with a white
center except the last to be selected which has normal black handles. This element is known as
the reference and in certain operations is used to provide new properties for the other elements.
Note: If you click anywhere outside of one of the selected drawing elements, all
the drawing elements are deselected.
Use the Select All command from the Edit menu to select all the drawing elements in the
current mimic.
Grouping
A drawing group is a collection of one or more drawing elements that behave as if they were
one. For example, when moving them within the window, their relative positions to each other
remain the same although as a group they may be moved anywhere within the window. All the
tools which operate on single drawing elements may also be used on a drawing group.
Note: You cannot arrange or align individual drawing elements that are grouped.
You must ungroup them before individual manipulation can be performed.
Creating a Group
Ungrouping
From the Drawing pop-up menu, from the Edit menu, or from the Standard toolbar, select the
Cut command. You can also press CTRL+X on the keyboard.
Duplicating
1 Choose the Select tool from the Draw toolbar or the Draw menu.
2 Press and hold the CTRL key on the keyboard.
3 Click and drag on the drawing element.
4 Release the mouse button. A duplicate of the drawing element will be inserted at the
cursor location.
To resize a polyline or polygon group (so you have a group of just one drawing element),
resize the group, and then ungroup it.
Rotating
Rotation is the process of rotating a drawing element about its anchor point. In design mode,
you can rotate lines, polygons, polylines, and bézier curves. You can also rotate text, but only
if the Do Not Auto Size property on the Aspect tab is unchecked and the Regular appearance is
chosen. In run mode, you can rotate all drawing elements except text by using Position
Animation. Text cannot be rotated while in run mode.
Select the Rotate tool from the Draw menu or the Draw toolbar. The cursor will change shape
to a circle with an arrow head.
Click within the drawing element you want to rotate and drag the cursor in a straight line in
any direction. The angle of rotation is directly proportional to how far you move the cursor.
The drawing element rotates about its anchor point.
Release the mouse button when you have rotated the drawing to its new position.
Note: You can also specify an exact angle in degrees of rotation under the Advanced
Drawing Properties box.
Note: Another way to move the anchor point is to change the X, Y coordinates of
the Anchor under the Advanced Drawing Properties box.
Text
Inserting Text
Text is created in much the same way as any other drawing element except, as part of the
process, the text string to be displayed must be typed in. When text is inserted, its dimensions
are supplied by a supporting rectangle. This rectangle may or may not be visible depending on
the appearance chosen for the text.
To Insert text
1 Select the Text command from the Draw toolbar or the Draw menu.
2 Position the cursor on the screen where the text is to start and click the left mouse button.
3 Type in the text to display.
4 Press the Enter key on the keyboard to confirm the text.
The text will initially appear with default properties. To change the text or its appearance, use
the properties box.
Text Properties
Text Tab
From the Text tab in the properties box, you can modify the text, color, size, and position.
• Text - The text to be displayed. Make changes to the text you have typed in this box. To
make changes to the font, style, and point size, click on the button.
Text
• Color - The color of the text.
Background
• Color - The color of the background behind the text.
From the Aspect tab in the properties box, you can display and modify the properties that
define the text and its appearance (button, shadow, etc.).
Text
• Do Not Auto Size - If this option is not checked, when you resize the box around the text,
the text itself will grow or shrink in proportion. When this option is checked, resizing the
box around the text does not change the size of the text itself.
• Multiline - If this option is not checked, all text will stay on one line. If you make the box
around the text smaller than the text itself, the words will be cut off by the box. When this
option is checked, as you resize the box around the text, the words will wrap to the next
line as necessary in order to stay visible.
• Alignment - How text is aligned within the box surrounding it. It can be one of the
following:
Left
Center
Right
Margin - How many pixels the text will allow between itself and the edge of the
surrounding box.
Appearance
Appearance - Lets you quickly modify the appearance of the box surrounding the text to one
of the following:
• Shadow
• Button
• Colored Button
• Relief
• Inverse Relief
Resizing Text
Resizing text is a way of changing the font size besides using the Text tab. If the Do Not Auto
Size box on the Aspect tab is unchecked, the point size of the font automatically changes to fit
the surrounding rectangle.
To Resize Text
Chapter 5
Animation and Expressions
Animation
What is Animation?
Animation is the process by which a drawing element is given the capability of interacting
with the user. This interaction can be visual, or using the keyboard and mouse, or both. There
are two distinct types of animation, although the principle of applying them both is the same.
Property animations connect a visual property of a drawing element, for example its color, to
the database. At runtime, the appearance of the drawing element changes in real-time
according to the database and the animation you have applied to it. Most of the time, you will
be using animation to display the real-time value of variables. But it may also be used to
display the result of an expression, an attribute such as a variable’s Domain, or context
information such as a database tag.
Control Zone animations create an area in a window from which a user may interact with the
application using the keyboard and mouse. Control zones allow the user to change the value of
variables, open and close mimics, run programs, etc.
The basic principle of applying all animations is the same. The following example is for
applying a Color on Bit animation to a text string.
1 Open the mimic which is to contain animation and select design mode.
2 Select the drawing element you want to animate. A Color on Bit animation may be applied
to all drawing elements except bitmaps and pre-animated objects.
3 From the menu bar, select Animate > Color > Bit.
4 The Drawing properties box will appear with a new tab called Colors Bit.
5 Enter the name of the bit either by typing it in directly or by using the Variable selector.
(The variable selector may be displayed by clicking the button at the end of the Bit field).
6 Check the boxes corresponding to the state of the bit (Off, On, or Unavailable) and the
property it is to affect. The tab with the paint can symbol is for the background of the text,
the tab with the pen for the text itself.
7 Select the colors corresponding to state of each selected property. Blinking and transparent
colors may be used. For more information on selecting colors see the sections on color
under drawing.
8 Select OK to confirm the animation.
Sometimes you want to apply more than one animation to a drawing element. There are no
restrictions on applying multiple animations, but before you do, you should take into account
the following points:
Before applying more than one animation, double check that one of the standard animations
will not meet your requirements. Many of them support combinations of animation using two
or more database variables.
There is no way to prioritize animation. For example, if you apply two colors on bit
animations to the same drawing element, the most recent bit change will provide the color.
Animations are only refreshed when the value of the attached database variable changes. With
unusual combinations, such as a polygon that has rotation and a bargraph fill applied to it, this
can produce unexpected effects.
When applying multiple animations, each animation will have its own tab in the drawing
properties box.
Removing an Animation
To remove an animation without deleting the drawing element, perform the following steps:
1 Display the properties box for the drawing element.
2 Select the tab for the animation to be deleted.
3 Click the trashcan symbol.
Property Animation
Property Animation
Property animations connects a visual property of a drawing element, for example its color, to
the database. At runtime, the appearance of the drawing element changes in real-time
according to the database and the animation you have applied to it. Most of the time, you will
be using animation to display the real-time value of variables. But it may also be used to
display the result of an expression, an attribute such as a variable’s Domain, or context
information such as a database tag.
Animate Color
Changing the color of a drawing element is one of the simplest and most commonly used ways
of presenting process information to the user. You can use the status of bits or alarms and the
value of register variables as the source of a color change. Some animations allow you to use a
combination of variables, for example a bit and alarm.
All color animations allow you to independently change both the border and pattern
(background and characters for text) of a drawing element. This gives a very wide range of
color combinations. You may use the blinking and transparent options in your choice of colors.
All the animations include the capability to select a special color to be used whenever any of
the variables are invalid. (For example when communication to a PLC has failed).
Each color change animation is represented by a tab in the properties box of the drawing to
which it is applied. Although the appearance of the tab will vary depending on the type of
color animation chosen, all will contain two common symbols representing the pattern and
border properties. The symbol representing patterns looks like a paint bucket. The symbol
representing border properties looks like the tip of a pen.
The following table shows what type of color animation options you can apply. These options
are available from the menu bar by selecting Animate > Color. They are also available on the
Animations toolbar under the Color tab.
Animate Text
Text Displays text by obtaining the string from a specified tag. As the tag
changes in the database, the text changes.
Text with Color Displays text like above, as well as changing the color selection according
on Bit to the status of a bit.
Label Displays the label property of a tag.
Note: This is only applicable to structured databases.
Label with Displays a label like above, as well as changing the color selection
Color on Bit according to the status of a bit.
Display Register Displays a register value by obtaining the value from a specified tag. As the
tag changes in the database, the text changes.
Display Register Displays a register value like above, as well as changing the color selection
with Color on according to the status of a bit.
Bit
Animate Symbols
Any symbols you have created by using Create Symbol on the Edit menu, can be inserted into
a mimic and then animated. When you animate a symbol, you can have the symbol that is
shown change to another symbol in the Library.
Each symbol animation is represented by a tab in the properties box of the drawing to which it
is applied. The appearance of the tab will vary depending on the type of symbol animation
chosen.
The following table shows what type of symbol animation options you can apply. These
options are available from the menu bar by selecting Animate > Symbols. They are also
available on the Animations toolbar under the Symbol tab.
Animate Position
Each position animation is represented by a tab in the properties box of the drawing to which it
is applied. The appearance of the tab will vary depending on the type of position animation
chosen.
The following table shows what type of position animation options you can apply. These
options are available from the menu bar by selecting Animate > Position. They are also
available on the Animations toolbar under the Position tab.
Single Axis Move a drawing element in one or two axes according to the value of one
Positioning register. This is a linear movement.
You can also set the value of a register by clicking on a drawing element and
dragging it.
The X and Y axis positioning is relative to the anchor point of the selected
drawing element.
HINT: Use Single Axis Positioning to create a slider like those found on the
Windows Volume Control panel. This can be used to change a value by
clicking and dragging with the mouse.
2 Axes Move a drawing element in two axes according to the value of two registers.
Positioning You can also set the value of two registers by clicking on a drawing element
and dragging it two axes.
The X and Y axis positioning is relative to the anchor point of the selected
drawing element.
HINT: Use 2 Axes Positioning to compare the relative values of two
variables in a simple X, Y chart.
Free Positioning Move a drawing element freely according to the value of two registers. One
register provides the X axis value and the second register provides the Y
axis value.
In Free Positioning animation, the X and Y axis is an absolute value for the
position on the screen. In this case, 0,0 is the upper-left position of the
screen.
Rotation Rotate a drawing element according to the value of a register. All drawing
elements can be rotated with animation except text.
To define the angle through which the drawing rotates, specify a minimum
and maximum value for the register along with their corresponding angles.
Rotation occurs around the anchor point of the drawing element.
HINT: Use Rotation animation to move a needle in a simulated analog
meter.
Scaling Resize a drawing element according to the value of a register.
A control zone is an area on the screen where a user may interact with the user interface.
Control zones provide the following actions:
• To send a value to a bit, register, or text database variable.
• To run a script, program, or application.
• To give a user access to timetables.
• To open and close mimics.
A control zone is created in the same way as any other animation by selecting a drawing
element and applying an animation to it. At runtime, to draw attention to itself, when the
cursor is over a control zone it changes shape and the drawing is highlighted with a button
style border.
Control zone animations may be applied to any drawing element. However, because the
highlight which appears around a control zone is rectangular and based on the dimensions of
the drawing element, a rectangle, text field, or bitmap looks the best.
Control zone animation on the Animate menu consists of:
• Send
• Run
• Link
You can enable and disable each control zone that you create using a database bit. You may
use the same or a different bit for each control zone.
A database bit is used because of the flexibility it gives you. The value of the bit could come
from a piece of equipment such as a PLC, from another station on a local area network, or
derived internally using an expression or script. You can choose to disable the control zone on
either the 1 or 0 state of the bit.
By using the Warning Box and/or Warning Beep check boxes, you can display a warning
message and/or produce a beep from the PC’s speaker if a user attempts to use the control zone
at run time when it is disabled.
These properties are available in the advanced section of the properties box.
All of the animations used to create control zones have a text field called Comment in their
properties tab. A string entered into the comment field, preceded by the @ character, will be
displayed as a ToolTip when the cursor is positioned over the control zone.
Note: Without the @ character, text entered in the comment field will not show up
as a ToolTip.
Animate Send
Each Send animation is represented by a tab in the properties box of the drawing element to
which it is applied. The appearance of the tab will vary depending on the type of animation
chosen. Animation which combines two features, such as Bit with Color, will have two tabs in
the properties box, one for each type of animation.
The following table shows what type of send animation options you can apply. These options
are available from the menu bar by selecting Animate > Send. They are also available on the
Animations toolbar under the Send tab.
Bit Allows the user to force the state of a single bit. The sent bit can be forced to
1 or 0. It can also be reversed. In other words, if the bit was 0 it becomes 1
or if it was 1 it becomes 0. The bit can also be sent directly without
confirmation or with a label which requires confirmation.
Bit with Color Allows the user to force the state of a single bit, like above. It is also
combined with a color tab allowing color animation.
Double Bit Allows the user to change the state of 2 bits at the same time. This is useful
when a device requires separate signals to start and stop it. The command is
always confirmed with a dialog box.
Register Allows the user to change register values. The user can supply the
information in four different ways.
• Directly from the keyboard,
• By incremental steps,
• From a graphical keypad which appears and allows interaction with a
mouse,
• A default value can be supplied which the user can confirm or change.
The value can also be entered directly into the text field of the drawing
element when the user clicks on it.
Text This animation may be applied to any of the solid drawing elements, but it is
normally used with Text in which case the string may also be displayed.
Strings may be entered either from the keyboard, or by using the mouse and
a displayed keyboard.
Region Specifies which region the mimic should be opened in. If you have multiple
monitors attached to the same system, each monitor can be a different
region.
Note: On the properties tab for each type of Send animation, you can provide a Hot
Key. This is a series of keystrokes that can be used instead of clicking on the
drawing element with the mouse. Leave the field set to None if you don’t
want to assign a Hot Key.
Animate Run
The Run Application animation allows you to start another Windows application, such as
Notepad, directly from a control zone.
The Run Application option is available from the menu bar by selecting Animate > Run. It is
also available on the Animations toolbar under the Run tab.
Animate Link
Each Link animation is represented by a tab in the properties box of the drawing element to
which it is applied. The appearance of the tab will vary depending on the type of animation
chosen.
The following table below what type of Link animation options you can apply. These options
are available from the menu bar by selecting Animate > Link. They are also available on the
Animations toolbar under the Link tab.
Open The Link Open animation may be applied to any drawing element, although
normally it will be applied to a text string with the text used as an indication
to the user. The appearance on the Aspect tab of the text properties can be
set to Button or Colored Button.
The name of the mimic to be opened is selected using the Mimic drop down
list box.
You can also provide the X and Y coordinates in pixels for the position of
the opened mimic. An absolute position opens the mimic at the X and Y
coordinates specific to the screen. A relative position opens the mimic at the
X and Y coordinates relative to the location where the mimic was originally
saved. For example if the mimic was saved at position 50, 70 and a relative
position of 30, 10 is supplied, the mimic will be opened at 80, 80.
Close The Link Close animation may be applied to any drawing element, although
normally it will be applied to a text string with the text used as an indication
to the user.
Specify the name of the mimic to be closed in the Mimic field.
HyperLink Allows you to create a link to a Web page.
Note Allows a note to the user to be opened when the drawing element is clicked
with the mouse. Provide the name and location of the file to be opened. The
file type can be a .TXT or .RTF file. If the Read Only box is checked, the
user will not be allowed to make changes to the note when it is opened.
Otherwise, the user can make changes which can be saved.
Note: On the properties tab for each type of Link animation, you can provide a Hot
Key. This is a series of keystrokes that can be used instead of clicking on the
drawing element with the mouse. Leave the field set to None if you don’t
want to assign a Hot Key.Expressions
Expression Syntax
An expression contains the name of at least one or more database variables, operators,
functions and numeric constants.
The following rules must be observed when entering an expression.
Expressions are limited to 20 symbols. (A symbol is a database variable, a constant, an
operator or a function).
A space, a bracket or an equal sign must always precede a function.
When an expression is entered directly in an animation it must be preceded by an equals sign.
This tells the HMI to interpret the field as an expression and not as a reference to a variable.
When using an expression model in an animation it must be immediately preceded by an equal
sign (no space).
Functions
Operators
Expression Examples
• =CL:Motor1.Stop & CL:Motor1.Start | CL:Motor1.Fault
• =(CL:Inlet.Flow1 + CL:Inlet.Flow2)/100
• =CL:Tank1.Temperature & 65520
• =EXP(LOG(CL:Tank.Pressure)/2)
Expression Editor
When the same expression is required in several places, it can be useful to centralize its
definition using the Expression Editor to create an expression model. Once you have created
an expression model it is used in an animation by inserting its name instead of that of a
variable. The syntax of expression models is the same as that used when you enter an
expression directly in an animation.
The Expression Editor is displayed from the Tools menu and contains two main areas.
1 A tree control area that is used to browse the expression models defined in the project. A
right-click in this area displays a pop-up menu that allows you to create, copy, paste and
delete expression models.
2 A configuration area that shows the definition of the selected element in the tree control
area. If the root icon is selected, all expression models and their related definitions are
displayed. Double clicking on an expression model displays a box in which it may be
viewed and changed.
Chapter 6
Servers
Setting Up a Cluster
To set up a cluster, perform the following steps:
1 In the left-hand panel of the Servers Editor, right-click on CLUSTERS and select New.
2 Enter any Name for the cluster.
3 In the Server Type Name drop-down list, select the name of the SERVERTYPE you
created earlier.
4 Click Set.
Chapter 7
Security
Security
From the Security item on the Tools menu, you can perform one of the following:
• Log On - allows you to enter a user name and password to log on
• Log Off - allows you to log off as the current user
• Change Password - allows you to change the password as the user currently logged on.
You will be prompted to enter your old password, a new password, and confirmation of
the new password.
• Configure - allows you to configure the security for individual users and for user profiles.
Note: You must have Administration privileges to configure security.
Security Configuration
From the Security item on the Tools menu, you can configure Client Builder security.
Security configuration for Client Builder is similar to security configuration for Windows NT.
First, set up profiles for various types of access, such as Administrator, User, Designer, and
Guest, then set up user accounts and associate them with a profile.
At the bottom is a list box from where you can select the default user.
Security Categories
Administration NONE or When set to ALL, the user has access to the following menu
ALL commands.
Tools\Security\Configure…
Tools\Servers…
Tools\Project\Open…
Tools\Project\Options…
When set to ALL, the "Administration" security category
allows users to perform all operations they want to do (and
this, even if other security categories are set to NONE).
Preferences NONE or When set to ALL, the user has access to the following menu
ALL commands.
Tools\Preferences\Colors…
Tools\Preferences\Blinking…
Tools\Preferences\ActiveX Controls…
Tools\Preferences\Decluttering…
Design NONE or When set to ALL, the user can modify the current project.
ALL That is, add / modify / delete windows, graphical elements,
animations and scripts.
Desktop Only two: When set to ALL, the user has access to the underlying
NONE or operating system keys (example: Ctrl-Alt-Del).
ALL
Print Only two: When set to ALL, the user has access to the print tools.
NONE or
ALL
Exit Only two: When set to ALL, the user may shut down the HMI.
NONE or
ALL
Zoom Only two: When set to ALL, the user may zoom windows.
NONE or
ALL
Layer 0 to 15 At runtime, a drawing layer is displayed only if the user has
the corresponding layer level.
Window 0 to 63 At runtime, a window may be opened only if the user has
the corresponding window access level.
Command 0 to 63 At runtime, the value of a variable may be forced (from a
control zone animation) only if the user has the
corresponding command level.
The ability for the user to add additional security categories is provided to allow security
checking for 3rd party embedded ActiveX controls. Additional security categories are added
using a special text file which can be located in either the program directory of the Human
Machine Interface (HMI) or the Config Files directory of the project. The text file can be given
any name as long as it has a .SEC extension.
The format of the files is similar to the .INI files used by Windows itself. A section named
[Categories] defines new security categories with the associated number of levels. Each new
category then has a section of its own which is used to provide the name of the category to the
user in one or more languages. This information is in the form of :
• Language ID=Label
• Where the Language ID is that used by Windows. The following is an example of this file.
• [Categories]
AlarmViewer=1
AlarmAck=32
[Category\AlarmViewer]
0009-English=AlarmViewer
[Category\AlarmAck]
0000-Neutral=Alarm Acknowledge
0009-English=Alarm Acknowledge
040C-French Standard=Acquittement d’alarmes
0C0C-French Canadian=Acquittement d’alarmes
Chapter 8
Scripting
Scripting Language
The editor in which you develop, debug, and run scripts can be displayed either from the
Display menu or by pressing Shift+F11.
The scripting environment is made up of the following features:
• Menu Bar
• Toolbar
• Project Explorer
• Properties List
• Code Window
• Output Window
• Search Window
The menu bar provides access, using either the keyboard or the mouse, to all development
tools. The menu bar may be turned on and off using the Workspace pop-up menu (displayed
by right-clicking anywhere in the Scripting Workspace).
Scripting Toolbar
The toolbar provides instant access, via the mouse, to the scripting tools. The toolbar can be
floating or docked - that is locked to one of the borders and may be turned on and off from a
pop-up menu displayed by right-clicking on the menu bar.
The toolbar buttons provide quick access to the following tools:
• Display the HMI workspace. The script editor remains open in the background.
• Save the script that is currently open in the code window.
• Cut the selected text.
• Copy the selected text to the clipboard.
• Paste the contents of the clipboard into the code window.
• Find a word or phrase in the script open in the code window.
• Search for all occurrences of a word or phrase. The result is displayed in the search
window.
• Enable the auto comment facility.
• Undo the previous edit.
• Redo the previous undo.
• Display the Project Explorer window.
• Display the Output window.
• Display the Properties List window.
• Compile the script currently being edited in the code window.
• Compile all of the scripts in the project.
• Toggle between design and run modes.
The Project Explorer displays a hierarchical list of all objects within a project. A single click
on any of the objects will display its properties in the Properties List. Double-clicking on any
of the elements will display the script associated with it (if any) in the Code Window. Scripts
other than those associated with a mimic or any of the objects it contains are saved in the
Script File sub-directory of the project. Scripts associated with a mimic are saved in the mimic
file itself.
All of the objects have an identifier (ID) and an object type or class (except Modules). The
following standard object types are displayed.
• ThisSystem As System: The ID of the current System Object providing the operating
system name, screen resolution, etc. The corresponding scripts are saved in System.bas.
• ThisApplication As Application: The ID of the current Application object. The
corresponding scripts are saved in Application.bas.
• ThisProject As Project: The ID of the current Project object. The corresponding scripts are
saved in Project.bas.
• TheseWindows As Windows: The ID of the current Windows object providing the total
number of displayed windows currently open. The corresponding scripts are saved in
Windows.bas.
• TheseMimics As Mimics: The ID of the current Mimics object providing the total number
of mimics currently open. The corresponding scripts are saved in Mimics.bas.
• TheseVariables As Variables: The ID of the current Variables object providing the total
number of variables permanently subscribed. The corresponding scripts are saved in
Variables.bas.
• Modules: Modules is not an object - it is a container provided to display and manage script
modules.
In addition to these standard objects, the Explorer will contain a list of the objects that are
included in any of open mimics.
The Properties List provides a list of properties, methods, and events for the object currently
selected in the Project Explorer window. The Properties List behaviour is the same as the
Properties List available in the HMI workspace.
The Code window is used to write, display, and edit the scripting language code. You can open
several Code windows concurrently so that you can copy and paste between them.
The list box at the top left of the Code window displays the ID of the currently selected object
(in the Project Explorer), and in the case of a Mimic, any objects it contains.
The list box at the top right of the Code window lists all available events for the selected
object. An item that appears in bold text indicates that code has been written for that event.
The procedure code for an object appears in the script area as a single scrollable list sorted
alphabetically by name. Selecting a procedure using the drop-down list boxes at the top of the
Code window moves the cursor to the first line of code in the procedure you select. If you
declare a new procedure, its name is automatically inserted in the events and procedures list.
The text of the procedure is color-coded according to the context.
• Blue is used for a key word.
• Green is used for a comment.
• Black is used for all other text.
In the script you can get and set object properties and call object methods. To access the
properties of an object, type its unique name followed by a full stop and the name of the
property. For native HMI graphic objects and ActiveX controls a pop-up list (known as the dot
popup box) is automatically displayed from which you can select the properties and method
for that object.
The Output window displays the output from any Print methods in the script.
The Search window displays results from the use of the Find command. Double-clicking on
any of the lines in the Search window will automatically open the relevant script for editing.
Chapter 9
Objects, Properties, Methods,
and Events
Properties
A property is an attribute of an object or an aspect of its behavior. For example, properties of a
window include its name, its size and position. To change the characteristics of an object, you
change the values of its properties.
To set the value of a property, follow the reference to an object with a full stop, the property
name, an equal sign, and the new property value. The following example changes the color of
the drawing element "Shape_Red."
Shape_Red.BackColorPrimary = RGB(255, 0, 0)
You can retrieve information about an object by returning the value of one of its properties.
The following example returns the height of a drawing object.
ObjHeight = Object_Truck.Height
In this example, Object_Truck refers to a drawing element. The height of that drawing element
is assigned to the variable ObjHeight.
Note: Not all properties can be set – some are read only.
Methods
A method is an action that an object can perform. For example, just as a drawing element can
be moved the drawing element object has a Move method. Methods normally have arguments
that qualify how the action is performed. The following example moves the bitmap "Bitmap1"
to a new location within its window.
Bitmap1.Move NewXPos, NewYPos
In most cases, methods are actions and properties are qualities. Using a method causes
something to happen to an object, while using a property returns information about the object
or it causes a quality about the object to change.
Events
An event is an action recognized by an object, such as clicking the mouse or pressing a key,
and for which you can write code to respond. Events can occur for a number of reasons:
• A user action such as clicking a mouse or pressing a key.
• A subscribed variable changing value.
• Because of other program code.
• Something happening in the system.
Most objects are returned by returning a single object from the collection. For example, the
Windows collection contains the open The HMI windows. You use the Windows property of
the ActiveProject object to return the Windows collection.
After you've accessed the collection, you can return a single object by using an index value in
parentheses (this is similar to how you work with arrays). The index value is usually a number
or a name. The following example displays the name property of the first window opened in a
message box.
Dim ObjWindow As Object
Set ObjWindow = Application.ActiveProject.Mimics
MsgBox "Name = " & ObjWindow(1).Name, vbInformation, sCaption
You can loop through the elements of a collection in a number of different ways. However, the
recommended method for looping on a collection is to use the For Each...Next loop. In this
structure, the scripting language repeats a block of statements for each object in a collection.
The following example displays the name of each open window in the Windows collection.
For Each objMimic In Application.ActiveProject.Mimics
_ MsgBox "Name = " & objWindow.Name, vbInformation, sCaption
Next
Subscribed variables are managed using a box displayed by right clicking on the
TheseVariables object in the Project Explorer and selecting the Edit option from the displayed
pop-up menu.
The box that is displayed contains a list of variables already subscribed and allows you to add,
edit and delete entries.
Chapter 10
The Client Builder
Environment
Opening Position
On the Window Properties Included Mimic Tab, the opening position determines where a
mimic is opened relative to the parent window. Select the opening position by clicking on any
of the hatched areas in the window graphic.
You can choose to open the mimic relative to one of the corners of the parent window, or
relative to the support drawing element for the link - open animation. You can also open the
mimic relative to the cursor position.
When opening the mimic relative to one of the corners, specify the distance, in terms of X and
Y coordinates, from that corner.
If you do not select any opening position, the mimic will be opened at the position defined by
its own X and Y coordinates (as in the display tab).
Popup Behavior
On the Window Properties Included Mimic Tab, put a check in the box to enable popup
behavior for the included mimic.
Popup behavior is defined by the following characteristics:
• A popup mimic is always opened as a child of another window.
• A popup mimic automatically closes as soon as focus is returned to the parent window.
• A dashed box is displayed around the control zone from which the mimic is opened.
Layer Access
If layer selection is allowed on the Window Properties Access Rights Tab, the user can change
the layers that are displayed at runtime.
Level Access
From the drop-down list on the Window Properties Access Rights Tab, specify the access level
that the user must have in order to open the mimic. Access levels range from 1 to 99.
Unauthorized Signal
Warning signals can be applied on the Window Properties Access Rights Tab.
When the Warning Box is checked, a warning box is displayed if the user attempts to change
the zoom or layers display when it is not permitted.
When the Warning Beep is checked, a warning sound is produced if the user attempts to
change the zoom or layers display when it is not permitted.
Window Background
This Window Property option lets you specify the background color of the window. Click on
the color box and pick a color from the color palette.
Note: You can also change the background color of the window by right-clicking
anywhere on the background and selecting Background Color from the
popup menu.
Window Decluttering
This Window Property option lets you specify a decluttering template to be used with the
selected window. A decluttering template specifies which layers will be visible at specific
zoom levels.
Decluttering templates are created from the Tools > Preferences menu.
Window Grid
This Window Property option lets you customize the grid and how it functions.
If the grid is Visible, it is displayed as dashed lines in both horizontal and vertical planes.
If the grid is Enabled, all subsequently produced drawing elements are aligned with the grid.
The X and Y values let you specify the grid size in pixels.
To change the color of the grid lines, click on the color box and pick a color from the color
palette.
Note: You can turn the grid visibility and alignment on or off by clicking the GRID
button or the ALIGN button respectively, on the Arrange toolbar. These
options can also be enabled or disabled by right-clicking anywhere on the
window background and making your selection from the popup menu. The
grid color can also be changed from the popup menu by right-clicking on the
window background.
Window Layers
The layer buttons on the Window Properties Display Tab detemine which of the mimic layers
are displayed as default when the mimic is opened at runtime.
Note: You can also select which layers are displayed from the Layers toolbar.
Window Position
This Window Property option lets you specify the pixel positions for the top left corner of the
window relative to the top left corner of the workspace.
X is the position of the top left hand corner of the window relative to the left hand side of the
workspace.
Y is the position of the top left hand corner of the window relative to the top of the workspace.
Window Size
This Window Property option lets you specify the width and height in pixels for the window.
Window Style
The window style properties are mainly used to change how the window behaves. For
example, if it may be iconized or moved.
Options
Title Bar Display a title bar. If the title bar is selected the window automatically has a border.
System Menu Display the system menu icon on the title bar.
Iconizable Display the iconise button on the title bar. If this option is unchecked, the window
cannot be iconized.
Maximize Display the maximize button on the title bar. If this option is unchecked, the window
cannot be maximized.
Sizeable Allow the window to be sized by clicking and dragging the border. If this property is
selected the window will have a border.
Moveable Allow the window to be moved by clicking and dragging the title bar.
Foreground Keeps the window in the foreground.
Modal The window will behave as a modal. It will retain focus until the window is closed.
Nothing outside a modal window can be selected.
Close Display the close button on the title bar. If this option is unchecked, the window
cannot be closed.
Small Caption Display a narrow title bar and use a small font for the window title.
Border Display a standard border around the window.
Client Border Display a client border around the window.
Static Border Display a static border around the window.
Scale to Fit Size Any drawing elements in the window will be scaled to fit if the window is sized
when in run mode.
Cache Stores the window in memory. This will make the window open faster the next time
it is called. However, the more windows stored in cache, the slower your system will
run. The default is to allow no more than 5 windows stored in cache. You can
change the allowed cache size under Tools > Options.
Window Title
This Window Property option lets you customize the text that appears in the window title bar.
If a title is not specified, the name of the mimic (the filename) will be used.
Zoom Access
If zoom is allowed on the Window Properties Access Rights Tab, the user can zoom the mimic
between the specified minimum and maximum zoom levels.
Workspace Appearance
This option lets you specify the background color of the workspace. Click on the color box and
pick a color from the color palette.
Note: You can also change the background color of the workspace by right-clicking
anywhere on the workspace background and selecting Desk Background
from the popup menu.
Workspace Behavior
These options let you customize how the main workspace window behaves.
• If Minimize, Maximize, or Close are checked, these standard window buttons will
available on the title bar.
• If Move is checked, you will be able to move the workspace around on you desktop.
• If Size is checked, you will be able to resize the workspace.
• If Automatic Scrollbars is checked, when a child window does not fit within the
workspace, scrollbars will automatically appear so you can scroll to see all of the child
window.
Workspace Position
This option lets you specify the left and top pixel positions for the top left corner of the
workspace.
Note: This option is unavailable if the workspace is set to display in Full Screen.
Workspace Size
This option lets you specify the width and height in pixels for the workspace.
You can also set the size to Full Screen.
Workspace Title
The title option lets you customize the text that appears in the workspace title bar.
Index I-121
basic definition of 46 Flip Horizontally (Arrange menu) 20
geometric shapes 56 Flip Vertically (Arrange menu) 20
grid 49 floating a toolbar 25
drawing elements 52
(base) tab 59 G
anchor point 62 geometric shapes 46
coloring 55 Graphic Explorer 52
copying and pasting 67 Graphic Explorer (Display menu) 16
grouping 66 grid
layers 63 changing the resolution 50
locked or unlocked 64 turning alignment on or off 50
manipulating and arranging 65 turning visibility on or off 50
moving and resizing 66 grid (drawing) 49
properties 58 Group (Edit menu) 15
advanced 61
renaming 53
rotating 70
H
rotation angle 64 HMI 103
selecting 65 Human Machine Interface. See HMI.
visibility bound 62
zoom threshold 62 I
Drawing Popup Menu 48 iconizing and restoring a window 42
image
E inserting an 51
Edit menu 15 transparency 52
Ellipse (Draw menu) 19 Image (Insert menu) 17
events 111 Included Mimic Tab (WIndow Properties box) 44
Exit (File menu option) 14 Insert menu 17
Expression Editor (Tools menu) 24
expressions 87 K
editor 92 Keyboard Manager (Tools menu) 23
syntax 88
L
F Language (Tools menu) 23
Favorite ActiveX Controls (Insert menu) 18 Layers toolbar 37
File menu 14 Library (Display menu) 16
I-122 Index
Line (Draw menu) 19 basic definition of 109
Link (Animate menu) 21 returning from a collection 111
Links Tab (Window Properties box) 44 OLE 48
Lock (Edit menu) 15 OLE Links (Edit menu) 16
OLE Object (Insert menu) 18
M Open (File menu option) 14
Main Window tab (Workspace Properties) 11 Options (Tools menu) 24
menu bar
basic definition of 12 P
docking 12 Paste (Edit menu) 15
floating 12 Polygon (Draw menu) 19
items 12 Polyline (Draw menu) 19
turning on and off 12 Position (Animate menu) 21
methods 110 Preferences (Tools menu) 23
mimics Print (File menu option) 14
basic definition of 39 Print Preview (File menu option) 14
closing 41 Print Setup (File menu option) 14
creating new 41 profiles
displaying in different modes 39, 42 adding and configuring 98
opening 41 basic definition of 97
saving 41 programming hints 113
Mode menu 21 Project (Tools menu) 23
Mode toolbar 32 properties 110
Move Backward (Arrange menu) 20 Properties (Drawing popup menu) 49
Move Forward (Arrange menu) 20 Properties (Edit menu) 16
Move to Back (Arrange menu) 20 Properties List (Display menu) 16
Move to Front (Arrange menu) 20 Property Animation 77
N R
New (File menu option) 14 rank option 95
Normal View 1 Recent Files (File menu option) 14
1 (Mode menu) 22 Rectangle (Draw menu) 19
Redo (Edit menu) 15
O Reference Set 1 (Mode menu) 22
objects Reference Set 2 (Mode menu) 22
Refresh (Display menu) 17
Index I-123
Regions tab (Workspace Properties) 12 Select All (Edit menu) 15
reshaping a toolbar 25 Send (Animate menu) 21
resolution (changing a grid’) 50 Servers (Tools menu) 24
Rotate (Draw menu) 18 Servers and Clusters 93
Rounded Rectangle (Draw menu) 19 Space Horizontally (Arrange menu) 21
Run (Animate menu) 21 Space Vertically (Arrange menu) 21
Run (Mode menu) 22 Standard toolbar 25
status bar 13
S Status Bar (Display menu) 17
Same Height (Arrange menu) 21 Symbol (Insert menu) 17
Same Size (Arrange menu) 21 Symbols (Animate menu) 21
Same Width (Arrange menu) 21
Save (File menu option) 14 T
Save All (File menu option) 14 Template Tab (Window Properties box) 44
Save As (File menu option) 14 Test Set (Mode menu) 22
Script Editor (Display menu) 17 text
Scripting inserting 71
Code Window 106 properties 72
menu 104 resizing 73
Output Window 107 Text (Animate menu) 21
Project Explorer Text (Draw menu) 19
Project Explorer. See Scripting. toolbars
Properties List 106 Animations 37
Search Window 107 Arrange 33
toolbar 104 arranging 25
scripting available 13
language 103 basic definition of 12
scrollbars 13 docking 12, 25
Security Draw 28
basic definition of 9 floating 12, 25
Categories 100 Layers 37
configuration 97 Mode 32
menu (Tools menu) 23 reshaping 25
Security (Tools menu) standard 25
basic definition of 97 turning on and off 13
Select (Draw menu) 18 Tools menu 22
I-124 Index
Trend (Insert menu) 18 Z
Trend Control. See USDATA Trend Control. Zoom In (Mode menu) 22
zoom level 13
U Zoom Out (Mode menu) 22
Undo (Edit menu) 15
Ungroup (Edit menu) 15
Unlock (Edit menu) 15
USDATA Alarm Viewer Control (Insert menu) 18
USDATA Database Browser Control (Insert menu)
18
USDATA Trend Control (Insert menu) 18
User Manager 97
user profiles. See profiles.
users
adding and configuring 99
default rights 102
logging on and off 102
V
variables 112
VBA 103
VBScript 103
View Script (Drawing popup menu) 49
visibility (turning on and off for a grid) 50
W
Warnings (Display menu) 17
Window Management dialog box 40
Window Properties dialog box 43
Workspace
basic definition of 11
Properties 11
Workspace Properties (Display menu) 17
Workspace Properties dialog box. See Workspace,
Properties.
Index I-125