hmi - · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

464
HMI Software release 4.21 February 2004

Transcript of hmi - · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Page 1: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

HMI

Software release 4.21

February 2004

Page 2: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

ISaGRAF Enhanced - HMI

Printing History 1st printing — September 15, 1999 (HTML version)2nd printing — February 28, 20013rd printing — June 29, 20014th printing — August 31, 20015th printing — February 8, 20026th printing — February 16, 2004

© Copyright 1999-2004: ICS Triplex ISaGRAF Inc

All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc.

Page 3: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Table of ContentsHMI _____________________________________________ 1

Workspace ............................................................................................................. 3Menu Bar ........................................................................................................ 4Contextual Menu .......................................................................................... 10Grid ............................................................................................................... 11Colour Palette ............................................................................................... 12

Changing a Colour in the Palette .............................................................14Selecting a Solid Colour.....................................................................14Selecting a Blinking Colour ...............................................................15Defining Colours as Transparent .......................................................15Selecting a Gradient Colour ...............................................................16

Using the Colour Palette to Colour a Drawing ........................................19Graphic Explorer .......................................................................................... 20Toolbars ........................................................................................................ 21

Mode Toolbar.....................................................................................21Animation Toolbar .............................................................................22Drawing Toolbar ................................................................................25Arrange Toolbar .................................................................................26

Customizing the HMI .......................................................................................... 29Setting Defaults ............................................................................................ 30

Options Tree.............................................................................................31Colours.....................................................................................................35Blinking Colour Periods ..........................................................................36

Keyboard Shortcuts ...................................................................................... 37Creating a New Keyboard Layout ...........................................................38Adding Shortcuts for Standard Actions ...................................................39Adding Shortcuts to Run Functions.........................................................41Activating a Keyboard Layout.................................................................42Activating a Layout Using a Script..........................................................43

Configuring Libraries ................................................................................... 44Creating a New Library ...........................................................................45Enabling a Library ...................................................................................46

Folder Structure ................................................................................................... 47HMI............................................................................................................... 48

ISaGRAF Enhanced 4.21 i

Page 4: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Projects ......................................................................................................... 49Libraries........................................................................................................ 51

Working with Mimics.......................................................................................... 53Window and Mimic Objects in the Scripting Language .............................. 54Mimics Basics .............................................................................................. 55

Operational Modes...................................................................................56Designing a Mimic Hierarchy .................................................................57

Creating and Managing Mimics ................................................................... 58Creating Mimics ......................................................................................59Saving a Mimic........................................................................................60Closing a Mimic ......................................................................................61Opening Multiple Views of the Same Mimic..........................................62Iconizing and Restoring Mimics..............................................................63Using Mimics with a Branch ...................................................................64Mimic Management Box .........................................................................65

Changing Window Properties ...................................................................... 67Display.....................................................................................................68

Defining the Window Style ...............................................................69Selecting the Window and Mimic Size..............................................70Displaying Text in a Title Bar ...........................................................70Defining the Grid ...............................................................................71Drawing Layers and De-cluttering Templates...................................71

Access Rights...........................................................................................73Included Mimic........................................................................................74

Configuring the Opening Position .....................................................74Enabling Pop-Up Behaviour ..............................................................75

Links ........................................................................................................76Creating and Using Mimic Templates.......................................................... 77

Creating Mimic Templates ......................................................................78The Template Tab....................................................................................79Creating and Using Declutter Templates.................................................80

Opening Windows from a DOS Command Line ......................................... 82Drawing ............................................................................................................... 83

Using Geometric Shapes....................................................................83Using Images .....................................................................................84Using OLE Objects ............................................................................84

Inserting Drawing Elements ......................................................................... 85Lines ........................................................................................................86

ii ISaGRAF Enhanced 4.21

Page 5: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Shapes ......................................................................................................88Changing the Fill Pattern of a Shape..................................................90Changing the Appearance of a Shape ................................................91Drawing a ½ or ¼ Ellipse...................................................................92Changing the Corner Radius of a Rounded Rectangle.......................92Changing an Arc or Pie Shape ...........................................................93

Polylines, Polygons, Bézier Curves, or Bézier Shapes............................94Re-shaping a Polyline or Polygon......................................................95Re-shaping a Bézier Curve.................................................................96Adding or Deleting a Node ................................................................97Drawing an Ellipse or Other Shape as a Polygon ..............................98Transforming a Bézier Curve into a Polygon ....................................99

Inserting Text.............................................................................................. 100Changing the Font..................................................................................101Changing the Appearance of the Support Rectangle .............................102Using the Do Not Auto Resize Property................................................103Resizing text by dragging ......................................................................104

Inserting Images.......................................................................................... 105Using the Transparency Property...........................................................107Using Animated GIF and AVI Files ......................................................108

Managing Drawing Elements ..................................................................... 110Selecting Elements.................................................................................111Copying and Pasting Elements ..............................................................113Moving Elements ...................................................................................115Resizing Elements..................................................................................116Aligning Elements .................................................................................117Spacing Elements...................................................................................118Moving Elements to the Front or Back..................................................119Locking and Unlocking Elements..........................................................120Grouping Elements ................................................................................121Rotating Elements..................................................................................122Flipping Elements about their Axis .......................................................124Reversing the Order of Points in Shapes ...............................................125

Using the Boolean Graphic Tools............................................................... 126Drawing a Union from Drawing Elements ............................................127Drawing an Intersection from Drawing Elements .................................128Drawing an Extraction from Drawing Elements ...................................129

Advanced Properties................................................................................... 130Placing a Drawing Element in a Specific Display Layer.......................131

ISaGRAF Enhanced 4.21 iii

Page 6: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Binding the Display of a Drawing Element to a Zoom Threshold ........132Animation .......................................................................................................... 133

Basics.......................................................................................................... 134Applying Animations.......................................................................134Applying Multiple Animations ........................................................135Removing Animations .....................................................................136

OPC Server Variables in Animations ....................................................137Using Relative Referencing .............................................................137Forcing Direct Referencing..............................................................138Errors When Selecting Variables.....................................................138

Configuring Register Limits ..................................................................139Custom Output Formats.........................................................................140

Entering a Custom Output Format...................................................141General Formatting Characters ........................................................142Numeric Formatting Characters.......................................................142Time and Date Formatting Characters.............................................143Using Conditional Formats ..............................................................144

Expressions in Animations ....................................................................145Substitution Strings in Animations........................................................146

Attaching Quality Sequences to Animations.............................................. 147Property Animation .................................................................................... 148

Changing Colour....................................................................................149Visual Effects...................................................................................149Colour Properties Tab ......................................................................150How Many Colours Can I Select? ...................................................151Colour Animations and Behaviour ..................................................151Thresholds Used in Colour Register Value .....................................152

Displaying Messages and Labels...........................................................154Message Animation .........................................................................154Label Animation ..............................................................................154

Displaying a Register as a Numeric Value ............................................156Displaying a Register as a Bargraph......................................................157Exchanging Objects ...............................................................................160Legend Animation .................................................................................163

Position Animation..................................................................................... 166Rotation .................................................................................................167Scaling ...................................................................................................169Single-Axis Positioning .........................................................................170Two-Axes Positioning ...........................................................................172

iv ISaGRAF Enhanced 4.21

Page 7: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Free Positioning .....................................................................................174Path ........................................................................................................175

How the Animated Drawing Moves ................................................176Using the Cursor Behaviour Property ..............................................176Drawing Restrictions........................................................................176

Mimic Animation ....................................................................................... 177Link Open Animation ............................................................................178Link Close Animation............................................................................182Hyperlink Animation .............................................................................183Region Animation..................................................................................184

Control Zone Animation............................................................................. 186Sending Bits ...........................................................................................190

Send Bit Animation..........................................................................190Confirming a Command With a Label.............................................191Double Bit Animation ......................................................................192Operation..........................................................................................194

Entering Register Values .......................................................................195Entry Method ...................................................................................196Selecting the Output Format ............................................................196Selecting the Input Format ...............................................................197Selecting the Control Range.............................................................198

Entering a String ....................................................................................199Text Entry Method ...........................................................................199Displaying the Text ..........................................................................200

Starting an Application ..........................................................................201Application to Run ...........................................................................201Start-up Behaviour ...........................................................................202

Displaying a Text Note ..........................................................................203Selecting the File to Open ................................................................203Using a File Model...........................................................................204

ActiveX Controls ............................................................................................... 205Enabling ActiveX Controls......................................................................... 206

Inserting ActiveX Controls in HMI Mimics..........................................208Changing ActiveX Control Properties ...................................................209Manually Registering ActiveX Controls ...............................................210

OPC Server ........................................................................................................ 211Implementation in the HMI ........................................................................ 212Configuring OPC........................................................................................ 214

ISaGRAF Enhanced 4.21 v

Page 8: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

The Server Editor...................................................................................215Defining Communication Managers......................................................216Defining Servers ....................................................................................218Defining Clusters ...................................................................................219Defining Cluster Members ....................................................................220

Using a Remote Server Under Windows NT4 ........................................... 221Configuration on the Client Station (Win NT4) ....................................222Configuration on the Server Station (Win NT4) ...................................223

Using a Remote Server Under Windows 9x .............................................. 224Configuration on the Client Station (Win 9x) .......................................225Configuration on the Server Station (Win 9x).......................................226

OPC Quality ............................................................................................... 227Standard Quality Flags ..........................................................................228Quality Sequences .................................................................................229

Configuring Quality Sequences .......................................................230HMI Variable to OPC Data Type Mapping ............................................... 232OPC Variable Properties ............................................................................ 233

Register Variable Type ..........................................................................234Bit Variable Type ..................................................................................236Text Variable Type ................................................................................238Alarm Variable Type .............................................................................239

OPC Variables ................................................................................................... 241Variable Value, Quality, and Timestamp (VTQ) ....................................... 242Other Variable Properties ........................................................................... 243OPC Variable Browser ............................................................................... 244

Filtering the Variable List......................................................................245Selecting Variables for Animations and Expressions............................246Displaying More Information on Variables...........................................247Using the Variable Browser with Additional Variable Properties ........248Using the Branch Browser.....................................................................249

Symbols ............................................................................................................. 251Creating Direct-referencing Symbols......................................................... 253Creating Relative-referencing Symbols ..................................................... 254Inserting Symbols into Mimics .................................................................. 256

Displaying a Symbol’s Properties .........................................................258Using Symbols with Deferred Referencing...........................................259Re-sizing Symbols .................................................................................260

Using the Library Browser ......................................................................... 261

vi ISaGRAF Enhanced 4.21

Page 9: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Pre-defined Symbols................................................................................... 263IPID Faceplate .......................................................................................264Smart PID Faceplate ..............................................................................265

OLE.................................................................................................................... 267Embedding Objects..................................................................................... 268

Embedding New Objects .......................................................................269Embedding Objects Using Existing Files ..............................................270Embedding Objects Using Copy and Paste ...........................................271Changing Embedded Objects.................................................................272

Linking Objects .......................................................................................... 274Changing Linked Objects ......................................................................275Changing OLE Properties ......................................................................276Link Tab.................................................................................................277

Expressions ........................................................................................................ 279Expression Syntax ...................................................................................... 280Expression Editor........................................................................................ 283

Creating Expression Models ..................................................................284Trend Display .................................................................................................... 285

Choosing the Main Trend Display Features ............................................... 287Configuring the Display Buffer .................................................................. 288Configuring the Traces ............................................................................... 289Configuring the Appearance of the Trace for an Invalid Variable ............. 291Selecting Run-time Tools ........................................................................... 292

Trace Toolbox........................................................................................293Configuring the Legend Area ..................................................................... 294Trend Display at Run Time ........................................................................ 296

Real-time Mode .....................................................................................297Pause Mode............................................................................................298Using the Scroll Bar...............................................................................299Using the Toolbar ..................................................................................300Customising the Toolbar........................................................................301Using the Cursor ....................................................................................302

Scripting Language ............................................................................................ 305Objects, Methods, and Properties ............................................................... 306

Objects and Collections .........................................................................307Properties ...............................................................................................308Methods..................................................................................................309Returning Objects from Collections ......................................................310

ISaGRAF Enhanced 4.21 vii

Page 10: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Looping Through Collections................................................................311Scripting Language Editor.......................................................................... 312

Menu Bar ...............................................................................................313Toolbar...................................................................................................314Project Explorer .....................................................................................315Properties List........................................................................................316Code Window ........................................................................................317Output Window .....................................................................................319Search Window......................................................................................320

Native HMI Objects........................................................................................... 321HMI Object Hierarchy................................................................................ 324Application Objects .................................................................................... 326Project Objects ........................................................................................... 329System Objects ........................................................................................... 333Mimics Collection Objects ......................................................................... 336Mimic Objects ............................................................................................ 342Windows Collection Objects...................................................................... 353Window Objects ......................................................................................... 354Graphics Collection Objects....................................................................... 360Graphic Objects in General ........................................................................ 361AVI Objects................................................................................................ 376Bitmap Objects ........................................................................................... 378GIF Objects ................................................................................................ 379Group Objects............................................................................................. 380Metafile Objects ......................................................................................... 381Poly Objects ............................................................................................... 382Shape Objects ............................................................................................. 384Symbol Objects .......................................................................................... 388Text Objects ............................................................................................... 390Variables Collection ................................................................................... 394Variable Objects ......................................................................................... 397

Security Features ............................................................................................... 405User Manager ............................................................................................. 406

Configuring Profiles ..............................................................................407Configuring Users..................................................................................409

Security Categories..................................................................................... 411Adding Categories .................................................................................413

Logging On and Off ................................................................................... 414

viii ISaGRAF Enhanced 4.21

Page 11: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Symbol Library .................................................................................................. 415Categories ................................................................................................... 416

Creating Categories................................................................................417Editing Categories..................................................................................418Deleting Categories................................................................................419Making Categories "Read-Only" ...........................................................420

Symbols ...................................................................................................... 421Editing Symbols.....................................................................................422Modifying Symbols ...............................................................................423Copying, Moving, and Deleting Symbols..............................................425Exporting Symbols.................................................................................426Adding Symbols to the Library..............................................................427Retrieving Deleted Symbols ..................................................................428

Customizing the Symbol Library ............................................................... 429Sharing Symbols on the Network ............................................................... 431Importing Graphic Files.............................................................................. 432

Glossary ............................................................................................................. 433Copyright ........................................................................................................... 451

ISaGRAF Enhanced 4.21 ix

Page 12: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties
Page 13: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

HMI

The HMI is the environment in which you create the graphical interfaces with which users willinteract. These interfaces hold basic drawing elements, ActiveX controls, and OLE objectsmaking up windows. You can also insert graphical symbols, representing most areas ofindustrial automation, from the Symbol Library. You define behaviors for windows and theirelements using scripts and programs. You can apply animation to windows and elements.

ISaGRAF Enhanced 4.21- HMI 1

Page 14: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties
Page 15: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

WorkspaceThe HMI workspace is the drawing area in which you create windows. From the workspace,you can access the menu bar, contextual menus, and toolbars. You can choose to display a grid.The menu bar gives you access to the Graphic Explorer and the Colour Palette.

ISaGRAF Enhanced 4.21 - HMI 3

Page 16: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Menu Bar

File New creates a new fileOpen opens an existing file for workingClose closes the active fileClose All closes all active filesSave saves the active file open to your computerSave As saves the active file to a specific file pathSave All saves all active filesPrint Setup lets you configure your printer and printing propertiesPrint Preview lets you view your document prior to printingPrint prints the documentRecent Files gives you quick access to recently opened filesExit exits the program

Edit Undo lets you undo recent actionsRedo lets you redo actions which have been undoneCut lets you move a file to the clipboard or to another fileCopy creates a duplicate of an element or filePaste inserts a file or element on the clipboardDelete removes a selected elementSelect All selects all elements or filesGroup combines elements to work as a single objectUngroup ungroups grouped elementsLock locks an element (you cannot change its properties)Unlock unlocks an elementCreate Symbol creates a new symbolVBA Control enables a drawing element so that it may be used as a

VBA control (Not yet implemented)Symbol Project in VBA

enables the use of VBA script inside a symbol (Not yet implemented)

4 ISaGRAF Enhanced 4.21 - HMI

Page 17: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Edit(Continued)

OLE Links edits Object Linking and Embedding linkProperties opens the element's properties box

Display Colors Palette opens colour palette in the workspaceGraphic Explorer opens graphic explorer in the workspaceProperties List opens properties list box in the workspaceLibrary opens library box in the workspaceWarnings allows warnings to appear in the workspaceAdvanced Mode displays the advanced properties of a drawing element's

propertiesStatus Bar opens status bar for an active drawing element in the

workspaceArrange Iconized Windows

RightBottomLeftTop

Visual Basic Editor opens Visual Basic Editor, in which you can type or edit event scripts

Workspace Properties opens Workspace Properties boxRefresh reloads active windowsLibrary Converter accesses the Library Converter

Insert Symbol inserts symbol into the active window from the libraryImage inserts an image file from the libraryActiveX Control inserts a qualified ActiveX control in a HMI windowFavorites ActiveX Controls

inserts an ActiveX control from your favorites menu

OLE Object inserts an Object Linking and Embedding link to your window

Trend inserts a real time trends display into your HMI windowGrid inserts a grid display

ISaGRAF Enhanced 4.21 - HMI 5

Page 18: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Draw Select accesses select toolRotate accesses rotation toolLine accesses line drawing toolRectangle accesses rectangle drawing toolRounded Rectangle accesses rounded rectangle drawing toolEllipse accesses ellipse drawing tool1/2 Ellipse accesses 1/2 ellipse drawing tool1/4 Ellipse accesses 1/4 ellipse drawing toolArc accesses arc drawing toolPie accesses pie drawing toolPolygon accesses polygon drawing toolPolyline accesses polyline drawing toolBézier Curve accesses Bézier curve drawing toolBézier Shape accesses Bézier shape drawing toolText accesses text tool

Arrange Flip Horizontally flips object on horizontal axisFlip Vertically flips object on vertical axisMove to Front moves an element in front of all overlapping elementsMove to Back moves an element behind all overlapping elementsMove Forward moves an element in front of the element immediately

in front of itMove Backward moves an element behind the element immediately in

back of itAlign Left aligns element horizontally so left edge aligns with that

of the referenceAlign Right aligns element horizontally so right edge aligns with

that of the referenceAlign Top aligns element vertically so upper edge aligns with that

of the reference.

6 ISaGRAF Enhanced 4.21 - HMI

Page 19: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Arrange(Continued)

Align Bottom aligns element vertically so lower edge aligns with that of the reference.

Center Vertically centers element vertically so that center aligns with that of the reference.

Center Horizontally centers element horizontally so that center aligns with that of the reference.

Space Horizontally spaces elements horizontally so that they are evenly spaced.

Space Vertically spaces elements vertically so that they are evenly spaced.

Same Width resizes element so that the width matches that of the reference.

Same Height resizes element so that the height matches that of the reference.

Same Size resizes element so the width and height match that of the reference.

Animate Color BitBit GroupRegister BitWeighted BitsRegister ValueBargraphLegend

Text TextText with Colour on BitLabelLabel with Colour on BitDisplay RegisterDisplay Register with Colour on Bits

ISaGRAF Enhanced 4.21 - HMI 7

Page 20: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Animate(Continued)

Symbols BitBit GroupRegister BitRegister Value

Position Single Axis Positioning2 Axes PositioningFree PositioningRotationScaling

Send BitBit with ColourDouble BitRegisterTextRegion

Run ApplicationLink Open

CloseNote

Mode Design switches the selected view of the window to Design mode

Run switches the selected view of the window to Run modeTest Set switches the selected view of the window to test modeZoom In zooms into the selected windowZoom Out zooms out of the selected windowNormal Window 1:1 returns the selected window to normal sizeMagnifying Glass accesses the magnifying toolCancel Magnifying Glass

cancels all magnification changes performed with the magnifying tool

8 ISaGRAF Enhanced 4.21 - HMI

Page 21: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Tools Project OpenLibrariesOptions

Security Log OnLog OffChange Password

Preferences ColoursBlinkingActiveX ControlsDecluttering

Language FrenchEnglish

Keyboard Manager allows you to create shortcuts to commands using keyboard commands

Expression Editor accesses the Expression EditorServers accesses the Server EditorOptions opens the Options Tree box

Window New Window opens a new working windowIconize/Maximize iconizes or restores a windowWindow Properties displays window properties box

Help Contents opens online help for the HMIIndex lists help topics in alphabetical orderSearch opens a search tool databaseAbout displays licensing information

ISaGRAF Enhanced 4.21 - HMI 9

Page 22: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Contextual MenuThe Window Contextual menu allows quick access to some of the most frequently changedWindow properties and to the Window Properties box. It also allows you to paste the contentsof the clipboard into the window at the current cursor position. You can access the menu byright-clicking anywhere in a Window background while the window is in Design mode.

You can access the Drawing Contextual Menu by right-clicking anywhere on a drawingelement (or group of elements). The mimic in which the drawing element resides must be inDesign mode.

Paste the contents of the clipboardToggle alignment of drawings to the gridToggle display of the gridChange the background colour of the windowChange the colour of the gridDisplay the window Properties boxSelect Run mode

Cut the drawing element and place it on the clipboard Copy the drawing element to the clipboardDelete the drawing elementCreate a drawing group from the selected elementsRestore a drawing group to its individual elementsLock the drawing elementUnlock the drawing elementCreate an object using the selected drawing elementsEnable the drawing element to be used as a VBA controlEnable use of VBA script inside symbolArrange the selected drawing elementsDisplay the scripting language editorDisplay the drawing properties box

10 ISaGRAF Enhanced 4.21 - HMI

Page 23: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

GridThe grid is a tool to help you precisely position your drawing elements. It is an imaginarymatrix of co-ordinates within each mimic. When you create drawing element, for example arectangle, its size and position will automatically adjust so that each of its corners is located onthe 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 behaviour of thegrid may be modified as follows.

! The colour of the grid may be changed from the mimic pop-up menu or the mimicproperties box.

! Display of the grid may be toggled on and off using the mimic pop-up menu or the mimicproperties box. Even if the grid is not displayed drawing elements are still aligned to it.

! The resolution of the grid may be changed from the mimic properties box.

! The grid may be turned off completely using the mimic pop-up menu or the mimicproperties box. Drawing elements subsequently produced or modified will not be alignedto the grid

Changing the grid resolution

The standard grid resolution of eight pixels is suitable for nearly all applications. However, ifyou need to, it is possible to change the grid resolution from the window properties box.

1. Open the Window properties box (using the Window contextual menu).

2. Enter new values for the grid resolution in pixels. The minimum recommended grid sizeis four pixels.

3. Click OK.

ISaGRAF Enhanced 4.21 - HMI 11

Page 24: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Colour PaletteThe colour palette appears each time you select a colour property from any drawing elementproperties box and can also be accessed from the Display menu by choosing Colour Palette.

! Changing a Colour in the Palette

! Using the Colour Palette to Colour a Drawing

It is essential to understand the use of each area of the Colour Palette before starting anydrawing.

! Selected colours. The colours currently in use.

! Transparent colour. Click here to choose one of the selected colours as transparent.When you use a transparent colour for a drawing, the background will be see-through.

! Normal colours. When you colour a drawing using one of the colours from this area thecolour is saved in the drawing. If you change the colour in the palette the colour in thedrawing is not affected.

12 ISaGRAF Enhanced 4.21 - HMI

Page 25: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

! Indexed colours. When you colour a drawing using one of the colours from this area thecolour is inserted as a reference. If you change the colour in the palette the colour of alldrawings using it will also change.

Colours in the palette are changed using the Colour Picker. To display the Colour Picker youdouble click on the colour in the palette that you want to change. There are three colour stylesavailable.

! Solid. A single colour.

! Blinking. A blinking colour contains two colour selections. The affected part of thedrawing element will alternate between the two colours at a pre-defined rate.

! Gradient. A gradient colour contains between two and eight colours. The affected part ofa drawing element will be shaded starting with one colour gradually changing to the othercolours across the drawing.

ISaGRAF Enhanced 4.21 - HMI 13

Page 26: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing a Colour in the Palette

You can change any of the colours in the palette using the Colour Selector. To open the ColourSelector, double-click on the colour in the palette that you want to change.

A colour is defined by the three components: hue, saturation, and luminance.

! Hue is the colour's shade or tint. It is measured on a circular spectrum running from red togreen to blue and returning to red.

! Saturation is the hue's purity. A colour with a 100% saturation appears bright and vivid,whereas a colour with 0% saturation is a shade of gray.

! Luminance is the colour's brightness. A colour with 100% luminance is pure white, and acolour with 0% luminance is pure black.

Selecting a Solid Colour

To select a solid colour

1. Select the fill mode as solid.

14 ISaGRAF Enhanced 4.21 - HMI

Page 27: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

2. Select the hue and saturation using the colour pick box.

3. Select the luminance using the pointer control.

4. Click OK.

Selecting a Blinking Colour

Some drawing elements support blinking colours. A blinking colour contains two colourselections. In Run mode, the affected part of the drawing element will alternate between themat a pre-defined rate.

To select a blinking colour

1. Select the fill mode as blinking.

2. Click the primary colour and use the colour picker to select it.

3. Click the alternative colour and use the colour picker to select it.

4. Select which of the blinking periods to use (There are 8 configurable blink rates).

5. Click OK.

The blinking rates are selected from the Preferences menu.

Defining Colours as Transparent

When a transparent colour is applied to a drawing element, the affected property becomesinvisible and the background or any drawing elements under it can be seen.

Defining a colour as transparent

1. Check the Transparent Colour box.

2. Click OK.

ISaGRAF Enhanced 4.21 - HMI 15

Page 28: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Selecting a Gradient Colour

A gradient colour contains two or more colours. The affected part of a drawing element willbe shaded starting with one colour gradually changing to the other colour(s) across thedrawing. The type of gradient may be selected from either spot or linear. The following showssome example of the use of gradient colours.

16 ISaGRAF Enhanced 4.21 - HMI

Page 29: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

The use of gradient colours is very attractive but, when using them, it is important to note thatthe speed at which they rendered will depend on the choice of graphic adapter and the colourconfiguration.

! Make the Step parameter us large as possible. The drawing performance depends directlyon the size of the Step. For example a step of 4 will render twice as fast as a step of 2.

! When using a linear gradient, the angles 0, 90, 180 or 270 are most efficient.

! The radial gradient is more time consuming than linear particularly if the X and Yco-ordinates aren’t close to the object centre (50%, 50%)

! The number of colours has no impact on the drawing performance.

To select a colour with a spot gradient

1. Select the fill mode as gradient.

2. Select the type as spot.

3. Click the one of the small colour boxes on the gradient control above the colour circleand select its colour using the colour picker in the normal way.

4. Repeat for the other colour box.

5. Select the position at which the colour shading starts by dragging the colour boxes alongthe gradient control.

6. Select the centre for the colour spot by entering X and Y co-ordinates. These are enteredas 0 to 100% with 0, 0 representing the top left of the drawing when it is filled.

7. Click OK.

To select a colour with a liner gradient

1. Select the fill mode as gradient.

2. Select the type as linear.

3. Click the one of the small colour boxes on the gradient control above the colour circleand select its colour using the colour picker in the normal way.

ISaGRAF Enhanced 4.21 - HMI 17

Page 30: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

4. Repeat for the other colour box.

5. Select the position at which the colour shading starts by dragging the colour boxes alongthe gradient control.

6. Select the angle at for the colour gradient.

7. Click OK.

To add additional colours when using a gradient

By default a gradient uses two colours. However, if necessary, it is possible to add additionalcolours up to a maximum of eight.

1. Select the fill mode as gradient.

2. Click and drag the new colour box icon to the left of the gradient control onto the gradientcontrol.

3. Select the colour for the new colour box in the normal way.

4. Select the position at which the colour shading starts by dragging the colour box alongthe gradient control.

To remove additional colours

" Click the colour box to be removed and drag it over the new colour box icon.

18 ISaGRAF Enhanced 4.21 - HMI

Page 31: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Colour Palette to Colour a Drawing

The Colour Palette can be used to colour a drawing directly or by changing the colours usingthe drawing’s properties box.

To change a drawing’s colour directly

1. Open the Colour Palette.

2. Click the drawing.

The palette will display the drawing’s current colours in the colour selection area.

3. To change the colour of the fill (or background of text), left-click on the new colour

4. To change the colour of the border (or text) right-click on the new colour.

Note: If you select more than one drawing, the colour changes will be applied to all selecteddrawing elements.

To change a colour in a drawing properties box

1. Open the drawing element’s properties box.

2. Click the colour to change.

The colour palette will appear.

3. Left-click on the colour in the palette.

4. If you want the colour to blink, right-click on the second colour.

To copy the colours from an existing drawing

You can choose a colour already used in an existing drawing to be used in other drawings.

1. Open the Colour Palette.

2. Click on the drawing element from where the colours are to be copied.

Subsequent drawings will be initially created using these colours.

ISaGRAF Enhanced 4.21 - HMI 19

Page 32: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Graphic ExplorerThe Graphic Explorer provides you with a hierarchical view of the elements forming awindow.

The graphical explorer allows you to see:

! A list of all windows currently open

! A list of drawing elements and the co-ordinates of their anchor point for each window

! Any animation that has been applied to each drawing element

! The name of any database variables and branch used for each animation

In addition, you can double-click on its entry in Explorer to modify any of the drawingelement's properties

The tools at the top of the explorer allow you to filter what drawing elements are displayed.

To access the Graphic Explorer

! From the Display menu, choose Graphic Explorer.

20 ISaGRAF Enhanced 4.21 - HMI

Page 33: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

ToolbarsFour toolbars are available:

! Mode Toolbar

! Animation Toolbar

! Drawing Toolbar

! Arrange Toolbar

Mode Toolbar

The Mode toolbar is used to switch a window between Design and Run modes and to zoom theview in and out.

Switch the selected view of the window to Design mode.

Switch the selected view of the window to Run mode.

Switch the selected view of the window to Test mode.

Switch the selected view of the window to reference mode 1.

Switch the selected view of the window to reference mode 2.

Clicking on the zoom in tool will change the cursor shape to a magnifying glass with a plus sign in the centre. If you then click on an opened window, the view of it will zoom in. (Its physical size on the screen will get larger). You may zoom in to a maximum of 6400% of the original size. To deselect the zoom in mode, click on the tool again.

ISaGRAF Enhanced 4.21 - HMI 21

Page 34: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Animation Toolbar

The Animation toolbar gives you quick access to animation tools. The toolbar contains seventabs, one for each class of animation.

Clicking on the zoom out tool will change the cursor shape to a magnifying glass with a minus sign in the centre. If you then click on an opened window, the view of it will zoom out. (Its physical size on the screen will get smaller) The maximum zoom out is 2% - that is the window is displayed on the screen one fiftieth of its normal size. To deselect the zoom out mode, click on the tool again. Clicking on the zoom area tool will change the cursor to a magnifying glass. You can then click and drag a band to zoom into a specific area of a mimic. . The zoomed mimic may open in the same or a different window depending on the configuration selected in Tools.Options.Magnifying Glass Mode. To deselect the zoom area mode, click on the tool again.Close any windows opened as a result of using the zoom area tool. The original copy of the window remains open.Return the selected window to normal size (1:1)

Colour TabColour using one bit.

Colour using the binary combination of up to four bits.

Colour using a bit masked from a register.

Colour using a value calculated from weighted bits.

Colour using a register level.

22 ISaGRAF Enhanced 4.21 - HMI

Page 35: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Colour shape fill using the value of a register (Bargraph).

Display a scale using a minimum and maximum value.

Text tab Display a string

Display a string in a colour according to the value of a bit.

Display a label.

Display a label in a colour according to the value of a bit.

Display the value of a register numerically.

Display the value of a register using two bits to change the colour.

Position tab Display the value of a register using movement in one axis.

Display the value of two registers using movement in two axes.

Display the value of a register using rotation.

Display the value of a register using size.

Object Tab Select objects using a single bit.

Select objects using the binary combination of up to four bits.

ISaGRAF Enhanced 4.21 - HMI 23

Page 36: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Select objects using a bit masked from a register.

Select objects using the value of a register.

Link tab Open a window.

Close a window.

Open a text note.

Send tab Change the value of a single bit.

Change the value of a single bit. A colour on bit animation is also applied.

Change the value of two bits. One bit is the inverse of the other.

Change a register value.

Change a text (string) value.

Select a region.

Run tab Run an application.

24 ISaGRAF Enhanced 4.21 - HMI

Page 37: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Drawing Toolbar

The Drawing toolbar gives you quick access to all the commonly-used tools to producedrawing elements. (The Arrange toolbar can be used after to align and manipulate drawingelements once they are produced.)

Select, move or size a drawing.

Rotate a drawing element.

Display the properties box for the selected drawing element.

Display the properties list for the selected drawing element.

Draw a line.

Draw a rectangle.

Draw a rounded rectangle.

Draw an ellipse or circle.

Draw a 1/4 ellipse.

Draw a 1/2 ellipse.

Draw an arc.

Draw a pie.

Draw a polygon.

Draw a polyline.

ISaGRAF Enhanced 4.21 - HMI 25

Page 38: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Arrange Toolbar

The Arrange toolbar contains tools to resize, move, align, lock and group drawing elements.

Draw a Bézier curve.

Draw a Bézier shape.

Insert text.

Insert a symbol from the library.

Insert an image from the library.

Insert an ActiveX control from the favorites list.

Insert an ActiveX control from the qualified list.

Insert an OLE link.

Insert a real time trend display.

Resize the selected elements so that the width matches that of the reference.

Resize the selected elements so that the height matches that of the reference.

Resize the selected elements so that the width and height matches that of the reference. Align selected elements horizontally so that the left edge aligns with that of the reference. Align selected elements horizontally so that the right edge aligns with that of the reference.

Page 39: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Align selected elements vertically so that the upper edge aligns with that of the reference. Align selected elements vertically so that the lower edge aligns with that of the reference. Align selected elements vertically so that their centers aligns with that of the reference.Align selected elements horizontally so that their center aligns with that of the reference. Align selected elements horizontally so that they are evenly spaced.

Align selected elements vertically so that they are evenly spaced.

Bring selected element in front of all overlapping elements.

Send selected element behind all overlapping elements

Bring selected element in front of the drawing element immediately in front of it. Send selected element behind the element immediately under it.

Lock a drawing element. Once locked, you cannot change the drawing element's properties. Unlock a drawing element.

Toggle (turn on and off) display of the drawing grid.

Toggle (turn on and off) the alignment of drawing elements to the grid.

Group the selected drawing elements.

Ungroup the selected drawing group.

ISaGRAF Enhanced 4.21 - HMI 27

Page 40: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Flip a drawing element about its vertical axis. (1/2 and 1/4 ellipses, bitmaps and drawing groups)Flip a drawing element about its horizontal axis. (1/2 and 1/4 ellipses, bitmaps and drawing groups)Create a new polygon using Boolean operators by adding the sum of the areas two drawing elements.Create a new polygon using Boolean operators by taking the overlapping area of two drawing elements.Create a new polygon using Boolean operators by subtracting the overlapping area of one drawing element from the other.Reverse the order of points in a polygon, polyline, Bézier curve or Bézier shape. Useful when using the Boolean graphic tools and the Path animation.

28 ISaGRAF Enhanced 4.21 - HMI

Page 41: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Customizing the HMIYou can customize certain elements in the HMI to suit your needs. This includes defaultsettings, creating user-defined shortcut keys, and creating libraries to store your project foldersand files.

ISaGRAF Enhanced 4.21 - HMI 29

Page 42: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Setting DefaultsYou can change some HMI default settings from the Options Tree, such as window and file behaviour to suit your needs. You can also adjust default colours and blinking colours for your drawing elements.

30 ISaGRAF Enhanced 4.21 - HMI

Page 43: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Options Tree

The HMI has a number of options normally left at their default settings. You can view andchange these settings by choosing Options from the Tools menu..

ISaGRAF Enhanced 4.21 - HMI 31

Page 44: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

General

Colour Palette : Display Indexed Colours only

Disables display on the first 32 (non-indexed) colours in the palette.

Mimic Open Mode

<Design> Mode - Mimics are opened in design mode.<Run> Mode - Mimics are open in run-time mode. This is the default selection.

Default Startup Mimic

Enables a mimic to be opened automatically when the HMI starts. The name of the mimic andan optional branch are entered in the parameters area.

Connection for Data

Design Time Server - Selects the Design Time server for the collection of real time informationfrom an OPC server.

Run-time Server - Selects the Run-time server for the collection of real time information froman OPC server. This is the default selection.

Connection for Variable Browsing

Design Time Server - Selects the Design Time server for variables browsing in an OPC server.

Run-time Server - Selects the Run-time server for variable browsing in an OPC server. This isthe default selection.

Mimics

Popup, Close on <Esc> key –

Enables popup windows to be closed using the Esc key on the keyboard. Persistent contextvariables after close.

32 ISaGRAF Enhanced 4.21 - HMI

Page 45: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Animation

No warning box <Animation not connected> in run-time mode – Disables the display of arun-time warning for incorrectly-configured animations.

Operator dialog boxes

Use System Message font – Enables use of the Windows’ system font for text in User dialogboxes.

Sound Warning (Advanced Windows Properties) – Enables the generation of a sound using thePC’s loudspeaker when the Beep option in a window’s properties is selected.

File Format

ASCII Format reading with check -

Mimics

User can select the format – Allow the user to select the format in which a mimic is saved.

Default Format

Binary Format – Use binary as the default save format.

ASCII Format – Use ASCII as the default save format.

Original Format – Use the current format by default.

Symbols

User can select the format – Allow the user to select the format in which a symbol is saved.

Default Format

Binary Format – Use binary as the default save format.

ASCII Format – Use ASCII as the default save format.

Original Format – Use the current format by default.

ISaGRAF Enhanced 4.21 - HMI 33

Page 46: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Regions

Advanced Mode – Enable multiple region operation.

Multi open capability of the same mimic – Allow a copy of a mimic to be opened concurrentlyin each region.

Previous mimic (#P)

Global to the project – The previous mimic substitution is global to the entire project,independent of any regions.

Local to each region – The previous mimic substitution is local to the region.

Link Open <Close Caller> Mode

Close the Caller – The calling mimic is closed (if enabled) when using a Link Open Windowanimation.

Close all Region Mimics

Open in other Region that the caller one

Close the Caller – The calling mimic is closed (if enabled) when using a Link Open Windowanimation.

Close all target Region Mimics

Variable naming

Enable @ as Absolute Character – Enable use of the @ character in variable names to force adirect reference when using a mimic or symbol with a branch.

34 ISaGRAF Enhanced 4.21 - HMI

Page 47: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Colours

The default colours that are used when the Colour Bit animation is applied can be changed inthe Colour Preferences window accessed from the Tools menu by selecting Preference,then Colours.

ISaGRAF Enhanced 4.21 - HMI 35

Page 48: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Blinking Colour Periods

In many of the drawing elements and animations, you can select a blinking colour for one ormore of the properties. A blinking colour alternates between two selected colours at predefinedrate. From the Tools menu, you can change the period for which each colour is displayed in theBlinking Colour Periods window accessed by selecting Preferences, then Blinking Rates.

There are 16 configurable blink rates. Each of these has two configurable periods, one for eachof the colours. To change either period, click and drag the appropriate slider control. If you areusing blinking colours to attract the operator’s attention, it is recommended that you use a ratioof approximately 2 to1 for the periods. Each period may be configured within the range of 150to 2000 ms.

36 ISaGRAF Enhanced 4.21 - HMI

Page 49: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Keyboard ShortcutsThe Keyboard Manager is used to create user-defined shortcut keys. A shortcut is theassociation of a keystroke with a standard the HMI action or a function written using thescripting language. Each set of shortcut keys is allocated to a named keyboard layout. You canconfigure several layouts although only one may be active at any one time. At run-time, alayout is activated using the scripting language – in this way you can associate a layout to aproject, a window, or a particular user.

A keystroke is a key or key combination from the keyboard. You can use the function keys (F1to F12, Esc, Tab etc.) and any alpha-numeric key combined with Ctrl, Alt and Shift.

Warning: Once the keyboard layout is activated, the shortcut that you allocate to a key or keycombination replaces any standard function previously assigned to it.

From the Tools menu, you can access the Keyboard Manager by selecting KeyboardManager.

The Keyboard manager contains two areas:

! The left pane with a tree control from where layouts may be created, copied, and deleted

! The right pane where individual layouts are configured

ISaGRAF Enhanced 4.21 - HMI 37

Page 50: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating a New Keyboard Layout

To create a new keyboard layout

1. From the Tools menu, open the Keyboard Manager.

2. Right-click in the left pane and select New Layout from the pop-up menu.

3. Name the layout and click Apply.

38 ISaGRAF Enhanced 4.21 - HMI

Page 51: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Adding Shortcuts for Standard Actions

You can personalize shortcuts to standard actions on the keyboard. The following standardactions are available:

To add a shortcut for a standard action

1. Select the layout in the left pane.

2. Double-click on the New Shortcut entry in the right pane.

3. Select the Action button.

Action Operation Exit Shut down the HMI. LogOn Displays the "Log On" window. LogOff Logs off the current operator. Previous Window Activates the previous window.Next Window Activates the next windowPrevious Zone Activates the previous zone within the current window.Next Zone Activates the next zone within the current window.First Zone Activates the first zone declared in the current window.Last Zone Activates the last zone declared in the current window.

ISaGRAF Enhanced 4.21 - HMI 39

Page 52: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

4. Click in the Accelerator field and press the key combination for this shortcut.

5. Select the action from the Action list box.

6. Click OK.

40 ISaGRAF Enhanced 4.21 - HMI

Page 53: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Adding Shortcuts to Run Functions

To add a shortcut to run a function

You can custom create a shortcut to a function on your keyboard for functions you usefrequently.

1. Select the layout in the left pane.

2. Double-click on the New Shortcut entry in the right pane.

3. Select the Script button.

4. Click in the Accelerator field and press the key combination for this shortcut.

5. Select the module in which the function is to be found using the Module list box.

6. Select the function using the Function list box.

7. Click OK.

Note: You can run either a function or subroutine. It is not possible to pass parameters.

ISaGRAF Enhanced 4.21 - HMI 41

Page 54: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Activating a Keyboard Layout

A keyboard layout is activated either by selecting the layout from the Keyboard Manager or byusing a script.

To activate a layout from the keyboard manager

! Collapse the layout tree in the left pane and then click on the layout to be activated in theright pane.

This activation is only temporary and will be forgotten when the HMI is restarted.

42 ISaGRAF Enhanced 4.21 - HMI

Page 55: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Activating a Layout Using a Script

To activate or deactivating a layout using a script, use the ActiveKeyboardLayout property ofthe ThisProject object:

Private Sub OperatorButton_Click()ThisProject.ActiveKeyboardLayout = "Default" ' Activate operator layoutEnd SubPrivate Sub NoneButton_Click()ThisProject.ActiveKeyboardLayout = "" ' Deactivate layoutEnd Sub

Warning: A runtime error will be generated if the name passed to this property cannot befound in the layout list defined for the project

ISaGRAF Enhanced 4.21 - HMI 43

Page 56: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring LibrariesA library is the collective name for the folders used to store the window, window template,script, object, and image files composing a project. By default, there is only one library, knownas the Local Library, located in the project’s root folder. In addition to the Local Library, it ispossible to create two other types of libraries:

! Project libraries, these are located in the Libraries folder under the project’s root folderand are only available to that project.

! Shared libraries, these are located in the Shared Libraries folder under the HMI’s rootfolder. The content of these libraries is available to all projects.

Using libraries has two main advantages:

! You can organize the components of a project in a logical way. For example, you couldcreate separate libraries of animated and non-animated objects.

! You can create libraries of windows, window templates, scripts, images, and objects thatcan be reused in several projects

There is no limit to the number of libraries that you can create or the way in which they areused. You can create and manage libraries from the Tools menu, by choosing Project thenLibraries.

44 ISaGRAF Enhanced 4.21 - HMI

Page 57: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating a New Library

The following explanation applies to both project and shared libraries.

1. From the Tools menu, open the library management tool by selecting Project, thenLibraries.

2. Select the Project Libraries or Shared Libraries tab.

3. Click the New Library tool.

The New Library window appears.

4. Name the library. This is the name by which it will be referenced in the HMI.

5. Name the folder. The folder name does not have to be the same as the library name butyou may find it easier to manage if it is.

6. Enter a description of the library in the comment field.

7. Click OK.

8. Close the library management box.

Note: Existing shared libraries are automatically registered when the Library Management boxis opened. They do not have to be manually configured, but they must be enabled if they are tobe used in a project.

Warning: You cannot delete libraries online. To delete a library you must stop the HMI andmanually delete its folders.

ISaGRAF Enhanced 4.21 - HMI 45

Page 58: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Enabling a Library

Before a library can be used in a project, it must be enabled. Libraries that are not enabled donot appear in the list of libraries displayed when inserting a window, image, or object. Librariesthat you create online are automatically enabled. Existing shared libraries must be enabledbefore they can be used.

To enable a library

1. From the Tools menu, choose Project, then Libraries.

The Library Management box appears.

2. Select the Shared Libraries tab.

3. Locate and check the desired library.

4. Click Close.

Page 59: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Folder StructureAll HMI installations, Projects, and Libraries follow common folder structures according totheir types. Folder structures are used to organize files and folders in a comprehensive schemeto make it easier to work with.

ISaGRAF Enhanced 4.21 - HMI 47

Page 60: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

HMIAll HMI installations follow the same basic directory structure as shown below.

! Root Folder – The folder specified during the software installation. For example,C:\ProgramFiles\HMI

! Program – Program executable files, libraries and other resources.

! Projects – The root folder for all the projects.

! Redist – Program libraries and resources supplied by 3rd parties and distributed as part ofthe HMI.

! Shared Libraries – Libraries available to all projects containing reusable objects, scriptsbitmaps and mimics.

48 ISaGRAF Enhanced 4.21 - HMI

Page 61: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

ProjectsProjects share a common structure, as outlined below:

! Project 1 – The root folder for the project Project 1.

! Bitmap files – The folder containing any local image files used by the project. Images inthis file are not available to other projects.

! Config files – Project configuration files.

! Libraries – Libraries available to this projects only containing reusable objects, scriptsbitmaps and mimics.

! Mimic files – Window definition files.

ISaGRAF Enhanced 4.21 - HMI 49

Page 62: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

! Script files – Script files containing Functions, Subroutines and Variables not linked to aparticular object.

! Symbol files – Reusable graphic objects.

! Template files – Mimic template files.

! Project 1.fvp – The project definition file. Double clicking on a .fvp file willautomatically start the HMI. (Similar to double clicking on a .doc file to start Word)

50 ISaGRAF Enhanced 4.21 - HMI

Page 63: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

LibrariesBoth the shared libraries and project libraries follow the same structure. Resources available inthe shared libraries in the root folder are available to all projects. Resources in libraries in aproject are only available to that project.

! Lib 1 – The root folder for the library Lib 1

! Bitmap files – Image files

! Config files – Configuration files

! Mimic files – Window definition files

! Script files – Script files containing Functions, Subroutines and Variables not linked to aparticular object

! Symbol files – Reusable graphic objects

! Template files – Mimic template files

! Lib 1.fvl – The library definition file

ISaGRAF Enhanced 4.21 - HMI 51

Page 64: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties
Page 65: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Working with MimicsThe terms window and mimic are used many times throughout this documentation and aregenerally interchangeable. However there is a subtle difference between a window and a mimicthat is important to understand, particularly if you are manipulating windows and mimicsprogrammatically.

A window is the container for a mimic. The window defines such things as the location on thescreen, the style (borders, title etc.) and the access rights. There is always at least one windowper opened mimic.

A mimic is the contents of a window. You draw in the mimic to produce menus, overviews,process diagrams etc. You can have more than one instance of the same mimic open at once,each in its own window. For example you could have one copy open in run mode and100% zoom and another copy in design mode at 200% zoom.

For those readers familiar with the classic Microsoft Document/View architecture, Mimic isequivalent to Document and Window equivalent to View.

ISaGRAF Enhanced 4.21 - HMI 53

Page 66: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Window and Mimic Objects in the Scripting LanguageWhen using the scripting language you will find the following objects concerned with mimicsand windows.

The Mimics Collection Object

The Mimics collection object represents the collection of the currently opened mimics for theactive Project.

The Mimic Object

A Mimic object represents an opened mimic. Mimic’s properties or methods are related to thetargeted mimic and to all windows containing this mimic (including the active one).

The Windows Collection Symbol

The Windows collection object represents the collection of the currently opened windows forthe active Project, or the collection of currently opened windows for a specific Mimic

The Window Object

A Window object represents an opened window on a specified Mimic.

54 ISaGRAF Enhanced 4.21 - HMI

Page 67: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Mimics BasicsThe User Interface for your project is developed as a number of mimics. Mimics are easily andquickly developed to form Menus, Overviews, Process Diagrams, Trend Displays and so on.Mimics may be linked together, using a special type of animation, to form a hierarchicaldisplay.

Each mimic is contained within a window, the properties of which are individually selectedincluding the size and position on the screen, the ability to move or re-size the window and theaccess level.

ISaGRAF Enhanced 4.21 - HMI 55

Page 68: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Operational Modes

Mimics can be displayed in a number of modes selected from the Mode toolbar.

! Run. In run mode the animated properties of drawing elements in the mimic are updatedin real time. It is not possible to change the properties of any drawing in the mimic or itssupport window.

! Test. Test is a sub-mode of run and is only operational when run mode is selected. In testmode the variables used in any animations are disconnected from their source and mayhave their real time value manually forced.

! Design. In design mode the properties of drawing elements do not update in real time.Drawing elements may be added, modified and deleted and the support windowmodified. This is the mode of operation used whilst developing a mimic.

The HMI supports the Microsoft Document View architecture that allows you to have severalinstances of the same mimic open concurrently. Each instance is contained within its ownsupport window. For example you could have one instance opened in design mode and anotherin run mode.

56 ISaGRAF Enhanced 4.21 - HMI

Page 69: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Designing a Mimic Hierarchy

The mimic hierarchy determines the way in which a user navigates around the project. As auser will normally not have access to the development tools which open mimics. Considerationmust be given as to how mimics are linked together. A typical hierarchy might contain:

! Main menu

! Sub-menus

! Plant-wide overview

! Process diagrams

! Management information

! Diagnostic displays

! Trend displays

The mimic hierarchy may be designed so that the mimics available at any time depend on theaccess rights of the current user.

ISaGRAF Enhanced 4.21 - HMI 57

Page 70: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating and Managing MimicsThe tools used to create, save, and manage mimics are located on both the Standard tool barand on the File menu.

Create a new mimic.

Open an existing mimic

Save the selected mimic

Save all open mimics

Close the selected mimic window

Close all mimics windows

58 ISaGRAF Enhanced 4.21 - HMI

Page 71: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating Mimics

You can either create a new mimic with default properties, or a new mimic based on a mimictemplate.

To create a new mimic

" On the Standard toolbar, click .

A new mimic is created with default properties.

To create a new mimic using a mimic template

1. From the File menu, choose New.

The New mimic dialog box appears.

2. Select the name of the template then click OK. You can also enter the name of a databasebranch for use with the mimic.

Related TopicsWindow Templates, on page 85

ISaGRAF Enhanced 4.21 - HMI 59

Page 72: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Saving a Mimic

To save a mimic

" Click the Save tool on the standard toolbar or choose Save from the File menu.

Note: If you are saving a window for the first time, the Mimic Management box appears andyou must enter a mimic name. This name will be used in the future when opening the mimicand is also the name of the file in which the mimic definition will be saved.

60 ISaGRAF Enhanced 4.21 - HMI

Page 73: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Closing a Mimic

To close a mimic

! Click the Close tool on the standard toolbar or select Close from the File menu.

If changes have been made to the mimic since it was opened and they have not been saved, youwill be prompted to save them.

If a mimic view is not displayed at 100% (normal) magnification, any changes to mimic sizeand position are not saved.

ISaGRAF Enhanced 4.21 - HMI 61

Page 74: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Opening Multiple Views of the Same Mimic

It is possible to have several views of the same mimic open concurrently in the same or a mixof the modes. All views of the same mimic are automatically updated with any changes made.For example you could have:

! One view in Run mode and the other in Design mode

! One view zoomed in to make fine changes to drawings and another at full size to see theeffect of those changes

To Open Another View of a Mimic

1. Select the mimic by clicking anywhere in it.

2. From the Window menu, choose New Window.

62 ISaGRAF Enhanced 4.21 - HMI

Page 75: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Iconizing and Restoring Mimics

Mimics that have been iconized are displayed in a column next to the right hand border of theWorkspace. Iconized mimics in Run mode continue to be updated in real time.

To iconize a mimic

! Double-click the mimic’s title bar, or select the minimize tool if enabled.

To restore a mimic

! Double-click anywhere in the iconized view.

ISaGRAF Enhanced 4.21 - HMI 63

Page 76: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using Mimics with a Branch

When a mimic is opened or created, it may be given a database branch. Subsequently anyreference to variables is relative to that branch. When used in conjunction with the structuredOPC server, this technique can be used to reduce the number of mimics required and thesubsequent development time.

Example

Consider an application where there are four identical gas turbines to be supervised. Eachturbine has more than 100 variables associated with it. In the OPC server, each variable namestarts with the turbine number.

Data:turbine1.speed Data:turbine1.pressure etc.

Data:turbine2.speed Data:turbine2.pressure etc.

Data:turbine3.speed Data:turbine3.pressure etc.

Data:turbine4.speed Data:turbine4.pressure etc.

A mimic named Turbine is created initially with the branch Data:turbine1. Subsequently,all variable references are relative to Data:turbine1, so speed actually refers toData:turbine1.speed. A further mimic named Menu is created with four commandbuttons, each one linked to the Turbine mimic but using four different branches eachcorresponding to one of the turbines.

At run-time, the Turbine mimic may be opened four times, each time displaying a differentgroup of variables from the server.

With this example, instead of creating four mimics, it was only necessary to create one. Theadvantages of this are that it reduces development time and makes maintenance much easier.

64 ISaGRAF Enhanced 4.21 - HMI

Page 77: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Mimic Management Box

The Mimic Management dialog box appears when you save a mimic for the first time, save amimic with a new name, and when you open a mimic using the Open tool or the Opencommand from the File menu.

The management box provides a list of mimics, the option of a preview display of the selectedmimic, and tab options for selecting the mimic library and branch. The list may be switchedbetween a simple or detailed format using the display buttons.

Tab Options and Command Buttons

! Folder - The name of the folder in which the mimic file is to be saved or from which it isopened. This can either be mimics if you are saving or opening a normal mimic, or mimictemplates if you are creating or loading a window template. See Window Templates forfurther information.

! Library - The name of the library in which the mimic file is to be saved or from which itis opened. By default, there is one library known as Local. Other libraries may beavailable depending on the configuration of the project.

ISaGRAF Enhanced 4.21 - HMI 65

Page 78: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

! Name - The name of the mimic to be opened or saved. You can type the name directlyinto this field or select it by clicking in the list. The name must comply with standardWindows file naming conventions.

! Filter – A lexical filter which may be applied to reduce the number of mimic namesdisplayed in the list.

! Branch - The name of a database branch to be used with the mimic. See Opening a Mimicwith a branch for further information.

66 ISaGRAF Enhanced 4.21 - HMI

Page 79: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing Window PropertiesYou can change many aspects of a mimic's support window such as its display, user-access,behaviour and any link-open animations which may be associated with a window.

To access the Window Properties box

1. In the window, right-click outside of an element.

The contextual menu appears.

2. Choose Window Properties.

ISaGRAF Enhanced 4.21 - HMI 67

Page 80: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Display

The display tab contains the main properties that affect the window's appearance andbehaviour:

! Defining Window Behaviour

! Displaying Text in Title Bar

! Adding a Drawing Grid

! Drawing Layers

68 ISaGRAF Enhanced 4.21 - HMI

Page 81: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Defining the Window Style

The style is the name given to the group of properties that effect the general behaviour of thewindow. Note that some of the properties interact with one another, for example if you enablethe system menu the title bar is automatically displayed.

! System menu - Display the system menu icon on the title bar.

! Iconizable - Display the iconise button on the title bar.

! Maximise - Display the maximise button on the title bar.

! Sizeable - Allow the window to be sized by clicking and dragging the border.

! Moveable - Allow the window to be moved by clicking and dragging the title bar. Notethat the title bar is not automatically enabled.

! Foreground – The window is always displayed in the foreground - that is any otherwindows opened at the same time will be forced behind it.

! Close - Display the close button on the title bar.

! Small Caption - Display a narrow title bar and use a small font for the window title.

! Border - Display a standard style border around the window.

! Client Border - Display a client style border around the window.

! Static Border - Display a static style border around the window.

! Modal – The window exhibits modal behaviour, i.e., the window retains focus until it isclosed.

! Cache - The window is saved in cache memory after the first time it has been opened.Subsequently, when the window is opened it will appear on the screen quicker than if wasbeing opened from the hard disk. Note that when a window is in cache it uses systemresources (memory and CPU time) and so this option should only be used when essential.The cache is restricted to a finite number of windows as defined in the project start upconditions. If you try and cache more than this the window that was opened first, that isthe oldest in the cache, will be removed from the cache.

ISaGRAF Enhanced 4.21 - HMI 69

Page 82: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Selecting the Window and Mimic Size

Normally the window and mimic it contains are the same size. However, there are somecircumstances where it is desirable to have the mimic a different size than the window. Thefollowing properties set the window and mimic size and the relationship between them.

! Link mimic and window size - The default selection. The window and mimic it containsare the same size. The size may be changed either by entering the width and height in thecorresponding fields or by dragging the window border.

! Scale mimic to fit window - The window and mimic can be different sizes. The mimic isscaled to fit it to the window. The mimic size is entered in the mimic width and heightfields. The window size can be entered in the window width and height fields, or bydragging the window border. When this option is selected the zoom tools are notavailable.

! Allow mimic to be larger than window - The mimic can be larger than the window. Themimic size is entered in the mimic width and height fields. The window size can beentered in the window width and height fields, or by dragging the window border. If thewindow is smaller than the mimic scroll bars are automatically displayed on the windowborders to allow navigation of the mimic.

Displaying Text in a Title Bar

When the Title bar option is checked, you can enter a title or description to be displayed in thetitle bar. As well as fixed text, you may also use the following substitution characters to displaycertain information about the system.

#h The current hour as two digits#m The current minute as two digits#s The current second as two digits#B The database branch that the window has been opened with#D The current date as two digits#M The current month as two digits#W The window name

70 ISaGRAF Enhanced 4.21 - HMI

Page 83: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

If the title bar is enabled and no text is entered, the window name will be displayed.

Defining the Grid

The drawing grid is a tool to help you precisely position to your drawing elements. It is animaginary matrix of co-ordinates within each window.

When you create a drawing element (for example a rectangle), its size and position willautomatically adjust so that each of its corners is located on the nearest grid point. When youmove a drawing element, as you release the mouse button, the top left hand corner willautomatically move to the nearest grid point.

The grid is displayed as a series of dashed lines in both the horizontal and vertical planes. Thedisplayed grid is a multiple of the grid size and is only displayed as a guide. You should decideon a grid size before you start drawing in a window because changing it while working on itmay cause problems when aligning drawing elements created with the previous grid size.

The following properties effect the operation of the grid:

! Visible - Displays or hides the lines representing the grid. The grid operation is unaffected

! Enable – If selected, all subsequently produced drawing elements are aligned with thegrid

! X and Y - The grid size in pixels. It is recommended that the grid is made no smaller thanfour pixels. The default grid size of eight pixels is adequate for most applications

! Colour - The colour of the grid lines in Design mode

Drawing Layers and De-cluttering Templates

The HMI supports a CAD like layer system for drawing. When you create any drawing elementit is allocated to one or more layers. In order for the drawing to be visible, one or more of thecorresponding layers must be enabled.

#Y The current year as two digits###Y The current year as four digits

ISaGRAF Enhanced 4.21 - HMI 71

Page 84: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

In the window configuration you can select the enabled layers in two ways:

! By using the layer buttons

! By specifying a de-clutter template. De-clutter templates enable layers according to zoomlevel. If you select a de-clutter template then the layer select buttons are no longeroperational. See the topic on Creating and Using De-clutter Templates for moreinformation.

72 ISaGRAF Enhanced 4.21 - HMI

Page 85: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Access Rights

The access rights tab contains properties that determine how the user can change the mimic atrun-time.

Tab options and command buttons

! Level - The access level that the user must have in order to open the window

! Zoom allowance – user is allowed to zoom the window between the specified zoomlevels

! Allow layer selection – user is allowed to change the layers that are displayed at run-time

! Warning box – displays a warning box if the user attempts to change the zoom or layersdisplay when it is not permitted

! Warning Beep – emits a warning sound if the user attempts to change the zoom or layersdisplay when it is not permitted

ISaGRAF Enhanced 4.21 - HMI 73

Page 86: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Included Mimic

This tab determines how the mimic behaves when it is opened as a child of another mimic(using the Link – Open animation) or when opened as a context mimic:

! Configuring the Opening Position

! Enabling Pop-Up Behaviour

Configuring the Opening Position

The opening position determines where a mimic is opened relative to the parent mimic. Youselect the position by clicking on any of the hatched areas in the representative of the mimic.

74 ISaGRAF Enhanced 4.21 - HMI

Page 87: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

You can choose to open the mimic relative to one of the corners of the parent mimic, or relativeto the support drawing element for the link-open animation. You can also open the mimicrelative to the cursor position.

If you choose to open the mimic relative to one of the corners, then you can also specify thedistance from that corner, in terms of X and Y co-ordinates.

If you do not select any opening position, then the mimic will be opened at the position definedby its own X and Y co-ordinates (as in the display tab).

Enabling Pop-Up Behaviour

When enabling popup behaviour the operation of the mimic in Run mode is modified asfollows:

! A pop-up mimic is always opened as a child of another mimic

! A pop-up mimic automatically closes as soon as focus is returned to the parent mimic,normally when the parent mimic is next clicked into.

! A dashed box is displayed around the control zone from which the mimic is opened

ISaGRAF Enhanced 4.21 - HMI 75

Page 88: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Links

The options available from this tab determine which mimics are opened from Link-Openanimations when using the substitution characters #M1 to #M10. For further information, seethe section on Opening and Closing Mimics in the Control Zone topic.

76 ISaGRAF Enhanced 4.21 - HMI

Page 89: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating and Using Mimic TemplatesWhen you create a new mimic, there is the option to base it on a mimic template. The newmimic will inherit certain properties from the template and any drawing in the mimic templatewill also appear in the new mimic.

The reference to the mimic template is dynamic, that is, if you change any properties ordrawings in the template, these changes are automatically reflected in any mimic-based on it.You can select which of the properties your new mimic inherits from the template from theTemplate tab in the Window Properties box.

When used carefully, mimic templates can considerably reduce the configuration time for aproject and also have the advantage of giving mimics in the project a standard look and feel.

ISaGRAF Enhanced 4.21 - HMI 77

Page 90: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating Mimic Templates

A mimic template is created in the same way as any other window except that it is saved in theMimic templates folder. Drawing elements and animations in the mimic template will be fullyfunctional in any mimic using it, but they can only be edited and changed in the mimictemplate.

Note: You cannot nest templates, that is, a template cannot be based on another template.

78 ISaGRAF Enhanced 4.21 - HMI

Page 91: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

The Template Tab

In the Window properties box for any mimic based on a template you can select which of theproperties of the template the mimic will inherit. You can also change template on which themimic is based or even remove it altogether.

ISaGRAF Enhanced 4.21 - HMI 79

Page 92: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating and Using Declutter Templates

When drawing, you can control the visibility of a drawing element by giving it zoom bounds.If the mimic in which it is contained is zoomed outside of these bounds, the drawing elementbecomes invisible. This technique (known as declutter) is used to control the level of detaildisplayed in a mimic as it is zoomed. The disadvantage of controlling visibility this way is thatyou must allocate the zoom bound to every drawing element it is to affect. A declutter templatesimplifies this by allocating zoom bounds to a layer. You then attach the drawing element tothat layer.

To Create a Declutter Template

1. From the Tools menu, select Preferences, then Decluttering.

The Decluttering management box appears.

80 ISaGRAF Enhanced 4.21 - HMI

Page 93: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

2. Click New.

A new de-clutter template appears:

3. Enter a name for the template. This name will be used when referencing it in a windowproperties box.

4. Enter zoom bounds for those layers that are to be dependent of zoom level.

5. Click OK to confirm the template then OK to close the De-clutter management box.

ISaGRAF Enhanced 4.21 - HMI 81

Page 94: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Opening Windows from a DOS Command LineYou can open HMI windows from a DOS command line. The syntax is the following:

"Drive:\Program Files\ISaGRAF Enhanced\HMI\hmi.exe" "Drive:\Program Files\ISaGRAF Enhanced\HMI\Projects\project_directory\project_name.fvp"

Furthermore, you can choose to open the window in runtime mode, without the menu andtoolbar appearing on top. To open the window in runtime mode, you need to add the followingat the end of the command line:

/runtime

Example

To open the Demo.fvp HMI window located in the FermDemo project directory whenISaGRAF Enhanced has been installed in the default directories:

"C:\Program Files\ISaGRAF Enhanced\HMI\hmi.exe" "C:\Program Files\ISaGRAF Enhanced\HMI\Projects\FermDemo\Demo.fvp" /runtime

82 ISaGRAF Enhanced 4.21 - HMI

Page 95: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

DrawingDrawing is the process by which you transform your blank windows into Menus, Overviews,Process Mimics etc. You can draw in windows 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 elementhas a wide range of properties that allow you to quickly and easily change theappearance. For example, a rectangle can appear as a button.

! By importing images in standard Windows’ BMP, JPEG or WMF formats, you candisplay scanned images, standard Windows’ icons etc.

! Using OLE (Object Linking and Embedding), you can include information created inother applications, such as charts, graphics, and spreadsheet data.

You display the process you are supervising by attaching properties of the drawing elementsto the real time value of variable in the database. For example, a polygon representing a valvecan change colour depending on the valve position. Attaching properties of drawing elementsto the real time value of variables is known as animation. Animation is described in anothersection.

Using Geometric Shapes

Using workspace tools, you can create geometric elements defined as sets of coordinateshaving properties defining colour and style. The properties of geometric shapes are much easierto change and to attach to the value of variables in the database. Geometric shapes have a widerange of possibilities for dynamically changing properties. The window definition filescontaining only geometric shapes are compact, and they also use less memory. However, thepictures they create are generally less attractive than those which use images. Geometric shapesconsist of:

! Lines

! Shapes

! Polylines, Polygons, Bézier Curves, or Bézier Shapes

ISaGRAF Enhanced 4.21 - HMI 83

Page 96: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using Images

An image is a map of the area it occupies on the screen with the colour of each pixel (pictureelement) described by a number of digital bits. The number of bits used to define each pixelwill depend on how many colours the picture is using: eight bits per pixel can define 256colours, 16 bits per pixel 64,000 etc. Once an image is created, there is very little that can bedone to change it dynamically. For example, you cannot attach an area of an image to adatabase variable so that it changes colour according to the value of the variable. There aremany drawing and painting packages available which are able to produce stunning pictures inimage format. Images can also be created from scanned pictures of real objects and the numberof colours in an image is limited only by the capability of the host computer. However, imagesoffer limited possibilities for dynamically changing images according to the value of databasevariables.

The HMI supports the use of images in standard BMP, JPG or WMF formats. The use ofimages can considerably enhance the appearance of your application; there are however twopoints which you must always take into consideration:

! Images, particularly those with large numbers of colours, use considerable amounts ofmemory (RAM)

! Images frequently use different colour palettes. If you display two or more images at thesame time with different palettes, and the graphic adapter you are using does not havesufficient colours to display them, you will get bizarre effects with the displayed colourschanging.

Using OLE Objects

When linking or embedding information from another application, the information is displayedin the window in the same form as it would be in the original application, such as a Worddocument. When you double-click on the object in Design mode, the application in which theobject was originally created is automatically opened and the object is ready for editing. Whenyou return to the Supervisor, the window will reflect any changes made to the object. OLEobjects can display information in virtually any form as long as there is a Windows applicationsupporting OLE capable of editing it. However, the original applications must be used tochange the object. They also have very limited possibilities for dynamically changing OLEobjects according to the value of database variables.

84 ISaGRAF Enhanced 4.21 - HMI

Page 97: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Inserting Drawing ElementsYou can use various tools available in the HMI drawing window such as Lines; Shapes; andPolylines, Polygons, Bézier Curves, or Bézier Shapes to create drawing elements. These toolscan be accessed from the Drawing toolbar.

ISaGRAF Enhanced 4.21 - HMI 85

Page 98: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Lines

It is possible to draw straight lines using geometric tools.

Selecting the Line Style

The line style, colour and width can be changed from the drawing properties box.

86 ISaGRAF Enhanced 4.21 - HMI

Page 99: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

The line style can be selected from the following options.

The line styles other than solid are only available for line widths of 1. The line styles can alsobe applied to polylines and the border of solid drawing elements such as rectangles andpolygons.

Note: The Pattern properties do affect the appearance of the line.

To draw a line

1. From the Drawing toolbar, select the Line tool.

2. Position the cursor on the screen where the drawing is to start.

3. Drag the cursor until the line is of the required length.

4. Release the mouse button.

If the Ctrl button is held down while a line is drawn, it will always be horizontal, vertical, orat 45 degrees depending on which is nearest to the co-ordinates.

Solid

Dashed

Dotted

Dash Dot

Dash Dot Dot

ISaGRAF Enhanced 4.21 - HMI 87

Page 100: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Shapes

The draw tools, rectangle, rounded rectangle, ellipse, 1/2 ellipse, 1/4 ellipse, arc and pie allproduce variations of the Shape drawing element. The appearance in a mimic is determinedby the Shape's properties. The fundamental procedure to draw them all is the same.

You can perform many tasks when managing shapes:

! Changing the Fill Pattern of a Shape

! Changing the Appearance of a Shape

! Drawing a ½ or ¼ Ellipse

! Changing the Corner Radius of a Rounded Rectangle

! Changing an Arc or Pie Shape

To draw a shape

1. On the Drawing toolbar, click the desired tool.

2. Position the cursor on the screen where the drawing is to start.

88 ISaGRAF Enhanced 4.21 - HMI

Page 101: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

3. Drag the cursor until the drawing is of the required size.

4. Release the mouse button.

Once you have drawn the shape, its properties can be displayed and by double-clickinganywhere within its boundary.

Note: If the Ctrl button is held down while a rectangle (ellipse) is drawn, the height and widthwill be the same producing a square (circle).

ISaGRAF Enhanced 4.21 - HMI 89

Page 102: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing the Fill Pattern of a Shape

The fill style of a rectangle or ellipse can be changed using the Base tab in the drawingproperties box.

The following styles are available:

With styles other than Solid or Transparent the pattern colour is selected using the Colourproperty and the fill colour using the Background property. With the Solid style the fill colouris selected using the Colour property. It is also possible to change the border (line) style of arectangle or ellipse.

Related Topics “Lines”, on page 86

Solid Diagonal –45

Transparent Vertical

Diagonal + 45 Horizontal

Diagonal 45 and –45 Horizontal and Vertical

90 ISaGRAF Enhanced 4.21 - HMI

Page 103: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing the Appearance of a Shape

The overall appearance of a shape can be changed using the Aspect tab in the drawingproperties box.

The following options are available:

Regular. The shape is displayed as a normal rectangle. You can change the fill style and colour.

Button. The shape takes the appearance of a button. The fill colour and style is fixed. The border size can be changed using the Thickness property.

Coloured button. The shape takes the appearance of a coloured button. You can change the fill style and colour and the border size colour.

Relief. The shape takes a sunken appearance. You can change the fill style and colour and the border size and colour.

Inverse Relief. The shape takes a raised appearance. You can change the fill style and colour and the border size and colour.

Shadow. The shape is displayed as a normal rectangle with a coloured shadow. You can change the fill style and colour and the shadow width and colour.

ISaGRAF Enhanced 4.21 - HMI 91

Page 104: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Drawing a ½ or ¼ Ellipse

The method to draw a 1/2 ellipse or 1/4 ellipse is the same as for a drawing a full ellipse exceptthat the point at which the drawing is started will determine the orientation of the drawingelement.

The fill styles for a ¼ or ½ ellipse are the same as that for a rectangle.

Changing the Corner Radius of a Rounded Rectangle

You can change the corner radius of a rounded rectangle either from the properties box or byclicking and dragging the radius handle that is displayed when the drawing is selected.

Start At To Draw

Bottom left

Bottom right

Top left

Top left

92 ISaGRAF Enhanced 4.21 - HMI

Page 105: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing an Arc or Pie Shape

You can change the segment of an arc and the angle of the sector on the pie either from theproperties box or by clicking and dragging the handles displayed when the drawing is selected.

ISaGRAF Enhanced 4.21 - HMI 93

Page 106: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Polylines, Polygons, Bézier Curves, or Bézier Shapes

You can draw and modify polylines, polygons, and Bézier curves and shapes using theDrawing toolbar:

! Re-shaping a Polyline or Polygon

! Re-shaping a Bézier Curve

! Adding or Deleting a Node

! Drawing an Ellipse or Other Shape as a Polygon

! Transforming a Bézier Curve into a Polygon

To draw a polyline, polygon, Bézier curve, or Bézier shape

1. From the Drawing toolbar, select the desired button.

2. Position the cursor on the screen where the drawing is to start and click and release themouse button.

3. Move the cursor to the next node and click and release the mouse button.

4. Repeat step 4 until the second last node is drawn.

5. Move the cursor to the last corner and right-click to complete the drawing.

The fill pattern of a polygon can be changed in the same way as for a rectangle or ellipse.

Related TopicsShapes

94 ISaGRAF Enhanced 4.21 - HMI

Page 107: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Re-shaping a Polyline or Polygon

When a polygon or polyline is selected, a handle is displayed at each node. These handles canbe used in the same way as for a normal drawing element except that instead of resizing thedrawing element, they are used to reshape it.

ISaGRAF Enhanced 4.21 - HMI 95

Page 108: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Re-shaping a Bézier Curve

The nodes that define the shape of a Bézier curve can be moved in the same way as for apolyline or polygon. In addition, each node has a tangent and an associated handle that can beused to reshape the curve. The tangents are anchored at one end of each node and are parallelto the curve where they join it. By moving the tangent handles, you adjust the angle at whichthe curve intersects with each node and its radius.

96 ISaGRAF Enhanced 4.21 - HMI

Page 109: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Adding or Deleting a Node

It is sometimes necessary to add or delete a node from a polyline, polygon, Bézier curve orBézier shape. For example you may have made an error when drawing the shape.

To add or delete a node, first select the drawing element and then right click on either the nodeto be deleted, or a node adjacent to where the new node is to be added. A pop up menu will bedisplayed. Selecting the minus command will result in the node being deleted. Selecting theplus command will add a new node half way between the selected node and the next node inthe shape.

ISaGRAF Enhanced 4.21 - HMI 97

Page 110: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Drawing an Ellipse or Other Shape as a Polygon

You can draw any of the solid shapes, such as an ellipse, as a Polygon. This can be useful whenyou want to use the path animation.

To draw a shape as a Polygon

1. Draw a polygon the height and width that you want the final shape to be. The number ofnodes is not important.

2. Display the Polygon's properties box and select the Aspect tab.

3. In the shape drop down list box select the new appearance for the Polygon. You canselect any of the normal solid shape types. (Rectangle, Rounded rectangle, Ellipse, 1/2Ellipse, 1/4 Ellipse, Arc or Pie).

4. Click OK.

98 ISaGRAF Enhanced 4.21 - HMI

Page 111: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Transforming a Bézier Curve into a Polygon

You can convert a Bézier curve into a Polygon. This can be useful when you want to use thepath animation.

To transform Bézier curve into a Polygon

1. Draw a Bézier curve and adjust it to the final shape.

2. Display the Bézier curve's properties box and select the Aspect tab.

3. In the shape drop down list box select Polygon.

4. Click OK to confirm the transformation.

ISaGRAF Enhanced 4.21 - HMI 99

Page 112: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Inserting TextText is created in much the same way as any other drawing element except, as part of theprocess, the text string to be displayed must be typed in. When text is inserted, its dimensionsare supplied by a supporting rectangle. This rectangle may or may not be visible, depending onthe appearance chosen for the text.

1. From the Drawing toolbar, select Text.

2. Position the cursor on the screen where the text is to start.

3. Type in the text.

4. Press Enter.

The text will initially appear with a default font and the colours currently selected in the palette.You can modify the text from the text properties box.

100 ISaGRAF Enhanced 4.21 - HMI

Page 113: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing the Font

Clicking on the font tool in the Text properties box can change the text font. You can displaytext in any font installed on the host PC.

Warning: Be careful when selecting a font; make sure that it is available on the computer onwhich the application will finally run.

As long as you do not have the property Do Not Auto Size selected, the support rectangle willautomatically adjust to suit the size of the text.

The colour of the text can be selected from any of those in the palette.

ISaGRAF Enhanced 4.21 - HMI 101

Page 114: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing the Appearance of the Support Rectangle

The support rectangle is the rectangular area surrounding a text string. It is normallytransparent but it can be coloured and given one of a number of different styles. The style isselected using the appearance properties in the Aspect tab of the text properties box.

The following options are available:

Regular. The default appearance for text. The background fill can be transparent or Coloured.

Button. The text takes the appearance of a button. The fill colour is fixed. The border size can be changed using the Thickness property.

Coloured button. The text takes the appearance of a Coloured button. You can change the fill colour and the border size.

Relief. The text takes a sunken appearance. You can change the fill colour and the border size and colour.

102 ISaGRAF Enhanced 4.21 - HMI

Page 115: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Do Not Auto Resize Property

Selecting the Do Not Auto Size property has the following effects:

! If you change the size of the font, the support rectangle does not change (and vice versa)

! The alignment of the text can be selected from center (default) left or right

! A margin measured in pixels can be applied to the side to which the text is aligned.

! The multiline property can be selected. Text that is too long to be displayed on one linewill wrap onto further lines. The text is automatically broken at the most convenientspace.

Inverse Relief. The text takes a raised appearance. You can change the fill colour and the border size and colour.

Shadow. The text support rectangle is displayed with a Coloured shadow. You can change the fill colour and the shadow width and colour.

ISaGRAF Enhanced 4.21 - HMI 103

Page 116: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Resizing text by dragging

Resizing text is another way of changing the font size. If the Do Not Auto Scale property is notselected, the point size of the font is changed automatically to fit the support rectangle.

1. Select the text.

2. Click and drag one of the corner handles to its new position.

The width and height of the support rectangle and the point size of the font will changesimultaneously.

104 ISaGRAF Enhanced 4.21 - HMI

Page 117: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Inserting ImagesThe HMI supports the use of images in BMP, JPG, WMF. GIF and animated GIF formats. Italso supports multimedia files in AVI format. The use of images can considerably enhance theappearance of your application, there are however two points which you must always take intoconsideration.

! Images, particularly those with large numbers of colours, use considerable amounts ofmemory.

! Images frequently use different colour palettes. If you display two or more images at thesame time with different palettes, and the graphic adapter you are using does not havesufficient colours to display them, then you will get bizarre effects with the displayedcolours changing.

Before you can insert an image you must move it to the correct directory using the Explorer oranother file management tool. The image must reside in either:

! The Bitmap directory of your project.

! The Bitmap directory of any libraries you have created

An image is inserted as a reference. That is, the image file name is inserted in the mimicdefinition file. This means that, even when it has been inserted into a mimic, Paint or any otherdrawing package may still edit an image. Any changes made will be visible the next time themimic is opened.

To insert an image

1. Click on the Image button in the Drawing toolbar.

The Insert Image window appears containing the available images and an area in whichthey can be previewed:

ISaGRAF Enhanced 4.21 - HMI 105

Page 118: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

2. Select the library in which the image is located.

3. Select the name of the required image from the list.

Note: If necessary a lexical filter may be entered to reduce the number of images displayed inthe list.

4. Click the Insert button to insert the image.

The image will be placed at the top left hand corner of the mimic.

5. Drag the image to the desired location.

Or

" Click on the name of the image in the list and drag it to the required location in themimic.

Or

" Click on the thumbnail of the selected image and drag it to the required location in themimic.

106 ISaGRAF Enhanced 4.21 - HMI

Page 119: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Transparency Property

It is possible to define one of the colours that appears in each image as transparent. That is, youcan see the background of the window or any drawing elements under it through any area ofthat colour.

1. Double-click the image to display the properties box.

2. Check the Transparent Colour box.

3. The cursor becomes a small circle.

4. Click the area of the image that contains the colour you want to be transparent.

5. Click OK.

ISaGRAF Enhanced 4.21 - HMI 107

Page 120: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using Animated GIF and AVI Files

Animated GIF or AVI files produce an animated image by playing a number of frames at apredetermined interval. The number of frames and interval is fixed when the image is designed.Images of this type have an extra tab in the properties box to control the behaviour at run-time.

Playing the file automatically

If you select the Start playing automatically property the file will play as soon as the mimic isswitched to run time.

Controlling play programmatically

You can control play using the scripting language and the PlayCondition property. Forexample using the MouseEnter and MouseLeave events you can start and stop play when thepointer moves over the image.

Controlling the number of times the file is played.

You can either chose to play the file continuously or a fixed number of times using the RepeatForever and Play properties.

108 ISaGRAF Enhanced 4.21 - HMI

Page 121: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

What happens when play stops?

If you select the Rewind when stopped property the first frame will be displayed when play isstopped, otherwise the frame displayed at the time play stops remains displayed. If the Hiddenwhen not playing property is selected the image will not be visible when it is not playing.

ISaGRAF Enhanced 4.21 - HMI 109

Page 122: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Managing Drawing ElementsFrom the Drawing toolbar, you can perform many tasks when managing drawing elements:

! Selecting Elements

! Copying and Pasting Elements

! Moving Elements

! Resizing Elements

! Aligning Elements

! Spacing Elements

! Moving Elements to the Front or Back

! Locking and Unlocking Elements

! Grouping Elements

! Rotating Elements

! Flipping Elements about their Axis

110 ISaGRAF Enhanced 4.21 - HMI

Page 123: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Selecting Elements

A drawing element must be selected before you do anything to it. You can select more than oneelement at a time. A selected drawing element is surrounded by a number of small blocksknown as handles. An anchor point, about which certain drawing elements can be rotated, isalso displayed.

To select a single drawing element

1. From the Drawing toolbar, choose Select/Resize.

2. Point to the drawing element and click.

To select many elements

1. From the Drawing toolbar, choose Select/Resize.

2. Hold down the Shift button, point to each drawing element in turn and click.

Or

1. From the Drawing toolbar, choose Select/Resize.

2. Point to one corner of an imaginary rectangle containing all the drawing elements toselect. Drag the cursor to the diametrically opposite corner and release the mouse button.All drawing elements totally or partially within the rectangular area will be selected.

ISaGRAF Enhanced 4.21 - HMI 111

Page 124: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

When selecting several drawing elements, each one is surrounded by handles with a whitecenter except for the last to be selected which has normal handles. This element is known asthe reference and in certain operations is used to provide new properties for the other elements.

! You can use the commands on the Arrange toolbar to align and arrange them

! You can drag them to a new location. Their relative positions remain the same

! You can use the cut, copy, and delete commands

! You can create a drawing group

Warning: If you click anywhere outside of one of the selected drawing elements all thedrawing elements are de-selected.

112 ISaGRAF Enhanced 4.21 - HMI

Page 125: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Copying and Pasting Elements

It is possible to make copies of a drawing or to move a drawing to a different location using theCopy or Cut and Paste commands.

To place a copy on the clipboard

1. From the Drawing toolbar, choose Select/Resize.

2. Select one or more drawing element.

3. Click on Copy on the Standard toolbar, or press Ctrl C on the keyboard.

To cut and place a copy on the clipboard

1. From the Drawing toolbar, choose Select/Resize.

2. Select one or more drawing element, or click Cut on the Standard toolbar or press Ctrl Xon the keyboard.

To duplicate

1. From the Drawing toolbar, choose Select/Resize.

2. Press and hold Control.

3. Click the drawing element and holding down the mouse button drag the cursor.

4. Release the mouse button.

A copy of the drawing element will be inserted at the cursor location.

To paste the contents of the clipboard in a window

1. Click in the window to select it.

2. Click Paste on the Standard toolbar or press Ctrl V on the keyboard.

The contents of the clipboard will be pasted in the selected window. The location will be thesame as that of the original drawing element.

ISaGRAF Enhanced 4.21 - HMI 113

Page 126: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

To paste the contents of the clipboard at a specific location

1. Click the window to select it.

2. Open the Window properties box.

3. Select the Paste here command.

The contents of the clipboard will be pasted at the current cursor position.

Note: If the clipboard contains anything other than the Supervisor’s native geometric drawingelements, the contents will be inserted as an OLE object.

114 ISaGRAF Enhanced 4.21 - HMI

Page 127: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Moving Elements

You can move or nudge single elements or groups of elements.

To move a drawing element

1. Select the drawing element.

2. Click anywhere within the drawing element and drag it to its new location.

To nudge a drawing element

1. Select the drawing element.

2. Use the arrow keys on the keyboard to move the drawing. Each press moves the drawingone pixel.

Note: You can drag the drawing element within the same, or to another window.

ISaGRAF Enhanced 4.21 - HMI 115

Page 128: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Resizing Elements

You can resize elements manually or resize them to the same width, height, or width and heightof a reference element.

To resize elements

1. To resize a drawing element

2. Select the drawing element.

3. Click and drag one of the drawing element handles to its new position. Clicking on one ofthe handles on the side of a drawing element will change its width. Clicking on one of thehandles on the top or bottom of an element will change its height. To change width andheight together, click on one of the corner handles.

Note: To resize a polygon, polyline or Bézier curve, group it, resize the group, and ungroup it.

To resize elements to the same width, height, or width and height as a reference element

1. Select all elements to be resized making sure to select the reference element last.

2. To resize the elements to the same width, from the Arrange toolbar, click .

3. To resize the elements to the same height, from the Arrange toolbar, click .

4. To resize the elements to the same width and height, from the Arrange toolbar,

click .

116 ISaGRAF Enhanced 4.21 - HMI

Page 129: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Aligning Elements

You can align elements with the left side, right side, top, or bottom of a reference element. Youcan also horizontally or vertically align the centers of elements.

To align elements

1. Select all elements to be aligned making sure to select the reference element last.

2. To align the elements with the left side, from the Arrange toolbar, click .

3. To align the elements with the right side, from the Arrange toolbar, click .

4. To align the elements with the top, from the Arrange toolbar, click .

5. To align the elements with the bottom, from the Arrange toolbar, click .

6. To horizontally align the centers, from the Arrange toolbar, click .

7. To vertically align the centers, from the Arrange toolbar, click .

ISaGRAF Enhanced 4.21 - HMI 117

Page 130: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Spacing Elements

You can evenly space elements either horizontally or vertically.

To evenly space elements

1. Select all elements to be evenly spaced making sure to select the reference element last.

2. To evenly space elements horizontally, from the Arrange toolbar, click .

3. To evenly space elements vertically, from the Arrange toolbar, click .

118 ISaGRAF Enhanced 4.21 - HMI

Page 131: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Moving Elements to the Front or Back

You can bring elements to the front or send them to the back of all others. You can also chooseto move an element in front of an element directly in front of it or behind one directly behind it.

To move elements to the front or back

1. Select the element to move.

2. To bring the element to the front of all others, from the Arrange toolbar, click .

3. To send the element behind all others, from the Arrange toolbar, click .

4. To bring the element to the front of the element directly in front of it, from the Arrange

toolbar, click .

5. To send the element behind the element directly behind it, from the Arrange toolbar,

click .

ISaGRAF Enhanced 4.21 - HMI 119

Page 132: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Locking and Unlocking Elements

A drawing element that has been locked cannot be moved or changed in any way, including itsproperties, while in Design mode. When a locked drawing element is selected, the handles willbe different than those of a normal drawing element. In the picture below, the drawing elementon the right is locked while the one on the left is unlocked.

To lock or unlock a drawing element

1. Select the drawing element.

2. To lock a drawing element, from the Arrange toolbar, click .

3. To unlock a drawing element, from the Arrange toolbar, click .

120 ISaGRAF Enhanced 4.21 - HMI

Page 133: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Grouping Elements

A drawing group is a collection of one or more drawing elements that behave as if they wereone. For example, when moving them within the window, their relative positions remain thesame although as a group they can be moved anywhere within the window. All the tools whichoperate on single drawing elements can also be used on a drawing group.

Warning: You cannot arrange or align individual drawing elements in a group.

To create a group

1. Select the drawing elements to make up the group.

2. From the Arrange toolbar, click .

To ungroup

1. Select the drawing group.

2. From the Arrange toolbar, click .

ISaGRAF Enhanced 4.21 - HMI 121

Page 134: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Rotating Elements

Rotation is the process of rotating a drawing element about its anchor point. You can rotatepolylines, polygons, and Bézier curves. You can also rotate text but only if the Do Not AutoScale property is not selected and the Regular appearance is chosen.

To rotate a drawing element

1. From the Drawing toolbar, click .

The cursor changes shape to a circle with an arrow head.

2. Click within the drawing element and drag the cursor. The angle of rotation is directlyproportional to how far you move the cursor.

3. Release the mouse button when you have rotated the drawing to its new position.

The drawing element rotates about its anchor point. You can relocate the anchor pointusing the following method.

Or

1. Open the drawing element properties box.

2. Click the down arrow button to display the advanced properties.

122 ISaGRAF Enhanced 4.21 - HMI

Page 135: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

3. Enter the angle in the Rotation Angle field. A positive number is clockwise; a negativenumber counterclockwise.

4. Click OK.

To move the anchor point

1. From the Drawing toolbar, choose Select/Resize .

2. Select the drawing element.

3. Move the cursor over the anchor point.

The cursor will change shape to an anchor.

4. Click and drag the anchor point to its new location.

ISaGRAF Enhanced 4.21 - HMI 123

Page 136: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Flipping Elements about their Axis

You can flip 1/2 ellipses, 1/4 ellipses, bitmaps, and groups of drawing elements about theirhorizontal or vertical axis.

Note: To flip a single polyline, polygon or Bézier curve, group it, flip the group and thenungroup it.

To flip drawing elements about their axis

1. Select the element.

2. To flip the element about its horizontal axis, from the Arrange toolbar, click .

3. To flip the element about its vertical axis, from the Arrange toolbar, click .

124 ISaGRAF Enhanced 4.21 - HMI

Page 137: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Reversing the Order of Points in Shapes

You can reverse the order of points in a polygon, polyline, Bézier curve or Bézier solid. Thisoption can be useful when using the Boolean graphic tools and the Path animation.

To reverse the order of points in shapes

1. Select the polygon, polyline, Bézier curve, or Bézier shape.

2. From the Arrange toolbar, click .

ISaGRAF Enhanced 4.21 - HMI 125

Page 138: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Boolean Graphic ToolsUsing the Boolean Graphic Tools you can create a new polygon drawing element using thelogical combination of two other drawing elements. The available tools are Union,Intersection, and Exclusion located on the Arrange toolbar. The new polygon is calculatedusing a mathematical model and certain rules and restrictions apply. The Boolean graphic toolssupport the following drawing elements:

! Rectangle

! Rounded rectangle

! Ellipse or circle

! 1/4 ellipse

! 1/2 ellipse

! Arc

! Pie

! Polygon

! Bézier shape

For the polygon and Bézier shapes, the mathematical model requires the selected drawing tohave a particular drawing orientation. The direction of the first point to the last point must bein an counterclockwise direction. You can then change the drawing orientation you can use theReverse tool on the Arrange toolbar.

Related Topics “Drawing a Union from Drawing Elements”, on page 127 “Drawing an Intersection from Drawing Elements”, on page 128 “Drawing an Extraction from Drawing Elements”, on page 129

126 ISaGRAF Enhanced 4.21 - HMI

Page 139: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Drawing a Union from Drawing Elements

You can create a new polygon by adding the sum of the areas of two drawing elements.

To create a polygon from the union of two drawing elements

1. Select the first drawing element by clicking on it.

2. While holding the Shift button, select the second drawing element.

3. From the Arrange toolbar, click .

A new polygon is created taking the colour from the second shape.

4. Click and drag the polygon to its location.

The original drawing elements remain unchanged.

Related Topics “Using the Boolean Graphic Tools”, on page 126

ISaGRAF Enhanced 4.21 - HMI 127

Page 140: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Drawing an Intersection from Drawing Elements

You can create a new polygon by taking the overlapping area, i.e., intersection, of two drawingelements. The two drawing elements to be used in the combination must have two intersectingpoints. If there are more than two intersections points, the combination can fail or produceunexpected results.

To create a polygon from the intersection of two drawing elements

1. Select the first drawing element.

2. While holding the Shift button, select the second drawing element.

3. From the Arrange toolbar, click .

A new polygon is created taking the colour from the second shape.

4. Click and drag the polygon to its location.

The original drawing elements remain unchanged.

Related Topics “Using the Boolean Graphic Tools”, on page 126

128 ISaGRAF Enhanced 4.21 - HMI

Page 141: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Drawing an Extraction from Drawing Elements

You can create a polygon by subtracting the overlapping area of one drawing element from theother.

To create a polygon from the extraction of an area of an element

1. Select the first drawing element.

2. While holding the Shift button, select the second drawing element.

3. From the Arrange toolbar, click .

A new polygon is created taking the colour from the second shape.

4. Click and drag the polygon to its location.

The original drawing elements remain unchanged.

Related Topics “Using the Boolean Graphic Tools”, on page 126

ISaGRAF Enhanced 4.21 - HMI 129

Page 142: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Advanced PropertiesMost of the drawing elements support additional advanced properties that are not normallydisplayed in the properties box. To display the advanced properties you can either:

! From the Display menu, select Advanced Mode. The advanced properties appear everytime you display a drawing element’s properties.

! Click the down arrow button at the bottom of a property box. The box will change toshow the advanced properties for that specific drawing element.

130 ISaGRAF Enhanced 4.21 - HMI

Page 143: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Placing a Drawing Element in a Specific Display Layer

Each window contains 16 display layers. At run-time, you can select the layers that appeareither manually, using the Layer toolbar, or automatically according to defined criteria (thecurrent user, process conditions etc.) The layers are completely independent of one another andyou can choose to display one or more layers at any one time.

Each drawing element can be assigned to one or more layer. Any drawing elements notallocated to the selected layers are not visible in the window.

By default, when a window is created, it displays all layers. Likewise, when a drawing elementis created, it is allocated to all layers. Therefore, if you do not intend to use layers, there isnothing to do.

To allocate a drawing element to specific layers

1. Open the drawing element properties box.

2. Click the down arrow button to display the advanced properties.

3. Select/deselect layers using layer buttons (from 0 to 15).

4. Click OK.

ISaGRAF Enhanced 4.21 - HMI 131

Page 144: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Binding the Display of a Drawing Element to a Zoom Threshold

The visibility of drawing elements can be bound to a zoom range, that is, if the window iszoomed to a level outside of that range, the drawing will not be visible.

The main use of this technique is to declutter large or complex windows. For example, if youhave a window that is 1600 x 1200 pixels in size, you might move around it using the scrollbars. You can also zoom out so that the entire mimic is visible. In this case, you may now haveso much activity on the screen that the most important information is no longer obvious. Bybinding some of the drawing elements so that they can only be seen between 0 and 100(normal) view, you can automatically reduce the amount of information visible so that the mostimportant information is easily seen.

To lock the visibility of a drawing element to a zoom threshold

This command allows you to choose and lock a convenient zoom threshold for your drawingelement.

1. Select the drawing element properties box.

2. Click the down arrow button to display the advanced properties.

3. Enter the minimum and maximum zoom level (range 0 to 6400%).

4. Click OK.

132 ISaGRAF Enhanced 4.21 - HMI

Page 145: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

AnimationAnimation is the process by which a drawing element is given the capability of interacting withthe operator either visually, using the keyboard and mouse, or both. There are three distincttypes of animation, however, the principle of applying them is all the same:

Related Topics “Animation Toolbar”, on page 22

ISaGRAF Enhanced 4.21 - HMI 133

Page 146: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

BasicsThere are three distinct types of animation, although the principles behind them are the same:

! Property animations connect a visual property of a drawing element to the database. Atrun-time, the appearance of the drawing element changes in real time according to thedatabase and the animation you have applied to it. Most of the time you will be usinganimation to display the real-time value of variable but it can also be used to display theresult of an expression, an attribute (such as a variable’s domain), or context information(such as the current database branch).

! Control Zone animations create an area in a window from which an operator can interactwith the application using the keyboard and mouse. Control zones allow the operator tochange the value of variables, open and close windows, run programs, send recipes etc.

! Macro animations create more complex displays such as Trend Charts

Applying Animations

The principle behind applying animations is the same for all types. The following example isfor applying a Colour on Bit animation to a text string.

To apply an animation

1. Open the window to be animated and select Design mode.

2. Select the drawing element you wish to animate. A Colour on Bit animation can beapplied to all drawing elements except bitmaps and pre-animated objects.

3. Select Colour on Bit from the toolbar or Animation submenu.

The Drawing properties Box appears with the Colours Bit tab.

134 ISaGRAF Enhanced 4.21 - HMI

Page 147: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

4. Type in the name of the bit, or use the Variable Browser. (You can access the VariableBrowser by clicking the button adjacent to the Bit field. See the section on usingvariables in an animation for more information.)

5. Check the boxes corresponding to the state of the bit and the property it is to affect. Thetab with the paint can symbol is for the background of the text; the tab with the pen forthe text itself.

6. Select the colours corresponding to state of each selected property. Blinking andtransparent colours can be used. (For further information on selecting colours, see thesection on Drawing.)

7. Click OK.

Applying Multiple Animations

Sometimes it is necessary to apply more than one animation to a drawing element. There areno restrictions placed on this, but before you do this you should take into account the followingpoints:

! Before applying more than one animation, double check that one of the standardanimations will not meet your requirements. Many of them support combinationanimation using two or more database variables.

ISaGRAF Enhanced 4.21 - HMI 135

Page 148: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

! There is no way to prioritize animation. For example, if you apply two Colour on Bitanimations to the same property, the most recent bit change will provide the colour.

! Animations are only refreshed when the value of the attached variable changes.

! When applying multiple animations each animation will have its own tab in the drawingproperties box.

Removing Animations

To remove an animation without deleting the support drawing element

1. Access the properties box for the drawing element.

2. Select the tab for the animation to be deleted.

3. Click the Trash Can.

4. Click OK.

136 ISaGRAF Enhanced 4.21 - HMI

Page 149: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

OPC Server Variables in Animations

When using an OPC variable in animation, you enter its name (as it is known in the server),preceded by the name of the cluster, and a colon. If you know the name, you can type it directlybut it is normally easier to use the Variable Browser to select the name from the server's list.The following are examples of valid variable names:

Cluster1:Process.Engine1.Compressor1.B1

Cluster1:Process.Engine1.Compressor1.A1

Applicom:CARD1.DATABASE.B1

Data:Node1.DataTable3_256

Simu:Simulation.Square Waves.Int4

C1:B1

For more information, see “OPC Variable Browser”, on page 244.

Using Relative Referencing

If the animation is in a window that has been opened with a branch (for example,Cluster1:Process.Engine1), you can use relative referencing. With relative referencing,each variable reference uses only part of the variable name. For example, you might use thename Compressor1.B1. The other part of the variable name is supplied by the branch of thewindow. The variable names are automatically calculated at run-time by joining the branchwith the relative name in the animation.

When using the Variable Browser to select a variable in a window with a branch, itautomatically selects the correct part of the variable name for you. For example, if the windowwas opened with the branch Cluster1:Process.Engine2 and you selected the variableCluster1:Process.Engine2.Compressor1.B1, it would insert Compressor1.B1.

ISaGRAF Enhanced 4.21 - HMI 137

Page 150: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Forcing Direct Referencing

Sometimes you need to refer to a variable with a different branch (or no branch at all) in awindow that has been opened with a branch. To do this, you use direct referencing where thevariable name is preceded by the @ character. For exampleApplicom:@CARD1.DATABASE.B1. When using direct referencing, the same variable isalways referred to, no matter what branch the window is opened with. If you use the VariableBrowser to select the variable, the @ character is inserted automatically when you select avariable with a different branch than that of the window.

Errors When Selecting Variables

The following error symbols may appear adjacent to the support drawing element whenselecting a variable for an animation.

The HMI has been unable to start the referenced OPC server.

The variable does not exist in the referenced OPC server

The HMI is waiting for the real time value of the variable. This symbol sometimes appears briefly when a window is first opened if the server has not been previously started.

138 ISaGRAF Enhanced 4.21 - HMI

Page 151: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring Register Limits

Many of the animations that display the value of a register require a minimum and maximumvalue for the register to be entered. These are used by the HMI when filling a shape, positioninga drawing on the screen etc.

By default, the values are set to Auto. This means that the HMI will attempt to get them fromthe variable definition in the server. If the range of the variable in the server changes, allanimations linked to it automatically follow without the need to change the animation.

If the server does not support the maximum and minimum properties, or if you want to use adifferent value, there are two other options accessed by clicking the buttons adjacent to thebound fields.

Enables you to enter a fixed value for the minimum and maximum bounds.

Enables the bounds to be defined by the real-time value of another register in the server. The variable browser is displayed to allow selection of the variable name.

ISaGRAF Enhanced 4.21 - HMI 139

Page 152: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Custom Output Formats

Custom output formats are used in animations that display the value of a register.

! Register Display and Register Display with Colour on Bits

! Send Register Value

They are also used when formatting the numbers displayed on the axis of the Legend Display.

! Entering a Custom Output Format

! General Formatting Characters

! Numeric Formatting Characters

! Time and Date Formatting Characters

! Using Conditional Formats

To enter a custom display format

! Select the down arrow button adjacent to the format field in the animation tab and selectthe custom option

The custom format box appears. Here, you can enter the format characters.

140 ISaGRAF Enhanced 4.21 - HMI

Page 153: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

It is also possible to use custom formats when inputting a value.

Entering a Custom Output Format

To enter a custom output format

1. Select the down arrow button adjacent to the format field

2. Select the Custom option.

The Custom Format box appears.

3. Type the format in the Output Format field, or select one of the examples using the buttonadjacent to the field.

ISaGRAF Enhanced 4.21 - HMI 141

Page 154: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

4. If you are displaying a time and date, select the received input units.

5. Click OK.

General Formatting Characters

The HMI uses specific characters for general formatting:

Numeric Formatting Characters

The HMI uses specific characters for numeric formatting:

"" Display the string inside the double quotation marks. \ Display the following character literally. Do not interpret it as a formatting

character. ; Separator character. The characters on the left of the semicolon are used to

format the value if it is positive and those to the right are used if it is negative.

0 Digit placeholder. Display a digit or a zero. If the expression has a digit in the position where the 0 appears in the format string, display it; otherwise, display a zero in that position. If the number has fewer digits than there are zeros (on either side of the decimal) in the format expression, display leading or trailing zeros.

# Digit placeholder. Display a digit or nothing. If the expression has a digit in the position where the # appears in the format string, display it; otherwise, display nothing in that position.

. Decimal placeholder. The decimal placeholder determines how many digits are displayed to the left and right of the decimal separator.

% Percentage placeholder. The expression is multiplied by 100. The percent character % is inserted in the position where it appears in the format string.

~ Displays the absolute value (unsigned). , Thousand separator. The thousand separator separates thousands from hundreds

within a number that has four or more places to the left of the decimal separator.

142 ISaGRAF Enhanced 4.21 - HMI

Page 155: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Time and Date Formatting Characters

When displaying a register in time or date format, you specify the display format and the rawinput format. For example, you could display a value as years, months, and days and the rawinput in hours. The character specifying the input format is placed to the right of the otherformatting characters separated by the @ character. The default unit of measure, if one is notassigned, for the raw input is in milliseconds. The time display is calculated using the numberof raw input units since January 1st 1970.

You can also display time information as a duration by enclosing the format characters withsquare brackets. For example, the raw input could be in minutes and you can display thenumber of days it represents.

ll Milliseconds with non-significant zeros (000 to 999). l Milliseconds without non-significant zeros (0 to 999). ss Seconds with non-significant zeros (00 to 59). s Seconds without non-significant zeros (0 to 59). nn Minutes with non-significant zeros (00 to 59). n Minutes without non-significant zeros (0 to 59). hh Hours with non-significant zeros (00 to 23). h Hours without non-significant zeros (0 to 23). dd Days with non-significant zeros (01 to 31). d Days without non-significant zeros (1 to 31). ww Week of the year (1 to 54). w Day of the week (1 representing Sunday to 7 representing Saturday). mm Month with non-significant zeros (01 to 12). m Month without non-significant zeros (1 to 12). yyy Year as four digits (1970 to 2038). yy Year as two digits (70 to 38). : Separator for use between time elements. / Separator for use between date elements. @l Use milliseconds as the raw input.

ISaGRAF Enhanced 4.21 - HMI 143

Page 156: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Examples of time and date formatting

With a value of 934999200 seconds the formatted output will be:

19:00:00 18/08/1999 for a format of h:nn:ss dd/mm/yyy@s

Day 230 of Year 99 for a format of "Day" y of \year yy@s

Using Conditional Formats

You can configure the format so that it is conditional on the value of the raw variable. In thiscase the syntax of the format is as follows:

[Expression1]Format1;[Expression2]Format2;[Expression3]Format3]....;[Expression N]FormatN

You can also enter two format strings separated by a semicolon but without conditionalexpressions. In this case, the format on the left will be used for positive numbers and the oneon the right for negative numbers.

@s Use seconds as the raw input. @n Use minutes as the raw input. @h Use hours as the raw input. @d Use days as the raw input. @m Use months as the raw input. @y Use years as the raw input.

144 ISaGRAF Enhanced 4.21 - HMI

Page 157: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Expressions in Animations

Instead of using a variable name in animation, it is possible to use an expression containingoperators, functions, and variables.

The expression can be entered directly into the field normally used for the variable name, or itcan be entered using the Expression Manager in which case a mnemonic referring to theexpression model is entered in the variable field. An expression is differentiated from avariable name by immediately preceding it with an equal sign (Use no spaces).

Note: Expressions cannot be used in an animation where an operator enters a value or in aTrend Display.

For further information on the syntax of expressions, see the Expression Manager topic.

ISaGRAF Enhanced 4.21 - HMI 145

Page 158: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Substitution Strings in Animations

Substitution strings are used to provide context-sensitive information to an animation. Unlikeusing a variable name, the information passed to the animation does not change according to avariable value, instead it reflects a parameter of the current environment. The following tablelists the available substitutions and the animations in which they can be used:

You can configure the format so that it is conditional on the value of the raw variable. In thiscase the syntax of the format is as follows.

[Expression1]Format1;[Expression2]Format2;[Expression3]Format3]....;[ExpressionN]FormatN

You can also enter two format strings separated by a semicolon but without conditionalexpressions. In this case, the format on the left will be used for positive numbers and the oneon the right for negative numbers.

String Substitutes Use in animation * Name of the current window or branch depending

on the context. Link - open and Link - close. Send - program.

#W

#WB

#B1 to #B6.

#S1 to #S6

Name of the current window.

Current window branch.

Elements of the current window branch.

Elements of the object branch.

Link - open and Link - close. Link - send program. Format string in Text on bit.

#P

#M1 to #M10

Name of previous window

Window names in window chaining choices.

Link - open and Link - close.

146 ISaGRAF Enhanced 4.21 - HMI

Page 159: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Attaching Quality Sequences to Animations

To attach quality sequences to an animation

1. Display the properties box for the drawing element then select the Animation tab.

2. Click Advanced Properties to display the Sequence selection drop down list box.

3. Select the required sequence then click OK.

Related Topics “Quality Sequences”, on page 229

ISaGRAF Enhanced 4.21 - HMI 147

Page 160: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Property AnimationYou can use the status of bits and the value of register variables as the source of a colourchange.

All colour animations allow you to independently change both the border and pattern(background and characters for text) of a drawing element, giving a wide range of colourcombinations. You can use the blinking and transparent options in your choice of colours. Allanimations include the capability to select a special colour to be used whenever any of thevariables are invalid (for example when communication has failed).

148 ISaGRAF Enhanced 4.21 - HMI

Page 161: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing Colour

Changing the colour of a drawing element is one of the simplest and most commonly ways of present processing information to the user. You can use the status of bits and the value of reg-ister variables as the source of a colour change.

All colour animations allow you to independently change both the border and pattern(background and characters for text) of a drawing element, giving a wide range of colourcombinations. You can use the blinking and transparent options in your choice of colours. Allanimations include the capability to select a special colour to be used whenever any of thevariables are invalid (for example when communication has failed).

! Visual Effects

! Colour Properties Tab

! How Many Colours Can I Select?

! Colour Animations and Behaviour

! Thresholds Used in Colour Register Value

Visual Effects

Each type of colour animation allows you to independently change the colour of both thepattern and border of the drawing.

For the Pattern property

Patterns are repeated motifs that can be used to add texture to your animations:

! For a drawing with a solid or coloured button style the whole of the pattern area changes.

! For a drawing with a hatched pattern, only the colour of the hatching changes.

! For text the colour of the background changes.

! There is no effect on lines or polylines.

ISaGRAF Enhanced 4.21 - HMI 149

Page 162: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

For the Border property

You can change the appearance of the outlines of your animations:

! For a geometry (rectangle, ellipse etc.), the border changes colour.

! For a line or polyline the whole line changes colour.

! For text, the characters change colour.

Colour Properties Tab

Each colour change animation is represented by a tab in the Properties box of the drawing.Although the appearance of the tab will vary depending on the type of colour animation chosen,all will contain two common symbols representing the pattern and border properties.

Using the Colour Palette to Select the Colours

The dynamic colours used in an animation are selected using the colour palette in the same wayas when you colour a static drawing element. You can use single, blinking, and transparentcolours.

150 ISaGRAF Enhanced 4.21 - HMI

Page 163: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Specifying a Colour for Invalid Status

On all the colour animations, you have the option to select a colour that will be displayed whenany of the variables used becomes invalid. A variable can become invalid for a variety ofreasons, the most common being loss of communication to external equipment such as a PLCor RTU.

It is recommended that you make use of this option. If you do not, when a variable becomesinvalid, the animation will display the colour representing the last valid value of the variable.As a consequence, the user may not be aware that the displayed information may be out of date.

How Many Colours Can I Select?

The number of colours that you can select depends on the animation chosen. You do not haveto use all of the colours. For example, the animation Colours Bit Group allows you to select upto 16 colours using four bits, but you could use it to select just four colours using two bits.However, whichever animation you choose, you must select at least two of the availablecolours as the transition to or from an unselected state is not recognized.

Colour Animations and Behaviour

You can apply various properties to your animations according to their types.

Animation Behaviour Bit Selection of two colours according to the status of a single bit. Bit group Selection of 16 colours according to the binary combination of up to

four bits. Alarm Selection of five colours according to the five states of an alarm.

(Off, On - Nack, On - Ack, Off - Nack, Inhibited). If you select the Static option the colours used are those you specify in the animation. If you select the Dynamic option the colours are taken from the preferences for the appropriate alarm level. Changing the preferences will change the colours displayed in the animation.

Bit & Alarm Selection of eight colours according to the binary combination of the two states of a bit and four states of an alarm.

ISaGRAF Enhanced 4.21 - HMI 151

Page 164: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Thresholds Used in Colour Register Value

In the animation Colour - Register Value, you select a register and enter up to eight thresholdvalues and corresponding colours. The threshold values must be in ascending order. Eachthreshold determines the point at which a colour change takes place. This is best explained withan example:

Threshold 1 = 10 Colour = Blue

Threshold 2 = 15 Colour = Green

Threshold 3 = 20 Colour = Yellow

Threshold 4 = 30 Colour = Red

Reg. out of range Colour = White

A register value of less than 10 will display blue.

A register value of 10 or greater but less than 15 will display green.

A register value of 15 or greater but less than 20 will display yellow.

A register value of 20 or greater but less than 30 will display red.

Register bit Selection of two colours using a bit masked from a register with a binary rank. For example if you use the third bit, when the binary representation of the register is xxxxxxxxxxxx1xx the colour selected for 1 will be displayed. When the binary representation of the register is xxxxxxxxxxxx0xx the colour selected for 0 will be displayed.(x = either 1 or 0).

Weighted bits Similar to above except that the value is calculated by adding the values of eight weighted bits. Bit 1 = 1, Bit 2 = 2, Bit 3 = 5, Bit 4 = 8 etc. For example 000010001 = 17. This animation is generally used with binary encoded transducers

Register value Selection of up to eight colours according to value of a single register. See the section on Understanding Thresholds for an explanation of Threshold operation.

152 ISaGRAF Enhanced 4.21 - HMI

Page 165: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

A register value of 30 or above will display white.

If the Reg. out of range option is not selected then a register value of 20 or greater will displayred.

ISaGRAF Enhanced 4.21 - HMI 153

Page 166: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Displaying Messages and Labels

Messages and labels provide real-time textual information to the user.

Both the Message and Label animations use a text field as the support drawing element. Thetext field provides font, colour, and style (inverse, button etc.) properties.

Message Animation

Message animation displays the contents of text variable. The most common use of this is todisplay the time, date, and user name. Other uses include operator prompts, warning messages,and status information.

When using the Message animation, it is normal to select the Do Not Auto Size property of thesupport text field. If unselected, the length of the field will dynamically change at run-timeaccording to the number of characters displayed. This can give an odd effect if you are using astyle that displays a background colour, such as Inverse or Button.

If you need to display very long messages, you can select the Multiline property in the supporttext field. The message can be displayed on a number of lines, automatically broken at the mostconvenient white space.

Label Animation

The Label animation displays text associated with a bit variable. You can display:

! The variable’s associated label

! A variable’s item description

! Context-sensitive information such as the name of the window in which the animationresides, the branch of an object etc.

Displaying Associated Labels

When using a bit, an associated label is a pair of strings, one string is displayed when the bit isoff, the other when the bit is on. If the bit has not been attached to an associated label, then thedefault strings of Animation 0 and Animation 1 will be displayed.

154 ISaGRAF Enhanced 4.21 - HMI

Page 167: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Displaying a Variable's Title

If you choose the option to display the variable's title but it does not have one, then the variablename will appear instead. A variable's title is bilingual, so if you change the language for theproject you must ensure that you have a title in the appropriate language.

Displaying Context-Sensitive Information

To display context-sensitive information, you must select the Format option button and thenenter a substitution string in the field provided. The substitution string determines what isdisplayed in the label. The following options are available:

You can combine substitution strings and use other characters that appear literally.

Compatibility Note

In the animation toolbox and menu, you will find Message – Bit and Label – Bit animations,in addition to the standard Message and Label animations. These create a Colour on Bitanimation at the same time as the Message or Label (See the section on Changing Colour fordetails). They are provided for compatibility with earlier versions of the software where it wasonly possible to attach one animation to each drawing element.

Using these animations is exactly the same as applying a Message (or Label) plus a Colour -Bit to the same drawing element.

String Substitutes #W The name of the current window. #WB The current window branch.

#B1 to #B6. Elements of the current window branch. #S1 to #S6 Elements of the object branch.

ISaGRAF Enhanced 4.21 - HMI 155

Page 168: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Displaying a Register as a Numeric Value

There are two animations which display a register as a numeric value known as Register andRegister & Bits. The animation Register & Bits is provided for compatibility with earlierversions of the software. Both animations use a text field as the support. The text field providesthe font, colour, and the style properties.

Selecting display format

The display format is selected using the format field in the Display Register tab.

Compatibility Note - Register & Bits

The animation value - Register & Bits allows you to display a register and change its colourusing a combination of up to four bits (two for the text colour and two for the backgroundcolour). It is provided for compatibility with earlier versions of the software. Its functions aresimilar but not identical to the Text - Register plus Colour – Four Bits animations on the samedrawing.

Selects either the auto or custom formats.

Allows the format to be supplied by a variable in the server.

156 ISaGRAF Enhanced 4.21 - HMI

Page 169: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Displaying a Register as a Bargraph

Using a bargraph, the value of a register is represented by filling one of the solid drawingelements. You can apply a bargraph to a rectangle, rounded rectangle, ellipse, and polygon.The fill is calculated using the value of the variable with respect to its range and the height (orwidth) of the drawing element. In the case of a polygon, the fill does not take into account theoccupied area.

Configuring the style

The colour of the bar and the background are specified by the configuration of the animation.However the style of the bargraph is inherited from the support drawing element. For example,the bargraph can appear in relief or as a coloured button.

Configuring the display bounds

The minimum and maximum bounds are the values representing 0% and 100% fill of thebargraph. By default the bounds are set to Auto. This means that the HMI will attempt to getthe bounds for the variable from the OPC server. If the range of the variable in the OPC serverchanges, all animations linked to it using the Auto bound will automatically follow without theneed to change the animation.

If the server does not support variable bounds or if you want to use a different value, there aretwo other options accessed by clicking the buttons adjacent to the bound fields.

Clicking this button allows you to enter a fixed value for the minimum and maximum bounds. Clicking this button allows the bounds to be defined by the value of another register in the server. The variable browser is displayed to allow selection of the variable name.

ISaGRAF Enhanced 4.21 - HMI 157

Page 170: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring the fill direction

The animation properties allow you to enter the range of the variable for the fill, as a minimumand maximum, and the fill direction. You can fill from the bottom, top, left or right.

Changing the Bargraph Colour

You can change the colour of the bargraph bar at run-time using a threshold system controlledby up to four bits. To display the threshold properties, click the down arrow button at thebottom of the bargraph tab.

The way in which the bits affect the colour of the bargraph depends on which of the threethreshold systems is selected. In the explanation below, the threshold name corresponding tothe bit is used:

158 ISaGRAF Enhanced 4.21 - HMI

Page 171: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

hihi, high, low, lolo

If hihi is 1 thenUse the colour for hihiElse if high is 1 then

Use the colour for highElse if lolo is 1 then

Use the colour for loloElse if low is 1 then

Use the colour for lowElse the colour is not changed.

ppphigh, pphigh, hihi, high

If ppphigh is 1 thenUse the colour for ppphighElse if pphigh is 1 then

Use the colour for pphighElse if hihi is 1 then

Use the colour for hihiElse if high is 1 then

Use the colour for highElse the colour is not changed.

low, lolo, pplow, ppplow

If ppphigh is 1 thenUse the colour for ppphighElse if pphigh is 1 then

Use the colour for pphighElse if hihi is 1 then

Use the colour for hihiElse if high is 1 then

Use the colour for highElse the colour is not changed.

ISaGRAF Enhanced 4.21 - HMI 159

Page 172: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Exchanging Objects

Simple changes in process status can be indicated by change of colour. For example, a pumpcan be displayed in green when it is running, red when it is stopped, and blue when faulty. Insome cases however, changing colour is not adequate.

Consider the case where a float switch is to be displayed. The requirements are that it shouldappear horizontal when its corresponding bit in the database is true and at an angle of 45o whenthe bit is false. This can easily be achieved by creating two objects, each representing one ofthe conditions, and exchanging them depending on the state of the database bit. In practice,exchanging objects can create many visual effects.

! Object Animations and Behaviour

! Exchanging Bitmaps

! Anchor Points

! Using Objects With a Branch

! Specifying an Object for Invalid Status

Object Animations and Behaviour

You can apply various properties to your animations according to their types.

Animation BehaviourBit Selection of two objects according to the status of a bit. A third

object can be selected to represent the invalid state.Bit group Selection of up to 16 objects according to the binary combination of

up to four bits. An additional object can be specified that will be displayed if any of the bits are invalid.

Alarm Selection of four objects according to the 4 states of an alarm. (Off, On – Nack, On - Ack, Off - Nack). A further 4 objects may be selected to represent the various invalid conditions that an alarm may take.

160 ISaGRAF Enhanced 4.21 - HMI

Page 173: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Exchanging Bitmaps

Sometimes it is necessary to exchange bitmaps. To do this, objects are created, each onecontaining one of the bitmaps. The bitmaps can now be exchanged by exchanging the objects.

Anchor Points

When exchanging objects, the support drawing element is always another object, normally oneof those used in the animation. The location of all objects used in the animation is determinedby aligning their anchor points with that of the support object.

Using Objects With a Branch

If the objects being displayed contain animations which use relative variable referencing, abranch must be supplied. The branch can be entered directly, by using the branch selector, orby using substitution characters. For further information, see the topic on An Introduction toAnimation. For further information on objects see the topic on Creating and Using Objects.

Specifying an Object for Invalid Status

On all the object animations, you have the option to select a special object that appears whenany of the variables used becomes invalid. A variable can become invalid for a variety ofreasons, the most common being loss of communication to external equipment such as a PLCor RTU.

Register bit Selection of two objects by a bit masked from a register using a binary rank. For example if you use the third bit, when the binary representation of the register is xxxxxxxxxxxx1xx the object selected for 1 will be displayed. When the binary representation of the register is xxxxxxxxxxxx0xx the object selected for 0 will be displayed.(x = either 1 or 0). A third object can be selected to represent the invalid state.

Register value Selection of eight objects according to up to eight thresholds applied to a register. An additional object can be selected to represent the invalid state. See the section on changing colour for an explanation of threshold operation.

ISaGRAF Enhanced 4.21 - HMI 161

Page 174: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

It is highly recommended that you make use of this option. If you do not, when a variablebecomes invalid the animation will display the object representing the last valid value of thevariable. As a consequence, the user will be unaware that he may be viewing out of dateinformation.

162 ISaGRAF Enhanced 4.21 - HMI

Page 175: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Legend Animation

Legend animation automatically creates a numeric scale that can be used in conjunction withbargraph or position animation to provide the user with an indication of the value. Legendanimation uses a rectangle as the support drawing element. The rectangle provides size of thelegend, the colour of the background, and the colour and width of the lines.

The advantage of using the Legend over a fixed scale drawn manually is that the Legend canbe configured to get the maximum and minimum value for the scale from a variable. If therange of the variable changes, the Legend follows automatically.

ISaGRAF Enhanced 4.21 - HMI 163

Page 176: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring the Scale Appearance

The number of primary and secondary divisions that appear on the scale can be selected usingone of three methods:

! Auto – The HMI decides on the number of divisions using a built-in algorithm.

! Units – The number of primary divisions is calculated using the range of the scale dividedby the number entered in the primary field. For example, using a minimum of 0, amaximum of 100 and a primary unit of 25, there would be four primary divisions. Thenumber of secondary divisions per primary division is calculated using the numberentered in the primary field divided by the number in the secondary field. For example,using a primary unit of 25 and a secondary unit of 5, there will be five secondarydivisions.

! Count – The number entered in the primary field is the number of primary divisions. Thenumber entered in the secondary field is the number of secondary divisions per primarydivision.

The direction of the scale is selected using the direction command buttons. If one of thehorizontal options is selected, the text is rotated so that it reads from bottom to top.

164 ISaGRAF Enhanced 4.21 - HMI

Page 177: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

The format of the scale number is selected using the standard output formatting characters.

Selecting the Scale Range

The maximum and minimum values on the scale range is set to Auto by default. This meansthat the HMI will attempt to get them from the register definition in the server.

If the server does not support the maximum and minimum properties or if you want to use adifferent value, there are two other options accessed by clicking the buttons adjacent to themaximum and minimum fields.

Clicking this button allows you to enter a fixed value for the minimum and maximum bounds. If you select a fixed value, then it is not necessary to select a register name.Clicking this button allows the minimum and/or maximum to be defined by the real-time value of other register(s) in the server. The variable browser appears to allow selection of the variable name.

ISaGRAF Enhanced 4.21 - HMI 165

Page 178: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Position AnimationPosition animation allows you to move, rotate, and change the size of drawing elements atrun-time, according to the value of one or more register variables.

In addition, the position animations allow you to set the value of one or two registers by usingthe cursor to drag a drawing element.

166 ISaGRAF Enhanced 4.21 - HMI

Page 179: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Rotation

When using the rotation animation the value of a register is represented by angular movement.A typical example of its use is to move the needle in a simulation of an analogue meter. Youcan apply rotation to all drawing elements except text and images.

ISaGRAF Enhanced 4.21 - HMI 167

Page 180: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Specifying the Rotation Scale

The angle through which the drawing rotates is defined by specifying a minimum andmaximum value for the register together with their corresponding angles. The rotation anglestarts at zero degrees for no rotation and is clockwise for increasing values of angle. You mayspecify positive and negative values for both the value and angle. Rotation takes place aboutthe drawing’s anchor point. The following are two examples of different rotation scales andthe effect on the drawing element:

Note: Register values less than the minimum are treated the same as a minimum value. In thefirst example above, a value of -10 would result in a rotation of 00. Register values greater thanthe maximum are treated the same as a maximum value. In the first example above, a value of200 would result in a rotation of 900. If the register is invalid, the rotation angle is the same asfor the minimum value.

Minimum value = 0

Maximum value = 100

Minimum angle = 00

Maximum angle = 900 With a value of 0, the drawing will remain in its original position.

With a value of 50, the drawing will rotate clockwise 450.

With a value of 100, the drawing will rotate clockwise 900.

Minimum value = 0

Maximum value = 100

Minimum angle = 00

Maximum angle = -900 With a value of 0, the drawing will remain in its original position.

With a value of 50, the drawing will rotate counterclockwise 450.

With a value of 100, the drawing will rotate counterclockwise 900.

168 ISaGRAF Enhanced 4.21 - HMI

Page 181: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Scaling

When using the scaling animation, the value of a register is represented by changing the sizeof a drawing. You can scale a drawing in both the X and Y axes. Scaling can be applied to alldrawing elements, although there are some limitations when using it with text.

The scaling for the drawing is defined by specifying minimum and maximum values for theregister together with corresponding scale ratios. You can specify different scaling for the Xand Y dimensions if required. At run-time, the drawing is scaled around the anchor point.

Note: When scaling text, the Do Not Auto Size property must be selected.

ISaGRAF Enhanced 4.21 - HMI 169

Page 182: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Single-Axis Positioning

Single-axis positioning is used to move a drawing according to the value of a register. Single-axis positioning can be applied to all drawing elements.

The drawing movement is along an (imaginary) straight line between two points on the screen.The co-ordinates for the start of the line is supplied by the position of the support drawingelement. The co-ordinates for the end of the line is the position of the support drawing elementplus the values of the X and Y axis movement properties.

The X and Y axis movement properties can be positive or negative. Positive X axis valuescause movement from the left to the right of the screen. Positive Y axis values cause movementfrom the top to the bottom of the screen.

The start and end point values can be any value within the range of the selected register. Thestart value can be less than or greater than the end value.

It is possible to create movement in both axes.

Using the Cursor Behaviour Property

If the Cursor Behaviour property is selected, the user is able to click and drag the drawingelement to set the value of the register. This is used to create what is commonly known as aslider control.

170 ISaGRAF Enhanced 4.21 - HMI

Page 183: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

If the Direct Send property is selected, the value of the register is changed as the drawing isdragged. If the Direct Send property is not selected, the value is only set when the mouse buttonis released.

ISaGRAF Enhanced 4.21 - HMI 171

Page 184: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Two-Axes Positioning

Two-axes positioning is used to move a drawing according to the value of two registers.Two-axes positioning can be applied to all drawing elements.

The drawing movement is within an imaginary rectangle. One corner of the rectangle is definedby the position of the support drawing element. The opposite corner is defined by the positionof the support drawing element plus the X and Y axis movement properties.

The X and Y axis movement properties can be positive or negative. Positive X axis valuescause movement from the left to the right of the screen. Positive Y axis values cause movementfrom the top to the bottom of the screen.

The start and end point values can be any value within the range of the selected registers. Thestart value can be less than or greater than the end value.

172 ISaGRAF Enhanced 4.21 - HMI

Page 185: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Cursor Behaviour Property

If the Cursor Behaviour property is selected, the user can to click and drag the drawing elementto set the value of the registers.

If the Direct Send property is selected, the value of the registers is changed as the drawing isdragged. If the Direct Send property is not selected, the value is only set when the mouse buttonis released.

ISaGRAF Enhanced 4.21 - HMI 173

Page 186: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Free Positioning

Free positioning is used to move a drawing according to the value of two registers. Freepositioning can be applied to all drawing elements.

The position of the anchor point of the drawing element on the screen in pixels is taken fromthe value of the X and Y registers. (The position of the anchor point relative to the drawingelement remains unchanged.) The initial position of the drawing element is not taken intoaccount.

174 ISaGRAF Enhanced 4.21 - HMI

Page 187: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Path

The path animation allows you to move a drawing element along a path defined by a polyline,polygon, Bézier curve or Bézier shape. The path animation may be applied to any drawingelement or symbol.

Note: The animation is applied to the drawing that is to move, not to the drawing elementproviding the path.

Warning: The animated drawing and the drawing providing the path must both belong to thesame depth from a grouped point of view. That is, if the drawings are grouped, they must bothbe in the same group.

ISaGRAF Enhanced 4.21 - HMI 175

Page 188: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

How the Animated Drawing Moves

The range of register values over which the drawing moves is divided equally by the numberof segments in the drawing providing the support path. For example, if the range is 0 to 100and there are 5 segments in the path drawing, the animated drawing will move along the firstsegment from 0 to 19, the second segment from 20 to 39 etc. The length of the segments is nottaken into account and so if the segments are of different lengths the drawing will appear tomove faster and slower as it moves along the different segments.

At run time, when the register is at the start point value, the anchor point of the animateddrawing element is located at the start position (X and Y in the drawing properties box) of thepath drawing. The location of the animated drawing element in design mode has no relevance.

If the Curved property is enabled, the animated drawing will rotate according to the angle ofthe segment it is following.

Using the Cursor Behaviour Property

If the Cursor Behaviour property is selected the User is able to click and drag the drawingelement to set the value of the register.

If the Direct Send property is selected the value of the register is changed as the drawing isdragged. If the Direct Send property is not selected the value is only set when the mouse buttonis released.

Drawing Restrictions

The animated drawing and the drawing providing the path must both belong to the same depthfrom a grouped point of view.

176 ISaGRAF Enhanced 4.21 - HMI

Page 189: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Mimic AnimationYou can apply the Link Open or Link Close animations to any drawing element in your mimicthough they are normally applied to text. This option allows you to control opening and closingbehaviours of elements in a designated mimic. You can also apply Hyperlink or Regionanimations to mimics.

ISaGRAF Enhanced 4.21 - HMI 177

Page 190: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Link Open Animation

Link Open animation can be applied to any drawing element although normally it is applied toa text string with the text used as an indicator to the Operator.

You can select the window to be opened using the Window drop down list box.

! Relative or Absolute Opening Positions

! Opening a Mimic with a Branch

! Opening a Child Mimic

! Substitution Characters

The name of the mimic to be opened is selected using the Mimic drop-down list box.

178 ISaGRAF Enhanced 4.21 - HMI

Page 191: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Relative or Absolute Opening Positions

You specify the position at which the mimic is opened using the X Position and Y Positionproperties.

If you select the Relative property, the position in which the mimic is opened is determined bythe position properties plus the location in which 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 mimicwill be opened at 80, 80.

If you select the Absolute property, the mimic is always opened at the location specified in theanimation and the position in which it is originally saved is ignored.

Opening a Mimic with a Branch

When a Link Open animation is configured, an optional branch can be supplied which is thenused with the mimic when it is opened. Subsequently, any reference to variables within thatmimic is relative to that branch. When it is used in conjunction with the structured server, thistechnique can reduce the number of mimics required and the subsequent development time.

Several copies of a mimic can be opened at the same time as long as they have differentbranches.

ISaGRAF Enhanced 4.21 - HMI 179

Page 192: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Opening a Child Mimic

You can open a mimic as a child of another, already open mimic. Child mimics behave in aslightly different way.

! Child mimics stay on top of the parent mimics until it is closed. You cannot move aparent mimic on top of a child mimic.

! When you close the parent mimic, any open child mimics also close.

! A child mimic can only move within the bounds of the parent mimic.

To open a mimic as a child, you must specify the name of the parent mimic using the Includedin - Mimic property. Note that if the parent mimic has been opened with a branch, this mustalso be specified.

180 ISaGRAF Enhanced 4.21 - HMI

Page 193: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Note: If you use the substitution character * as the name of the "included in" mimic the mimicwill always be opened as a child of the mimic in which the animation resides. Similarly, if youuse * for the branch, the child mimic will inherit the branch of the mimic in which theanimation resides. This is very useful when including the animation in an object which can beinserted in any mimic.

Substitution Characters

Using substitution characters, you can make a mimic open animation that is context-sensitive.

If you base the Link-open animation on a text drawing element, and you use one of thesubstitution strings #M1 to #M10 at run-time, the label specified with the mimic name willappear in the text drawing element.

This technique can be used to create a standard menu object containing up to 10 Link-openanimations. The text displayed in the support drawing elements and in the opened mimics willdepend on the link properties of the mimic in which the object is placed.

String Opens#P The previous mimic that was opened.#M1 to #M10

The mimics configured in host mimics Link tab.

ISaGRAF Enhanced 4.21 - HMI 181

Page 194: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Link Close Animation

Link Open animation can be applied to any drawing element, although normally it is appliedto a text string with the text used as an indication to the Operator.

You specify the name of the mimic to be closed in the Mimic field. If the mimic has a branch,then this also must be specified.

If you use the substitution character * as the mimic name, the animation will close the mimicin which it resides. This is useful when including the animation in an object which can beinserted in any mimic.

182 ISaGRAF Enhanced 4.21 - HMI

Page 195: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Hyperlink Animation

The Hyperlink animation only operates at run time when the mimic containing it is opened inan ActiveX document container such as Microsoft Explorer. It can be used to provide a linkto a file (such as another mimic or a Word document) or a URL (Universal Resource Locator).

You can also choose to go to a specific location within the file, for example, to a bookmark ina Word document, by entering the reference in the Named Location field.

If used, the Friendly Name will be substituted for the File or URL name in the history ofMicrosoft Explorer.

ISaGRAF Enhanced 4.21 - HMI 183

Page 196: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Region Animation

The region animation is used to select where a mimic is opened on projects having more thanone region. Regions are normally used with graphic adapters that support more than one screenin which case the number of regions is selected to match the number of screens. For example,on a system having two regions, if you select the right region and then open a mimic at position0,0 it will open with the top left hand corner at the top left hand corner of the right screen.

You indicate the number of regions in the Workspace Properties box. The region in which amimic is opened is selected using Region animation.

The behaviour of mimics when using regions is affected by some of the properties in theoptions box displayed by choosing Options from the Configure menu.

184 ISaGRAF Enhanced 4.21 - HMI

Page 197: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

The region animation can be configured so that a user can select the region in which a mimicis opened, or so that the region is fixed. The default region in which the next mimic is openedis selected by clicking on the corresponding icon at the top of the dialog box. The followingproperties are available.

! Direct send - The region is selected without allowing user selection.

! Permanent - The selection is permanent until the next region animation or instruction isused.

! Temporary - The next mimic open uses the selected region after which the region revertsto the previous one. For example on a two region system the current region is 1 and thenregion 2 is selected using the region animation. The next mimic to open would be inregion 2, the following one would be in region 1.

! Choice available in run mode - At run time, the user is allowed to select the temporary orpermanent properties. The direct send property must not be selected.

ISaGRAF Enhanced 4.21 - HMI 185

Page 198: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Control Zone AnimationA control zone is an area on the screen where a user can interact with the HMI.

! Attaching a Control Zone to a Command Level

! Sending Bits

Control zones allow the following actions:

! To send a value to a bit, register, or text variable

! To start another application (Excel, Word etc.)

! To open and close windows

! To create a hyperlink

! To display a text file

A control zone is created in the same way as any other animation by selecting a drawingelement and applying an animation to it. In the Drawing Properties box, an additional tabappears in from which you can select the properties for the animation. At run-time, to drawattention to the user, the cursor changes shape while it is over a control zone and the drawingis highlighted with a button style border.

186 ISaGRAF Enhanced 4.21 - HMI

Page 199: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

While the actions produced by the various control zone animations are different, they have anumber of common properties.

! Accelerator key - You can assign a keystroke that has the same effect as clicking on thecontrol zone.

! Tooltip - You can create a prompt that is automatically displayed when the pointer is overthe control zone.

! Command level - You can lock a control zone to a command level restricting its use tocertain Users.

! Interlock condition - You can specify a bit that may be used as an interlock.

Using an Accelerator Key with a Control Zone

An Accelerator key is a key or combination of keys that produces the same operation asclicking on a control zone. To allocate an accelerator to a control zone, click in the acceleratorfield and then press the combination of keys that are to act as the accelerator. The key strokesyou have pressed will appear as text in the accelerator field. For example, Shift F2.

ISaGRAF Enhanced 4.21 - HMI 187

Page 200: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Comment Field to Create a ToolTip

All of the animations used to create control zones have a text field called Comment in theirproperties tab. A string, preceded by the @ character, entered into the comment field will bedisplayed as a ToolTip when the cursor is positioned over the control zone.

Attaching a Control Zone to a Command Level

A control zone can also be attached to a Command level. At run-time, the user must have rightsto that command level to operate the control zone.

For animations that do not change the value of a variable, a fixed command level must beentered.

For animations that change the value of a variable, the command right field is set to auto bydefault. This means that the HMI will attempt to get the value from the variable definition inthe server. If the server supports this property or if you want to use a different value, there aretwo other options accessed by clicking the buttons adjacent to the fields.

This property is available in the advanced section of the properties tab.

Clicking this button allows you to enter a fixed value for command level.

Clicking this button command level to be defined by the value of another register in the server. The variable browser is displayed to allow selection of the variable name.

188 ISaGRAF Enhanced 4.21 - HMI

Page 201: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using an Interlock Bit with a Control Zone

All control zones have the option of an interlock using a bit variable. The control zone is activeonly when the bit is in the selected state. A bit variable is used because of the flexibility it givesyou. The value of the bit could come from a piece of equipment such as a PLC, from anothercomputer, or derived internally using an expression or program. When using an interlock youhave the option of a warning beep and/or a message box when a User attempts to use the controlzone and it is locked.

This property is available in the advanced section of the properties tab.

ISaGRAF Enhanced 4.21 - HMI 189

Page 202: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Sending Bits

There are two animations which can be used to change the state of a bit: one operates on asingle bit while the other operates simultaneously on two bits.

! Send Bit Animation

! Double Bit Animation

Send Bit Animation

The Send Bit animation allows the user to force the state of a single bit.

190 ISaGRAF Enhanced 4.21 - HMI

Page 203: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

The behaviour of the control zone is determined by the following properties:

! Reverse - The control zone sends the bit to the opposite of its current state; that is, if thebit was 0, it becomes 1, or if it was 1, it becomes 0.

! To 1 – The control zone always forces the bit to 1. If it is already 1, then there is nochange.

! To 0 – The control zone always forces the bit to 0. If it is already 0, then there is nochange.

! Variable - At run time when the User clicks the control zone the state of the bit to beforced is copied from the state of another bit.

! Direct – The control zone sends the bit without confirmation

! Label – See explanation below

! Handled – The control zone behaves as a push to run button. At run time, the bit is sent tothe requested state while the user clicks and holds down the mouse button. When thebutton is released, the bit is sent to the opposite state.

! Pulse - Sends the bit to the required state (0, 1 or reverse) for a period defined in seconds.After the period has elapsed, the bit is returned to the original state.

! Beep - Sound the PC's speaker when the command is made

Confirming a Command With a Label

If you choose the Label send mode, at run time, when the user clicks the control zone, a boxwill appear in which the command can be confirmed or cancelled. The box displays the bit itemdescription plus the appropriate string as entered in the Labels section of the Send Bit tab. Thisway, the user is provided with a native language prompt for the action.

ISaGRAF Enhanced 4.21 - HMI 191

Page 204: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

By default the label selection is set to Auto. This means that the HMI will attempt to get themfrom the variable definition in the server.

If the server doesn’t support labels or you want to use something different there are two otheroptions accessed by clicking the buttons adjacent to the bound fields.

Double Bit Animation

Double bit animation allows the user to change the state of two bits at the same time. This isuseful when a device requires separate signals to start and stop it. The command is alwaysconfirmed with a dialog box.

Enables you to enter your own labels for the to 0 and to 1 conditions.

Enables labels to be defined by the real-time value of a text variable in the server. The variable browser is displayed to allow selection of the variable name.

192 ISaGRAF Enhanced 4.21 - HMI

Page 205: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

ISaGRAF Enhanced 4.21 - HMI 193

Page 206: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Operation

When the user clicks the control zone at run-time, a dialog box appears containing threecommand buttons. The first button displays the label for the bit 1, the second the label for bit 2.

The control operates in two ways, depending if the pulse option has been selected:

! Without the pulse option. Clicking on the first button will set the first bit to 1 and thesecond bit to 0. Clicking on the second button will set the second bit to 1 and the first bitto 0.

! With the pulse option. Clicking on the first button will set the first bit to 1 for the definedperiod after which it will return to 0. The second bit is not affected. Clicking on thesecond button will set the second bit to 1 for the defined period after which it will returnto 0. The first bit is not affected.

! The cancel button closes the dialog box without any action.

194 ISaGRAF Enhanced 4.21 - HMI

Page 207: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Entering Register Values

The user can change the register values from a control zone created with the Control Registeranimation. Register values can also be changed using a position control. Position controls donot behave in the same way as a normal Control Zone and are explained in a separate topic.The control value animation allows a user to enter a precise value for a register, either from thekeyboard, from a displayed keypad, or using positive and negative steps.

! Entry Method

! Output Format

! Input Format

! Control Range

ISaGRAF Enhanced 4.21 - HMI 195

Page 208: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Entry Method

The Control Register animation provides a number of options that affect the way the user entersthe value at run-time.

! Keyboard – Typing in the new value directly into a field in a dialog box

! Step - Similar to keyboard with the addition of plus and minus command buttons withwhich the user can increase or decrease the value by a defined increment. The dialog boxcloses automatically after each increment, unless the Keep Box property is selected.

! Default - The user is prompted to confirm a (configurable) default value for the register

! Keypad - Similar to keyboard except that a representation of a numeric keypad isdisplayed as part of the dialog box which is used in conjunction with the mouse to enter avalue without using the physical keyboard

! Direct - The value is entered directly into the text field of the support drawing elementusing the keyboard. This option does not display a dialog box.

! Password - If selected, each digit of the entered value appears as an asterisk. This allowsthe user to enter a value with more security.

! Empty field - If selected, the dialog box does not display the current value of the registerin the field used to enter the value

Selecting the Output Format

If you choose to display the register value, you can select the output (display) format using thefollowing command buttons adjacent to the format field:

See the Using Custom Output Formats topic for further information.

Selects either the auto or custom formats.

Allows the format to be supplied by a variable in the server.

196 ISaGRAF Enhanced 4.21 - HMI

Page 209: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Selecting the Input Format

If you select a time and date style output format, you can also select a format for entering thevalue. The software automatically converts the input to its raw value in the register.

Warning: You can only use custom input formats when you have a time and date style outputformat selected.

ISaGRAF Enhanced 4.21 - HMI 197

Page 210: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Selecting the Control Range

The input range that is accepted by the animation is defined by the Minimum Value andMaximum Value properties. By default, these properties are set to auto, in which case, the HMIwill attempt to get the values from the OPC server. If either the maximum or minimum valuesare changed in the OPC server, all animations linked to it will automatically follow without theneed to change the animation.

If the server does not support maximum and minimum values or if you want to use a differentvalue, there are two other options accessed by clicking the buttons adjacent to the fields.

Allows you to enter fixed values for the minimum and maximum.

Allows the maximum and minimum to be defined by the value of other registers in the server. The variable browser is displayed to allow selection of the variable names.

198 ISaGRAF Enhanced 4.21 - HMI

Page 211: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Entering a String

The user enters strings from a control zone created with the Send Text animation. Thisanimation can be applied to any of the solid drawing elements, but it is normally used with Textin which case the string can be displayed. Strings can be entered either from the keyboard, orby using the mouse and a displayed keyboard.

! Text Entry Method

! Displaying the Text

Text Entry Method

At run-time, when the user clicks on a Send Text control zone, a dialog box appears, containingthe description of the text variable (or its name, if it does not have a description) as well as thecurrent string. The appearance of the dialog box and the way in which the string is entered isdetermined by the send mode properties.

! Keyboard – Typing in the new string directly into a field in the dialog box

! Displayed keyboard - Similar to keyboard except that a representation of a keyboard isdisplayed as part of the dialog box. This is used in conjunction with the mouse to enter astring without using the physical keyboard.

ISaGRAF Enhanced 4.21 - HMI 199

Page 212: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

! Direct - The value is entered directly into the text field of the support drawing elementusing the keyboard. This option does not display a dialog box.

! Password - If selected, each character of the entered string appears as an asterisk. Thisallows the user to enter a string with more security.

! Empty field - If selected, the dialog box does not display the current string of the textvariable in the field used to enter the string

Displaying the Text

If you use a text field as the support drawing element, you can display the string by checkingthe Display string box.

200 ISaGRAF Enhanced 4.21 - HMI

Page 213: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Starting an Application

The Application animation allows you to start another Windows’ application (such asNotepad) directly from a control zone.

! Application to Run

! Start-up Behaviour

Application to Run

! Application - The full path and name of the executable program required to run theapplication. The ellipsis button opens a file browser.

! Arguments - Optional command line arguments to be passed to the application, forexample, the name of a file to open.

ISaGRAF Enhanced 4.21 - HMI 201

Page 214: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

! Working directory - The path of the directory that contains the original files or somerelated files. Sometimes an application needs to use files from a different location thanthat of its executable program.

Start-up Behaviour

The start-up behaviour property determines the appearance of the application when it is started.It can be selected from the following options:

! Normal window - The application starts in a window, the normal size for the application

! Minimized - The application starts minimized. The icon may not be visible or accessible,depending on the access rights of the user and the configuration of the operating system,the icon may not be visible or accessible.

! Full-screen window - The application starts in a window occupying the whole screen

202 ISaGRAF Enhanced 4.21 - HMI

Page 215: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Displaying a Text Note

Note animation allows you to display, modify, and save the contents of a text file. The text fileappears in a window supporting the standard Windows’edit window keystrokes for textselection.

! Selecting the File to Open

! Using a File Model

Selecting the File to Open

In the Note properties tab, you can enter the name of the file to open or the name of a textvariable that contains the name of the text file. If you omit the path for the file, it is assumed tobe in the root directory of the active project.

ISaGRAF Enhanced 4.21 - HMI 203

Page 216: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using a File Model

If you want to create a new file that is based on the contents of an existing file, you can specifythe name of a model file. In Run mode, when the animation is selected, it opens the model andplaces its contents in the file specified by the file name. You can then modify and save this filebut the model file will not change.

204 ISaGRAF Enhanced 4.21 - HMI

Page 217: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

ActiveX ControlsActiveX controls are software components based on a common architecture that allow theinteraction of software under Microsoft Windows. In order to use an ActiveX control, you mustincorporate it in another program that has been designed to be an ActiveX container. There aremany programs that are ActiveX containers including the HMI. Communication between anActiveX control and the program containing it is made using methods, events, and properties.

A method is an action that an ActiveX can perform. The method is used by the containerprogram to control the behaviour of the ActiveX.

An event is a function used by an ActiveX control to indicate a change to the application. Forexample, an event can be generated when the mouse is clicked.

A property is information offered by an ActiveX to its container, for example, its size andposition on the screen. Properties can be read only or read and write.

There is a vast range of ActiveX controls available, from simple check boxes to complexgraphical displays such as the Trend display provided by the HMI.

ISaGRAF Enhanced 4.21 - HMI 205

Page 218: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Enabling ActiveX ControlsThe ActiveX controls available on a computer depend on the application programs that havebeen installed. (Many programs automatically register ActiveX controls as part of theinstallation process without the user being aware of it). The quality and conformance of theActiveX components to the Microsoft standard can vary. Therefore, before an ActiveXcomponent can be used in the HMI, it must first be enabled. Enabling it makes it available foruse in a project. Once enabled, you can also add ActiveX controls to a Favorites menu for quickaccess.

Note: When selecting ActiveX controls for use with a project, you need to ensure that theActiveX control is available on the target computer. Many ActiveX controls are supplied withother applications and cannot be freely distributed.

To enable an ActiveX Control

1. From the Tools menu, choose Preferences, then ActiveX Controls.

The ActiveX Controls Configuration window appears.

206 ISaGRAF Enhanced 4.21 - HMI

Page 219: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

2. From the installed ActiveX Controls browser, locate and check the desired ActiveXcontrol.

3. Click >>.

The chosen ActiveX control moves to the Approved ActiveX Controls browser.

4. Click OK.

To add an ActiveX Control to the Favorites Menu

1. From the Tools menu, select Preferences, then ActiveX Controls.

The ActiveX Controls Configurations window appears.

2. In the Approved ActiveX Controls browser, check each of the ActiveX controls you wantto appear in the Favorites menu.

ISaGRAF Enhanced 4.21 - HMI 207

Page 220: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Inserting ActiveX Controls in HMI Mimics

You can insert any of the enabled ActiveX controls into an HMI mimics. When you insert acontrol into a mimic, it is automatically given a reference name. You can view and change thename using the properties list.

The control becomes active as soon as the mimic is switched to Run mode. However, someActiveX controls come with their methods, events, and properties pre-defined. Others mayrequire programming using the scripting language, e.g., if you insert a command button, youwill need to define its behaviour when clicked.

Once a control has been inserted in a mimic, you can move it or resize it as you would a nativedrawing element.

To insert an ActiveX Control in a mimic

1. While in Design mode, from the Insert menu, choose ActiveX Control.

Note: An ActiveX Control must first be enabled before it can be inserted in a mimic.

The Insert ActiveX mimic appears.

2. Choose the desired ActiveX control.

The ActiveX control appears in the HMI mimic.

3. Resize the control to the desired size.

208 ISaGRAF Enhanced 4.21 - HMI

Page 221: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing ActiveX Control Properties

When an ActiveX is pasted into a mimic, it initially appears with default settings; these maydiffer from those you require. Note that this properties box differs from the properties box fora native drawing element.

To modify an ActiveX Control Property

1. From the Display menu, select Properties List.

The Properties window appears.

Some properties can be changed by typing in a new value. Some properties can be selectedfrom a list that appears when you click in the field. Other properties can be read only – this isindicated by the value appearing in gray. Once you have entered a new value for a property,the change becomes active immediately.

The Properties List also displays the Events and Methods available for an object. Selecting amethod will display its syntax in the area at the bottom of the Properties List. Selecting anEvent will open the script editor where you can type or edit the event script.

ISaGRAF Enhanced 4.21 - HMI 209

Page 222: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Manually Registering ActiveX Controls

Before you can use an ActiveX control, it must be registered with the operating system.ActiveX controls supplied as part of an application are normally automatically registered whenthe application is installed.

To register an ActiveX control

1. Copy the ActiveX program file (*.ocx) to the Windows' System directory.

2. From the Start button, select Run.

3. Type Regsvr32 followed by the name of the ActiveX control.

4. Click OK.

A message appears indicating whether the registration has been successful or not.

210 ISaGRAF Enhanced 4.21 - HMI

Page 223: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

OPC ServerOPC is an acronym for Object linking and embedding for Process Control.

OPC defines a standard interface for communication between software components either onthe same computer or on different computers connected over a network. OPC is based on theCOM/DCOM (Component Software Module) client / server standard from Microsoft. Asoftware component that has OPC client capability can, in theory, communicate and retrieveinformation from any software component that is an OPC server.

The HMI is an OPC client. It uses one or more OPC servers to collect data from the outsideworld. Typically, an application developed for the HMI will use an OPC server provided byone of the many PLC manufactures or a third party industrial communication vendor.

The main benefits of OPC are:

! Hardware manufactures only have to develop one set of software components forcustomers to use in their applications

! Software developers will not have to rewrite drivers because of hardware feature changesor additions

! Customers will have more choice for the development of integrated manufacturingsystems

The OPC concept allows for the flexibility to add new standards as and when the demandrequires it. The standard at the time of writing is known as OPC Data Access 2.0 and definesthe mechanism for the exchange of real-time data. There are at least two other emergingstandards that will provide access to alarm and event data and historic data.

Further information on OPC is available from the OPC foundation web site:www.opcfoundation.org.

ISaGRAF Enhanced 4.21 - HMI 211

Page 224: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Implementation in the HMIThe OPC implementation within the HMI uses a flexible design to allow for future support ofnew standards without the need for major redesign. In order to do this, the HMI employs agateway between itself and the OPC server. This gateway is known as the communicationmanager. As new standards emerge, new managers will be added to interface with them. Thecurrent communication manager supports OPC Data Access 2.0. Each OPC server that you usewith the HMI is allocated to a communication manager.

The HMI has also been designed to support redundant servers. In order to do this, we mustintroduce the concept of a cluster. A cluster is an ordered group of prioritized servers. Each ofthe servers allocated to a cluster must have an identical structure. The priority or rank is usedwhen attempting to make an OPC connection. If the server ranked first fails, an attempt will bemade to connect with the second server and soon. For normal (non-redundant) operation, acluster with just one server is created. Each OPC server you configure is made a member ofone of the clusters. When referring to variables within an OPC server, you use the cluster name.The HMI automatically directs references to the server currently connected.

212 ISaGRAF Enhanced 4.21 - HMI

Page 225: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

The structure of an OPC implementation within the HMI can be visualized as follows:

In this example, there is one communication manager, OPCDA20. Attached to it are threeserver definitions: Server1A, Server1B and Server2. The cluster Data1 has two members,Server1A and Server1B, operating in redundant mode. The cluster Data2 has one member,Server2.

ISaGRAF Enhanced 4.21 - HMI 213

Page 226: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring OPCBefore the HMI can communicate with an OPC server, it must first be configured so it knowshow the server behaves. The basic steps to configure an OPC server are:

! Configure a communication manager. The communication manager acts as a gatewaybetween the HMI and any OPC servers. In the communication manager configuration,you specify the program identity of the manager and the type of data it will be used toaccess (data, alarm or trend).

! Configure one or more servers. Each server is attached to a previously definedcommunication manager. The configuration includes the identity of the server by which itwill be known in the HMI, the computer on which it is located, and its program identity.

! Configure one or more clusters

! Configure a cluster member. A cluster member is an instance of a previously definedserver with a priority for use in redundant applications. If you configure just one member,then priority is not used.

214 ISaGRAF Enhanced 4.21 - HMI

Page 227: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

The Server Editor

The Server Editor is used to define all the elements required for communication with one ormore OPC servers, that is, the communication manager, servers, clusters, and cluster members.

The Server Editor contains two parts:

! A tree control that can be used to browse the current configuration. A right-click on anyof the elements will display a pop-up menu from which you can add, delete, or cut andpaste elements. A left-click on any of the elements will select it and display its propertiesin the configuration area.

! A configuration area from where the properties of the selected element are displayed andedited

To access the Server Editor

! From the Tools menu, select Servers

Note: An OPC server is automatically started the first time that a mimic is displayed thatrequires information from it.

ISaGRAF Enhanced 4.21 - HMI 215

Page 228: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Defining Communication Managers

You can configure your OPC server types to suit your needs.

To configure a communications manager

1. From the Tools menu, select Servers to open the Server Editor.

2. Right-click on the Server Types icon and from the contextual menu select New.

3. A new server type will be created with default settings.

4. Change the name field to something applicable to the current configuration. For exampleOPCDA20. This name is used when referencing the communication manager later in theconfiguration.

5. Select the communication manager type using the Type field. You can either select one ofthe pre-configured entries (as configured in CommMgr.ini – see below) or select [UserDefined].

6. Select the computer on which the manager is to run. Normally this is left at the default ofMy Computer.

7. If you have selected [User Defined], you must now enter the Prog ID and select theAccess Type. These fields are automatically completed if you use one of thepre-configured types.

8. Click Set.

About the CommMgr.ini File

The CommMgr.ini file is found in the HMI Program directory and describes the standardcommunication manager(s) supplied as part of the HMI.

The entry for each communication manager starts by a definition of the access type (DATA,ALARM or TREND) and nickname enclosed in square brackets, followed by the keywordsProgID and ClassID.

The nickname is the name by which the manager is known in the HMI and appears in Type listbox in the server editor. In the example this is OPC Data Access

216 ISaGRAF Enhanced 4.21 - HMI

Page 229: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

The ProgID and ClassID are saved in the system registry and identify the communicationmanager for the operating system. ClassID is only required when the communication manageris being run on another computer.

Warning: Do not edit this file unless you are 100% confident about the changes you will make.

Example[DATA\OPC Data Access]ProgID=FrontVue.OPCCMclassID = {BD28D911-F6CF-11d2-8BCB-00105AABB585}

ISaGRAF Enhanced 4.21 - HMI 217

Page 230: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Defining Servers

To Configure a Server

1. Right-click a communication manager icon. From the contextual menu, select AddServer.

A new server will be created with default settings.

2. Change the name field to something applicable to the current configuration, such asTestServer1. This name is used when referencing the server later in the configuration.

3. Use the Computer field in the Real-Time section to browse the network and select aserver. Double-clicking on a computer name selects the computer only, whiledouble-clicking on a server selects both the computer name and the server programidentity (Prog ID).

4. Click Set

Note: Some servers require this process to be repeated for the Design-Time section as well.Check the documentation supplied with the server for further information.

Note: The Storage Name field is currently not used

Manually entering server details

Normally, it is unnecessary to modify the server details once selected. However, if you are anadvanced user, you can manually enter or modify server details by clicking the advancedbutton which displays the following box.

218 ISaGRAF Enhanced 4.21 - HMI

Page 231: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Defining Clusters

To configure a cluster

1. Right-click on the Clusters icon and from the contextual menu, select New.

A new cluster is created with default settings.

2. Change the name field to something applicable to the current configuration, such as Data.This name is used when referencing the cluster later in the configuration.

3. If you have configured more than one communication manager, select the correct oneusing the Server Type Name field.

4. Click Set.

ISaGRAF Enhanced 4.21 - HMI 219

Page 232: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Defining Cluster Members

To configure a cluster member

You can modify server details to suit your needs.

1. Right-click on the icon representing a configured cluster and from the contextual menu,select New Member.

A new cluster member is created with default settings.

2. Change the name field to something applicable to the current configuration, such asMain.

3. If you have configured more than one server, select the correct one using the ServerName field.

4. Select the rank for redundant operation. If you are using one server, the rank is at default1.

5. Click Set.

220 ISaGRAF Enhanced 4.21 - HMI

Page 233: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using a Remote Server Under Windows NT4OPC allows the connection to a server on a remote computer. The main issues in thisconfiguration are security and access rights. The possible configurations are almost endless andcan be different depending on the server used. The following describes a typical configuration,in this case using the Applicom OPC server.

! Configuration on the Client Station (Win NT4)

! Configuration on the Server Station (Win NT4)

Further information on these issues can be found on the Microsoft Knowledge Base:

! Article No Q176799. Using DCOM Config (DCOMCNFG.EXE) on Windows NT

! Article No Q158508. COM Security Frequently Asked Questions

! Article No Q169321. COM Servers Activation and Windows Stations

ISaGRAF Enhanced 4.21 - HMI 221

Page 234: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuration on the Client Station (Win NT4)

1. Click the Start button on the Windows taskbar and select the run command. Start theDCOM configuration utility by typing DCOMCNFG and clicking OK.

2. Select the Default Properties tab. Select the option Enable Distributed COM on thiscomputer. Select Connect for the Default Authentication Level. Select Impersonate forthe Default Impersonation Level.

3. Select the Applications tab. Select the OPC server that you are using and display itsproperties.

4. Select the Location tab. Enable the option Run application on the following computerand enter the name of the remote computer.

5. Confirm the configuration using the Apply command button and close the DCOMconfiguration utility.

222 ISaGRAF Enhanced 4.21 - HMI

Page 235: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuration on the Server Station (Win NT4)

6. Click the Start button on the Windows taskbar and select the run command. Start theDCOM configuration utility by typing DCOMCNFG and clicking OK.

7. Select the Default Properties tab. Select the option Enable Distributed COM onthis computer. Select Connect for the Default Authentication Level. SelectImpersonate for the Default Impersonation Level.

8. Select the Applications tab. Select the OPC server that you are using and display itsproperties.

9. Select the Location tab and check the option Run the application on this computer isselected.

10. Select the Security tab. Check that the SYSTEM, Everyone and INTERACTIVE accountsappear in the list of custom execution permissions.

11. Select the Identity tab. Check that the option The interactive user is selected.

12. Click Apply and close the DCOM configuration utility.

Notes:

! In this example, it is the account of the user logged on at the server station (interactiveuser) that is used to run the OPC server.

! The user logged on at the remote client station must have an account on the server station.

! If the server station is to be used without anyone logged on the Interactive useroption in the Identity tab must not be selected.

ISaGRAF Enhanced 4.21 - HMI 223

Page 236: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using a Remote Server Under Windows 9xOPC allows the connection to a server on remote computer. Under Windows 9x, the followingoptions must be installed in order to use DCOM (the underlying technology for OPC):

! The TCP/IP network protocol

! Under Windows 95, the DCOM configuration tool (DCOMCNFG.EXE). Rundcm95cfg.exe from the HMI installation disk.

! The DCOM libraries. Run dcom95.exe (Windows 95) or dcom98.exe (Windows 98) fromthe HMI installation disk.

Note: The computer must be rebooted after installation of the DCOM configuration tool andlibraries.

! Configuration on the Client Station (Win 9x)

! Configuration on the Server Station (Win 9x)

224 ISaGRAF Enhanced 4.21 - HMI

Page 237: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuration on the Client Station (Win 9x)

With OPC, you can configure server connections to allow access from remote computers underWindows 9x systems.

1. Click the Start button on the Windows taskbar and select the run command. Start theregistry configuration utility by typing REGEDIT and clicking OK.

2. Search for the keyHKEY_LOCAL_MACHINE\Software\Microsoft\OLE\EnableRemoteConnection

and set its value to Y (Yes). Close the registry configuration tool.

3. Click Start from the Windows taskbar and select the run command. Start the DCOMconfiguration utility be typing DCOMCNFG and clicking OK.

4. Select the Default Properties tab. Select the option Enable Distributed COM onthis computer. Select Connect for the Default Authentication Level. SelectImpersonate for the Default Impersonation Level.

5. Select the Applications tab. Select the OPC server that you are using and display itsproperties.

6. Select the Location tab. Enable the option Run application on the followingcomputer and enter the name of the remote computer.

7. Click Apply and close the DCOM configuration utility.

ISaGRAF Enhanced 4.21 - HMI 225

Page 238: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuration on the Server Station (Win 9x)

You can configure server connections using OPC under Windows 9.x systems.

1. Click Start from the Windows taskbar and select the run command. Start the registryconfiguration utility by typing REGEDIT and clicking OK.

2. Search for the key HKEY_LOCAL_MACHINE\Software\Microsoft\OLE\EnableRemoteConnection and set its value to Y (Yes). Close the registry configuration tool.

3. Click Start button from the Windows taskbar and select the run command. Start theDCOM configuration utility be typing DCOMCNFG and clicking OK.

4. Select the Default Properties tab. Select the option Enable Distributed COM onthis computer. Select Connect for the Default Authentication Level. SelectImpersonate for the Default Impersonation Level.

5. Select the Applications tab. Select the OPC server that you are using and display itsproperties.

6. Select the Location tab. Enable the option Run application on this computer.

7. Select the Security tab. Select the option Use custom access permission andcheck the group The world has been added.

8. Click Apply and close the DCOM configuration utility.

Note: It is not possible to remotely start an OPC server under Windows9x and so some othermethod must be found to start it. See the documentation provided by the manufacturer of theOPC server.

226 ISaGRAF Enhanced 4.21 - HMI

Page 239: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

OPC QualityAn OPC server provides a minimum of three properties for each of its variables, known asValue, Quality and Timestamp.

! The Value is the real-time value of the variable, for example the level of a tank.

! The timestamp is the time at which the value last changed.

! The Quality provides information about the reliability and status of the value.

The Quality is provided as a 16 bit word. The higher 8 bits are vendor specific and the lower8 bits always follow a standard format.

The extent to which the Quality property is supported depends on the server you are using. Forfurther information on the server your are using see the vendors documentation.

ISaGRAF Enhanced 4.21 - HMI 227

Page 240: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Standard Quality Flags

The lowest eight bits of the Quality flags are defined in the form of three bit fields; Quality(QQ), Sub-status (SSSS), and Limit (LL) status arranged in the form of QQSSSSLL as follows:

Quality (QQ)

The quality field provides the most basic information about the quality of the variable.

If the OPC server does not provide Quality information then this value is always set to 3.

Sub-status (SSSS)

The Sub-status field provides information specific to the basic Quality. For example if theQuality was uncertain the status may indicate that the value is outside of its configured range.If the server does not provide Sub-status information then this field is always set to 0.

Limit (LL)

The Limit field provides an indication of the value of the variable with respect to its limits andis valid regardless of the Quality and Sub-status. If the server does not provide Limitinformation then this value is always set to 0.

QQ Bit Value Defines Description

0 00SSSSLL Bad Value is not useful for reasons indicated by the Sub-status

1 01SSSSLL Uncertain The quality of the value is uncertain for reasons indicated by the Sub-status

2 10SSSSLL N/A Not used3 11SSSSLL Good The Quality of the value is Good

228 ISaGRAF Enhanced 4.21 - HMI

Page 241: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Quality Sequences

The Quality Sequences are used to customise the visual indication provided by an animation atrun-time when an OPC variable has a Quality other than good. The indication may take theform of a colour change, the display of a text string or the selection of a symbol, depending onthe animation type.

You can create any number of Quality Sequences which may then be assigned to eachanimation as required.

A previously configured sequence is assigned to the animation in question. For example thesequence Standard is assigned to a Colour On Bit animation. At run-time, when the quality ofany variable in the animation changes each row in the sequence is checked in turn. The qualityvalue is ANDed with the Mask and the result checked against the Value. If there is a matchthe properties defined in the condition are substituted for those of the animation, otherwise thenext row is checked and so on. If there are no matches then the properties configured in theanimation are used.

The properties that are used from the sequence will depend on the animation type. If it is acolour change animation (for example colour on bit) then the Line Colour and Fill Colour willbe used. If it is a text animation (for example register display) then the Text property will beused. If it is a symbol animation (for example symbol on bit) then the Symbol property will beused.

Note: The order in which the conditions are checked is important as they are not mutuallyexclusive.

ISaGRAF Enhanced 4.21 - HMI 229

Page 242: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring Quality Sequences

You configur sequences from the Sequence editor accessed from the Tools menu by choosingPreferences, then Quality Sequences:

To create a new sequence

1. Right click on the Sequences icon in the left pane and from the pop-up menu select NewSequence.

2. Enter a name for the sequence.

To add a condition to a sequence

1. Select the sequence to which the condition is to be added.

2. In the right pane right click the New Alias icon. From the pop-up menu select New.

3. Enter a name for the condition.

230 ISaGRAF Enhanced 4.21 - HMI

Page 243: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

4. In the Mask field, click and select the small button adjacent to the field. Select the maskand value bits. Remember that the mask is ANDed with the quality and if equal to thevalue the condition is valid.

5. Select the colour for the Line and Fill fields. If a colour change is not required, right clickand from the contextual menu select No change.

6. Enter the string in the Text field. If a text change is not required, right click and from thepop-up menu select No change.

7. Select the symbol in the Symbol field. If a symbol change is not required, right click andfrom the pop-up menu select No change.

To create a new sequence based on an existing one

1. Select an existing sequence.

2. Right click on its name and from the pop-up menu select the copy command.

3. Click anywhere in left hand pane and from the pop-up menu select the paste command.

To save the configuration

" To save a new sequence or changes to an existing sequence click OK. Clicking Canceldiscards any changes.

Related Topics “Attaching Quality Sequences to Animations”, on page 147

ISaGRAF Enhanced 4.21 - HMI 231

Page 244: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

HMI Variable to OPC Data Type MappingThe HMI supports four native variable types that are mapped to OPC data types as follows.

*The Alarm variable requires the OPC item to support Vendor Specific Properties.

Related Topics “OPC Variables”, on page 241

OPC Server HMI

Data Type Description Data Type Description

VT_I1 1 byte integer VT_R8 RegisterVT_I2 2 byte integer VT_R8 RegisterVT_I4 4 byte integer VT_R8 RegisterVT_UI1 1 byte unsigned

integerVT_R8 Register

VT_UI2 2 byte unsigned integer

VT_R8 Register

VT_UI4 4 byte unsigned integer

VT_R8 Register

VT_R4 4 byte real (IEEE format)

VT_R8 Register

VT_R8 8 byte real (IEEE format)

VT_R8 Register

VT_BSTR String VT_BSTR StringVT_DATE Date VT_BSTR StringVT_BOOL Boolean VT_BOOL Bit and Alarm*

Page 245: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

OPC Variable PropertiesFor each variable (OPC item) used in an animation the HMI expects the server to provide theitem Value, Timestamp and Quality (known as VTQ). Normally only the item value isdisplayed but, by the use of two special suffixes, the quality or timestamp may alternatively bedisplayed.

! To display the timestamp the suffix #_T is added to the item name.

! To display the quality the suffix #_Q is added to the item name.

In addition to the Value, Quality, and Timestamp, certain animation types expect a linkedvariable to support additional properties. For example, a register variable, when linked to abargraph animation, would require a minimum and maximum value. Most of these additionalfields are optional with a default or user configured value being used if they are not available.

ISaGRAF Enhanced 4.21 - HMI 233

Page 246: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Register Variable Type

Name Standard OPC Property ID Comments

Type ID: 1 ("Item Canonical Data Type")

Data type: VT_I2

[Mandatory]

This field contains the OPC Data Type.

Units ID: 100 ("EU Units")

Data type: VT_BSTR

[Optional] [Default: Empty]

Used to provide the units text attribute.

Description ID: 101 ("Item Description")

Data type: VT_BSTR

[Optional] [Default: Empty]

Provides a textual description of the variable For example, "Tank 1 level measurement"

Minimum ID: 102 ("High EU")

Data type: VT_R8

[Optional] [Default: 2147483647]

The value of the minimum bound of the variable (the default value will be chosen according to the OPC Item canonical data type).

Maximum ID: 103 ("Low EU")

Data type: VT_R8

[Optional] [Default: -2147483646]

The value of the maximum bound of the variable (the default value will be chosen according to the OPC Item canonical data type).

234 ISaGRAF Enhanced 4.21 - HMI

Page 247: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Name Vendor Specific OPC Property ID Comments

Security ID: 5000

Data type: VT_I2

[Optional] [Default: 0]

The security level required to change the value of the variable from the HMI.

Format ID: 5002

Data type: VT_BSTR

[Optional] [Default: "%.2f"]

A format string (Standard C/C++ string format) used when displaying the variable.

Invalid Label

ID: 5005

Data type: VT_BSTR

[Optional] [Default: "Invalid"]

A label that is substituted for the value when the quality is bad.

ISaGRAF Enhanced 4.21 - HMI 235

Page 248: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Bit Variable Type

Name Standard OPC Property ID Comments

Type ID: 1 ("Item Canonical Data Type")

Data type: VT_I2

[Mandatory]

This field contains the OPC Data type.

Description ID: 101 ("Item Description")

Data type: VT_BSTR

[Optional] [Default: Empty]

Provides a textual description of the variable For example, "Dosing pump fault"

Close Label ID: 106 ("Contact Close Label")

Data type: VT_BSTR

[Optional] [Default: "On"]

The label that is substituted for the 1 (ON) state of a bit when displayed.

Open Label ID: 107 ("Contact Open Label")

Data type: VT_BSTR

[Optional] [Default: "Off"]

The label that is substituted for the 0 (OFF) state of a bit when displayed.

Name Vendor Specific OPC Property ID Comments

Security ID: 5000

Data type: VT_I2

[Optional] [Default: 0]

The security level required to change the value of the variable from the HMI.

Force Off Label

ID: 5003

Data type: VT_BSTR

[Optional] [Default: "Command to 0"]

The label that is displayed when forcing a bit to 0 from a dialog box.

236 ISaGRAF Enhanced 4.21 - HMI

Page 249: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Force On Label

ID: 5004

Data type: VT_BSTR

[Optional] [Default: "Command to 1"]

The label that is displayed when forcing a bit to 1 from a dialog box.

Invalid Label

ID: 5005

Data type: VT_BSTR

[Optional] [Default: "Invalid"]

A label that is substituted for the value when the quality is bad.

Name Vendor Specific OPC Property ID Comments

ISaGRAF Enhanced 4.21 - HMI 237

Page 250: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Text Variable Type

Name Standard OPC Property ID Comments

Type ID: 1 ("Item Canonical Data Type")

Data type: VT_I2

[Mandatory]

This field contains the OPC Data type.

Description ID: 101 ("Item Description")

Data type: VT_BSTR

[Optional] [Default: Empty]

Provides a textual description of the variable For example, "Name of notepad file"

Name Vendor Specific OPC Property ID Comments

Security ID: 5000

Data type: VT_I2

[Optional] [Default: 0]

The security level required to change the value of the variable from the HMI.

Invalid Label

ID: 5005

Data type: VT_BSTR

[Optional] [Default: "Invalid"]

A label that is substituted for the value when the quality is bad.

238 ISaGRAF Enhanced 4.21 - HMI

Page 251: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Alarm Variable Type

As the OPC standard does not deal with alarms in its Data Access Framework a VendorSpecific Property is used to retrieve the alarm state. The HMI will attempt to subscribe to thisproperty only if the animation requests an alarm variable type. If the server does not supportthese Vendor Specific Properties (standard OPC servers will not) it will not be possible to usethe animations that use the alarm variable type.

Name Standard OPC Property ID Comments

Type ID: 1 ("Item Canonical Data Type")

Data type: VT_I2

[Mandatory]

This field contains the OPC Data type.

Description ID: 101 ("Item Description")

Data type: VT_BSTR

[Optional] [Default: Empty]

Provides a textual description of the variable. For example, "Tank 1 high level alarm"

Close Label ID: 106 ("Contact Close Label")

Data type: VT_BSTR

[Optional] [Default: "On"]

The label that is substituted for the 1 (ON) state of a bit when displayed.

Open Label ID: 107 ("Contact Open Label")

Data type: VT_BSTR

[Optional] [Default: "Off"]

The label that is substituted for the 0 (OFF) state of a bit when displayed.

ISaGRAF Enhanced 4.21 - HMI 239

Page 252: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Names Vendor Specific OPC Property ID Comments

Security ID: 5000

Data type: VT_I2

[Optional] [Default: 0]

The security level required to change the value of the variable from the HMI.

Force Off Label

ID: 5003

Data type: VT_BSTR

[Optional] [Default: "Command to 0"]

The label that is displayed when forcing a bit to 0 from a dialog box.

Force On Label

ID: 5004

Data type: VT_BSTR

[Optional] [Default: "Command to 1"]

The label that is displayed when forcing a bit to 1 from a dialog box.

Invalid Label

ID: 5005

Data type: VT_BSTR

[Optional] [Default: "Invalid"]

A label that is substituted for the value when the quality is bad.

Alarm composite State

ID: 5007

Data type: VT_I4

[Mandatory]

The current composite state of the alarm.

Alarm State Labels

ID: 5008

Data type: VT_BSTR | VT_ARRAY

[Mandatory]

An array containing the labels for each alarm state. See below for details

240 ISaGRAF Enhanced 4.21 - HMI

Page 253: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

OPC VariablesThe OPC standard allows for a flexible approach to variable naming with either a flat orhierarchical naming scheme. The variable names are determined entirely by the OPC server.The HMI requests a list of names from the server which is then displayed in the variablebrowser.

Most OPC servers use a hierarchical naming scheme of one form or another. Some serversallow variables to be named in a way that represents the outside world, while others use namesthat represent locations of a data table in a PLC or other piece of equipment. Each variablename has one or more elements (also known as branches and leaves) separated by decimalpoints. The following are all valid variable names:

Process.Engine1.Compressor1.B1Process.Engine1.Compressor1.A1CARD1.DATABASE.B1Node1.DataTable3_256Simulation.Square Waves.Int4B1

Within the HMI, variable names are preceded by the name of the cluster followed by a colon.The following are all valid variable names within the HMI.

Cluster1:Process.Engine1.Compressor1.B1Cluster1:Process.Engine1.Compressor1.A1Applicom:CARD1.DATABASE.B1Data:Node1.DataTable3_256Simu:Simulation.Square Waves.Int4C1:B1

Some OPC servers extend the hierarchical naming further to provide more that one piece ofinformation about a variable. For example, an analog variable can have a real time value, aminimum and maximum, a description, and units text.

ISaGRAF Enhanced 4.21 - HMI 241

Page 254: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Variable Value, Quality, and Timestamp (VTQ)For each variable (OPC item) used in an animation, the HMI expects the server to provide theitem Value, Timestamp, and Quality (known as VTQ). Normally only the item value isdisplayed but, by the use of two special suffixes, the quality or timestamp may be displayed.

To display the timestamp the suffix #_T is added to the item name.

To display the quality the suffix #_Q is added to the item name.

The following example shows the use of this with variable names within the HMI.

Cluster1:Process.Engine1.Compressor1.B1#_T

Cluster1:Process.Engine1.Compressor1.A1#_Q

242 ISaGRAF Enhanced 4.21 - HMI

Page 255: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Other Variable PropertiesIn addition to the Value, Quality, and Timestamp, certain animation types expect a linkedvariable to support additional properties. For example, a register variable, when linked to abargraph animation, would require a minimum and maximum value. Most of these additionalproperties are optional with a default or user configured value being used if they are notavailable.

If an OPC variable supports additional properties that are accessible by the HMI they will bedisplayed in the Variable Browser and may also be used in an animation in their own right. Forexample you could display the minimum and maximum values of a register.

The following shows an example of naming of additional properties.

Cluster1:Process.Engine1.Compressor1.M1

Cluster1:Process.Engine1.Compressor1.M1.Min

Cluster1:Process.Engine1.Compressor1.M1.Max

Cluster1:Process.Engine1.Compressor1.M1.UnitText

ISaGRAF Enhanced 4.21 - HMI 243

Page 256: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

OPC Variable BrowserThe Variable Browser displays a list of all variables available in a selected OPC server. Thedisplay is similar to the Windows NT Explorer with a tree control in one pane and a detaildisplay in the other. Instead of representing folders and files, the icons represent thehierarchical structure of variables within the server. The information displayed can be filteredby data type and a lexical filter field.

When arrays hold less than 32 items, all items are displayed in the Variable Browser. Whenarrays hold more than 32 items, only one variable is displayed with the lower bound and higherbound in brackets. When selecting this variable, the following appears in the selection field:

Simu:Process.Engine1.LargeArray[1..100].C3

You must change the variable name and write the item wanted.

Simu:Process.Engine1.LargeArray[29].C3

244 ISaGRAF Enhanced 4.21 - HMI

Page 257: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Filtering the Variable List

The variable list can be filtered by type (register, text or bit) by selecting or de-selecting thecorresponding icon and using a filter string.

The filter string allows the use of wildcard characters, character lists, or character ranges, inany combination, to match variable names. The following table shows the characters allowedin the filter and what they match:

A group of one or more characters (charlist) enclosed in brackets ([ ]) can be used to match anysingle character in string and can include almost any character code, including digits.

By using a hyphen (-) to separate the upper and lower bounds of the range, charlist can specifya range of characters. For example, [A-Z] results in a match if the corresponding characterposition in string contains any uppercase letters in the range A-Z.

Characters in filter Matches in variable name ? Any single character.* Zero or more characters.# Any single digit (0-9).[charlist] Any single character in charlist.[!charlist] Any single character not in charlist.

ISaGRAF Enhanced 4.21 - HMI 245

Page 258: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Selecting Variables for Animations and Expressions

To select a variable for an animation or expression

1. Open the Variable Browser. (Click on the button in an animation tab or the Browserbutton in the Expression Manager.)

2. Select a cluster using the cluster list box.

3. Request a list of variables from the server by clicking the button. This may takea few seconds depending on the type of server.

4. Expand the tree display of the server’s variables and select the variable you require.

The variable name appears in the selection field.

5. Check that the variable name is correct. Some OPC browsers provide only partial namesand you may need to complete the name manually by typing in the selection field.

6. Click Apply.

7. Close the Variable Browser.

Note: You must select the correct variable type. If you select the wrong type of (for examplea text variable for an animation that expects a bit), a warning message will be generated andthe link between the animation and OPC server will not work.

246 ISaGRAF Enhanced 4.21 - HMI

Page 259: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Displaying More Information on Variables

You can display more information about a variable by clicking on the button once youhave selected a variable name. Depending on the structure of the OPC server, different itemswill appear.

ISaGRAF Enhanced 4.21 - HMI 247

Page 260: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Variable Browser with Additional Variable Properties

If an OPC Server supports additional properties for the variables you will be able to see boththe variable name and its additional properties in the variable browser. The OPC variable, forexample Simu:Process.Engine1.Compressor1.M1 appears as both a branch (left hand paneonly) and a complete variable (left hand plus right hand pane). You can select either thevariable or the variable plus one of its properties.

248 ISaGRAF Enhanced 4.21 - HMI

Page 261: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Branch Browser

The Branch Browser is used in a similar way to the Variable Browser except that it is used toselect a branch rather than a complete variable name. The Branch Browser can be displayedwhenever it is necessary to select a branch in any of the configuration dialog boxes.

ISaGRAF Enhanced 4.21 - HMI 249

Page 262: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

250 ISaGRAF Enhanced 4.21 - HMI

Page 263: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

SymbolsA Graphical Symbol is a collection of drawing elements and associated animations that havebeen grouped together and stored in a library. From the library, a symbol may be pasted intoany mimic as many times as it is needed. A symbol may represent anything from a simple closebutton for a mimic, to a very complex piece of equipment with hundreds of animations. Nospecial tools are needed to create Symbols; they are created in the same way as any otherdrawing using the Workspace tools. Using symbols in your project has a number of benefits.

! Repetitious drawing is avoided considerably reducing development time.

! The Developer may create his own reusable symbol library specific to industry sector inwhich he operates.

! When a symbol is pasted into a mimic, it is done as a reference. If a modification is to bemade to the operation of a symbol, the changes need only be made to the symbol in thelibrary, all instances of it will automatically be modified.

Direct, Relative, and Deferred Referencing

When a symbol is created, you can choose to use direct, relative, or deferred referencing to thevariables in the symbol’s animations. In fact, it is possible to mix all three types if necessary.

With direct referencing, any variable names used in an animation are entered in their entirety.For example, you could use the name Simu:@Process.Engine1.Compressor1.Bit1.Note that the name is prefixed with an @ symbol. This tells the HMI that this is a directlyreferenced name. Whenever the symbol is reused, the animation will always refer to the samevariable, irrespective of any branch.

With relative referencing, each animation refers to just the last part of the variable name. Forexample, you might use the name M1. The rest of the variable name is supplied as a branchwhen the symbol is pasted into a mimic. The variable names are automatically calculated atrun-time by concatenating the branch with the relative name used in the animation. You canonly make use of relative referencing if the server you are using has a structured namingscheme.

ISaGRAF Enhanced 4.21 - HMI 251

Page 264: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

With deferred referencing, temporary variable names are used in each animation. Temporaryvariables only exist while an animation using them is displayed, and do not appear in the server.Temporary variable names always end with a percent % character, for example TEMPMV1%.When a symbol containing temporary variables is pasted into a mimic, a dialog box appears,allowing the temporary variables to be replaced with actual variables in the server. This doesnot affect the symbol in the library, rather, the use of it in the mimic. The same symbol can beused any number of times, each with a different set of variables.

252 ISaGRAF Enhanced 4.21 - HMI

Page 265: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating Direct-referencing SymbolsThe following example describes the creation of a simple symbol. While this is a specificexample, the same principle is used when creating any symbol. The symbol is to use directreferencing to server variables, that is, when it is reused, it will not use a branch.

The symbol will use the Register Display animation to display three registers representing thetime in hours, minutes, and seconds.

1. Create a new mimic to use as a work area in which to create the symbol. The mimic canbe deleted once you have finished.

2. In Design mode, use the drawing elements Text and Rectangle to draw the requiredshape. Draw the three Text elements that will be used to display the dynamic information.

3. Apply the three animations. When referencing the variables ensure the full name is usedpreceded by the @ character.

4. Select all the drawing elements and use the Group command to create a drawing group.The drawing elements will be surrounded by eight large black squares once they havebeen grouped.

5. From the Edit menu, select Create, then Symbol.

A dialog box will appear prompting for the symbol name. If you have multiple libraries,then a list of the available libraries also appears.

6. Choose the library. Enter the symbol name and click OK.

You have now created a symbol.

The symbol appears in the chosen library from where it may be pasted into any mimic.

ISaGRAF Enhanced 4.21 - HMI 253

Page 266: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating Relative-referencing SymbolsThe following example describes the creation of a symbol using relative variable referencing.

The symbol is to represent a motor attached to a paddle stirrer. The symbol is to display themotor status and speed. A control zone will allow a user to start and stop the motor. Thecompleted symbol might look something like this:

In the example, only the last part or the leaves of the variable names were used in the symbol.However there is no restriction to how much or how little of a variable name you use as longas when the variable reference is concatenated with the branch it produces a valid variablename. For example, in the above symbol we could have used Compressor1.B1,Compressor1.M1 etc. and when the symbol was pasted into a mimic used the branchSimu:Processs.Engine1.

In some cases, a symbol might appear in a mimic that has been opened with a branch. In thiscase the mimic branch, symbol branch and variable reference in the animation are allconcatenated to provide the final variable name.

To create a relative-referencing symbol

1. Create or open a mimic to use as a work area in which the symbol will be created. Themimic must be opened with a valid branch, for example:

Simu:Process.Engine1.Compressor1, as the HMI checks the existence of avariable when using it in an animation.

2. In Design mode, draw the static shape.

254 ISaGRAF Enhanced 4.21 - HMI

Page 267: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

3. Apply the animations. When entering the variables, enter only the relative part of thename. The variable browser will do this automatically, or you can enter the namemanually.

4. Select all the drawing elements and use the Group command to create a drawing group.

The drawing elements will be surrounded by eight large black squares when they havebeen grouped.

5. From the Edit menu, select Create, then Symbol.

A dialog box will appear, prompting for the symbol name. If you have multiple libraries,then a list of the available libraries also appears.

6. Choose the library, enter the symbol name, and click OK.

ISaGRAF Enhanced 4.21 - HMI 255

Page 268: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Inserting Symbols into MimicsBefore inserting a symbol into a mimic, the HMI must be set to Design mode. There are anumber of methods by which a symbol can be inserted into a mimic:

! inserting the symbol

! dragging and dropping the symbol from another mimic

! using the standard Windows copy and paste commands

! using the Copy tool from the Standard toolbar

! dragging and dropping it from the library browser

To insert a symbol

1. From the Insert menu, select Symbol.

A box containing a list of symbols, referenced by name, appears. A lexical filter can beapplied to reduce the number of symbols displayed in the list.

2. If using multiple libraries, select the relevant library.

3. Select the symbol name from the scrollable list.

A visual preview of the symbol appears adjacent to the list.

4. If the symbol uses relative variables, enter a valid branch.

5. Click OK to insert the symbol in the mimic.

To drag and drop a symbol from another mimic

1. Left-click on the symbol in the source mimic. Hold down the mouse button and drag thesymbol to its new mimic. Release the mouse button when it is in the correct position.

2. When the mouse button is released, a dialog box appears showing the names of anyvariables and allowing a branch to be entered. Enter a branch (if required) and click OK.

The symbol is now in the new mimic.

256 ISaGRAF Enhanced 4.21 - HMI

Page 269: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

To copy a symbol from another mimic

1. Left-click on the symbol in the source mimic. Hold down the mouse button and the Ctrlkey on the keyboard. Drag the copy of the of the symbol to its new mimic. Release themouse button when it is in the correct position.

2. When the mouse button is released, a dialog box appears, showing the names of anyvariables and allowing a branch to be entered. Enter a branch (if required) and click OK.

The symbol has now been moved to the new mimic.

To paste a symbol using keyboard functions

1. Left-click to the source mimic to select the symbol. Use Ctrl C to copy the symbol.

2. Move the mouse pointer to destination mimic and left-click the mimic.

3. Use Ctrl V to paste the symbol into the mimic.

ISaGRAF Enhanced 4.21 - HMI 257

Page 270: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Displaying a Symbol’s Properties

In Design mode, you can display a symbol's properties by double-clicking it.

The properties box contains a list of the variables used in the symbol and its branch.

! Original size – If selected, the symbol is displayed at 100% of its original size.

258 ISaGRAF Enhanced 4.21 - HMI

Page 271: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using Symbols with Deferred Referencing

If the animations contained in a symbol use temporary variables, the temporary variables mustbe substituted by variable from the server before the symbol will display anything meaningful.This is done using the symbol properties dialog box which is displayed by double-clicking thesymbol in Design mode.

Any temporary variable names are indicated by having the text Substitutable in the informationfield. To change a temporary name to a real one, double-click its entry in the variable list. Thevariable selector appears from which a variable name may then be selected. In the exampleabove, the temporary variable Open% has been substituted bySimu:@Process.Engine1.Compressor1.B1.

Note: Changing a reference to a temporary variable name to a real one only affects the copy ofthe symbol on which the action is performed. In this way, the same symbol can be used todisplay an unlimited number of different variables.

ISaGRAF Enhanced 4.21 - HMI 259

Page 272: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Re-sizing Symbols

A symbol can be resized in the same way as a single drawing element by selecting it, thenclicking and dragging with the mouse on one of the handles surrounding it.

The symbol may be resized in a one or both dimensions depending on where the mouse ispositioned. Holding down the Ctrl key while resizing will ensure that the X and Y dimensionsretain the original ratios.

260 ISaGRAF Enhanced 4.21 - HMI

Page 273: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Library BrowserThe Library Browser displays the contents of a symbol library as thumbnails sorted intoalphabetic order, rather than as just a list of names. The library to be displayed is selected usingthe list box at the top of the browser.

The Browser may be used to select and paste symbols into a mimic, and also to display asymbol’s properties.

When a thumbnail appears hatched, it means that the symbol contains one or more animations.A thumbnail that is not hatched does not contain any animations. When a thumbnail containsthe When a thumbnail contains the symbol, there is problem with the symbol. In most casesthis will be due to the symbol referring to another symbol or bitmap that does not exist. Thiscan happen if you have copied symbols from one project to another without taking all thelibraries.

To select and paste a symbol into a mimic

1. Click on the symbol thumbnail in the library. Hold down the mouse button and drag thecursor to the location in the mimic.

2. Release the mouse button.

A copy of the symbol appears in the mimic.

ISaGRAF Enhanced 4.21 - HMI 261

Page 274: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

To display a symbol’s properties

" Double-click on the symbol thumbnail in the library.

The symbol properties dialog box appears.

262 ISaGRAF Enhanced 4.21 - HMI

Page 275: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Pre-defined SymbolsPre-defined symbols are specialized symbols created for use with various Workbenchfunctions or function blocks:

! IPID faceplate, for use with the IPIDController advanced function block

! Smart PID faceplate, for use with the Smart PID optional function block

ISaGRAF Enhanced 4.21 - HMI 263

Page 276: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

IPID Faceplate

The IPID Faceplate is designed to be connected via the ISaGRAF Enhanced OPC server to aIPIDController function block. You insert the faceplate, into the HMI, as a symbol. From theChoose Mimic window, choose a Branch in the Branch picklist. A branch refers to aconfiguration, a resource, and a PID function block.

Note: The IPID Faceplate library must be enabled for the faceplate to be available in theChoose Mimic window.

264 ISaGRAF Enhanced 4.21 - HMI

Page 277: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Smart PID Faceplate

The Smart PID faceplate is designed to be connected via the ISaGRAF Enhanced OPC serverto a Smart PID function block. You insert the faceplate, into the HMI, as a symbol. From theChoose Mimic window, choose a Branch in the Branch picklist. A branch refers to aconfiguration, a resource, and a PID function block.

Note: The Smart PID Faceplate library must be enabled for the faceplate to be available in theChoose Mimic window.

ISaGRAF Enhanced 4.21 - HMI 265

Page 278: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties
Page 279: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

OLEUsing object linking and embedding, you can include information created in other applications,such as a spreadsheet or word processor, in the Supervisor’s windows. The informationincluded is known as an object.

The main difference between linking and embedding is where the data is stored:

! Embedded objects become part of the window source file

! Linked information, remains stored in the original source file with the window containingonly the location of the file while still displaying a graphic representation of the linkeddata

ISaGRAF Enhanced 4.21 - HMI 267

Page 280: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Embedding ObjectsEmbedding means inserting information such as an Excel chart or a Word document into awindow. Once embedded, the information, or object, becomes part of the window. When youdouble-click an embedded object in Design mode, you open the application in which the objectwas created; the object is displayed and ready for editing. When you return to the Supervisor,the window reflects any changes you've made to the object. You can embed an object using anexisting file, or you can create and embed a new object.

Note: To edit an embedded object created in another application, you must have the otherapplication installed on your computer.

268 ISaGRAF Enhanced 4.21 - HMI

Page 281: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Embedding New Objects

Embedding a new object

1. Open or select the window in which the object is to be embedded.

2. From the Edit sub-menu, select Insert Object.

The Insert Object window appears displaying the available types of objects.

3. In the Object Type box, select the type that describes the application in which you want tocreate the object.

4. Click OK.

5. A new object of the selected type will be created embedded in your window and theassociated application opened to allow you to edit the new object. The application’stoolbars will appear within the Workspace.

6. Move and resize the object as required.

7. Enter the information you want to display in the new object. When done, click anywhereoutside of the object; the associated application will close and the Supervisor’s windowwill be updated.

ISaGRAF Enhanced 4.21 - HMI 269

Page 282: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Embedding Objects Using Existing Files

Embedding an object using an existing file

1. Open or select the window in which the object is to be embedded.

2. From the Edit sub-menu select Insert Object.

The Insert Object window appears in which you indicate the file to insert as an object.

3. Select the Create From File option.

4. In the File box, type or select the name of the object that you want to embed. You can usethe Browse button to select a different drive or directory.

5. Click OK.

270 ISaGRAF Enhanced 4.21 - HMI

Page 283: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Embedding Objects Using Copy and Paste

Embedding an object using copy and paste

1. Open the application (Word, Excel etc.) with which the object is associated.

2. Open the application file.

3. Copy all or part of the application file to the clipboard. (Usually done using the Copycommand on the Edit menu or Ctrl C.)

4. Close the application.

5. Open or select the Supervisor window in which the object is to be embedded.

6. Paste the contents of the clipboard into the window by using the Paste command from theEdit sub-menu or Ctrl V on the keyboard.

ISaGRAF Enhanced 4.21 - HMI 271

Page 284: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing Embedded Objects

There are two ways to change embedded objects:

! Edit them directly in the window in which they are embedded

! Open them in the original application

Embedded objects are surrounded by a solid border when a window is in Design mode.

To edit an embedded object

1. Open or select the window in which the object is embedded and select Design mode.

2. Double-click on the embedded object.

The object is surrounded with a hatched border and the toolbars from the objects originalapplication are displayed within the Workspace:

272 ISaGRAF Enhanced 4.21 - HMI

Page 285: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

3. Make the necessary changes to the object.

4. When finished, click anywhere outside of the object or its toolbars.

The toolbars will be closed and the object returned to its static state.

Warning: When editing an object in this way, many of the original application’s tools may notbe operable.

To open an embedded object

1. Right-click the object to open the Drawing Pop-Up menu

2. The last entry in the menu is context sensitive dependent on the type of object you haveselected. For example, for a spreadsheet it will be Spreadsheet Object. Attached to thislast entry will be a further sub-menu with the choice of Edit or Open. Select Open.

3. The object will now be opened within the original application where you can then makeany required changes.

4. To return to the Supervisor when you have finished making any changes, select Quit orExit from the application’s File menu.

ISaGRAF Enhanced 4.21 - HMI 273

Page 286: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Linking ObjectsLinking means inserting the location of a source of information such as an Excel chart or aWord document into a window. Linked information remains stored in the original source filealthough the window still displays a graphic representation of the data as with embedding.

As an example, we can consider the situation where the management of a factory produces areport in an Excel spreadsheet of the production targets for the following week. The report isupdated each day with revised targets. In one of the Supervisor’s windows, a link to thespreadsheet object is made. The graphical view of the spreadsheet in the Supervisor’s windowis automatically updated each time the management revises the spreadsheet.

To link an object

1. Open or select the window in which the object is to be embedded.

2. From the Edit sub-menu select Insert Object.

3. Select the Create From File option.

4. In the File box, type or select the name of the object that you want to embed. You can usethe browse button to select a different drive or directory.

5. Select Link.

6. Click OK.

274 ISaGRAF Enhanced 4.21 - HMI

Page 287: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing Linked Objects

You can only change a linked object from within the original application. To do this, you caneither:

! Double -click the object while the window is in Design mode.

Or

! Open the original application and edit the original file.

A linked object is surrounded by a dashed border when a window is in Design mode.

ISaGRAF Enhanced 4.21 - HMI 275

Page 288: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Changing OLE Properties

OLE Object Properties Box

The OLE object properties box is accessed by right-clicking the object and then selectingProperties from the contextual menu.

The appearance of the box varies depending on the type of object. All objects will have theGeneral and View tabs. Linked objects will have the additional Link tab.

The General Tab displays the type of object, its size, and location. For a linked object, thelocation will be that of the original file. For an embedded object, the location will be the file ofthe host window.

The View Tab allows you to select the display of the object as editable information or as anicon. Displaying the object as an icon has little use in the Supervisor as you cannot double-clickon it to reveal the information at run-time.

276 ISaGRAF Enhanced 4.21 - HMI

Page 289: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Link Tab

The Link tab is only displayed for linked objects.

Command Buttons

! Change source - Displays a standard Windows’ file selection box to allow you to choosea new source for the object

! Open Source - Opens the source file for editing using the original application

! Update Now - Updates the display of the object in the Supervisor’s window with anychanges that have been made

! Break Link - Breaks the link between the display in the Supervisor’s window and thesource file. The display of the object within the window stays the same but becomes anon-editable Windows’ Metafile.

ISaGRAF Enhanced 4.21 - HMI 277

Page 290: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties
Page 291: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

ExpressionsAn expression allows the calculation of a value by using one or more variables, functions,operators, and constants. An expression is automatically evaluated each time any of thevariables within it change.

Expressions may be defined and used in two ways:

! They can be entered directly in any animation in the field normally used for a variablename. Expressions used in this way are only evaluated while the window containing theanimation is open. An expression is differentiated from a variable name by preceding itwith an equal (=) sign.

! They can be entered in the Expression Editor where they are known as Expressionmodels. Each model is identified by a name that is used instead of a variable name. Thisis useful where the same expression is used a number of times. The animation uses theresult of the expression – it does not copy the expression and evaluate it; therefore, if theexpression is changed, this is automatically reflected in any animation in which it is used.

ISaGRAF Enhanced 4.21 - HMI 279

Page 292: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Expression SyntaxAn 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, anoperator, 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 equalssign. This tells the HMI to interpret the field as an expression and not as a reference to avariable.

! When using an expression model in an animation, it must be immediately preceded withan equal sign (no space)

Functions

The HMI uses specific syntax in its expressions to represent certain mathematical functions:

Function Operation SyntaxSIN Sine (degrees) SIN(val)COS Cosine (degrees) COS(val)TAN Tangent (degrees) TAN(val)ASIN Arc sine ASIN(val)ACOS Arc cosine ACOS(val)ATAN Arc tangent ATAN(val)LOG Natural log LOG(val)EXP Exponential EXP(val)ABS Absolute value ABS(val)FLOOR Round down FLOOR(val)CEIL Round up CEIL(val)

280 ISaGRAF Enhanced 4.21 - HMI

Page 293: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Operators

The HMI uses specific syntax in its expressions for different operators.

Operator Operation Syntax+ Addition Var1 + Var2- Subtraction Var1 - Var2* Multiplication Var1 * Var2/ Division Var1 / Var2== Equality Var1 == Var2!= Inequality Var1 != Var2> Greater than Var1 > Var2>= Greater or equal Var1 >= Var2< Less than Var1 < Var2<= Less or equal Var1 <= Var2! or NOT Logical NOT ! Var1 or NOT Var1|| or OR Logical OR Var1 || Var2 or Var1 OR

Var2&& or AND Logical AND Var1 && Var2 or Var1

AND Var2~ or BNOT Binary NOT ~ Var1 or BNOT Var1| or BOR Binary OR Var1 | Var2 or Var1 BOR

Var2& or BAND Binary AND Var1 & Var2 or Var1

BAND Var2POW Power Var1 POW Var2MOD Modulus Var1 MOD Var2>> N or RSHIFT N Right shift (N bits) Var1 >> N or Var1 RSHIFT

N<< N or LSHIFT N Left shift (N bits) Var1 >> N or Var1 LSHIFT

N

ISaGRAF Enhanced 4.21 - HMI 281

Page 294: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

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)

282 ISaGRAF Enhanced 4.21 - HMI

Page 295: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Expression EditorWhen the same expression is required in several places, it can be useful to centralize itsdefinition using the Expression Editor to create an expression model. Once you have createdan expression model, it is used in an animation by inserting its name instead of that of avariable. The syntax of expression models is the same as when you enter an expression directlyin an animation.

You access the Expression Editor from the Tools menu by choosing Expression Editor.

The Expression Editor contains two main areas.

! A tree control area that is used to browse the expression models defined in the project.Right-clicking in this area displays a contextual menu that allows you to create, copy,paste, and delete expression models.

! A configuration area that shows the definition of the selected element in the tree controlarea. If the root icon is selected all expression models and their related definitions aredisplayed. Double-clicking on an expression model displays a box in which it may beviewed and changed.

ISaGRAF Enhanced 4.21 - HMI 283

Page 296: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating Expression Models

To create an expression model

1. Open the Expression Editor.

2. Right-click in the tree control area. Select the new command from the contextual menu.

3. Name the expression model.

4. Double-click on the model name in the right hand pane.

You can enter the expression in the box that appears.

The expression can be continued on several lines. The browser button can be used to selectvariable names.

284 ISaGRAF Enhanced 4.21 - HMI

Page 297: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Trend DisplayThe trend display is a special animation which produces a display of up to eight register or bitvariables plotted against time. Any number of trend displays may be embedded in a mimic,the only limitation being the amount of physical space available. There is no limit to thenumber of trend displays which may be configured.

The trend display has many features:

! Up to 8 Register and/or Bit variables may be displayed on each Trend.

! Y axis (range) independently configurable for each trace.

! X axis (time) configurable from 1 second to 32767 days.

! Toolbar to change run-time configuration.

! Zoom on both X and Y axes.

! Scroll bar for the X axis.

! Configurable Legend area displaying detail of each trace.

ISaGRAF Enhanced 4.21 - HMI 285

Page 298: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

! Highly configurable appearance.

! Trend displays may be embedded in any mimic

! Unlimited number of Trend Displays in each project.

To draw trend displays

The basic method to create a Trend Display is the same as any other native drawing element.

1. Open the mimic in which the Trend Display will be inserted and select Design mode.

2. Select the Trend Display tool from either the animation toolbar or the menu.

A Trend Display will be created and its properties box automatically opened ready for theconfiguration process.

Once you have configured the Trend Display and closed its properties box it can be moved,sized and copied the same as any other drawing element.

286 ISaGRAF Enhanced 4.21 - HMI

Page 299: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Choosing the Main Trend Display FeaturesThe following properties, found in the display tab, are used to select which of the optionalfeatures are displayed at run-time.

! Toolbar - Display the trend toolbar. The toolbar may be positioned at the top, bottom, leftor right of the trend display. The tools that are displayed on the toolbar can be selected inrun mode.

! Scroll bar - Display the X axis scroll bar and tools. The height of the scroll bar, in pixels,can also be selected.

! Background - The colour of the chart area on which the traces are plotted.

! Display Time Scale - Display a time axis scale at the at the bottom of the chart area.

! Display Grid Lines - Display vertical grid lines in the chart area.

! Display Time Information - Display the time at the start and end of the chart, and the timeat the cursor position.

! Period - The period for the time axis entered as a number of either seconds, minutes,hours or days.

! Refresh period – A background refresh period, in seconds and tenths of seconds, at whichthe chart area is refreshed if the values do not change. (Normally the display is refreshedwhen any of the values change.)

ISaGRAF Enhanced 4.21 - HMI 287

Page 300: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring the Display BufferEach Trend Display contains a configurable display buffer where a temporary historic recordof the values for each trace is stored. The values in the buffer may be displayed on the chartusing the scroll bar.

When a mimic containing a trend Display is first opened the buffer will be empty. As the bufferfills the size of the slider on the scroll bar changes to reflect the amount of data stored as a ratioof the chart period. For example, if the buffer contains 10 minutes of data and the chart is 2minutes, the slider will be approximately one fifth the length of the scroll bar.

When the mimic containing the Trend Display is closed the buffer is emptied unless the mimicis cached.

The following properties are used to configure the display buffer:

! Time capacity - The maximum period for which the display buffer will retain values forthe traces.

! Maximum point buffer capacity - The maximum number of values which may berecorded in the display buffer. Normally this will be left at the default value of 10,000.However if the application has any special requirements (for example, reducing theamount of memory required) this property may be changed. Values are discarded wheneither the time capacity is reached or the display buffer is full

288 ISaGRAF Enhanced 4.21 - HMI

Page 301: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring the TracesThe Curves and Invalid Curves tabs allow you to select which variables will be displayed andthe appearance of the corresponding trace.

! Descriptor – The description for each trace which appears in the Trace Detail Box at runtime.

! Variable - The name of the variable to be displayed.

! Line - The colour and width of the trace.

! Style - The style of the line used for the trace.

! Join - Selects the way in which the trace will be displayed:

Each point representing a change in value is connected to the previous one with a single line.

ISaGRAF Enhanced 4.21 - HMI 289

Page 302: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

! Mark - An optional marker that is plotted each time the variable attached to a tracechanges.

! Min & Max - The numeric range of the variable within the trace. If both left at zero therange is taken from the variable’s properties at run time.

Note: Joining points together with a single line is often used for a drawing a trace because ofits appearance. However you must remember that the values are only valid at each apex,anywhere else on the line is interpolated. The recommended option is to join each point witha horizontal and vertical line.

Each point representing a change in value is connected to the previous one with a vertical and horizontal line.

Each point representing a change in value is plotted with no interconnecting lines.

290 ISaGRAF Enhanced 4.21 - HMI

Page 303: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring the Appearance of the Trace for an Invalid VariableThe Invalid Curves tab allows you to specify the appearance of a trace when its correspondingvariable is invalid. Selecting a different appearance for a trace when the variable is invalidallows the user to easily identify when there is a problem with the variable. You can select botha different colour and style (for example dashed) for the invalid trace.

ISaGRAF Enhanced 4.21 - HMI 291

Page 304: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Selecting Run-time ToolsThe tools available to the user at run-time are selected from the Execution tab.

! Toolbar Position – Allows the user to change the location of the toolbar.

! Toolbar Modification – Allows the user to select the tools that appear on the toolbar.

! Right click popup – Enables display of the contextual menu at run time that is used toselect the zoom mode.

! Include Variables When Restoring Configuration - In run mode, when selecting theRestore tool, the variables displayed on the trend revert to those selected at design time.

292 ISaGRAF Enhanced 4.21 - HMI

Page 305: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Trace Toolbox

Note: The Trace Toolbox is included only for backwards compatibility. The functionality itprovides has now been superseded by that provided by the Legend.

The Trace Toolbox provides additional information about each of the traces in the Trend andallows the user to modify the traces. The Trace Toolbox and each of its properties may beenabled or disabled as required. Note that any changes made are temporary and will be lostwhen the Trend display is closed.

! Auto Open Trace Toolbox -.If selected the Trace Toolbox is automatically opened when atrend is displayed (when the mimic containing it is opened).

! Enable Trace Toolbox - Enables the user to open the Trace Toolbox.

! Visibility – Enables individual traces to be temporarily hidden. This can be useful whenone trace is obscuring another.

! Colour – Allows the colour of each trace to be changed.

! Scale – Allows the scale for each trace to be displayed or hidden.

! Min/Max – Allows the range for each trace to be changed.

! Advanced Properties – Allows access to the toolbox advanced properties, all of whichmay be individually enabled and disabled.

! Select variable – Allows the variable for each trace to be changed.

! Trace Width – Allows the width of each trace to be changed.

! Trace Style – Allows the plotting style for each trace to be changed.

ISaGRAF Enhanced 4.21 - HMI 293

Page 306: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring the Legend AreaThe Legend tab is used to configure the Legend displayed below the chart area. The Legenddisplays a line of properties for each trace. Some properties are read only, whereas others canbe selected to be read only or editable. You can select a different colour to differentiatebetween read only or editable fields.

The Legend can display the following information:

! Visible - A command button from where display of the trace can be toggled.

! Scale - A command button from where display of the trace scale can be toggled.

! Color - The colour of a trace. Editable.

! Line Style - The style in which the trace line is drawn. Editable.

! Join - The way in which the trace is drawn (triangular, square wave or dotted). Editable.

! Thickness - The thickness of the trace. Editable.

! Mark - The marker shown at each change of the variable. Editable.

! Title - The description allocated to a trace. Editable.

294 ISaGRAF Enhanced 4.21 - HMI

Page 307: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

! Maximum - Used with Minimum to specify the range of values for a trace.. Editable.

! Minimum - Used with Maximum to specify the range of values for a trace.. Editable.

! Variable - The name of the variable allocated to a trace. Editable.

! Real-time The current value of the variable allocated to a trace. Read only.

! Cursor - The value of the trace at the cursor position. Read only.

! User Data 1-3 - User configurable information field. Editable.

To select and deselect properties to display

1. To select a property for display, click on its name in the All Columns list the click thedouble left arrow.

2. To deselect a property for display, click on its name in the Columns list then click thedouble right arrow.

You can also select and deselect properties by double-clicking their name.

To configure a column

1. De-select the tick box to display the property in the read only column.

2. To change the description of the column, click the column name, then click in the DisplayName field. You can then type in your own description.

3. To change the width of the column, click the column name, then click the Size field. Youcan then enter a width for the column in pixels. The width of the columns can also bechanged in run mode by the user, unless the Lock Size tick box has been selected.

Warning: If you double click on a name it removes it from the list.

ISaGRAF Enhanced 4.21 - HMI 295

Page 308: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Trend Display at Run TimeThe Trend Display plots the value of up to 8 database variables (bit or register) against time.The horizontal axis represents time, and the vertical axis, value.

Each Trend Display contains a configurable display buffer where values of the databasevariables for each trace are stored. In a real-time Trend Display the display buffer temporarilyrecords values for the traces giving the user a limited ability to scroll back in time.

The Trend Display operates in two modes.

! Real-time. The traces are plotted on the chart in real-time as the value of the variablesthey represent change. A Trend Display may be configured so that it starts up in

real-time or it may be selected using the tool at run time.

! Pause mode. The traces are plotted on the chart from the values of variables recorded inthe display buffer. The Trend Display may be switched from real-time to pause mode by

using the tool, or by using the scroll bar.

296 ISaGRAF Enhanced 4.21 - HMI

Page 309: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Real-time Mode

In real-time mode new values for each trace are plotted starting on the right hand side of thechart. Older data scrolls across the chart eventually disappearing off the left hand side.

The frequency at which the chart is refreshed depends on the configuration and how often thedata is changing.

! The chart is always updated when any of the variables changes value.

! The chart is also refreshed at a background rate determined by the configuration of theTrend Display. For example if the background refresh was set to 5, the chart wouldrefresh every 5 seconds even if none of the variables have changed.

A Trend Display records temporary historic data in its display buffer. The buffer continues torecord data all the time the trend is displayed discarding the oldest values when it becomes full.As the buffer fills the size of the slider on the scroll bar changes to reflect the amount of datastored as a ratio of the chart period. For example, if the buffer contains 10 minutes of data andthe chart is two minutes, the slider will be approximately one fifth the length of the scroll bar.

ISaGRAF Enhanced 4.21 - HMI 297

Page 310: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Pause Mode

The Trend Display automatically switches to pause mode whenever you click and drag theslider button on the scroll bar, or select the pause tool.

In pause mode the chart area no longer updates in real-time, instead it displays the temporaryhistoric data recorded in the display buffer. However, the buffer of the Trend Display is stillupdated in real-time with the oldest values being discarded. The effect of this is that the databeing displayed on the chart is gradually moving through the buffer. This can be seen by thefact that the slider button on the scroll bar gradually moves towards the left. Hence, if youleave the Trend Display in pause mode for long enough, the data for the time period displayedwill be discarded.

When in pause mode you can scroll backwards and forwards through the data using the scrollbar and zoom in and out in both the X and Y axis using either the toolbar or the cursor.

298 ISaGRAF Enhanced 4.21 - HMI

Page 311: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Scroll Bar

The scroll bar is used to select data in the display buffer for display on the chart.

You can get an approximate idea of the ratio of the number of values that may displayed in thechart to those held in the buffer by the size of the scroll button in relation to the area in whichit may be moved.

The way in which the scroll bar tools behave changes slightly depending on which mode theTrend Display is in.

Real-time PauseSelect pause mode and scroll to oldest data in display buffer.

Scroll to oldest data in display buffer.

Select pause mode and scroll back through data in display buffer.

Scroll back through data in display buffer.

No Action Scroll forward through data in display buffer.

No action Select real-time mode

Display the Trace Toolbox Display the Trace Toolbox

Select pause mode and scroll through data in display buffer.

Scroll through data in display buffer.

ISaGRAF Enhanced 4.21 - HMI 299

Page 312: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Toolbar

The toolbar contains the tools used to select the mode and for simple zooming in and out of thechart time axis.

Select real-time mode

Select pause mode

Explode time axis. The time axis is doubled.

Implode time axis. The time axis is halved.

Restore the time axis to its original setting

Select cursor mode

Zoom in area

Zoom in time axis only

Return to previous zoom level

Cancel all zoom

Restore the trend to its original configuration.

Print the trend display on the default printer.

300 ISaGRAF Enhanced 4.21 - HMI

Page 313: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Customising the Toolbar

If you have enabled the property Toolbar Modification the user is able to change the toolbar atrun time. You can position the toolbar on either the left (default), right, top or bottom of thetrend and select which buttons are displayed.

To position the toolbar

1. Click on the toolbar with the right mouse button.

2. From the contextual menu select the new position

To select which buttons are displayed

1. Click on the toolbar with the right mouse button.

2. From the contextual menu select the toolbar modification command.

3. Use the list of toolbar buttons and the Add and Remove commands to select the buttons tobe displayed.

4. Select the Close command when finished.

5. Save the mimic in which the trend is placed.

Note: You can customise the toolbar and then de-select the Toolbar Modification property ifyou want to change the toolbar, but not make this option available to the user.

ISaGRAF Enhanced 4.21 - HMI 301

Page 314: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Using the Cursor

When in pause or historic modes mode you may use the cursor to interact with the chart area.Using the cursor you can :

! Display the value of each of the traces at a particular point in time.

! Zoom the trend in the time (horizontal) axis.

! Zoom the trend simultaneously in both the time (horizontal) axis and value (verticalaxis).

You select the operating mode for the cursor from either the toolbar or a contextual menudisplayed by right clicking anywhere in the chart area

To display the value of the traces

1. Select the cursor tool. The mouse pointer will appear as a cross whilst it is over the chartarea.

2. Click anywhere in the chart area. The values for the traces at that point will be displayedin the Legend area or in the Scale area if visible.

Select cursor mode

Zoom in area

Zoom in time axis only

Return to previous zoom level

Cancel all zoom

302 ISaGRAF Enhanced 4.21 - HMI

Page 315: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

To zoom the time axis

1. Select the zoom time axis tool. The mouse pointer will appear as a magnifying glasswhilst it is over the chart area.

2. Click on the chart at the point representing the new start time for the chart. Hold downthe mouse button and drag the cursor to the point representing the new end time. Releasethe mouse button.

To zoom both axes

1. Select the zoom area tool. The mouse pointer will appear as a magnifying glass whilst itis over the chart area.

2. Click on the chart at the point representing the new start time and maximum value for thechart. Hold down the mouse button and drag the cursor to the point representing the newend time and minimum value. Release the mouse button.

ISaGRAF Enhanced 4.21 - HMI 303

Page 316: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties
Page 317: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Scripting LanguageThe HMI scripting language is intended for customizing and extending the HMI and forenabling the HMI to interact with other Windows-based applications. The Scripting Languagehas the same syntax and semantics as Microsoft's Visual Basic (VB). The HMI ScriptingLanguage Reference offers information on using the scripting language within the HMI.

Here are some examples of what you can do with the scripting language:

! convert display values from one engineering unit to another

! format and print reports

! send data to other Windows-based applications such as spreadsheets, plotting packages,and databases,

! manage dialog boxes and user input,

! toggle operator screens from one language to another, i.e., from English to Japanese

! extend the capabilities of display elements, i.e., change the text displayed on a buttonaccording to the step that is currently being executed by a sequential process controlapplication

The scripting language adds to the six programmable control languages included in ISaGRAFEnhanced. As a general "rule of thumb", the scripting language should be used for anycalculation or customization that has an impact only on the supervisory node, while the controllanguages should be used for all calculations that have a direct impact on the real-time process.

Related Topics “Native HMI Objects”, on page 321 “Scripting Language Editor”, on page 312HMI Scripting Language Reference

ISaGRAF Enhanced 4.21 - HMI 305

Page 318: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Objects, Methods, and PropertiesObjects are the fundamental building block of the scripting language; nearly everything you doin the scripting language involves modifying objects. An object in the scripting language canrepresent every element of the HMI, windows, drawings, animations, ActiveX controls, etc.

306 ISaGRAF Enhanced 4.21 - HMI

Page 319: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Objects and Collections

An object represents an element such as a window or drawing element. A collection is an objectthat contains several other objects, usually of the same type. Using properties and methods, youcan modify a single object or an entire collection of objects.

ISaGRAF Enhanced 4.21 - HMI 307

Page 320: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Properties

A property is an attribute of an object or an aspect of its behaviour. For example, properties ofa window include its name, its size and position. To change the characteristics of an object, youchange the values of its properties.

To set the value of a property, follow the reference to an object with a full stop, the propertyname, an equal sign, and the new property value. The following example changes the colour ofthe 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 elementis assigned to the variable ObjHeight.

Note: Note that not all properties can be set – some are read only.

308 ISaGRAF Enhanced 4.21 - HMI

Page 321: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Methods

A method is an action that an object can perform. For example, just as a drawing element canbe moved, the drawing element object has a Move method. Methods normally have argumentsthat 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 causessomething to happen to an object, while using a property returns information about the objector it causes a quality about the object to change.

ISaGRAF Enhanced 4.21 - HMI 309

Page 322: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Returning Objects from Collections

Most objects are returned by returning a single object from the collection. For example, theWindows collection contains the open HMI windows. You use the Windows property of theActiveProject object to return the Windows collection.

After you've accessed the collection, you can return a single object by using an index value inparentheses (this is similar to how you work with arrays). The index value is usually a numberor a name. The following example displays the name property of the first window opened in amessage box.

Dim ObjWindow As ObjectSet ObjWindow = Application.ActiveProject.WindowsMsgBox "Name = " & ObjWindow(1).Name, vbInformation, sCaption

310 ISaGRAF Enhanced 4.21 - HMI

Page 323: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Looping Through Collections

You can loop through the elements of a collection in a number of different ways. However, therecommended method for looping on a collection is to use the For Each...Next loop. In thisstructure, 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 objWindow In Application.ActiveProject.WindowsMsgBox "Name = " & objWindow.Name, vbInformation, sCaptionNext

ISaGRAF Enhanced 4.21 - HMI 311

Page 324: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Scripting Language EditorYou can develop, debug, and run scripts by accessing the Script Editor from the Display menu,or with the Shift F11 function.

Related Topics

“Workspace”, on page 3

312 ISaGRAF Enhanced 4.21 - HMI

Page 325: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Menu Bar

The Menu Bar provides access, using either the keyboard or the mouse, to all the developmenttools. The Menu Bar can be turned on and off using the Workspace pop-up menu byright-clicking anywhere in the workspace

ISaGRAF Enhanced 4.21 - HMI 313

Page 326: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Toolbar

The toolbar provides instant access, via the mouse, to the most commonly-used tools. Thetoolbar can be floating or docked - that is, locked to one of the borders and can be turned onand off from a pop-up menu displayed by right-clicking on the menu bar.

Display the 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 appears 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.

314 ISaGRAF Enhanced 4.21 - HMI

Page 327: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Project Explorer

The Project Explorer displays a hierarchical list of all objects within a project. A single clickon any of the objects will display its properties in the Properties List. Double-clicking on anyof the elements will display the script associated with it (if any) in the Code Window. Thescripts are saved in the Script File sub-directory of the project.

All of the objects have an identifier (ID) and an object type or class (except Modules). Thefollowing standard object types are displayed.

! ThisSystem As System: The ID of the current System Object providing the operatingsystem name, screen resolution etc. (System.bas)

! TheseTasks As Tasks: The ID of the current Tasks object. (Task.bas)

! ThisApplication As Application: The ID of the current Application object.(Application.bas)

! ThisProject As Project: The ID of the current Project object. (Project.bas)

! TheseViews As Views: The ID of the current Views object providing the total number ofdisplay views currently open. (Views.bas)

! TheseWindows As Windows: The ID of the current Windows object providing the totalnumber of windows currently open. (Windows.bas)

! Modules: Modules is not an object, it is a container provided to display and manage scriptmodules.

In addition to these standard objects, the explorer will contain a list of the objects that areincluded in any of open windows. Any script generated for these objects is saved in the file thatdefines the window itself.

ISaGRAF Enhanced 4.21 - HMI 315

Page 328: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Properties List

The Properties list provides a list of properties, methods, and events for the active object in theProject Explorer window.

316 ISaGRAF Enhanced 4.21 - HMI

Page 329: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Code Window

The Code Window is used to write, display, and edit the scripting language code. You can openseveral Code windows concurrently so 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 Window 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 sortedalphabetically by name. By selecting a procedure using the drop-down list boxes at the top ofthe Code window, the cursor moves to the first line of code in the selected procedure. If youdeclare a new procedure, its name is automatically inserted in the events and procedures list.The text of the procedure is colour 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

ISaGRAF Enhanced 4.21 - HMI 317

Page 330: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

For native HMI graphic objects and ActiveX controls, a pop-up list is automatically displayedfrom which you can select the properties and methods for that object.

318 ISaGRAF Enhanced 4.21 - HMI

Page 331: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Output Window

The Output Window displays the output from any Print methods in the script.

ISaGRAF Enhanced 4.21 - HMI 319

Page 332: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Search Window

You can open the Search Window display results from the Edit menu, then selecting Search.Double-clicking on any of the lines in the Search window will automatically open the relevantscript for editing.

320 ISaGRAF Enhanced 4.21 - HMI

Page 333: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Native HMI ObjectsThe HMI’s object’s properties, methods and events allow the User to develop any customisedbehaviour needed for the supervision and control of the process. Some object instances arealways available as part of the HMI core functionality (for example ThisProject) whereasothers will be created as part of the application (for example an opened mimic).

Class Represents Instance in the HMIActiveX A third party ActiveX object. Its

properties, methods, functions and events are exposed once it is inserted into a mimic. For information on the behaviour of the object see the documentation provided by the vendor.

Application The HMI application. ApplicationAVI An AVI object.Bitmap A bitmap object. This class supports BMP

and JPG image formats.fvProject The currently opened project. ThisProjectGIF A GIF object. This class supports GIF

image formats.

ISaGRAF Enhanced 4.21 - HMI 321

Page 334: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Graphics A collection representing all drawing objects within a mimic. The following object classes are included.

ActiveX

AVI

Bitmap

GIF

Group

Metafile

OLE

Poly

Shape

Symbol

Text

Graphics

Group A group object. A number of drawing elements that have been grouped together. (Not a symbol inserted from the libraries)

Metafile A metafile object. This class supports WMF and EMF image formats.

Mimic An opened mimic. ThisMimicMimics A collection representing all opened Mimic

objects.TheseMimics, Mimics

OLE A 3rd party OLE object. Its properties, methods, functions and events are exposed once it is inserted into a mimic. For information on the behaviour of the object see the documentation provided by the vendor

322 ISaGRAF Enhanced 4.21 - HMI

Page 335: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Poly A polygon/polyline object. This class includes the Line, Polyline, Polygon and Bézier curve drawing elements.

Shape A shape object. This class includes the Rectangle, Rounded Rectangle, Ellipse, Arc and Half-arc drawing elements.

Symbol A symbol object. A native HMI symbol from the symbol library. (previously known as an object).

System A set of properties that describes the system on which the HMI is running.

ThisSystem, System

TemplateGraphics A collection representing all drawing objects within a mimic template. Identical to the Graphics collection except that it points to the Graphics of a mimic template. If the mimic has no template then TemplateGraphics is redirected to Graphics.

TemplateGraphics

Text A text object. This class includes the text drawing element.

Variable A permanently subscribed variable. It provides properties, methods and events for variables of all types.

Variables A collection representing all permanently subscribed variables.

Variables, TheseVariables

Window A view of an opened mimic. A mimic can have several views opened simultaneously. For example, one in design mode and the other in run mode.

Windows A collection representing all opened Window objects.

Windows

ISaGRAF Enhanced 4.21 - HMI 323

Page 336: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

HMI Object HierarchyTo manipulate native HMI objects the User must know the relationships between them. Thehighest level object is Application with all other objects subordinate to it. Using theApplication object’s properties and methods you are able to access all objects subordinate toit. The object hierarchy is shown below.

324 ISaGRAF Enhanced 4.21 - HMI

Page 337: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Note: Graphic Objects is a generic term referring to all drawing object classes (Shape, Textetc.). Animation Objects is a generic term referring to all animation object classes. Specificanimation classes are not available in this version. There is also a collection knownTemplateGraphics that is identical to Graphics except that refers to the Graphics in a mimictemplate.

ISaGRAF Enhanced 4.21 - HMI 325

Page 338: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Application ObjectsThe Application object represents the HMI itself and is the topmost object in the HMI nativeobject hierarchy. From the Application object, you can directly access other native HMIobjects by using the Application object’s properties and methods, or you can indirectly accessobjects through other objects obtained by the object’s properties and methods.

Application Object Properties

Property As R/W DescriptionActiveMimic Mimic R Returns a Mimic object that represents the active

mimic (the one with focus).ActiveProject Project R Returns a Project object that represents the

currently opened project.ActiveWindow Window R Returns a Window object that represents the active

mimic (the one with focus).Application Application R Returns the Application object itself.Build String R Returns the build number of the HMI.Mimics Mimics R Returns the collection of all opened mimics.Name* String R Always returns "Application"Path String R Returns the path of the application.PathSeparator String R Returns the character separator used in the folder

names by the system on which the application is running (“\” under Windows platform).

ProductName String R Returns the product name.System System R Returns the System object that describes the

system on which the application is running.Variables Variables R Returns the collection of variables currently

subscribed.VBAVersion String R Returns the version number of VBA.VBE Object R Returns the Visual Basic Environment root object

that contains all other objects and collections represented in Visual Basic for Applications.

326 ISaGRAF Enhanced 4.21 - HMI

Page 339: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Application Object Methods

Version String R Returns the version number of the application.Visible Boolean R/W Returns and sets the visibility property. When

visibility is True the HMI is visible . When it is False it is hidden. WHEN USING THIS PROPERTY TO HIDE THE HMI YOU MUST ALSO ARRANGE A MECHANISM TO MAKE IT VISIBLE AGAIN.

Method DescriptionPrintOut Sub PrintOut([Copies As Integer], [Orientation As fvOrientation], [Printer As

String])

Prints everything in the workspace excluding menu and toolbars.Copies Optional argument. Default: 1

A number that specifies the number of copies to be printed.Orientation Optional argument. Default: fvPortrait

Orientation can take one of the following fvOrientation values:

fvLandscape, fvPortraitPrinter Optional argument

A string that indicates the printer to be used. If not specified then the system default printer is used.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 327

Page 340: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Application Object ExamplesPrivate Sub TextApplicationEx1_Click()

'-------- Returns information about the application

TextInfo1.Text = Application.Name & " Version " & Application.Version

TextInfo2.Text = "Product name " & Application.ProductName

End Sub

Private Sub TextApplicationEx2_Click()

'-------- Opens a mimic and returns the mimic object

Dim objMimic As Object

Set objMimic = Application.Mimics.Open("TEST")

MsgBox objMimic.Name & " mimic is opened "

End Sub

Private Sub TextApplicationEx3_Click()

Application.PrintOut 1, fvLandscape

End Sub

328 ISaGRAF Enhanced 4.21 - HMI

Page 341: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Project ObjectsThe fvProject object represents the currently opened project. This object is available throughthe ActiveProject property of the Application object. ThisProject is a pre-defined instance ofthe object.

Project Object Properties

Property As R/W DescriptionActiveKeyboardLayout String R/W Returns and sets the name of the active

keyboard layout.ActiveMimic Mimic R Returns the Mimic object that represents

the active mimic of the project.Application Application R Returns the Application object from

which the Project object is stemmed.Mimics Mimics R Returns the collection of all opened

mimics.Parent Application R Returns the parent object of the Project

object.Path String R Returns the path of the project.ProjectName String R Returns the name of the project.UserFullName String R Returns the full name of the user currently

logged-on.UserName String R Returns the name of the user currently

logged-on.UserDescription String R Returns the description of the user

currently logged-on.Variables Variables R Returns the collection of all permanently

subscribed variables.Windows Windows R Returns the collection of all opened

windows.

ISaGRAF Enhanced 4.21 - HMI 329

Page 342: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Project Object Methods

Method DescriptionLogoffUser Sub LogoffUser ([ShowDialog As Boolean])

Logs off the user currently logged-on.ShowDialog Optional argument. Default: True

A Boolean that indicates if the logoff dialog must (True) or must not (False) be displayed.

LogonUser Sub Logon User([ShowDialog As Boolean], [Name As Variant], [Password As Variant])

Logs on a new user.ShowDialog Optional argument. Default: True

A Boolean that indicates if the Logon dialog must (True) or must not (False) be displayed.

Name Optional argument. Default: “”

A String that specifies the name of the user that must be logged-on.

Password Optional argument. Default: “”

A String that specifies the password of the user that must be logged-on.

Quit Sub Quit()

Closes all the opened mimics and quits the application.

330 ISaGRAF Enhanced 4.21 - HMI

Page 343: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Project Object Events

Project Object ExamplesPrivate Sub fvProject_StartupComplete()

'-------- Subscribe local variables

Variables.Add "User%", fvVariableTypeText

Variables.Add "Time%", fvVariableTypeText

Variables.Add "Date%", fvVariableTypeText

'-------- Get Default user name for display in local variable

[User%] = ThisProject.UserName

'-------- Open first mimic

ThisProject.Mimics.Open "Menu"

End Sub

Private Sub fvProject_UserChanged()

Dim strUserName As String

strUserName = ThisProject.UserName

Event DescriptionBeforeQuit Sub fvProject_BeforeQuit(Cancel As Boolean)

Occurs when project is about to be quit.Cancel Boolean value that can be set to True if the

project must not be quit.StartupComplete Sub fvProject_StartupComplete()

Occurs when project loading is complete.UserChanged Sub fvProject_UserChanged()

Occurs when the user currently logged-on has changed or if user information database has changed.

ISaGRAF Enhanced 4.21 - HMI 331

Page 344: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

'-------- Set keyboard layout - assumes layout name is the same as user name

ThisProject.ActiveKeyboardLayout = strUserName

[User%] = strUserName

End Sub

332 ISaGRAF Enhanced 4.21 - HMI

Page 345: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

System ObjectsThe System object represents the system on which the HMI is running. This object is availablethrough the System property of the Application object. ThisSystem is a pre-defined instanceof the object.

System Object Properties

Property As R/W DescriptionApplication Application R Returns the Application object from

which the System object is stemmed.ComputerName String R Returns the name of the computer on

which the HMI is running.HorizontalResolution Long R Returns the horizontal resolution (in

pixels) of the screen.MemoryTotal Long R Returns the total size, in kilobytes, of

physical memory.NumberOfProcessors Long R Returns the number of processors in the

system.OperatingSystem String R Returns the name of the operating system

currently used.Parent Application R Returns the parent object of the System

object.Version String R Returns the version number of the

currently used operating system.VerticalResolution Long R Returns the vertical resolution (in pixels)

of the screen.

ISaGRAF Enhanced 4.21 - HMI 333

Page 346: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

System Object Methods

System Object ExamplesPrivate Sub TextSystemEx1_Click()

'-------- Get the operating system name and screen resolution

'-------- Note the use of underscore as a continuation character

TextInfo1.Text = "Operating System " & ThisSystem.OperatingSystem

TextInfo2.Text = " Screen Resolution " & ThisSystem.HorizontalResolution _

& " x " & ThisSystem.VerticalResolution

End Sub

Private Sub TextSystemEx2_Click()

Method Description

PrintOut Sub PrintOut([Copies As Integer], [Orientation As fvOrientation], [Printer As String])

Prints the entire screen.

Copies Optional argument. Default: 1

A number that specifies the number of copies to be printed.

Orientation Optional argument. Default: fvPortrait

Orientation can take one of the following fvOrientation values:

fvLandscape, fvPortrait

Printer Optional argument

A string that indicates the printer to be used. If not specified then the system default printer is used.

334 ISaGRAF Enhanced 4.21 - HMI

Page 347: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

'-------- Print the entire screen

ThisSystem.PrintOut 1, fvLandscape

End Sub

ISaGRAF Enhanced 4.21 - HMI 335

Page 348: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Mimics Collection ObjectsThe Mimics collection object represents the collection of the currently opened mimics for theactive Project.

Mimics Object Properties

Mimics Object Methods

Property As R/W Description

Application Application R Returns the Application object from which Mimics object is stemmed.

Count Long R Returns the number of Mimic object in the collection.

Parent Object R Returns the parent object of the Mimics object (For Mimics, the Parent object is always an fvProject object).

Method DescriptionClose Sub Close([SaveChanges As Variant])

Closes all the mimics handled in the collection.SaveChanges Optional argument.

Indicates if changes must be saved or not. SaveChanges can take one of the following fvSaveAction values: fvDoNotSaveChanges, fvSaveChanges or fvPromptToSaveChanges.

Default: fvPromptToSaveChanges

336 ISaGRAF Enhanced 4.21 - HMI

Page 349: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

IsOpen Function Open(Name As String, [Branch As Variant], [ReferenceSet As Variant], [Region As Variant]) As Boolean

Tests to see if a Mimic is open according to the passed arguments. Returns true if it is open, else false.Name Name of the mimicBranch Optional argument. Default: “”

String that specifies the name of the branch that must be used to open the Mimic.

ReferenceSet Optional argument. Default: fvRefSetRealtime

The fvRefSet that must be passed to open the Mimic. ReferenceSet can take one of the following fvRefSet values: fvRefSetRealtime, fvRefSet1, fvRefSet2 or fvRefSetTest.

Region Optional argument. Default: 1

Long that specifies the region that must be used to open the Mimic.

Item* Function Item(Index As Variant, [Branch As Variant], [ReferenceSet As Variant], [Region As Variant]) As Mimic

Returns the Mimic object of the collection that matches the passed arguments.

Method Description

ISaGRAF Enhanced 4.21 - HMI 337

Page 350: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Item* (Continued)

Index A Long with a range from 1 to Mimics.Count, which represents the position of the mimic object in the collection, that specifies the item that must be returned. In this case, optional arguments, if they are specified, are discarded.

Or

A String, which represents the name of the mimic object, that specifies the item that must be returned. In this case, optional arguments, if they are specified, are taken into account.

Branch Optional argument. Default: “”

A String, which represents the name of the branch of the mimic object, that specifies the item that must be returned.

ReferenceSet Optional argument. Default: fvRefSetRealtime

A fvRefSet, which represents the reference set of the mimic object, that specifies the item that must be returned. A ReferenceSet can take one of the following fvRefSet values: fvRefSetRealtime, fvRefSet1, fvRefSet2, fvRefSetTest.

Region Optional argument. Default: 1

A Long, which represents the region of the mimic object, that specifies the item that must be returned.

Method Description

338 ISaGRAF Enhanced 4.21 - HMI

Page 351: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Open Function Open(FileName As String [,Branch As String] [,ReferenceSet As Variant] [,Region As Integer] [,ParentName As String] [,ParentBranch As String] [,ParentReferenceSet As Integer] [,ParentRegion As Integer] [,LeftPos As Integer] [,TopPos As Integer] [,AbsolutePos As Boolean]) As Mimic

Opens and returns a Mimic object.FileName A string containing the name of the

mimic.Branch Optional argument. Default: “”

String that specifies the name of the branch that must be used to open the Mimic.

ReferenceSet Optional argument. Default: fvRefSetRealtime

The fvRefSet that must be passed to open the Mimic. ReferenceSet can take one of the following fvRefSet values: fvRefSetRealtime, fvRefSet1, fvRefSet2 or fvRefSetTest.

Region Optional argument. Default: 1

An Integer that specifies the region that must be used to open the Mimic.

ParentBranch Optional argument. Default ""

A string specifying the name of the parent mimic when opening a mimic as a child.

Method Description

ISaGRAF Enhanced 4.21 - HMI 339

Page 352: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Open (Continued)

ParentRefernceSet Optional argument. Default: fvRefSetRealtime

The reference set of parent mimic when opening a mimic as a child. ParentReferenceSet can take one of the following fvRefSet values: fvRefSetRealtime, fvRefSet1, fvRefSet2 or fvRefSetTest.

ParentRegion Optional argument. Default: 1

An integer that specifies the region of the parent mimic when opening a mimic as a child.

LeftPos Optional argument. Default 0.

A long indicating the opening position of a child window relative to the parent.

TopPos Optional argument. Default 0.

A long indicating the opening position of a child window relative to the parent.

AbsoloutePos Optional Argument. Default True.

If True then LeftPos and TopPos are absolute, else they are relative to the original saved position of the child mimic.

Save Sub Save([NoPrompt As Variant])

Saves all the mimics handled in the collection.NoPrompt Optional argument.

Indicates if the user must be prompted (False) or not (True). NoPrompt can take one of the following Boolean values: True or False.

Default: True

Method Description

340 ISaGRAF Enhanced 4.21 - HMI

Page 353: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Mimics Object ExamplesPrivate Sub TextMimicsEx1_Click()

'-------- Open the Menu mimic and return its object

Dim objMimic As Object

Set objMimic = Mimics.Open("Menu")

End Sub

Private Sub TextMimicsEx2_Click()

'--------Loop through all opened mimics

Dim objMimic As Object

For Each objMimic In Mimics

MsgBox objMimic.FullName

Next

End Sub

ISaGRAF Enhanced 4.21 - HMI 341

Page 354: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Mimic ObjectsA Mimic object represents an opened mimic. Mimic’s properties or methods are related to thetargeted mimic and to all windows (views) opened on this mimic (including the active one).For example, BackColor property reflects the background colour of the mimic. A change tothis property will change the background colour of all windows (views) opened on this mimic.

Mimic Object Properties

Property As R/W DescriptionAlwaysActive Boolean R/W Returns or sets the Boolean attribute that

indicates if the mimic’s windows must (True) or must not (False) be always active (regarding other non always active windows).

Application Application R Returns the Application object from which Mimic object is stemmed.

BackColor OLE_Color R/W Returns or sets the RGB code of the background colour of the mimic.

BackColorIndex Integer R/W Returns or sets the index of the indexed colour cell used as background colour of the mimic. (this index can vary from 1 to 32 if the chosen colour cell is indexed, if the chosen colour cell is fixed, this index is set to 0).

Branch String R Returns the branch name used to open the mimic.

Cache Boolean R/W Returns or sets the Boolean attribute that indicates that the mimic must be cached.

Caption String R/W Returns or sets the text displayed in the title bar of the windows that display the mimic.

DeclutteringModel String R/W Returns or sets the name of the decluttering model that must be used by the mimic.

342 ISaGRAF Enhanced 4.21 - HMI

Page 355: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

EnableEvents Boolean R/W Returns or sets the Boolean that indicates if events must (True) or must not (False) be fired for a mimic.

When this property is disabled, mimic associated scripts are not performed.

EnableLayerSelection Boolean R/W Returns or sets the Boolean that indicates if user can (in run mode) use the “Layers” tool mimic in order to modify the layer selection currently applied to the mimic’s windows. Note: this boolean doesn’t disable layer selection from script.

EnableZoom Boolean R/W Returns or sets the Boolean that indicates if user can (in run mode) use the “Zoom” tools in order to modify the zoom currently applied to the mimic’s windows. Note: this boolean doesn’t disable zooming from script.

FullName String R Returns the full name (the file’s one) of the mimic.

Graphics Graphics R/W Returns the collection of all graphic objects placed on the mimic.

GridColor OLE_Color R/W Returns or sets the RGB code of the grid colour of the mimic.

GridColorIndex Integer R/W Returns or sets the index of the indexed colour cell used as grid colour of the mimic (this index can vary from 1 to 32 if the chosen colour cell is indexed, if the chosen colour cell is fixed, this index is set to 0).

IncMimicHeightFromCorner

Long R/W Returns or sets the vertical distance between the two nearest corners of a newly opened included mimic and the animation that has caused its opening.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 343

Page 356: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

IncMimicOpeningPosition

fvOpenPosition

R/W Returns or sets the attribute that indicates the position of a newly opened included mimic according to the animation that has caused its opening. IncMimicOpeningPosition can take one of the following fvOpenPosition values:

FvOpenPositionNone

fvOpenPositionTopLeftCorner

fvOpenPositionBottomLeftCorner

fvOpenPositionTopRightCorner

fvOpenPositionBottomRightCorner

fvOpenPositionOnObject

fvOpenPositionBottomObject

fvOpenPositionLeftObject

fvOpenPositionTopObject

fvOpenPositionRightObject

fvOpenPositionBottomRightObjectIncMimicPopUp Boolean R/W Returns or sets the Boolean attribute that

indicates if newly opened included mimic for the mimic are exclusive (popup behavior = True) or not (False).

IncMimicWidthFromCorner

Long R/W Returns or sets the horizontal distance between the two nearest corners of a newly opened included mimic and the animation that has caused its opening.

Index Integer R Returns the index of the Mimic object in the Mimics collection.

Property As R/W Description

344 ISaGRAF Enhanced 4.21 - HMI

Page 357: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

MaximumZoom Long R/W Returns or sets the maximum limit of the zoom factor that can be applied (in run mode) to the mimic’s windows using the “Zoom” tools. Without limits, zoom factor may vary from 0 to 6400. A zoom factor of 100 means original size. Note: this limit is not taken into account when zooming is performed by script.

MinimumZoom Long R/W Returns or sets the minimum limit of the zoom factor that can be applied (in run mode) to the mimic’s windows using the “Zoom” tools. Without limits, zoom factor may vary from 0 to 6400. A zoom factor of 100 means original size. Note: this limit is not taken into account when zooming is performed by script.

Modal Boolean R/W Returns or sets the Boolean attribute that indicates if the mimic’s windows must (True) or must not (False) be modal.

Name String R/W Returns the name used in code to identify the Mimic.

Note: The default name for new object is the kind of object plus a unique integer.

Parent Object R Returns the parent object of the Mimic object.Path String R Returns the path name (the file’s one) of the

mimic.ReferenceSet fvRefSet R/W Returns or sets the reference set used by the

mimic’s windows.

ReferenceSet can take one of the following fvRefSet values: fvRefSetRealtime, fvRefSet1, fvRefSet2 or fvRefSetTest.

Region Long Returns or sets the region number where are displayed the mimic’s windows.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 345

Page 358: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Modified Boolean R/W Returns or sets the Boolean attribute that indicates if the mimic was modified since its opening. True indicates it has been modified.

ShowCaption Boolean R/W Returns or sets the Boolean attribute that indicates if the windows that display the mimic must (True) or must not (False) display its caption in their title bar.

SecurityLevel Long R/W Returns or sets the security level needed to open the mimic.

Selection Object R Returns the currently selected object (Graphic object) on the mimic.

Tag Variant R/W Returns or sets a general purpose variant within the mimic object. The value is not saved.

TemplateGraphics Graphics R/W Returns the collection of all graphic objects placed on the mimic template.

TemplateName String R/W Returns or sets the name of the template mimic that must be used by the mimic.

UseTemplateAccessRights

Boolean R/W Returns or sets the Boolean attribute that indicates if the template mimic’s access rights properties must (True) or must not (False) be used by the mimic’s windows. Access Rights refer to the following properties of the template mimic:

EnableLayerSelection

EnableZoom

MaximumZoom

MinimumZoom

SecurityLevel

WarningBeep

WarningBox

Property As R/W Description

346 ISaGRAF Enhanced 4.21 - HMI

Page 359: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

UseTemplateBackground

Boolean R/W Returns or sets the Boolean attribute that indicates if the template mimic’s background colour properties must (True) or must not (False) be used by the mimic. Background colour properties refer to the following properties of the template mimic:

BackColor

BackColorIndex.UseTemplateCaption

Boolean R/W Returns or sets the Boolean attribute that indicates if the template mimic’s Caption property must (True) or must not (False) be used by the mimic’s windows.

UseTemplateGrid Boolean R/W Returns or sets the Boolean attribute that indicates if the template mimic’s grid properties must (True) or must not (False) be used by the mimic’s windows. Grid properties refer to the following properties of the template mimic:

GridColor,

GridColorIndex,

GridDistanceHorizontal,

GridDistanceVertical,

ShowGrid,

SnapToGrid.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 347

Page 360: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

UseTemplateIncludedMimic

Boolean R/W Returns or sets the Boolean attribute that indicates if the template mimic’s included mimic properties (True) or must not (False) be used by the mimic. Included mimic properties refer to the following properties of the template mimic:

IncMimicHeightFromCorner,

IncMimicOpeningPosition ,

IncMimicPopUp,

IncMimicWidthFromCorner.UseTemplateLayers Boolean

(Editable)R/W Returns or sets the Boolean attribute that

indicates if the template mimic’s Layers property must (True) or must not (False) be used by the mimic’s windows.

UseTemplatePosition Boolean R/W Returns or sets the Boolean attribute that indicates if the template mimic’s position properties must (True) or must not (False) be used by the mimic’s windows. Position properties refer to the following properties of the template mimic:

Left

TopUseTemplateSize Boolean R/W Returns or sets the Boolean attribute that

indicates if the template mimic’s size properties must (True) or must not (False) be used by the mimic’s windows. Size properties refer to the following properties of the template mimic:

Height

Width

Property As R/W Description

348 ISaGRAF Enhanced 4.21 - HMI

Page 361: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

UseTemplateStyles Boolean R/W Returns or sets the Boolean attribute that indicates if the template mimic’s styles properties must (True) or must not (False) be used by the mimic’s windows. Styles properties refer to the following properties of the template mimic:

AlwaysActive,

Border

Cache

ClientBorder

CloseButton

ControlBox

EnableMove

EnableResize

MaxButon

MinButton

Modal

ShowCaption

StaticBorder

StretchContentsToFitSize

TitleBar

ToolMimicWindows Windows R Returns the collection of all opened windows

that refer to the mimic.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 349

Page 362: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Mimic Object Methods

WarningBeep Boolean R/W Returns or sets the Boolean attribute that indicates if a warning beep must (True) or must not (False) occur when user attempts to perform an unauthorised action.

WarningBox Boolean R/W Returns or sets the Boolean attribute that indicates if a warning message box must (True) or must not (False) be displayed when user attempts to perform an unauthorised action.

Method DescriptionActivate Sub Activate ()

Activate (sets focus) the mimic. If the mimic is opened in more than one window it will activate the first window.

Close Sub Close([SaveChanges As fvSaveAction])

Closes all windows of the mimic object.SaveChanges Optional argument. Default:

fvPromptToSaveChanges

SaveChanges can take one of the following fvSaveAction values:

fvDoNotSaveChanges, fvPromptToSaveChanges, fvSaveChanges

NewWindow Function NewWindow () As Window

Opens and returns a new window for the mimic.Save Sub Save ()

Saves the mimic object.

Property As R/W Description

350 ISaGRAF Enhanced 4.21 - HMI

Page 363: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

SaveAs Sub SaveAs(FileName As String)

Saves the mimic object under a different file name. The original mimic is closed and the new mimic opened.FileName The name of the file in which the mimic object will

be saved.SaveCopy As Sub SaveCopyAs(FileName As String)

Saves the mimic object under a different file name. The original mimic is remains open.FileName The name of the file in which the mimic object will

be saved.ScrollTo Sub ScrollTo(Horizontal As Long, Vertical As Long, Window As Integer)

Scrolls the mimic within the window.

The horizontal and vertical co-ordinates define the reference point of the mimic that must be placed, if possible, at the centre of the window after the scroll operation.Horizontal A long that defines the horizontal co-ordinate of the

reference point for the scroll operation.Vertical A long that defines the vertical co-ordinate of the

reference point for the scroll operation.Window A integer representing the window in which the

operation is to take place.

Method Description

ISaGRAF Enhanced 4.21 - HMI 351

Page 364: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Mimic Object Events

Mimic Object ExamplesPrivate Sub Mimic_Open()

'-------- On event mimic_open initialise output strings

Text1.Text = ""

Text2.Text = ""

Text3.Text = ""

Text4.Text = ""

Text5.Text = ""

Text6.Text = ""

End Sub

Private Sub TextMimicEx1_Click()

'-------- Set the focus to the Menu mimic (mimic must be open)

Dim objMimic As Object

Set objMimic = Mimics.Item("Menu")

objMimic.Activate

End Sub

Event DescriptionBeforeClose Sub Mimic_BeforeClose(Cancel As Boolean)

Occurs when the mimic is about to be closed.Cancel Boolean value that can be set to True if the mimic

must not be closed.Cancel Boolean value that can be set to True if the mimic

must not be printed.Open Sub Mimic_Open()

Occurs when the mimic object is opened.

352 ISaGRAF Enhanced 4.21 - HMI

Page 365: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Windows Collection ObjectsThe Windows collection object represents the collection of the currently opened windows forthe active Project, or the collection of currently opened windows for a specific Mimic

Windows Object Properties

Windows Object Methods

Property As R/W DescriptionApplication Application R Returns the Application object from which

Windows object is stemmed.Count Long R Returns the number of Window objects in the

collection.Parent Object R Returns the parent object of the Windows object.

Method DescriptionItem* Function Item (Index As Variant) As Window

Returns the Window object of the collection that matches the passed arguments.Index A Long with a range from 1 to

Windows.Count, which represents the position of the window object in the collection, that specifies the item that must be returned.

Refresh Sub Refresh()

Refreshes all opened windows (if the collection is the one handled by the Application object).

Refreshes all opened windows for a particular mimic (if the collection is the one handled by a Mimic object).

Refresh

ISaGRAF Enhanced 4.21 - HMI 353

Page 366: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Window ObjectsA Window object represents an opened window on a specified Mimic.

Window Object Properties

Property As R/W DescriptionApplication Application R Returns the Application object from which

Window object is stemmed.Border Boolean R/W Returns or sets the Boolean attribute that

indicates if a border style must (True) or must not (False) be applied to the window.

ClientBorder Boolean R/W Returns or sets the Boolean attribute that indicates if a client border style must (True) or must not (False) be applied to the window.

CloseButton Boolean R/W Returns or sets the Boolean attribute that indicates if a close button must (True) or must not (False) be accessible on the window.

ControlBox Boolean R/W Returns or sets the Boolean attribute that indicates if a Control-menu box must (True) or must not (False) be accessible on the window.

Control-menu box refers to all buttons and menus accessible via the Title Bar of a window.

EnableMove Boolean R/W Returns or sets the Boolean attribute that indicates if the window must (True) or must not (False) be moveable

EnableResize Boolean R/W Returns or sets the Boolean attribute that indicates if the window must (True) or must not (False) be resizable.

GridDistanceHorizontal

Long R/W Returns or sets the distance that separates horizontally two points of the active window’s grid.

354 ISaGRAF Enhanced 4.21 - HMI

Page 367: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

GridDistanceVertical

Long R/W Returns or sets the distance that separates vertically two points of the active window’s grid.

Height Long R/W Returns or sets the height of the window.Layers Long R/W Returns or sets the layers currently displayed

on the window (Sixteen different layers are available (0..15), the layers property of a window is stored as a long. If layer n and m are selected for this window, layers property is set to 2n + 2m).

Left Long R/W Returns or sets the distance between the internal left edge of the window and the left edge of its container.

MaxButon Boolean R/W Returns or sets the Boolean attribute that indicates if a maximise button must (True) or must not (False) be accessible on the window.

MinButton Boolean R/W Returns or sets the Boolean attribute that indicates if a minimise button must (True) or must not (False) be accessible on the window.

Mode fvWindowMode R/W Returns or sets the mode of the window.

Mode can take one of the following fvWindowMode values:

fvWindowModeRun,

or fvWindowModeDesign.Parent Windows R Returns the parent object of the Window

object.ShowGrid Boolean R/W Returns or sets the Boolean attribute that

indicates if the window must (True) or must not (False) display the grid.

SnapToGrid Boolean R/W Returns or sets the Boolean attribute that indicates if the window must (True) or must not (False) activate the grid.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 355

Page 368: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

StaticBorder Boolean R/W Returns or sets the Boolean attribute that indicates if a static border style must (True) or must not (False) be applied to the window.

StretchContentsToFitSize

Boolean R/W Returns or sets the Boolean attribute that indicates if the window's content must (True) or must not (False) be stretched when this window is resized.

TitleBar Boolean R/W Returns or sets the Boolean attribute that indicates if a title bar must (True) or must not (False) be shown by the window.

ToolWindow Boolean R/W Returns or sets the Boolean attribute that indicates if a tool mimic style must (True) or must not (False) be applied to the window.

Top Long R/W Returns or sets the distance between the internal top edge of the window and the left edge of its container.

Width Long R/W Returns or sets the width of the window.ZoomRatio Long R Returns the zoom ratio currently applied to the

window.

Property As R/W Description

356 ISaGRAF Enhanced 4.21 - HMI

Page 369: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Window Object Methods

Method DescriptionActivate Sub Activate ()

Activate (sets focus) the window object.Close Sub Close([SaveChanges As fvSaveAction])

Closes the windows object.SaveChanges Optional argument. Default:

fvPromptToSaveChanges

SaveChanges can take one of the following fvSaveAction values:

fvDoNotSaveChanges, fvPromptToSaveChanges, fvSaveChanges

PrintOut Sub PrintOut([Copies As Integer], [Orientation As fvOrientation], [Printer As String])

Prints the window object only.Copies Optional argument. Default: 1

A number that specifies the number of copies to be printed.

Orientation Optional argument. Default: fvPortrait

Orientation can take one of the following fvOrientation values:

fvLandscape, fvPortraitPrinter Optional argument

A string that indicates the printer to be used. If not specified then the system default printer is used.

ISaGRAF Enhanced 4.21 - HMI 357

Page 370: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

ScrollTo Sub ScrollTo(Horizontal As Long, Vertical As Long)

Scrolls the mimic within the window.

The horizontal and vertical co-ordinates define the reference point of the mimic that must be placed, if possible, at the centre of the window after the scroll operation.Horizontal A long that defines the horizontal co-ordinate of the

reference point for the scroll operation.Vertical A long that defines the vertical co-ordinate of the

reference point for the scroll operation.Zoom Sub Zoom(ZoomValue As Long, [Horizontal As Long], [Vertical As

Long])

Zooms the content of the window around a reference point.

The horizontal and vertical co-ordinates define the reference point of the window’s mimic that must be placed, if possible and after the zoom operation, at the centre of the window.ZoomValue A long that indicates the zoom factor (as a

percentage of the original window size) to be applied to the window’s content.

Horizontal Optional argument. Default: window.width / 2

A long that defines the horizontal co-ordinate of the reference point for the zoom operation.

Vertical Optional argument. Default: window.height / 2

A long that defines the vertical co-ordinate of the reference point for the zoom operation.

Method Description

358 ISaGRAF Enhanced 4.21 - HMI

Page 371: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Window Object ExamplesPrivate Sub ZoomOut_Click()

'-------- Doubles the zoom on a window of the Mimic FVOjects5

Dim ObjWindow As Object

Set ObjWindow = FVObjects5.Windows.Item(1)

ObjWindow.Zoom ObjWindow.ZoomRatio*2, 0, 0

Text1.Text = "Current zoom is " & ObjWindow.ZoomRatio

End Sub

Private Sub TextWindowEx1_Click()

'-------- Prints the active window

Dim ThisWindow As Object

Set ThisWindow = Application.ActiveWindow

ThisWindow.PrintOut

End Sub

ISaGRAF Enhanced 4.21 - HMI 359

Page 372: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Graphics Collection ObjectsThe collection of Graphic objects.

Note: Graphic is a generic term that refers to either all the native HMI drawing elements . TheGraphic object type as such does not exist, the Graphics collection contains Object objects.

Graphics Object Properties

Graphics Object Methods

Property As R/W DescriptionApplication Application R Returns the Application object from which

Graphics object is stemmed.Count Long R Returns the number of Graphic object in the

collection.Parent Object R Returns the parent object of the Graphics

object - either a Group, Mimic or Symbol object depending on the context.

Method DescriptionItem Function Item(Index As Variant) As Object

Returns the indicated item (a Graphic object) from the Graphics collection.Index A Long with a range from 1 to Graphics.Count, which

represents the position of the graphic object in the collection, that specifies the item that must be returned.

OR

A String, which represents the name of the graphic object, that specifies the item that must be returned.

360 ISaGRAF Enhanced 4.21 - HMI

Page 373: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Graphic Objects in GeneralGraphic is a generic term referring to all native HMI drawing elements Poly, Shape, Text,Symbol and Group plus the Bitmap and Metafile objects. The Graphic object type as such doesnot exist, the Graphics collection contains Object objects.

The properties that define the appearance of all objects that belong to the Graphics collectionconform to certain rules. All properties that are related to colours follow the standard colourproperty naming scheme.

Pattern style rules

A pattern style is defined using the following conventions:

! A background colour: the colour used to fill the object.

! A pattern style: the pattern style used to fill the object (Solid, 45° Diagonal Hatching,135° Diagonal Hatching, Diagonal Cross Hatching, Horizontal Hatching, VerticalHatching, Cross Hatching, Transparent).

! A hatching colour: the colour used to draw hatching.

Line style rules

A line style is defined using the following conventions:

! A foreground colour: the colour used to draw the lines of the object.

! A line style: the line style used to draw the lines of the object (Solid, Dashed, Dotted,Dash Dot, Dash Dot Dot, Invisible).

! A line thickness: the line thickness used to draw the lines of the object.

ISaGRAF Enhanced 4.21 - HMI 361

Page 374: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Appearance rules

Appearance is defined using the following conventions:

! An appearance: the appearance used to draw the object (Regular, Shadow, Button,Coloured Button, Relief, Inverse Relief).

! A bottom-right and a top-left colour: the colours used to draw the bottom-right and thetop-left edges of the object when its appearance is not set to Regular.

! An appearance thickness: the thickness of the edges of the object when its appearance isnot set to Regular.

Text colour rules

Text colours are defined using following conventions:

! A foreground colour: the colour used to draw the text contained in the text object.

! A background colour: the colour used to fill the area defined by the including rectangleof the text object.

Standard colour property naming

Each colours used in an object can be fixed, indexed, transparent or blinking. Thus multipleproperties are needed to define a single colour. The names of these properties are constructedin a uniform manner using different but consistent suffixes. These suffixes are:

! Primary: Suffixed property returns or sets the OLE_COLOR code used for primarycolour (information returned or set is valid only if Primary Transparent suffixed propertyis set to False).

! Alternate: Suffixed property returns or sets the OLE_COLOR code used for alternatecolour (information returned or set is valid only if Alternate Transparent suffixedproperty is set to False).

! Primary Index: Suffixed property returns or sets the index of the indexed colour cell usedas primary colour. Indexed colour cells refer to the ones that can be found in theadvanced part of the palette (Primary Index suffixed property can vary from 1 to 32 if the

362 ISaGRAF Enhanced 4.21 - HMI

Page 375: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

chosen colour cell is indexed, if the chosen colour cell is fixed, Primary Index suffixedproperty is set to 0).

! Alternate Index: Suffixed property returns or sets the index of the indexed colour cellused as alternate colour. Indexed colour cells refer to the ones that can be found in theadvanced part of the palette (Alternate Index suffixed property can vary from 1 to 32 ifthe chosen colour cell is indexed, if the chosen colour cell is fixed, Alternate Indexsuffixed property is set to 0).

! Primary Transparent: Suffixed property returns or sets the transparent property thatindicates that the primary colour is transparent (True) or not (False).

! Alternate Transparent: Suffixed property returns or sets the transparent property thatindicates that the alternate colour is transparent (True) or not (False).

! Blink: Suffixed property returns or sets the index of the blinking frequency used for thiscolour (information is valid only if Primary suffixed property differs from Alternatesuffixed property).

Common Graphic Object Properties

The following properties are common to all the Graphic object types.

Property As R/W DescriptionAnchorX Integer R/W Returns or sets the horizontal co-ordinate of

the anchor point of the object. Anchor point co-ordinates are relative to the upper left point of the object.

AnchorY Integer R/W Returns or sets the vertical co-ordinate of the anchor point of the object. Anchor point co-ordinates are relative to the upper left of the object.

Animations Animations R Returns the animations collection representing the animations applied to the Graphic object

Application Application R Returns the Application object from which the Graphic object is stemmed.

ISaGRAF Enhanced 4.21 - HMI 363

Page 376: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

BackColorAlternate

OLE_Color R/W Returns or sets the alternate background colour of the shape. BackColorAlternate follows the Pattern Style rules.

BackColorAlternateIndex

Integer R/W Returns or sets the alternate background colour of the shape in the case of an indexed colour. BackColorAlternateIndex follows the Pattern Style rules.

BackColorAlternateTransparent

Boolean R/W Returns or sets the transparent property that indicates that the alternate background colour of the shape is transparent or not. BackColorAlternateTransparent follows the Pattern Style rules.

BackColorBlink Integer R/W Returns or sets the blinking frequency index of the background colour of the shape. BackColorBlink follows the Pattern Style rules.

BackColorPrimary OLE_Color R/W Returns or sets the primary background colour of the shape. BackColorPrimary follows the Pattern Style rules.

BackColorPrimaryIndex

Integer R/W Returns or sets the primary background colour of the shape in the case of an indexed colour. BackColorPrimaryIndex follows the Pattern Style rules.

BackColorPrimaryTransparent

Boolean R/W Returns or sets the transparent property that indicates that the primary background colour of the shape is transparent or not. BackColorPrimaryTransparent follows the Pattern Style rules.

Container Object R Returns the object in which the graphic is contained. Either the mimic, or in the case of a graphic within a symbol, the symbol.

EnableEvents Boolean R/W Returns or sets the Boolean that indicates if events must (True) or must not (False) be fired for the object..

Property As R/W Description

364 ISaGRAF Enhanced 4.21 - HMI

Page 377: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

ForeColorAlternate OLE_Color R/W Returns or sets the alternate foreground colour of the shape. ForeColorAlternate follows the Line Style rules.

ForeColorAlternateIndex

Integer R/W Returns or sets the alternate foreground colour of the shape in the case of an indexed colour. ForeColorAlternateIndex follows the Line Style rules.

ForeColorAlternateTransparent

Boolean R/W Returns or sets the transparent property that indicates that the alternate foreground colour of the shape is transparent or not. ForeColorAlternateTransparent follows the Line Style rules.

ForeColorBlink Integer R/W Returns or sets the blinking frequency index of the foreground colour of the shape. ForeColorBlink follows the Line Style rules.

ForeColorPrimary OLE_Color R/W Returns or sets the primary foreground colour of the shape. ForeColorPrimary follows the Line Style rules.

ForeColorPrimaryIndex

Integer R/W Returns or sets the primary foreground colour of the shape in the case of an indexed colour. ForeColorPrimaryIndex follows the Line Style rules.

ForeColorPrimaryTransparent

Boolean R/W Returns or sets the transparent property that indicates that the primary foreground colour of the shape is transparent or not. ForeColorPrimaryTransparent follows the Line Style rules.

HatchingColorAlternate

OLE_Color R/W Returns or sets the alternate hatching colour of the shape. HatchingColorAlternate follows the Pattern Style rules.

HatchingColorAlternateIndex

Integer R/W Returns or sets the alternate hatching colour of the shape in the case of an indexed colour. HatchingColorAlternateIndex follows the Pattern Style rules.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 365

Page 378: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

HatchingColorAlternateTranparent

Boolean R/W Returns or sets the transparent property that indicates that the alternate hatching colour of the shape is transparent or not. HatchingColorAlternateTranparent follows the Pattern Style rules.

HatchingColorBlink

Integer R/W Returns or sets the blinking frequency index of the hatching colour of the shape. HatchingColorBlink follows the Pattern Style rules.

HatchingColorPrimary

OLE_Color R/W Returns or sets the primary hatching colour of the shape. HatchingColorPrimary follows the Pattern Style rules.

HatchingColorPrimaryIndex

Integer R/W Returns or sets the primary hatching colour of the shape in the case of an indexed colour. HatchingColorPrimaryIndex follows the Pattern Style rules.

HatchingColorPrimaryTranparent

Boolean R/W Returns or sets the transparent property that indicates that the primary hatching colour of the shape is transparent or not. HatchingColorPrimaryTranparent follows the Pattern Style rules.

Height Integer R/W Returns or sets the height of the object.Layers Long R/W Returns or sets the layers on which the object

is drawn (Sixteen different layers are available (0..15), the layers property of a object is stored as a long. If layer n and m are selected for this object, its layers property is set to 2n + 2m). The object will be displayed only if one of the layers currently shown by its container matches one of the layers associated to it.

Left Integer R/W Returns or sets the distance between the left edge of the object and the left edge of its container.

Property As R/W Description

366 ISaGRAF Enhanced 4.21 - HMI

Page 379: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

LineStyle fvLineStyle R/W Returns or sets the line style of the shape (solid, dashed…). LineStyle follows the Line Style rules.

LineStyle can take one of the following fvLineStyle values:

FvLineStyleSolid

FvLineStyleDashed

fvLineStyleDotted

fvLineStyleDashDot

fvLineStyleDashDotDot

fvLineStyleInvisibleLineThickness Integer R/W Returns or sets the line width of the shape.

LineThickness follows the Line Style rules.Locked Boolean R/W Returns or sets the "locked" property of the

object.MaximumZoom Integer R/W Returns or sets the maximum limit of the

zoom range that can be applied to the object. The object will be displayed only if the zoom factor applied to its container is inside the zoom range defined by its Maximum and Minimum Zoom properties (zoom factor for a Mimic object can vary from 0 to 6400).

MinimumZoom Integer R/W Returns or sets the minimum limit of the zoom range that can be applied to the object. The object will be displayed only if the zoom factor applied to its container is inside the zoom range defined by its Maximum and Minimum Zoom properties (zoom factor for a Mimic object can vary from 0 to 6400).

Name String R/W Returns or sets the name used in a script to identify the object.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 367

Page 380: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Parent Object R Returns the object in which the graphic is contained. Either the mimic, or in the case of a graphic within a symbol, the symbol.

PatternStyle FvPatternStyle R/W Returns or sets the pattern style of the shape (solid, transparent, 45° diagonal hatching…). PatternStyle follows the Pattern Style rules.

PatternStyle can take one of the following fvPatternStyle values:

FvPatternStyleSolid

fvPatternStyleDiag45

fvPatternStyleDiag135

fvPatternStyleDiagCross

fvPatternStyleVertical

fvPatternStyleHorizontal

fvPatternStyleCross

fvPatternStyleInvisibleTag Variant R/W Returns or sets a general purpose variant

within the graphic object. The value is not saved.

Top Integer R/W Returns or sets the distance between the top edge of the object and the top edge of its container

Width Integer R/W Returns or sets the width of the object.

Property As R/W Description

368 ISaGRAF Enhanced 4.21 - HMI

Page 381: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Common Graphic Object Methods

The following methods are common to all the Graphic object types.

Method DescriptionMove Sub Move(left As Integer, [right As Integer], [width As Integer], [height

As Integer])

Moves the text object.left An Integer value indicating the horizontal co-ordinate

(x-axis) for the left edge of the text object in terms of the co-ordinate system used by its container (Independent of the zoom factor).

right Optional argument. Default: the_object.Right

An Integer value indicating the vertical co-ordinate (x-axis) for the top edge of the text object in terms of the co-ordinate system used by its container (Independent of the zoom factor).

width Optional argument. Default: the_object.Width

An Integer value indicating the new width of the object.height Optional argument. Default: the_object.Height

An Integer value indicating the new height of the object.Size Sub Size

(width As Integer, [height As Integer])

Resizes the object.width An Integer value indicating the new width of the object.height Optional argument. Default: the_object.Height

An Integer value indicating the new height of the object.

ISaGRAF Enhanced 4.21 - HMI 369

Page 382: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Common Graphic Object Events

The following events are common to all the Graphic object types. Events are fired only if theEnableEvents property of the underlying object has been set to True. This happensautomatically once the first event script has been associated with the object.

Event DescriptionClick Sub object_Click()

Occurs when the user presses and then releases a mouse button over the object.object Receiver object.

DblClick Sub object_DblClick()

Occurs when the user presses and releases a mouse button and then presses and releases it again over the object.object Receiver object.

MouseDown Sub object_MouseDown(button As Integer, shift As Integer, x As Variant, y As Variant)

Occurs when the user presses a mouse button over the object.object Receiver object.button An integer that identifies the button that was pressed to cause

the event. The button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.

370 ISaGRAF Enhanced 4.21 - HMI

Page 383: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

MouseDown (Continued)

shift An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the button argument is pressed. A bit is set if the key is down. The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT were pressed, the value of shift would be 6.

x A number that specifies the current location of the mouse pointer. The x value is always expressed in terms of the co-ordinate system used by its container independently of the current zoom factor applied to this one.

y A number that specifies the current location of the mouse pointer. The y value is always expressed in terms of the co-ordinate system used by its container independently of the current zoom factor applied to this one.

MouseEnter Sub object_MouseEnter(button As Integer, shift As Integer, x As Variant, y As Variant)

Occurs when the mouse pointer enters the area on the screen occupied by the object.object Receiver object.button An integer that corresponds to the state of the mouse buttons

when the event was caused. The button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that was pressed when events was caused.

Event Description

ISaGRAF Enhanced 4.21 - HMI 371

Page 384: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

MouseEnter (Continued)

shift An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the event was caused. A bit is set if the key is down. The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT were pressed, the value of shift would be 6.

x A number that specifies the current location of the mouse pointer. The x value is always expressed in terms of the co-ordinate system used by its container independently of the current zoom factor applied to this one.

y A number that specifies the current location of the mouse pointer. The y value is always expressed in terms of the co-ordinate system used by its container independently of the current zoom factor applied to this one.

MouseLeave Sub object_MouseLeave(button As Integer, shift As Integer, x As Variant, y As Variant)

Occurs when the user takes the mouse pointer out of an object.object Receiver object.button An integer that corresponds to the state of the mouse buttons

when the event was caused. The button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that was pressed when events was caused.

Event Description

372 ISaGRAF Enhanced 4.21 - HMI

Page 385: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

MouseLeave (Continued)

shift An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the event was caused. A bit is set if the key is down. The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT were pressed, the value of shift would be 6.

x A number that specifies the current location of the mouse pointer. The x value is always expressed in terms of the co-ordinate system used by its container independently of the current zoom factor applied to this one.

y A number that specifies the current location of the mouse pointer. The y value is always expressed in terms of the co-ordinate system used by its container independently of the current zoom factor applied to this one.

MouseUp Sub object_MouseUp(button As Integer, shift As Integer, x As Variant, y As Variant)

Occurs when the user releases a mouse button over the poly object.object Receiver object.button An integer that identifies the button that was released to cause

the event. The button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.

Event Description

ISaGRAF Enhanced 4.21 - HMI 373

Page 386: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Graphic Objects ExamplesPrivate Sub ButtonYSmaller_Click()

'-------- Decreases height of the Boundary shape

If (Boundary.Height > 100) Then

Boundary.Height = Boundary.Height - 10

End If

End Sub

Private Sub TextGraphicEx5_Click()

'-------- Gets the name of the container object

Dim ThisContainer As Object

MouseUp (Continued)

shift An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the button argument is released. A bit is set if the key is down. The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2 ). These bits correspond to the values 1, 2, and 4, respectively. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT were pressed, the value of shift would be 6.

x A number that specifies the current location of the mouse pointer. The x value is always expressed in terms of the co-ordinate system used by its container independently of the current zoom factor applied to this one.

y A number that specifies the current location of the mouse pointer. The y value is always expressed in terms of the co-ordinate system used by its container independently of the current zoom factor applied to this one.

Event Description

374 ISaGRAF Enhanced 4.21 - HMI

Page 387: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Set ThisContainer = TextGraphicEx5.Container

MsgBox "Container = " & ThisContainer.Name

End Sub

ISaGRAF Enhanced 4.21 - HMI 375

Page 388: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

AVI ObjectsAn object that represents an AVI image. The properties, methods and events are those asdocumented in the topic Graphic Objects in General plus the following.

AVI Object Properties

Property As R/W DescriptionFileName String R Returns the file name associated with the AVI

object.PlayCondition Boolean R/W Returns or sets the PlayCondition property. A

True condition initiates play. A False condition halts play.

PlayStatus Boolean R/W Returns the PlayStatus property. A True condition indicates the AVI is playing. A false condition indicates the AVI is no playing.

Transparent Boolean R/W Returns or sets the transparent property that indicates that a colour must be shown as transparent when the AVI object is drawn.

TransparentColor OLE_Color R/W Returns or sets the colour (OLE_COLOR code) that must be shown as transparent when the AVI object is drawn (information returned or set is valid only if the Transparent property is set to True).

TransparentColorIndex

Integer R/W Returns or sets the colour (indexed color) that must be shown as transparent when the AVI object is drawn (information returned or set is valid only if the Transparent property is set to True).

376 ISaGRAF Enhanced 4.21 - HMI

Page 389: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

AVI Object Methods

Related Topics “Common Graphic Object Properties”, on page 363

Method DescriptionSetOriginalSize Sub SetOriginalSize ()

Resets the object to its original size..

ISaGRAF Enhanced 4.21 - HMI 377

Page 390: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Bitmap ObjectsAn object that represents a BMP, a JPG or a JPEG image. The properties, methods and eventsare those as documented in the topic Graphic Objects in General plus the following.

Bitmap Object Properties

Bitmap Object Methods

Related Topics “Common Graphic Object Properties”, on page 363

Property As R/W DescriptionFileName String R Returns the file name associated with the

bitmap object.Transparent Boolean R/W Returns or sets the transparent property that

indicates that a colour must be shown as transparent when the bitmap object is drawn.

TransparentColor OLE_Color R/W Returns or sets the colour (OLE_COLOR code) that must be shown as transparent when the bitmap object is drawn (information returned or set is valid only if the Transparent property is set to True).

TransparentColorIndex

Integer R/W Returns or sets the colour (indexed color) that must be shown as transparent when the bitmap object is drawn (information returned or set is valid only if the Transparent property is set to True).

Method DescriptionSetOriginalSize Sub SetOriginalSize ()

Resets the object to its original size..

SetOriginalSize

378 ISaGRAF Enhanced 4.21 - HMI

Page 391: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

GIF ObjectsAn object that represents a GIF image. The properties, methods and events are those asdocumented in the topic Graphic Objects in General plus the following.

GIF Object Properties

GIF Object Methods

Property As R/W DescriptionFileName String R Returns the file name associated with the GIF

object.PlayCondition Boolean R/W Returns or sets the PlayCondition property. A

True condition initiates play. A False condition halts play.

PlayStatus Boolean R/W Returns the PlayStatus property. A True condition indicates the GIF is playing. A false condition indicates the GIF is not playing.

Transparent Boolean R/W Returns or sets the transparent property that indicates that a colour must be shown as transparent when the GIF object is drawn.

TransparentColor OLE_Color R/W Returns or sets the colour (OLE_COLOR code) that must be shown as transparent when the GIF object is drawn (information returned or set is valid only if the Transparent property is set to True).

TransparentColorIndex

Integer R/W Returns or sets the colour (indexed color) that must be shown as transparent when the GIF object is drawn (information returned or set is valid only if the Transparent property is set to True).

Method DescriptionSetOriginalSize Sub SetOriginalSize ()

Resets the object to its original size..

SetOriginalSize

ISaGRAF Enhanced 4.21 - HMI 379

Page 392: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Group ObjectsAn object that represents a group of drawing elements. The properties, methods and events arethose as documented in the topic Graphic Objects in General plus the following.

Group Object Properties

Property As R/W DescriptionGraphics Graphic R Returns the collection of all graphic objects in

the group.

380 ISaGRAF Enhanced 4.21 - HMI

Page 393: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Metafile ObjectsAn object that represents a WMF or EMF image. The properties, methods and events are thoseas documented in the topic Graphic Objects in General plus the following.

Metafile Object Properties

Metafile Object Methods

Property As R/W DescriptionFileName String R Returns the file name associated with the

bitmap object.

Method DescriptionSetOriginalSize Sub SetOriginalSize ()

Resets the object to its original size..

ISaGRAF Enhanced 4.21 - HMI 381

Page 394: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Poly ObjectsAn object that represents a Line, a Polyline, a Polygon or Bézier curve graphic object. Theproperties, methods and events are those as documented in the topic Graphic Objects inGeneral plus the following.

Poly Object Properties

Property As R/W DescriptionBottomRightColorAlternate

OLE_Color R/W Returns or sets the bottom right colour of the shape.

BottomRightColorAlternateIndex

Integer R/W Returns or sets the bottom right colour of the shape in the case of an indexed colour.

BottomRightColorAlternateTransparent

Boolean R/W Returns or sets the transparent property that indicates that the bottom right colour of the shape is transparent or not..

BottomRightColorBlink

Integer R/W Returns or sets the blinking frequency index of the bottom right colour of the shape..

BottomRightColorPrimary

Integer R/W Returns or sets the primary bottom right colour of the shape.

BottomRightColorPrimaryIndex

Integer R/W Returns or sets the primary bottom right colour of the shape in the case of an indexed colour.

BottomRightColorPrimaryTransparent

Boolean R/W Returns or sets the transparent property that indicates that the primary bottom right colour of the shape is transparent or not.

NbPoints Integer R/W Returns the number of points that composes the poly.

TopLeftColorAlternate

OLE_Color R/W Returns or sets the top Left colour of the shape.

TopLeftColorAlternateIndex

Integer R/W Returns or sets the top Left colour of the shape in the case of an indexed colour.

TopLeftColorAlternateTransparent

Boolean R/W Returns or sets the transparent property that indicates that the top Left colour of the shape is transparent or not..

382 ISaGRAF Enhanced 4.21 - HMI

Page 395: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

TopLeftColorBlink Integer R/W Returns or sets the blinking frequency index of the top Left colour of the shape..

TopLeftColorPrimary Integer R/W Returns or sets the primary top Left colour of the shape.

TopLeftColorPrimaryIndex

Integer R/W Returns or sets the primary top Left colour of the shape in the case of an indexed colour.

TopLeftColorPrimaryTransparent

Boolean R/W Returns or sets the transparent property that indicates that the primary top Left colour of the shape is transparent or not.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 383

Page 396: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Shape ObjectsAn object that represents a Rectangle, a Rounded Rectangle, an Ellipse, an Arc or a Half-Arcgraphic object. The properties, methods and events are those as documented in the topicGraphic Objects in General plus the following.

Shape Object Properties

Property As R/W DescriptionAppearance fvAppearance R/W Returns or sets the appearance of the shape

(regular, shadow, button…). Appearance follows the Appearance rules.

Appearance can take one of the following fvAppearance values:

FvAppearanceRegular

FvAppearanceShadow

FvAppearanceButton

FvAppearanceColoredButton

FvAppearanceRelief

fvAppearanceInverseReliefAppearanceThickness Integer R/W Returns or sets the edge thickness of the

shape having the Appearance property not set to Regular. AppearanceThickness follows the Appearance rules.

BottomRightColorAlternate

OLE_Color R/W Returns or sets the alternate bottom-right colour of the shape. BottomRightColorAlternate follows the Appearance rules.

BottomRightColorAlternateIndex

Integer R/W Returns or sets the alternate bottom-right colour of the shape in the case of an indexed colour. BottomRightColorAlternateIndex follows the Appearance rules.

384 ISaGRAF Enhanced 4.21 - HMI

Page 397: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

BottomRightColorAlternateTransparent

Boolean R/W Returns or sets the transparent property that indicates that the alternate bottom-right colour of the shape is transparent or not. BottomRightColorAlternateTransparent follows the Appearance rules.

BottomRightColorBlink

Integer R/W Returns or sets the blinking frequency index of the bottom-right colour of the shape. BottomRightColorBlink follows the Appearance rules.

BottomRightColorPrimary

OLE_Color R/W Returns or sets the primary bottom-right colour of the shape. BottomRightColorPrimary follows the Appearance rules.

BottomRightColorPrimaryIndex

Integer R/W Returns or sets the primary bottom-right colour of the shape in the case of an indexed colour. BottomRightColorPrimaryIndex follows the Appearance rules.

BottomRightColorPrimaryTransparent

Boolean R/W Returns or sets the transparent property that indicates that the primary bottom-right colour of the shape is transparent or not. BottomRightColorPrimaryTransparent follows the Appearance rules.

CurvatureX Integer R/W Returns or sets the horizontal curvature of the rounded shape (expressed in pixels).

CurvatureY Integer R/W Returns or sets the horizontal curvature of the rounded shape (expressed in pixels).

OpenedBorder Boolean R/W Returns or sets the boolean that indicates if the drawing of the shape having the 1/2 or 1/4 Ellipse shape style must be opened or closed.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 385

Page 398: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

ShapeStyle FvShapeStyle R/W Returns or sets the shape style of the shape (rectangle, rounded rectangle..).

ShapeStyle can take one of the following fvShapeStyle values:

FvShapeRectangle

FvShapeRoundedRectangle

FvShapeEllipse

FvShapeHalfEllipse

fvShapeQuartEllipseTopLeftColorAlternate

OLE_Color R/W Returns or sets the alternate top-left colour of the shape. TopLeftColorAlternate follows the Appearance rules.

TopLeftColorAlternateIndex

Integer R/W Returns or sets the alternate top-left colour of the shape in the case of an indexed colour. TopLeftColorAlternateIndex follows the Appearance rules.

TopLeftColorAlternateTransparent

Boolean R/W Returns or sets the transparent property that indicates that the alternate top-left colour of the shape is transparent or not. TopLeftColorAlternateTransparent follows the Appearance rules.

TopLeftColorBlink Integer R/W Returns or sets the blinking frequency index of the top-left colour of the shape. TopLeftColorBlink follows the Appearance rules.

TopLeftColorPrimary OLE_Color R/W Returns or sets the primary top-left colour of the shape. TopLeftColorPrimary follows the Appearance rules.

Property As R/W Description

386 ISaGRAF Enhanced 4.21 - HMI

Page 399: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

TopLeftColorPrimaryIndex

Integer R/W Returns or sets the primary top-left colour of the shape in the case of an indexed colour. TopLeftColorPrimaryIndex follows the Appearance rules.

TopLeftColorPrimaryTransparent

Boolean R/W Returns or sets the transparent property that indicates that the primary top-left colour of the shape is transparent or not. TopLeftColorPrimaryTransparent follows the Appearance rules.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 387

Page 400: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Symbol ObjectsAn object that represents a Symbol composed of a number of other graphic objects. Unlike thegroup object, Symbol instances are stemmed from a library. The properties, methods andevents are those as documented in the topic Graphic Objects in General plus the following.

Symbol Object Properties

Property As R/W DescriptionAngle Integer R/W Returns or sets the "angle" property of the

symbol object. This angle, expressed in degree, is used to draw the symbol instance according to the original position and size of its model stored in the symbol library.

BranchContext String R Returns the branch context (mimic branch) of the symbol.

FileName String R Returns the name of the file containing the symbol definition.

KeepOriginal Size Boolean R Returns True if the Original Size tick box is selected, else False

Graphics Graphics R Returns the collection of all graphic objects in the symbol.

LocalBranch String R/W Returns or sets the local branch of the symbol object.

388 ISaGRAF Enhanced 4.21 - HMI

Page 401: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Symbol Object Events

Event DescriptionBeforeEvent Function Symbol_BeforeEvent () As Boolean

Occurs before each of the standard events fired from any of the sub-objects within a symbol. If you return True then the next event will not be fired.

AfterEvent Sub Symbol_AfterEvent()

Occurs after each of the standard events fired from any of the sub-objects within a symbol. AfterEvent is always fired event if the other event has not fired because it was disabled by a previous BeforeEvent returning True.

ISaGRAF Enhanced 4.21 - HMI 389

Page 402: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Text ObjectsAn object that represents a text object. The properties, methods and events are those asdocumented in the topic Graphic Objects in General plus the following.

Text Object Properties

Property As R/W DescriptionAlignment FvAlignment R/W Returns or sets the alignment of the text

contained in the text object (right, center or left).

Alignment can take one of the following fvAlignment values:

FvAlignmentLeft

FvAlignmentCenter

fvAlignmentRightAppearance FvAppearance R/W Returns or sets the appearance of the text

(regular, shadow, button…). Appearance follows the Appearance rules.

Appearance can take one of the following fvAppearance values:

FvAppearanceRegular

FvAppearanceShadow

FvAppearanceButton

FvAppearanceColoredButton

fvAppearanceRelief

fvAppearanceInverseReliefAppearanceThickness Integer R/W Returns or sets the edge thickness of the text

having the Appearance property not set to Regular. AppearanceThickness follows the Appearance rules.

390 ISaGRAF Enhanced 4.21 - HMI

Page 403: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

AutoSize Boolean R/W Returns or sets the "AutoSize" property of the text object.

This property indicates if the text must (True) or must not (False) be stretched in order to fit in the including rectangle of the text object. Note: The reverse proposal also works - if the including rectangle of the text object must (True) or must not (False) be stretched in order to exactly include the contained text of the text object.

BottomRightColorAlternate

OLE_Color R/W Returns or sets the alternate bottom-right colour of the text. BottomRightColorAlternate follows the Appearance rules.

BottomRightColorAlternateIndex

Integer R/W Returns or sets the alternate bottom-right colour of the text in the case of an indexed colour. BottomRightColorAlternateIndex follows the Appearance rules.

BottomRightColorAlternateTransparent

Boolean R/W Returns or sets the transparent property that indicates that the alternate bottom-right colour of the text is transparent or not. BottomRightColorAlternateTransparent follows the Appearance rules.

BottomRightColorBlink

Integer R/W Returns or sets the blinking frequency index of the bottom-right colour of the text. BottomRightColorBlink follows the Appearance rules.

BottomRightColorPrimary

OLE_Color R/W Returns or sets the primary bottom-right colour of the text. BottomRightColorPrimary follows the Appearance rules.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 391

Page 404: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

BottomRightColorPrimaryIndex

Integer R/W Returns or sets the primary bottom-right colour of the text in the case of an indexed colour. BottomRightColorPrimaryIndex follows the Appearance rules.

BottomRightColorPrimaryTransparent

Boolean R/W Returns or sets the transparent property that indicates that the primary bottom-right colour of the text is transparent or not. BottomRightColorPrimaryTransparent follows the Appearance rules.

Font Font R/W Returns or sets the font of the text objectMargin Integer R/W Returns or sets the margin of the text

contained in a text object (expressed in pixel).

Multiline Boolean R/W Returns or sets the "Multiline" property of the text object.

This property indicates if embedded "\n" sequence in the text object must (True) or must not (False) be considered as a line break.

Text String R/W Returns or sets the text contained in the text object

Top Integer R/W Returns or sets the distance between the top edge of the text and the top edge of its container

TopLeftColorAlternate

OLE_Color R/W Returns or sets the alternate top-left colour of the text. TopLeftColorAlternate follows the Appearance rules.

TopLeftColorAlternateIndex

Integer R/W Returns or sets the alternate top-left colour of the text in the case of an indexed colour. TopLeftColorAlternateIndex follows the Appearance rules.

Property As R/W Description

392 ISaGRAF Enhanced 4.21 - HMI

Page 405: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

TopLeftColorAlternateTransparent

Boolean R/W Returns or sets the transparent property that indicates that the alternate top-left colour of the text is transparent or not. TopLeftColorAlternateTransparent follows the Appearance rules.

TopLeftColorBlink Integer R/W Returns or sets the blinking frequency index of the top-left colour of the text. TopLeftColorBlink follows the Appearance rules.

TopLeftColorPrimary OLE_Color R/W Returns or sets the primary top-left colour of the text. TopLeftColorPrimary follows the Appearance rules.

TopLeftColorPrimaryIndex

Integer R/W Returns or sets the primary top-left colour of the text in the case of an indexed colour. TopLeftColorPrimaryIndex follows the Appearance rules.

TopLeftColorPrimaryTransparent

Boolean R/W Returns or sets the transparent property that indicates that the primary top-left colour of the text is transparent or not. TopLeftColorPrimaryTransparent follows the Appearance rules.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 393

Page 406: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Variables CollectionThe collection of all currently subscribed Variable objects including all those used inanimations in any opened Mimic.

Variables Object Properties

Variables Object Methods

Property As R/W DescriptionApplication Application R Returns the Application object from which

Variables object is stemmed.Count Long R Returns the number of Variable objects in the

collection.Parent Object R Returns the parent object of the Variables

object (For Variables, the Parent object is always the Project object).

Method DescriptionAdd Function Add(Name As String [,[Type As] fvVariableType]) As Variable

Dynamically adds a variable to the Variables collection. If the variable is already subscribed by an animation, it may still be subscribed using this method. In this case it will not be un-subscribed when the animation is closed.Name A string containing the name of the variable to add.

394 ISaGRAF Enhanced 4.21 - HMI

Page 407: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Variables Object ExamplesDim WithEvents objOPCVar As Variable

Private Sub Text1_Click()

Variables.Add "Main:Branch1.B1", fvVariableTypeBit

Set objOPCVar = [Main:Branch1.B1]

objOPCVar.EnableEvents = True

Type Optional argument. Default: fvVariableTypeAny

A constant indicating the variable type selected from the following fvVariableType values:

FvVariableTypeAlarm

fvVariableTypeAny

fvVariableTypeBit

fvVariableTypeRegister

fvVariableTypeText Item* Function Item(Index As Variant) As Variable

Returns the indicated item (a Variable object) in the Variables collection.Index A Long with a range from 1 to Variables.Count, which

represents the position of the variable in the collection, that specifies the item that must be returned.

OR

A String, which represents the name of the variable, that specifies the item that must be returned.

Remove Sub Remove(Name As String)

Un-subscribes a variables subscribed using the Add method.Name A string containing the name of the variable to remove.

Method Description

ISaGRAF Enhanced 4.21 - HMI 395

Page 408: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

End Sub

Private Sub objOPCVar_ValueChange()

MsgBox objOPCVar.Value

End Sub

Private Sub Text11_Click()

Dim objVar As Object

For Each objVar In TheseVariables

MsgBox objVar.Name

MsgBox objVar.Value

Next objVar

End Sub

396 ISaGRAF Enhanced 4.21 - HMI

Page 409: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Variable ObjectsThe Variable object represents all variable types.

Variable Object Properties

Property As R/W DescriptionApplication Application R Returns the Application object from which

Variable object is stemmed from.CloseLabel R Returns the close label of the variable if it is

of type fvVariableTypeBit Description String R Returns the description of the variable.EnableEvents Boolean R/W Returns or sets the Boolean that indicates if

events must (True) or must not (False) be fired for the variable.

When this property is disabled, the variable associated scripts are not performed.

ForceOffLabel String R Returns the force off label of the variable if it is of type fvVariableTypeBit.

ForceOnLabel String R Returns the force on label of the variable if it is of type fvVariableTypeBit.

MinimumValue Double R Returns the minimum value of the variable if it is of type fvVariableTypeRegister.

MaximumValue Double R Returns the maximum value of the variable if it is of type fvVariableTypeRegister

Name String R Returns the name of the variable.OpenLabel String R Returns the open label of the variable if it is

of type fvVariableTypeBitParent Variables R Returns the parent object of the Variable

object (For Variable, the Parent object is always the Variables object).

PreviousStatus fvVariableStatus

R Returns the previous status of the variable. See Status for further information.

ISaGRAF Enhanced 4.21 - HMI 397

Page 410: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

PreviousValue Variant R Returns the previous Value of the variable.Quality Integer R Returns the quality of a variable.SecurityLevel Long R Returns the security level of the bit variable.Status fvVariableStatu

sR Returns the status of the variable. Status can

take one of the following fvVariableStatus values:

FvVariableStatusWaiting

FvVariableStatusGood

FvVariableStatusBad

FvVariableStatusConfigError

FvVariableStatusNotConnected

Status is automatically set to fvVariableStatusWaiting until the variable subscription is complete.

Status is automatically set to fvVariableStatusNotConnected if the server cannot be reached (or has failed).

TimeStamp Date R The time at which the variable was last updated.

Type fvVariableType R Returns the type of the variable as it was returned by the server. Type can take one of the following fvVariableType values: fvVariableTypeAny

fvVariableTypeBit

fvVariableTypeRegister

fvVariableTypeText.

fvVariableTypeAny means that the returned type is unknown.

Property As R/W Description

398 ISaGRAF Enhanced 4.21 - HMI

Page 411: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Variable Object Events

Units String E Returns the Units of a variable if it is of type fvVariableTypeRegister

UserData Variant R/W Returns or sets an expression that stores any extra data needed for your program. The User can use this property to identify objects.

Value* Variant R/W Returns or sets the Value of the variable.

If the type returned by the server for this variable is not compatible with the value passed for this property then the value will be discarded.

Method DescriptionValueChange Sub object_ValueChange()

Occurs when the value of the variable has changed.object Receiver object.

Property As R/W Description

ISaGRAF Enhanced 4.21 - HMI 399

Page 412: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Variable Object ExamplesPrivate Sub objOPCVar_ValueChange()

'-------- Records the value of the variable

Const BufferSize = 50

Const LogFile = "HistoricLog.txt"

Static Buffer(BufferSize) As String

Static BPointer As Integer

'-------- Record in a string array

'-------- Note the use of the _ continuation character

Buffer(BPointer) = Format(Date, " dd/mm/yyyy") & "," & _

Format(Time, "hh:nn:ss") & "," & objOPCVar.Value

'-------- If string array full then flush to file and start again

If (BPointer < BufferSize) Then

BPointer = BPointer + 1

Else

' Print Date & " " & Time & " Sending buffer To file"

Open LogFile For Append As #1

For BPointer = 1 To BufferSize

Print #1, Buffer(BPointer)

Next BPointer

Close #1

BPointer = 1

End If

Private Sub TextGetVarInfo_Click()

'-------- Gets and display information about a server variable

400 ISaGRAF Enhanced 4.21 - HMI

Page 413: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

'-------- NOTE the variable must be subscribed

Dim WorkVariable As Object

Dim VarName As String

VarName = TextInput.Text ' Name of variable to test

Set WorkVariable = TheseVariables.Item(VarName)

'-------- Get properties common to all variables

Text102.Text = "Description: " & WorkVariable.Description

Select Case WorkVariable.Status

Case fvVariableStatusWaiting

Text103.Text = "Status: Waiting"

Case fvVariableStatusGood

Text103.Text = "Status: Good"

Case fvVariableStatusBad

Text103.Text = "Status: Bad"

Case fvVariableStatusConfigError

Text103.Text = "Status: Configuration error"

Case fvVariableStatusNotConnected

Text103.Text = "Status: Not Connected"

Case Else

Text103.Text = "Status: Unknown"

End Select

'-------- Get properties specific to variable types

Select Case WorkVariable.Type

Case fvVariableTypeBit

Text104.Text = "Bit"

If (WorkVariable.Value = 0) Then

Text105.Text = "Value: " & WorkVariable.CloseLabel

Else

ISaGRAF Enhanced 4.21 - HMI 401

Page 414: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Text105.Text = "Value: " & WorkVariable.OpenLabel

End If

Case fvVariableTypeRegister

Text104.Text = "Type: Register"

Text105.Text = "Value: " & WorkVariable.Value & " " & WorkVariable.Units

Case fvVariableTypeText

Text104.Text = "Text"

Text105.Text = "Value: " & WorkVariable.Value

Case Else

Text104.Text = "Unknown variable type: " & WorkVariable.Type

End Select

End Sub

402 ISaGRAF Enhanced 4.21 - HMI

Page 415: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

ISaGRAF Enhanced 4.21 - HMI 403

Page 416: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties
Page 417: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Security FeaturesThe security system is applied to manage users and their access rights. The features availablefrom the HMI and the project at any time depend on the access rights of the current user.

The HMI security system is based on a user and profile system:

! A profile contains a list of access rights selected from a number of categories

! A user is given a name and password and allocated one or more profiles

Users log on to the system by entering their names and passwords in a special dialog box. Onlyone user can be logged on at any time.

As part of the security configuration, you can create a default user which supplies the accessrights when no other user is logged on.

ISaGRAF Enhanced 4.21 - HMI 405

Page 418: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

User ManagerThe User Manager is used to add and configure users and profiles. You access the UserManager from the Tools menu by choosing Security, then Configure.

The User Manager contains two main areas:

! The left pane, containing a tree control showing the users and allocated profiles. Right-clicking in this area will open a pop-up menu that may be used to add, copy, modify, anddelete users.

! The right pane, containing a tree control showing the profiles and the users to which theyhave been allocated. Right-clicking in this area will open a pop-up menu that may beused to add, copy, modify, and delete profiles.

At the bottom is a list box from which you can select the default user.

406 ISaGRAF Enhanced 4.21 - HMI

Page 419: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring Profiles

To add and configure a profile

1. From the Tools menu, select Security, then Configure to open the user manager.

2. Right-click in the right pane of the User Manager, and from the pop-up menu, select NewProfile.

3. Name the profile. This creates a new unconfigured profile.

4. Right-click on the new profile then from the contextual menu select Edit Profile.

The profile window appears containing a list of user right categories. If you areconfiguring a new profile, none of the categories will have any rights selected.

5. In the Categories section, set the appropriate administration rights for the new profile.

Note: You must create one profile with all administration rights before creating other profiles.

ISaGRAF Enhanced 4.21 - HMI 407

Page 420: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

6. To change a category, double-click it in the list. Individual rights can then be enabled anddisabled by selecting the corresponding tick box. You can select other categories usingcategory the list box. All and None options are provided to quickly select all or none ofthe rights.

7. Click OK to confirm the changes in the category box and then close the profile box.

408 ISaGRAF Enhanced 4.21 - HMI

Page 421: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Configuring Users

To add and configure a user

1. From the Tools menu, select Security, then Configure to open the User Manager.

2. Right-click in the left pane of the User Manager and from the contextual menu selectNew User.

3. Enter a name for the new user. This creates a new unconfigured user; user names are notcase sensitive.

4. Right-click on the new user and from the pop-up menu select Edit User.

The User editor appears containing the user properties.

ISaGRAF Enhanced 4.21 - HMI 409

Page 422: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

5. Enter a password for the user in the Password field and confirm the password by enteringit again in the Confirm Password field. Click Set to set the password. Passwords cancontain any alphanumeric character plus the underscore. Passwords are case sensitive.

6. Allocate a profile by selecting it in the list of Not Member Of and selecting the << button.You can add more than one profile. The rights are combined using a logical OR.

7. When finished, click Close.

Note: You can also add profiles to users by dragging and dropping them in the main UserManagement configuration box.

410 ISaGRAF Enhanced 4.21 - HMI

Page 423: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Security CategoriesYou can configure access rights in the HMI according to the security category.

Category Options DescriptionAdministration NONE or ALL When set to ALL, the user has access to

the following menu 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 ALL When set to ALL, the user has access to the following menu commands:

Tools.Preferences.Colours…

Tools.Preferences.Blinking…

Tools.Preferences.ActiveX Controls…

Tools.Preferences.Decluttering…Design NONE or ALL When set to ALL, the user can modify

the current project, that is, add / modify / delete windows, graphical elements, animations, and scripts.

Desktop* Only two: NONE or ALL When set to ALL, the user has access to the underlying operating system keys (example: Ctrl-Alt-Del).

Print* Only two: NONE or ALL When set to ALL, the user has access to the print tools.

ISaGRAF Enhanced 4.21 - HMI 411

Page 424: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

* Not implemented at time of writing.

Exit* Only two: NONE or ALL When set to ALL, the user may shut down the HMI.

Zoom Only two: NONE or ALL When set to ALL, the user may zoom windows.

Layer 0 to 15 At runtime, a drawing layer appears only if the user has the corresponding layer level.

Window 0 to 63 At runtime, a window can 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.

412 ISaGRAF Enhanced 4.21 - HMI

Page 425: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Adding Categories

The ability for the user to add additional security categories is provided to allow securitychecking for third party embedded ActiveX controls. Additional security categories are addedusing a special text file which can be located in either the program directory of HMI or theConfig 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 newcategory then has a section of its own which is used to provide the name of the category to theuser 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=1AlarmAck=32[Category\AlarmViewer]0009-English=AlarmViewer[Category\AlarmAck]0000-Neutral=Alarm Acknowledge0009-English=Alarm Acknowledge040C-French Standard=Acqittement d’alarmes0C0C-French Canadian=Acqittement d’alarmes

For further information on using this file, please contact technical support.

ISaGRAF Enhanced 4.21 - HMI 413

Page 426: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Logging On and OffTo log on, you enter a user’s name and password in the Log On dialog box. As standard, thisappears when you select Log-On then Security from the Tools menu. It may also be availablefrom one of the keyboard function keys, depending on the project configuration (see the topicon Keyboard Layout). When you log on, the current user (if any) is automatically logged off.It is not necessary for the current user to log off as a separate operation.

You can, if necessary, log off manually by accessing the Tools menu, selecting Security thenLog-Off.

Default User Rights

When the current user logs off, the access rights revert to those specified by the default user (asconfigured by the User Manager).

If there is no specified default user and there is one or more users configured, the Log On boxappears at start-up or when a user logs off, and all rights are disabled until another user logs on.

414 ISaGRAF Enhanced 4.21 - HMI

Page 427: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Symbol LibraryThe Symbol Library holds over 3,000 symbols for industrial automation, including pumps,pipes, valves, tanks, mixers, motors, ducts, electrical symbols, flow meters, material handling,sensors, PLCs, transmitters, and ISA symbols.

The symbols in the library are of three types: pictures, bitmaps, and textures. These symbolsare sorted into categories. You can change or add symbols and categories.

ISaGRAF Enhanced 4.21 - HMI 415

Page 428: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

CategoriesSymbols are sorted into categories. Category names hold up to 40 characters. A category canhold a maximum of 32,767 symbols. You can edit or add categories.

416 ISaGRAF Enhanced 4.21 - HMI

Page 429: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Creating Categories

To create a new category of symbols

! From the File menu, choose Create New Category.

! Category Description, Enter a description for the new category, up to 40 characters.Spaces and symbols are allowed.

! DOS Filename, Type in a valid DOS filename for the new category. The filename mustbe eight characters or less and the file extension must be CAT. Do not include a path ordrive letter in the filename. The new category will be created in the directory specifiedby the Category File Path, which can be specified on the Configure Symbol Libraryscreen.

ISaGRAF Enhanced 4.21 - HMI 417

Page 430: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Editing Categories

To access the Edit Category dialog box

! Right-click on a category, or choose Edit Category from the Edit menu.

Category Description

Type in a description for the category, up to 40 characters.

Category Information

! DOS Filename, the name and path of the category file (*.CAT) that contains all of thesymbol data for this category. These files can be freely copied or moved to othercomputers.

! File Size, the size of the DOS category file, in kilobytes.

! Number of symbols, the total number of symbols contained in the category. Maximum is32,767.

418 ISaGRAF Enhanced 4.21 - HMI

Page 431: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Deleting Categories

To delete an entire category, you must use File Manager, Explorer, or DOS to delete thecategory (*.CAT) file. To determine a category's filename, right-click on the category.

ISaGRAF Enhanced 4.21 - HMI 419

Page 432: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Making Categories "Read-Only"

When placing symbols on a network, you may want to make a category "read-only" so thatusers can use the symbols without messing them up. To make a category read-only, simply setthe DOS read-only file attribute for the category file. To determine the DOS filename of acategory, right-click on the category name in the list of categories on the Symbol tab.

When a category is set as read-only, users cannot delete, move, rename, or add to its symbols.

420 ISaGRAF Enhanced 4.21 - HMI

Page 433: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

SymbolsYou can perform many tasks with the symbols contained in the Symbol Library.

The library can contain three types of symbols:

! Pictures, vector-based drawings that can be stretched without distortion. Pictures areactually implemented using a Windows metafile (*.wmf).

! Bitmaps, pixel-based drawings that look best at their original size. Stretching a bitmapcan result in a jagged, distorted image.

! Texture, similar to bitmaps, except that they tile when you stretch it to form anever-ending pattern.

ISaGRAF Enhanced 4.21 - HMI 421

Page 434: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Editing Symbols

Editing allows you to change the name of a symbol or remove it from the library or copy it tothe clipboard:

! Symbol Description, name of the symbol. A name can hold a maximum of 80characters.

! Delete Symbol, removes the symbol from the category.

! Copy to Clipboard Button, copies the symbol to the clipboard. If the symbol is aPicture, it will be copied as a Windows metafile. If the symbol is a Bitmap or Texture, itwill be copied as a Windows bitmap.

! Symbol Information, indicates the size (in kilobytes) and type of the symbol.

To edit a symbol

! Right-click on a symbol thumbnail

OR

! From the Edit menu, choose Edit Symbol.

422 ISaGRAF Enhanced 4.21 - HMI

Page 435: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Modifying Symbols

You can modify the physical aspects of a symbol with the Symbol Options dialog box:

! Override Built-In Colors, overrides the predefined fill and line colors of picturesymbols . If this option is chosen, the colors currently in the Fill Color and Line Colorselection boxes will be used. For certain types of Picture symbols, the default will bechecked. This option does not apply to Bitmap or Texture symbols.

! Fill Color, applies a new fill color. This option will be disabled if the Override Built-InColors box is not checked.

! Line Color, applies a new line color. This option will be disabled if the Override Built-InColors box is not checked.

! Force Solid Colors, forces the entire symbol to be filled with the current Fill Color. Thisoption will be disabled if the Override Built-In Colors box is not checked.

! Filled, fills the picture symbols with a color. If this box is not checked, then Picturesymbols will consist of lines only, with no fill colors. This option does not apply toBitmap or Texture symbols.

! Flip Horizontal, flips the symbol horizontally.

! Flip Vertical, flips the symbol vertically.

! Rotation, rotates symbols 0, 90, 180, or 270 degrees.

ISaGRAF Enhanced 4.21 - HMI 423

Page 436: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

! Background Color, applies a new background color. This can be used to match symbolsto the background in your MMI application, especially if your MMI supports bitmaps andnot pictures (metafiles).

! Export Scale Factor, indicates the scaling factor of exported bitmaps. If you need alarger bitmap, you can increase the Export Scale Factor from 1X to 10X. Fine adjustmentof the exported bitmap size can be done by resizing the Preview window. To resize thePreview window, drag its right or bottom edge.

Note: When you click OK, the Symbol Options are stored to the hard drive. These changes arestored in memory on the hard disk of your computer.

To access the Symbol Options dialog box

1. Select a symbol thumbnail.

2. Click Options

424 ISaGRAF Enhanced 4.21 - HMI

Page 437: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Copying, Moving, and Deleting Symbols

To copy a symbol to the clipboard:

! Select a symbol and do one of the following:

# Click Copy.

# Double-click the symbol's thumbnail.

Pictures will be copied to the clipboard in both metafile and bitmap formats.

To copy a Picture to the clipboard as a metafile

! Select a symbol, then do one of the following:

# Click Copy while holding down the Shift key.

# Double-click the symbol's thumbnail while holding down the Shift key.

This will copy the Picture to the clipboard as a metafile, but not as a bitmap. Some programs,like Visual Basic (VB), will choose the bitmap format over the metafile format when pasting.This option will force Visual Basic (VB) to use the metafile format instead of the bitmapformat.

To move a symbol within the same category

! Drag the symbol's thumbnail by pressing and holding the left mouse button while movingthe mouse.

To copy a symbol into another category

! Drag the symbol's thumbnail onto a category in the Category listbox.

To move a symbol into another category

! Drag the symbol's thumbnail onto a category in the Category listbox while holding downthe Shift key.

To delete a symbol

! Right-click on the symbol's thumbnail, then click Delete Symbol.

ISaGRAF Enhanced 4.21 - HMI 425

Page 438: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Exporting Symbols

Exporting symbols differs depending on the type of symbol.

Bitmaps and textures will be exported at the same color depth as the current display driver. Forexample, if your computer is in 256-color mode, exported bitmaps will contain a 256-colorpalette.

A texture will normally be exported at the size of the preview window. To export a single tileof a texture, check Do Not Tile Textures in the Configure Symbol Library dialog box.

A picture can be exported either as a metafile (*.wmf) or as a bitmap (*.bmp). The metafileformat is generally preferred over the bitmap format. A metafile will stretch to any size muchbetter than a bitmap. A picture exported as a bitmap will be approximately the size of thepreview window on the main Symbol Library screen.

When Picture symbols are exported as bitmaps, they are exported at the size of the previewwindow. If you need a larger bitmap, you can increase the Export Scale Factor from 1X to 10Xfrom the Symbol Options screen. Fine adjustment of the exported bitmap size can be done byresizing the Preview window. To resize the Preview window, drag its right or bottom edge

The background color of a Picture exported as a bitmap can be changed from the SymbolOptions screen. This feature can be used to match symbols to the background in your MMIapplication.

To export a Bitmap or Texture from the Symbol Library

1. Select a symbol to be exported.

2. From the File menu, choose Export As Bitmap.

3. Choose a filename for the bitmap or texture.

To export a Picture from the Symbol Library

1. Select a symbol to be exported.

2. From the File menu, choose Export As Picture (wmf) or Export As Bitmap.

3. Choose a filename for the picture.

426 ISaGRAF Enhanced 4.21 - HMI

Page 439: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Adding Symbols to the Library

To add your own symbols to the Symbol Library, you can either paste them from the clipboardor import them from a file.

Pasting Graphics from the Clipboard

You can copy graphic objects from other Windows programs and add them to the SymbolLibrary as follows:

1. Switch to another graphics application, for example, CorelDraw!

2. Select an object.

3. From the Edit menu, select Copy.

4. Switch back to the Symbol Library.

5. From the Edit menu, choose Paste From Clipboard.

6. Type in an optional description for the symbol (80 characters maximum).

7. Select an available symbol type, as described below.

8. Select the category into which you wish to add the symbol, or create a new category byclicking Create New Category.

9. Click OK.

The symbol is added to the end of the selected category.

ISaGRAF Enhanced 4.21 - HMI 427

Page 440: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Retrieving Deleted Symbols

If you delete symbols accidentally for example, there is a way to retrieve them:

1. Rename the file ~CAT>BAK to something like TEMP.CAT. Run the Symbol Library tosee if the deleted symbol is back. If so, move it back to its original category, then deleteTEMP.CAT.

2. If the previous step did not work, hold down the Control key and right-click the categorywith the deleted symbol. This will compact the category file and create a fresh backup~CAT.BAK. Then perform the above step once more and you should find the deletedsymbol.

428 ISaGRAF Enhanced 4.21 - HMI

Page 441: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Customizing the Symbol LibraryYou can customize many features of the Symbol Library:

! Category File Path, this field is normally blank, which causes the Symbol Library tolook for the category (*.CAT) files in the same directory as the Symbol Library EXE. Ifyour category files are stored in a separate location, you can specify that directory in thisfield. If you want to share symbols with other developers on a network, you can set thispath to a network drive. For more information, see the section titled Sharing Symbols ona Network.

! Always On Top, keeps the Symbol Library on top of other windows. This is a way tokeep the Symbol Library nearby while you are working in another application, such asVisual Basic (VB).

! Automatically Minimize After Copying, automatically minimizes the Symbol Libraryafter copying a symbol to the clipboard. This option keeps the Symbol Library out of theway when copying symbols into other programs, such as Visual Basic (VB).

! Fast Thumbnails, speeds up the drawing of thumbnails. If Fast Thumbnails are turnedoff, the thumbnails are rendered directly from full-colour picture data. This results inhigh-quality thumbnails that take a little longer to draw. If Fast Thumbnails are turned on,the thumbnails are drawn using 16-colour pre-rendered bitmaps that draw fast, but do not

ISaGRAF Enhanced 4.21 - HMI 429

Page 442: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

look as nice as full-colour thumbnails. This box is automatically checked on systems with256 colours or less.

! Do Not Tile Textures, consists of a small bitmap that is tiled to form a larger bitmap.Normally, when a texture is copied to the clipboard, a large bitmap consisting of manytiles is copied. If this box is checked, only a single tile will be copied.

! Enable ToolTips, by unchecking this box, you can disable these yellow boxes that popup as you move the mouse across a symbol's thumbnail.

! Always Copy as Picture, controls the default behavior of the Copy button on the mainSymbol Library screen. When this box is unchecked, clicking Copy does the same thingas choosing Copy to Clipboard from the Edit menu. When this box is checked, clickingCopy does the same thing as choosing Copy as Picture (wmf) Only from the Edit menu.

To access the Configure Symbol Library dialog box

! From the Options menu, choose Configure.

430 ISaGRAF Enhanced 4.21 - HMI

Page 443: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Sharing Symbols on the NetworkThe Symbol Library can be configured so that multiple developers can use and contribute tothe same library on symbols across a network.

On the Configure Symbol Library screen there is a setting called Category File Path. This pathdetermines where the Symbol Library looks to find the category (*.CAT) files. Normally, thispath is empty. To share symbols, move the symbols to a network directory, such asF:\SYMFAC, then set the Category File Path to F:\SYMFAC for all users.

ISaGRAF Enhanced 4.21 - HMI 431

Page 444: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Importing Graphic FilesTo import graphics files into the Symbol Library, choose Import from the File menu. Picturefiles (*.WMF) and bitmap files (*.BMP) are supported. Most graphics programs for Windowscan export one or both of these formats. Generally, the Windows metafile (*.WMF) format ispreferred over the bitmap (*.BMP) format.

Importing graphics files into the Symbol Library follows the same procedure as the previoussection titled Pasting Graphics from the Clipboard, except that you are required to choose a fileto be imported.

432 ISaGRAF Enhanced 4.21 - HMI

Page 445: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

GlossaryThe Glossary contains terms used in the HMI and their definitions.

A - C

Access Rights Security permissions which determine how the user can change the window at run-time.

Anchor Points The support drawing element is always another object, normally one of those used in the animation, when exchanging objects. The location of all objects used in the animation is determined by aligning their anchor points with that of the support object.

Animation The process by which a drawing element is given the capability of interacting with the operator either visually, using the keyboard and mouse, or both.

ActiveX Controls Software components based on a common architecture that allow the interaction of software under Microsoft Windows.

In order to use an ActiveX control, you must insert it in another program that has been designed to be an ActiveX container. In ISaGRAF Enhanced, the HMI is an ActiveX container. Communication between an ActiveX control and the program containing it is made using methods, events, and properties.

Related Topics “ActiveX Controls”, on page 205

Application Objects Objects that represent the HMI itself and is the topmost object in the HMI native object hierarchy. From the Application object, you can directly access other native HMI objects by using the Application object’s properties and methods, or you can indirectly access objects through other objects obtained by these properties and methods.

ISaGRAF Enhanced 4.21 - HMI 433

Page 446: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Bitmap A collection of bits that represents an image.

Bitmap Objects Objects that represents a BMP, a JPG or a JPEG image.

Blinking Colour A blinking colour alternates between two selected colours at predefined rate. In many of the drawing elements and animations, you can select a blinking colour for one or more of the properties.

Branch Browser A tool that is used in a similar way to the Variable Browser except that it is used to select a branch rather than a complete variable name. The Branch Browser can be displayed whenever it is necessary to select a branch in any of the configuration dialog boxes.

Categories Category names hold up to 40 characters. Symbols are sorted into categories. A category can hold a maximum of 32,767 symbols.

Child Window A window that stay on top of the parent window until it is closed. You cannot move a parent window on top of a window.

Cluster An ordered group of prioritized servers. The HMI is designed to support redundant servers. Each of the servers allocated to a cluster must have an identical structure.

Cluster Member An instance of a previously defined server with a priority for use in redundant applications. If you configure just one member, then priority is not used.

Code Window A window in the Script Editor in which you write, display, and edit the scripting language code. You can open several Code windows concurrently so you can copy and paste between them.

Colour Palette A table of colours that appears each time you select a colour property from any drawing element properties box.

434 ISaGRAF Enhanced 4.21- HMI

Page 447: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

CommunicationManager

A gateway between the HMI and any OPC servers. In the communication manager configuration, you specify the program identity of the manager and the type of data it will be used to access (data, alarm or trend).

Contextual menu A window that allows quick access to some of the more frequently changed Window properties and to the Window Properties box

Control Zone An area on the screen where a user can interact with the HMI.

Control zones allow the following actions:

! To send a value to a bit, register, or text variable

! To start another application (Excel, Word etc.)

! To open and close windows

! To display a text file

! To select the region

Related Topics “Control Zone Animation”, on page 186

Control ZoneAnimation

An animation type that can be applied to any drawing element. However, as the highlight which appears around a control zone is rectangular and based on the dimensions of the drawing element, it is preferable to use a rectangle, text field or bitmap for the support.

Control Zone animations create an area in a window in which an operator can interact with the application using the keyboard and mouse.

Related Topics “Control Zone Animation”, on page 186

ISaGRAF Enhanced 4.21 - HMI 435

Page 448: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

D - H

Deferred Referencing A referencing type applied to an object’s variables in its animations. With deferred referencing, temporary variable names are used in each animation. Temporary variables only exist while an animation using them is displayed, and do not appear in the server. Temporary variable names always end with a percent % character, for example TEMPMV1%.

Design Refers to Design Mode.

In design mode, the properties of drawing elements do not update in real time. The window properties may be changed and drawing elements added, modified, and deleted. This is the mode of operation used while developing a window.

Related Topics “Run”, on page 446 “Test”, on page 449

Direct Referencing A referencing type applied to an object’s variables in its animations. With direct referencing, any variable names used in an animation are entered in their entirety. For example, you could use the name Simu:@Process.Engine1.Compressor1.Bit1. Note that the name is prefixed with an @ symbol. This tells the HMI that this is a directly referenced name. Whenever the object is reused, the animation will always refer to the same variable, irrespective of any branch.

Releated Topics “Deferred Referencing”, on page 436 “Relative Referencing”, on page 445

436 ISaGRAF Enhanced 4.21- HMI

Page 449: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Double BitAnimation

A type of Control Zone animation that allows the user to change the state of two 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.

Related Topics “Send Bit Animation”, on page 447

Drawing Process by which you transform your blank windows into Menus, Overviews, Process Mimics etc. You can draw in windows using three different mechanisms:

Using the Workspace tools, to create mathematically defined drawing elements (geometric shapes)

By importing images in standard Windows’ BMP, JPEG or WMF formats,

Using OLE (Object Linking and Embedding)

Related Topics “Drawing”, on page 83

Embedded Objects Objects whose information becomes part of the window. When you double-click an embedded object in Design mode, you open the application in which the object was created; the object is displayed and ready for editing. When you return to the Supervisor, the window reflects any changes made to the object.

Related Topics “Linked Objects”, on page 441

ISaGRAF Enhanced 4.21 - HMI 437

Page 450: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Event Function used by an ActiveX control to indicate a change to the application. For example, an event can be generated when the mouse is clicked.

Related Topics “ActiveX Controls”, on page 205

Expression Allows the calculation of a value by using one or more variables, functions, operators, and constants. An expression is automatically evaluated each time any of the variables within it change.

Expression Editor The environment in which you create expression models.

Expression Model Created in the Expression Editor, it is used in an animation by inserting its name instead of that of a variable. When the same expression is required in several places, it is useful to centralize its definition using expression models.

The syntax of expression models is the same as when you enter an expression directly in an animation.

Free Positioning A type of position animation that is used to move a drawing according to the value of two registers. Free positioning can be applied to all drawing elements.

Functions The HMI uses specific syntax in its expressions to represent certain mathematical functions.

Related Topics “Operators”, on page 443

Grid A tool to help you precisely position to your drawing elements. It is an imaginary matrix of co-ordinates within each window

438 ISaGRAF Enhanced 4.21- HMI

Page 451: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Graphic CollectionObjects

The collection of Graphic Objects.

Graphic is a generic term that refers to either all the Native HMI Objects elements . The Graphic object type as such does not exist, the Graphics collection contains Object objects.

Graphic Explorer A window that displays a hierarchical view of the elements forming a window

Graphic Objects Graphic is a generic term referring to all native HMI drawing elements: Poly, Shape, Text, Symbol and Group plus the Bitmap and Metafile objects. The Graphic object type as such does not exist, the Graphics collection contains Object objects.

The properties that define the appearance of all objects that belong to the Graphics collection conform to certain rules. All properties that are related to colours follow the standard colour property naming scheme.

Related Topics “Graphic Objects in General”, on page 361

Group Objects Objects that represent a group of drawing elements.

HMI Environment in which you create the graphical interfaces with which users will interact. Refers to Human Machine Interface.

HMI ScriptingLanguage

A scripting language used for customizing and extending the HMI and for enabling the HMI to interact with other Windows-based applications. The HMI Scripting Language has the same syntax and semantics as Microsoft's Visual Basic (VB).

ISaGRAF Enhanced 4.21 - HMI 439

Page 452: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

I - N

Label Animation A type of property animation that displays text associated with a bit variable. You can display:

! The variable’s associated label

! A variable’s item description

! Context sensitive information such as the name of thewindow in which the animation resides, the branch of anobject etc.

Related Topics “Message Animation”, on page 441

Library Collective name for the folders used to store the window, window template, script, object, and image files composing a project. By default, there is only one library, known as the Local Library, located in the project’s root folder.

Library Browser A table that displays the contents of an object library as thumbnails sorted into alphabetic order, rather than as just a list of names. The library to be displayed is selected using the list box at the top of the browser.

Link OpenAnimation

A type of Window Animation that can be applied to any drawing element although normally it is applied to a text string with the text used as an indicator to the Operator.

Related Topics “Link Close Animation”, on page 441 “Window Animation”, on page 450

440 ISaGRAF Enhanced 4.21- HMI

Page 453: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Link CloseAnimation

A component of Window Animation where you specify the name of the window to be closed in the Window field. If the window has a branch, then this also must be specified.

Related Topics “Link Open Animation”, on page 440 “Window Animation”, on page 450

Linked Objects Linked information remains stored in the original source file although the window still displays a graphic representation of the data as with embedding.

Related Topics “Embedded Objects”, on page 437

Macro Animations Animations that are capable of creating more complex displays such as Trend Charts.

Message Animation An animation type that displays the contents of text variable. The most common use of this is to display the time, date, and user name. Other uses include operator prompts, warning messages, and status information.

Related Topics “Label Animation”, on page 440

Metafile Objects Objects that represent a WMF or EMF image.

Method An action that an ActiveX can perform. The container program uses methods to control the behaviour of the ActiveX.

Related Topics “ActiveX Controls”, on page 205

Mimic A schematic representation of an object in a plant created using the HMI.

ISaGRAF Enhanced 4.21 - HMI 441

Page 454: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

O - R

Mimic CollectionObjects

Objects that represent the collection of the currently opened mimics for the active Project.

Mimic Objects Objects that represent opened mimics. Mimic’s properties or methods are related to the targeted mimic and to all windows (views) opened on this mimic (including the active one). For example, BackColor property reflects the background colour of the mimic. A change to this property will change the background colour of all windows (views) opened on this mimic.

Native HMI Objects Objects always available as a part of the HMI core functionality whose properties, methods, and events allow the user to develop any customized behaviour needed for the supervision and control of the process. Native HMI Objects differ from other object instances such as those created as part of the application (for example an opened mimic).

Related Topics “Native HMI Objects”, on page 321

Object A representation of an element such as a window or drawing element.

442 ISaGRAF Enhanced 4.21- HMI

Page 455: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

OLE Refers to Object Linking and Embedding.

Object linking and embedding can be used to include information created in other applications, such as a spreadsheet or word processor, in the Supervisor’s windows. The information included is known as an object.

The main difference between linking and embedding is where the data is stored:

! Embedded objects become part of the window source file

! Linked information, remains stored in the original sourcefile with the window containing only the location of the filewhile still displaying a graphic representation of the linkeddata

OPC Server Refers to Object linking and embedding for Process Control.

OPC defines a standard interface for communication between software components either on the same computer or on different computers connected over a network. OPC is based on the COM/DCOM (Component Software Module) client / server standard from Microsoft. A software component that has OPC client capability can, in theory, communicate and retrieve information from any software component that is an OPC server.

Operators The HMI uses specific syntax in its expressions for different operators.

Related Topics “Functions”, on page 438

Options Tree A tree-like structure that indicates selected options in the HMI. The HMI has a number of options normally left at their default settings. By default, there is only one library, known as the Local Library, located in the project’s root folder.

Output Window A window in the Script Editor that displays the output from any Print methods in the script

ISaGRAF Enhanced 4.21 - HMI 443

Page 456: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

PID Faceplate An object inserted in the HMI designed to be connected via the ISaGRAF Enhanced OPC server to a PID_ST_1 function block. You insert the faceplate, into the HMI, as an object.

Poly Objects An object that represents a Line, a Polyline, a Polygon or Bézier curve graphic object.

Position Animation A type of animation that allows you to move, rotate, and change the size of drawing elements at run-time, according to the value of one or more register variables.

In addition, the position animations allow you to set the value of one or two registers by using the cursor to drag a drawing element.

Pre-defined Objects Specialized objects created for use with various functions. The current available object is the PID Faceplate for use with the PID_ST_1 function block in the Workbench.

Profiles A list of access rights selected from a number of categories.

Project A set of configurations and links between their resources.

Project Explorer Displays a hierarchical list of all objects within a project

Project Objects Represent the currently opened project. This object is available through the ActiveProject property of the Application object

Properties List Provides a list of properties, methods, and events for the active object in the Project Explorer window.

Property Information offered by the ActiveX to its container such as its size and position on the screen. Properties can be "read only" or "read and write".

444 ISaGRAF Enhanced 4.21- HMI

Page 457: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Property Animation A type of animation used to connect a visual property of a drawing element to the database. At run-time, 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 variable but it can also be used to display the result of an expression, an attribute (such as a variable’s domain), or context information (such as the current database branch).

Read and Write A symbol status. When a category is set as read and write, users can delete, move, rename, or add to its symbols.

Read-Only A symbol status. When a category is set as read-only, users cannot delete, move, rename, or add to its symbols.

Related Topics “Categories”, on page 416

Register Values The user can change the register values from a control zone created with the Control Register animation. Register values can also be changed using a position control.

RegisterVariableObjects Objects that represent a Register Variable object.

Relative Referencing A referencing type applied to an object’s variables in its animations. With relative referencing, each animation refers to just the last part of the variable name. For example, you might use the name M1. The rest of the variable name is supplied as a branch when the object is pasted into a window. The variable names are automatically calculated at run-time by concatenating the branch with the relative name used in the animation. You can only make use of relative referencing if the server you are using has a structured naming scheme.

ISaGRAF Enhanced 4.21 - HMI 445

Page 458: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

S - Z

Rotation A type of Position Animation used to apply rotation to all drawing elements except to text and images. When using the rotation animation, the value of a register is represented by angular movement. A typical example of its use is to move the needle in a simulation of an analog meter.

Run Refers to Run mode.

In Run mode, the animated properties of drawing elements in the window are updated in real time. In this mode, it is not possible to change a window’s properties or any drawing. This is the normal operational mode of a window.

Related Topics “Test”, on page 449 “Design”, on page 436

Scaling A type of position animation used to change the size of a drawing. You can scale a drawing in both the X and Y axes. Scaling can be applied to all drawing elements, although there are some limitations when using it with text.

Scripting LanguageEditor

Environment in which you develop, debug, and run scripts.

Search Window A window in the Script Editor that displays search results executed by the search command.

446 ISaGRAF Enhanced 4.21- HMI

Page 459: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Security Categories Access rights in the HMI that are sorted according to a category:

! Administration

! Preferences

! Design

! Desktop

! Print

! Exit

! Zoom

! Layer

! Window

! Command

Send Bit Animation A type of Control Zone animation that allows the user to force the state of a single bit.

Related Topics “Double Bit Animation”, on page 437 “Control Zone Animation”, on page 186

Server Editor A tool used to define all the elements required for communication with one or more OPC servers, that is, the communication manager, servers, clusters, and cluster members.

Shape Objects An object that represents a Rectangle, a Rounded Rectangle, an Ellipse, an Arc or a Half-Arc graphic object.

Single AxisPositioning

A type of Position Animation used to move a drawing according to the value of a register. Single axis positioning can be applied to all drawing elements.

Strings A data structure composed of a sequence of characters. They an be entered either from the keyboard, or by using the mouse and a displayed keyboard.

ISaGRAF Enhanced 4.21 - HMI 447

Page 460: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Substitution Strings Strings used to provide context sensitive information to an animation. Unlike using a variable name, the information passed to the animation does not change according to a variable value, instead it reflects a parameter of the current environment.

Symbol A graphic used to represent a specific element of a plant in industrial automation. The HMI uses the Symbol Library from which you can choose 3,000 different symbols.

Symbol Library A collection of graphics that holds over 3,000 symbols for industrial automation, including pumps, pipes, valves, tanks, mixers, motors, ducts, electrical symbols, flow meters, material handling, sensors, PLCs, transmitters, and ISA symbols.

The symbols in the library are of three types: pictures, bitmaps, and textures. These symbols are sorted into categories. You can change or add symbols and categories.

Symbol Objects Objects that represent Symbols composed of a number of other graphic objects. Unlike the group object, Symbol instances are stemmed from a library.

Due to historic reasons, throughout the User Interface (dialog boxes, menus etc.) graphical Symbols are referred to as Objects. (For example there is an object library.) This will be changed to Symbol in a future release to be consistent with the scripting language.

System Objects Objects that represent the system on which the HMI is running. This object is available through the System property of the Application object.

448 ISaGRAF Enhanced 4.21- HMI

Page 461: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

Test Refers to Test mode.

A sub-mode of run and is only operational when Run mode is selected. In test mode, the variables used in any animation are disconnected from their source and may have their real time value manually forced.

Related Topics “Test”, on page 449 “Design”, on page 436

Text Note Animation A type of Control Zone animation that allows you to display, modify, and save the contents of a text file. The text file appears in a window supporting the standard Windows’ edit window keystrokes for text selection

Text Objects A Native HMI object that represents a text object.

TextVariable Objects A Native HMI Variables object that represents a Text Variable object.

Thumbnail A small version of your main artwork, it is the image that users click to view the large graphic.

Two Axes Positioning A type of Position Animation used to move a drawing according to the value of two registers. 2 Axes positioning can be applied to all drawing elements.

Related Topics “Single Axis Positioning”, on page 447

User The operator of specific instances of the HMI. A user is given a name and password and allocated one or more profiles

Related Topics “Profiles”, on page 444

ISaGRAF Enhanced 4.21 - HMI 449

Page 462: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

User Manager A tool used to add and configure users and profiles.

Variable Browser A window which displays a list of all variables available in a selected OPC Server. It allows you view and access the the OPC variables from a folder structure.

Variables Collection The collection of all permanently subscribed Variable objects. See the topic on Permanently Subscribed Variables for more information on how a variable becomes permanently subscribed.

Variables Objects Native HMI Objects that can be used to represent all variable types. The properties, methods and events of the Variable object are also supported by the more strongly typed objects RegisterVariable, and TextVariable.

Window Animation A type of animation that allows you to control opening and closing behaviours of elements such as drawing elements or text in a designated window.

Related Topics “Link Open Animation”, on page 440 “Link Close Animation”, on page 441

Window Objects Native HMI objects that represent opened windows on a specified Mimic

Windows CollectionObjects

Windows collection objects represent the collection of the currently opened windows for the active Project, or the collection of currently opened windows for a specific Mimic

Workspace The drawing area in which you create windows

Zoom Enlargement of a section of a window or graphic to fill the screen. The visibility of drawing elements can be bound to a zoom range, that is, if the window is zoomed to a level outside of that range, the drawing will not be visible.

450 ISaGRAF Enhanced 4.21- HMI

Page 463: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties

CopyrightInformation in these pages is subject to change without notice and does not represent acommitment on the part of ICS Triplex ISaGRAF Inc. No part of these pages may be reproducedin any form or by any means, electronic or mechanical, for any purpose without the expresswritten permission of ICS Triplex ISaGRAF Inc.

© 1999-2004 ICS Triplex ISaGRAF Inc. All rights reserved.

Product or company names included in these pages are trademarks or registered trademarks oftheir respective holders.

All logos and links used in this guide are, to the best of our knowledge, included with thepermission of the owner - if this is not the case, please let us know immediately.

ISaGRAF Enhanced 4.21 - HMI 451

Page 464: hmi -  · PDF fileHMI Variable to OPC Data Type Mapping ..... 232 OPC Variable Properties