Top Banner
1 OpenHMI SE/PE Professional Edition Application Development Technical Reference
299

Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

May 23, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

1

OpenHMI SE/PEProfessional Edition

ApplicationDevelopmentTechnical Reference

Page 2: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

2

Page 3: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

3

Revision Description DateA Manual Released 10/99B Revision 12/99C Revision 03/00D Revision 03/00E Revision 06/00

Xycom Automation Part Number 340045E

Trademark InformationXycom Automation and OpenHMI are trademarks of Xycom Automation, Inc.Brand or product names may be registered trademarks of their respective owners. Windows is aregistered trademark of Microsoft Corporation in the United States and other countries.

Copyright InformationThis document is copyrighted by Xycom Automation Incorporated (Xycom Automation) and shallnot be reproduced or copied without expressed written authorization from Xycom Automation.The information contained within this document is subject to change without notice. XycomAutomation does not guarantee the accuracy of the information.

Page 4: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150
Page 5: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

5

Table of Contents

1. Introduction to DesignStudio .......................................................................................... 17Related Manuals ......................................................................................................................................18Text Conventions Used in this Manual ...................................................................................................18

Mouse and Selection Conventions........................................................................................................18Windows Conventions..........................................................................................................................18

System Requirements ..............................................................................................................................19OpenHMI SE (Standard Edition) Features..............................................................................................20OpenHMI PE (Professional Edition) Features ........................................................................................20OpenHMI SE/PE Software Installation...................................................................................................21

Installing DesignStudio from the Installation CD-ROM ......................................................................22Creating Installation Floppy Disks .......................................................................................................23Installing DesignStudio from Floppy Disks .........................................................................................24

Starting DesignStudio..............................................................................................................................25Uninstalling OpenHMI SE/PE DesignStudio..........................................................................................26

2. The DesignStudio Interface ............................................................................................. 29Overview .................................................................................................................................................29

Workspace ............................................................................................................................................29Popup Menus ........................................................................................................................................30

Titlebar ....................................................................................................................................................30Status Bar ................................................................................................................................................31Menu Bar.................................................................................................................................................32

File Menu..............................................................................................................................................32Edit Menu .............................................................................................................................................34View Menu ...........................................................................................................................................35Insert Menu...........................................................................................................................................36Project Menu.........................................................................................................................................37Tools Menu...........................................................................................................................................38Window Menu ......................................................................................................................................38Help Menu ............................................................................................................................................39

Toolbars...................................................................................................................................................40Standard Toolbar ..................................................................................................................................40Tag Properties Toolbar .........................................................................................................................42Execution Control Toolbar ...................................................................................................................42Tools Toolbar........................................................................................................................................43

Object Editing Configuration.............................................................................................................43Bitmap Editing Configuration............................................................................................................43

Workspace Window ................................................................................................................................44Overview...............................................................................................................................................44

Organization and Navigation .............................................................................................................44Database Tab ........................................................................................................................................44Graphics Tab.........................................................................................................................................45Tasks Tab..............................................................................................................................................45Comm (Communications) Tab .............................................................................................................45

Database Spy Window ............................................................................................................................46Output (Log) Window.............................................................................................................................46

Page 6: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

6

3. Application Overview ....................................................................................................... 47Application Development Overview.......................................................................................................47Application Creation and Management...................................................................................................48

Creating a New Application .................................................................................................................48Opening an Existing Application..........................................................................................................50Saving an Application...........................................................................................................................50Closing an Application .........................................................................................................................50

Project Settings........................................................................................................................................50Identification Tab..................................................................................................................................51Options Tab ..........................................................................................................................................52

Automatic Translation Group Box ...............................................................................................52The Target System Group Box .....................................................................................................52The PC-based Control Group Box................................................................................................52

Runtime Desktop Tab ...........................................................................................................................53Options That Do Not Work Under Windows CE ..............................................................................54

Active area indication group box..................................................................................................54Necessary Application Creation Tasks....................................................................................................55

Application Tags Database ...................................................................................................................55Screen Creation.....................................................................................................................................55Driver Configuration ............................................................................................................................55

Optional Modules for Application Development ....................................................................................55Math Worksheets ..................................................................................................................................55Alarms...................................................................................................................................................55Trend Data Logging..............................................................................................................................55Recipes..................................................................................................................................................55Reports..................................................................................................................................................55Scheduler ..............................................................................................................................................55Security.................................................................................................................................................56Translation ............................................................................................................................................56

Tips to Optimize Application Development Time and Runtime Performance .......................................56Create the New Application Correctly..................................................................................................56Simplify the Screen...............................................................................................................................56Background Graphics Layer .................................................................................................................56Development Computer Color Settings................................................................................................57Driver Configuration ............................................................................................................................57Worksheet Calculations ........................................................................................................................57Verify Applications ..............................................................................................................................57Fonts .....................................................................................................................................................58Dead Bands...........................................................................................................................................58Development.........................................................................................................................................58

4. Tags................................................................................................................................... 59Tag Names ............................................................................................................................................59Tag Types .............................................................................................................................................60Array Tags (Tag Size) ..........................................................................................................................60Indirect Tags .........................................................................................................................................61

Classes.....................................................................................................................................................62Creating a Class and Members .............................................................................................................62Viewing and Editing Class Members ...................................................................................................63Classes and Indirect Tags .....................................................................................................................63

Page 7: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

7

Using, Finding and Editing Tags.............................................................................................................64Finding and Editing Tags ........................................................................................................................65

Workspace Window Database Tab.......................................................................................................65Shared Tags in DesignStudio 3.0 .......................................................................................................65Properties Window.............................................................................................................................65Tag Worksheet ...................................................................................................................................66Classes Folder ....................................................................................................................................66Editing Application Tags and Class Worksheets ...............................................................................67

Tag Properties Toolbar .........................................................................................................................68Object Finder Window.......................................................................................................................69

Tag Properties Window ........................................................................................................................71Tag Properties Window Parameters Tab for Boolean Tags ...............................................................71Tag Properties Window Parameters Tab for Integer and Real Tags..................................................72

Engineering Units Group Box ......................................................................................................73Signal Conditioning Group Box ...................................................................................................73

Tag Properties Window Parameters Tab for String Tags and Classes...............................................74Tag Parameters ........................................................................................................................................74

Tag Parameter List................................................................................................................................74Runtime/Emulation Parameters .........................................................................................................76Alarm Tag Parameters........................................................................................................................77

Creating and Defining a New Tag (Application Tags Only)...................................................................77New Tag Window.................................................................................................................................77

Internal Tags............................................................................................................................................78Editing and Viewing Internal Tags.......................................................................................................78Internal Tag Values...............................................................................................................................78Internal Tags List ..................................................................................................................................78

Database Merge.......................................................................................................................................80

5. Screen Construction ........................................................................................................ 83Creating and Managing a Screen.............................................................................................................83

Creating a Screen..................................................................................................................................83Opening a Screen..................................................................................................................................86Saving a Screen.....................................................................................................................................86Deleting a Screen..................................................................................................................................86

Workspace Window Graphics Tab..........................................................................................................87Screens Folder ......................................................................................................................................87Group Screen ........................................................................................................................................87

Creating New Screen Groups.............................................................................................................88Library ..................................................................................................................................................88Symbols ................................................................................................................................................89

Screen Control Menus .............................................................................................................................90Screen Right-Click Popup Menu ..........................................................................................................90Screen Window Control Drop-Down Menu.........................................................................................91

Screen Object Creation and Editing ........................................................................................................92Object Editing Configuration of the Tools Toolbar..............................................................................92Screen Parameter Tools ........................................................................................................................93Object Editing Tools and Object Properties .........................................................................................93

Object Selection .................................................................................................................................93Deselecting Objects............................................................................................................................94Object Movement...............................................................................................................................94Object Grouping and Ungrouping......................................................................................................95

Page 8: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

8

Resizing Objects ................................................................................................................................95Copying and Pasting Objects .............................................................................................................96Object Alignment ...............................................................................................................................96Spacing Objects Equally ....................................................................................................................97Object Orientation..............................................................................................................................97Changing Object Layers.....................................................................................................................98Object Properties Window .................................................................................................................98Object Popup Menu............................................................................................................................99

Simple Objects....................................................................................................................................101Orthogonal Lines..............................................................................................................................101Freehand Open Objects (Open Polygons)........................................................................................102Irregular Polygons............................................................................................................................103Rectangles ........................................................................................................................................104Rounded Rectangles.........................................................................................................................104Ellipses and Other Curved Shapes ...................................................................................................106Bitmap Objects.................................................................................................................................107Text ..................................................................................................................................................108Buttons .............................................................................................................................................109

Compound Objects .............................................................................................................................110Group of Symbols.......................................................................................................................110Symbol ........................................................................................................................................110Symbols ......................................................................................................................................111Library Objects ...........................................................................................................................111Grouped Objects .........................................................................................................................111

Active Objects ....................................................................................................................................112Alarms..............................................................................................................................................112

Alarm Filters Window ................................................................................................................114Trend Graph .....................................................................................................................................117

Horizontal Scale and Horizontal X/Y Scale Window.................................................................119Vertical Scale Window ...............................................................................................................123Pens Window..............................................................................................................................124

List Box Objects...............................................................................................................................126Smart Message Objects ....................................................................................................................129

Smart Message Configuration Window......................................................................................131Preconfigured Pushbuttons...............................................................................................................133

Static Object Properties ......................................................................................................................137Fill Color ..........................................................................................................................................137Line (and Border) Color and Style...................................................................................................137Fonts.................................................................................................................................................138

Dynamic Object Properties.................................................................................................................139Pushbutton or Keystroke Commands Added to Objects ..................................................................139

Mathematical Worksheet Section ...............................................................................................140Object Color Filling (Bar Graph) .....................................................................................................142Text Input and Output ......................................................................................................................143Object Color Change........................................................................................................................145Object Movement.............................................................................................................................146Object Resizing ................................................................................................................................147Object Rotation ................................................................................................................................148

Screen Bitmap Editing...........................................................................................................................149Bitmap Editing Configuration of the Tools Toolbar...........................................................................149Screen Parameter Tools ......................................................................................................................150

Page 9: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

9

Objects ................................................................................................................................................150Bitmap Objects.................................................................................................................................150Creating Line Objects ......................................................................................................................150Creating Two-Dimensional Objects.................................................................................................151

Object and Screen Manipulation.........................................................................................................152Object Selection ...............................................................................................................................152Bitmap Object Selection ..................................................................................................................152Area Selection ..................................................................................................................................152Resizing Objects and Areas .............................................................................................................153Object Orientation............................................................................................................................153Copying and Pasting Objects ...........................................................................................................153

Color Manipulation.............................................................................................................................154Object and Screen Area Color Parameters.......................................................................................154Line Color and Style ........................................................................................................................154Fill Color ..........................................................................................................................................154Object Color Parameters ..................................................................................................................155

Colors ....................................................................................................................................................157Object Color Selection........................................................................................................................157Colors Available for 16 Color Runtime Workstation Applications....................................................158

6. Scripting Language ........................................................................................................ 159Data Types.............................................................................................................................................160Operators ...............................................................................................................................................160

Arithmetic Operators ..........................................................................................................................160Boolean Operators ..............................................................................................................................161

Comparison Operators .....................................................................................................................161Logic Operators................................................................................................................................161

Bit Operators.......................................................................................................................................162Bitwise Boolean Logic Operators ....................................................................................................162Bit Rotation Operators .....................................................................................................................162

Functions ...............................................................................................................................................163Functions Listed By Operational Type...............................................................................................164

Log Messages Functions (Debugging).............................................................................................164Arithmetic Functions........................................................................................................................164Statistics Functions ..........................................................................................................................164Logarithmic Functions .....................................................................................................................164Logic Functions................................................................................................................................164String Functions (String Manipulation) ...........................................................................................164Date and Time Manipulation ...........................................................................................................165Trigonometric Functions..................................................................................................................165Opening and Closing Windows Functions.......................................................................................165Security System Functions...............................................................................................................165Module Activation Functions...........................................................................................................165File Manipulation Functions ............................................................................................................166Graphics Screen Printing Functions.................................................................................................166Text Translation Functions ..............................................................................................................166Multimedia Functions ......................................................................................................................166System Information Functions .........................................................................................................166Database Access Functions ..............................................................................................................167Loop Functions (Programming) .......................................................................................................167ODBC Functions — Not Usable in Windows CE ...........................................................................167

Page 10: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

10

Internal Tags Used With Functions (Programming) ........................................................................167Log Message Functions (Debugging).................................................................................................167

Trace(argument1).............................................................................................................................167Arithmetic Functions ..........................................................................................................................167

Abs(number argument1) ..................................................................................................................167Div(number argument1, number argument2) ..................................................................................168Format(string format flag1, number argument1) .............................................................................168GetBit(integer argument1, integer argument2) ...............................................................................169Mod(number argument1, number argument2).................................................................................169Pow(number argument1, number argument2) .................................................................................169ResetBit("integer tag name1", integer argument1) .........................................................................170Round(number argument1) ..............................................................................................................170SetBit("integer tag name1", integer argument1) .............................................................................170Sqrt(number argument1) ..................................................................................................................170Swap16(string tag name1) ...............................................................................................................170Swap32(string tag name1) ...............................................................................................................170Trunc(number argument1) ...............................................................................................................170

Statistics Functions .............................................................................................................................171Avg(number argument1, number argument2, ... , number argumentN) ..........................................171Max(number argument1, number argument2, ... , number argumentN)..........................................171Min(number argument1, number argument2, ... , number argumentN) ..........................................171Rand( )..............................................................................................................................................171

Logarithmic Functions........................................................................................................................171Exp(number argument1) ..................................................................................................................171Log(number argument1) ..................................................................................................................171Log10(number argument1) ..............................................................................................................171

Logic Functions ..................................................................................................................................172False(argument1) .............................................................................................................................172If(condition, result if true, result if false).........................................................................................172True(argument1) ..............................................................................................................................172

Functions for String Manipulation......................................................................................................172Asc2Str(argument1, argument2, ... , argumentN)............................................................................172CharToValue("string tag name", "integer array tag name")...........................................................173CharToValueW("string tag name", "integer array tag name") .......................................................173NCopy(string argument1, integer argument1, integer argument2).................................................173Num(argument1)..............................................................................................................................174Str(number argument1) ....................................................................................................................174Str2Asc(single character argument1)..............................................................................................174StrLeft(string argument1, integer argument1).................................................................................174StrLen(string argument1).................................................................................................................174StrLower (string argument1) ...........................................................................................................174StrRChr(string argument1, single character argument1)................................................................174StrRight(string argument1, integer argument1) ..............................................................................175StrStr(string argument1, string argument2) ....................................................................................175StrStrPos(string argument1, string argument2)...............................................................................175StrTrim(string argument1, integer parameter1) ..............................................................................175StrUpper(string argument1).............................................................................................................175ValueToChar("integer array tag name", integer argument1)..........................................................176ValueWToChar("integer array tag name", integer argument1)......................................................176

Date and Time Manipulation ..............................................................................................................176ClockGetDate(integer argument1)...................................................................................................177

Page 11: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

11

ClockGetDayOfWeek(integer argument1) ......................................................................................177ClockGetTime(integer argument1)..................................................................................................177DateTime2Clock(string argument1, string argument2) ..................................................................177GetClock( ).......................................................................................................................................177Hour2Clock(string argument1)........................................................................................................177SetSystemDate(string argument1) ...................................................................................................178SetSystemTime(string argument1) ..................................................................................................178

Trigonometric Functions ....................................................................................................................178ACos(number argument1) ...............................................................................................................178Asin(number argument1) .................................................................................................................178ATan(number argument1) ...............................................................................................................178Cos(number argument1) ..................................................................................................................179Cot(number argument1)...................................................................................................................179Pi( )...................................................................................................................................................179Sin(number argument1) ...................................................................................................................179Tan(number argument1) ..................................................................................................................179

Functions for Opening and Closing Windows....................................................................................179Close(string argument1) ..................................................................................................................179Open(string argument1, x1, y1, x2, y2)............................................................................................179

Security System ..................................................................................................................................180CreateUser(string user name, string group name, string password) ...............................................180RemoveUser(string user name) .......................................................................................................180

Module Activation Functions .............................................................................................................181AppActivate(string application title, integer parameter1) ..............................................................181AppIsRunning(string application title)............................................................................................181AppPostMessage(string application title, wParam, lParam) ..........................................................181AppSendKeys(argument1, argument2, ..., argumentN) ..................................................................182CleanReadQueue( ) ..........................................................................................................................182CloseSplashWindow( ).....................................................................................................................182DisableMath( ) .................................................................................................................................182EnableMath( ) ..................................................................................................................................183ExitWindows(integer parameter1) ..................................................................................................183IsScreenOpen(string screen name1) ................................................................................................183IsViewerInFocus( )...........................................................................................................................183LogOff( ) ..........................................................................................................................................183LogOn(string user name, string password) ......................................................................................183Math(integer argument1) .................................................................................................................183NoInputTime( ) ................................................................................................................................184PostKey(0, hexadecimal number wParam, 0)..................................................................................184Recipe("operation:recipe data file name") ......................................................................................185Report("operation:report file name")...............................................................................................186SendKeyObject(number event, string main key, number Shift, number Ctrl, number Alt, string targetscreen) ..............................................................................................................................................187SetAppPath(argument).....................................................................................................................188SetViewerInFocus ............................................................................................................................188ShutDown( ) .....................................................................................................................................188ViewerPostMessage(string screen title, wParam, lParam) .............................................................188Wait(integer argument1)..................................................................................................................189WinExec(string path and file name1, integer parameter1) .............................................................189

File Manipulation Functions...............................................................................................................189FileCopy(string path and file name1, string path and file name2) ..................................................189

Page 12: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

12

FileDelete(string path and file name1) ............................................................................................190FileLength(string path and file name1) ...........................................................................................190FileRename(string path and file name1, string path and file name2)..............................................190FindFile(string path and file name1) ...............................................................................................190GetFileAttributes(string path and file name1) .................................................................................190GetFileTime(string path and file name1, number parameter1).......................................................191Print(string path and file name1) .....................................................................................................191RDFilen("string filename1", string path name1, string mask1, number parameter1).....................191

Functions for Graphics Screens Printing ............................................................................................192PrintWindow(string screen name) ...................................................................................................192

Functions for Text Translations..........................................................................................................192Ext(string argument1) ......................................................................................................................192SetTranslationFile(string filename) .................................................................................................192

Multimedia Functions.........................................................................................................................192Play(string filename1) ......................................................................................................................192

System Information ............................................................................................................................193DbVersion( ) ....................................................................................................................................193GetAppHorizontalResolution( ) .......................................................................................................193GetAppVerticalResolution( ) ...........................................................................................................193GetComputerName( ).......................................................................................................................193GetHardkeyModel( ) ........................................................................................................................193GetHardkeySN( ) .............................................................................................................................193GetOS( ) ...........................................................................................................................................193GetPrivateProfileString(string file section, string parameter name, string failure message, stringpath and file name)...........................................................................................................................193GetProductPath( ).............................................................................................................................194GetTickCount( ) ...............................................................................................................................194InfoAppDir( ) ...................................................................................................................................194InfoAppAlrDir( )..............................................................................................................................194InfoAppHstDir( )..............................................................................................................................194InfoDiskFree(string argument1) ......................................................................................................194InfoResources(3) ..............................................................................................................................194NoInputTime( ) ................................................................................................................................194ProductVersion( ) .............................................................................................................................195SetAppAlarmPath(string path name)...............................................................................................195SetAppHstPath(string path name) ...................................................................................................195SetDateFormat(string single character, string date format)............................................................195

Database Access Functions.................................................................................................................195ForceTagChange(string tag name, argument1) ................................................................................195

Loops ..................................................................................................................................................196FOR(number initial value, number final value, number increment)................................................196NEXT ...............................................................................................................................................196

ODBC Functions — Not Usable in Windows CE..............................................................................196Internal Tags Used With Functions (Programming)...........................................................................197

GOTO...............................................................................................................................................197LABEL.............................................................................................................................................197

7. Math Worksheets............................................................................................................ 199Creating and Managing a Math Worksheet...........................................................................................199

Creating a Math Worksheet ................................................................................................................199Opening a Math Worksheet ................................................................................................................199

Page 13: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

13

Saving a Math Worksheet...................................................................................................................199Deleting a Math Worksheet ................................................................................................................200

Math Worksheet Overview ...................................................................................................................200Math Worksheet Header .....................................................................................................................200Math Worksheet Body........................................................................................................................201

Editing the Math Worksheet..................................................................................................................201

8. Alarms ............................................................................................................................. 203Alarm Types .......................................................................................................................................203

Creating and Managing an Alarm Worksheet .......................................................................................204Creating an Alarm Worksheet ............................................................................................................204Opening an Alarm Worksheet ............................................................................................................204Saving an Alarm Worksheet ...............................................................................................................204Deleting an Alarm Worksheet ............................................................................................................204

Alarm Worksheet Overview..................................................................................................................205Alarm Worksheet Header ...................................................................................................................205

Display/Save Group Box..................................................................................................................206Colors Group Box ............................................................................................................................206

Alarm Worksheet Body ......................................................................................................................207Editing the Alarm Worksheet Body ......................................................................................................208Alarm History File ................................................................................................................................209Setting Tag Alarm Parameters In The Tag Properties Window............................................................210

Alarms For Boolean Tags ...................................................................................................................210Alarm Type Check Boxes ................................................................................................................211

Alarms For Integer And Real Tags.....................................................................................................212Alarm Type Check Boxes ................................................................................................................213

9. Logging Trend Data........................................................................................................ 215Creating and Managing a Trend Worksheet..........................................................................................215

Creating a Trend Worksheet ...............................................................................................................215Opening a Trend Worksheet ...............................................................................................................215Saving a Trend Worksheet..................................................................................................................215Deleting a Trend Worksheet ...............................................................................................................216

Trend Worksheet Overview ..................................................................................................................216Trend Worksheet Header ....................................................................................................................216Trend Worksheet Body.......................................................................................................................217

Editing the Trend Worksheet Body.......................................................................................................218Setting Tag History Parameters In The Tag Properties Window ..........................................................219

Boolean History ..................................................................................................................................219Integer and Real History.....................................................................................................................220

Trend History Files................................................................................................................................220History Files Format ...........................................................................................................................221

Header (.hdr) File .............................................................................................................................221Text (.txt) File ..................................................................................................................................221

10. Recipes ........................................................................................................................... 223Recipe("operation:recipe data file name") ......................................................................................223

Creating and Managing a Recipe Worksheet ........................................................................................224Creating a Recipe Worksheet .............................................................................................................224Opening a Recipe Worksheet .............................................................................................................224

Page 14: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

14

Saving a Recipe Worksheet ................................................................................................................224Deleting a Recipe Worksheet .............................................................................................................224

Recipe Worksheet Overview.................................................................................................................225Recipe Worksheet Header ..................................................................................................................225Recipe Worksheet Body .....................................................................................................................225

Editing the Recipe Worksheet ...............................................................................................................226

11. Reports............................................................................................................................ 227Report("operation:report file name")...............................................................................................227

Creating and Managing a Report Worksheet ........................................................................................228Creating a Report Worksheet..............................................................................................................228Opening a Report Worksheet..............................................................................................................228Saving a Report Worksheet ................................................................................................................228Deleting a Report Worksheet..............................................................................................................228

Report Worksheet Overview .................................................................................................................229Report Worksheet ...............................................................................................................................229

12. Scheduler ........................................................................................................................ 231Creating and Managing a Scheduler Worksheet ...................................................................................231

Creating a Scheduler Worksheet.........................................................................................................231Opening a Scheduler Worksheet.........................................................................................................231Saving a Scheduler Worksheet ...........................................................................................................231Deleting a Scheduler Worksheet.........................................................................................................232

Scheduler Worksheet Overview............................................................................................................232Scheduler Worksheet Header..............................................................................................................232Scheduler Worksheet Body ................................................................................................................232

Editing the Scheduler Worksheet ..........................................................................................................233

13. Language Translation .................................................................................................... 235Overview ...............................................................................................................................................235Configuring Dynamic Language Translation in a Running Application ..............................................235

Project Settings ...................................................................................................................................236Enable External Translation for Objects and Alarms .........................................................................236

Object Properties Windows..............................................................................................................236Alarms: Tag Properties Window......................................................................................................237

Creating Translation Files...................................................................................................................237Creating a Way to Restore the Application to the Original Language ...............................................238Creating a Way to Initiate Translation................................................................................................239

Using Objects to Initiate Translation ...............................................................................................239Calling the SetTranslation() Function from Alternate Places ..........................................................239

Translating Your Entire Application .....................................................................................................240Project Settings ...................................................................................................................................240

14. Security System.............................................................................................................. 241Enabling DesignStudio Security ...........................................................................................................241Group Accounts.....................................................................................................................................242

Creating New Group Accounts...........................................................................................................242Opening Group Accounts ...................................................................................................................244Deleting Group Accounts ...................................................................................................................245

User Accounts .......................................................................................................................................245

Page 15: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

15

Creating New User Accounts .............................................................................................................245Opening User Accounts ......................................................................................................................247Deleting User Accounts ......................................................................................................................247

Setting Security Level for Display Screens...........................................................................................248Setting the Security Level for Worksheets............................................................................................249Setting the Security Level for Objects...................................................................................................249

Object Properties - Position ................................................................................................................249Object Properties – Text I/O...............................................................................................................250Object Properties – Command............................................................................................................250Object Properties – Smart Message ....................................................................................................250Object Properties – Pushbutton...........................................................................................................251

Logging On and Off ..............................................................................................................................251Development Software .......................................................................................................................251Runtime and Runtime Emulation Mode .............................................................................................252

15. I/O Communication......................................................................................................... 255Driver Help .........................................................................................................................................255

Adding and Configuring Device Drivers ..............................................................................................255Adding a Driver to a Project ............................................................................................................255

Communication Parameters................................................................................................................256Specifying Communication Parameters ...........................................................................................256

Driver Worksheet ..................................................................................................................................258Adding and Modifying Driver Worksheets ........................................................................................258

Adding a Driver Worksheet .............................................................................................................258Modifying a Driver Worksheet ........................................................................................................259Deleting a Driver Worksheet ...........................................................................................................260

Driver Worksheet Header ...................................................................................................................260Driver Worksheet Body......................................................................................................................261Scaling Tag Values .............................................................................................................................262

Scaling With Divisors and Offset Values ........................................................................................262Scaling To Absolute Values.............................................................................................................262

TCP/IP Communications.......................................................................................................................264TCP/IP Worksheet ..............................................................................................................................264

Adding a TCP/IP Worksheet............................................................................................................264Modifying an Existing TCP/IP Worksheet ......................................................................................265Deleting a TCP/IP Worksheet ..........................................................................................................265

OPC Client Worksheet ..........................................................................................................................266OPC Client Worksheet .......................................................................................................................266

Adding an OPC Client Worksheet ...................................................................................................266Modifying an OPC Client Worksheet ..............................................................................................268Deleting an OPC Client Worksheet .................................................................................................269

16. Downloading and Testing Applications .......................................................................... 271Downloading to the Runtime Workstation............................................................................................271

Execution Environment Window – Connecting to the Runtime Workstation or Setting Up LocalEmulation............................................................................................................................................271

Target Tab ........................................................................................................................................271Application Tab................................................................................................................................273Import Tab........................................................................................................................................276

Downloading an Application – Step-by-Step .....................................................................................278

Page 16: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

16

Connecting a Runtime Workstation and a Development Computer ................................................278Downloading an Application ...........................................................................................................279

Running an Application with the Execution Environment Window Closed ......................................280Saving Changes to an Application on the Runtime Workstation .......................................................280

Graphics Changes.............................................................................................................................280Other Changes..................................................................................................................................280

Local Emulation and Testing on the Development Computer ..............................................................281Test Display ........................................................................................................................................281Running an Application Locally.........................................................................................................281CE Viewer ..........................................................................................................................................281

Running the Emulator ......................................................................................................................281Debugging Tools for Both Runtime Workstation and Local Emulation...............................................282

Database Spy ......................................................................................................................................282Using the Database Spy Floating Dialog .........................................................................................282Using the Database Spy Dockable Window ....................................................................................283Reading and Writing Tag Parameters ..............................................................................................284

LogWin...............................................................................................................................................285Development and Runtime Emulation LogWin: Output Dockable Window...................................285Runtime Emulation LogWin: LogWin – Log Window ...................................................................287

Specifying What Tags to Log in the Emulation LogWin – Log Window ..................................289Runtime LogWin: LogWin Function and CELOG.TXT File ..........................................................289

UniPad Utility .............................................................................................................................290Project Status.........................................................................................................................................291

System Information Tab .....................................................................................................................291Execution Tasks Tab...........................................................................................................................292Execution Tasks List...........................................................................................................................293

Background Task ........................................................................................................................293Database Spy ..............................................................................................................................293DDE Client Runtime...................................................................................................................293DDE Server.................................................................................................................................293Driver Runtime ...........................................................................................................................294LogWin .......................................................................................................................................294ODBC Runtime...........................................................................................................................294OPC Client Runtime ...................................................................................................................294TCP/IP Client Runtime...............................................................................................................294TCP/IP Server .............................................................................................................................294Viewer.........................................................................................................................................295

Reaching Technical Support .................................................................................................................297Internet Access....................................................................................................................................297E-mail .................................................................................................................................................297FAX ....................................................................................................................................................298

Page 17: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

17

1. Introduction to DesignStudioWelcome to the quickest and easiest way to create human-machine interface (HMI)applications for the Microsoft® Windows® CE operating system. Using OpenHMI™SE/PE you, the application developer, can create powerful, full-featured applications thatexploit the key features of Microsoft Windows CE.The OpenHMI SE/PE application software consists of two parts: the development system(software running on a desktop, laptop, or industrial PC) and the runtime system(software running on an operator interface workstation). The runtime software ispreloaded on the OpenHMI SE/PE workstation. You use the OpenHMI SE/PEdevelopment software, DesignStudio, on the development PC to create OpenHMI SE/PEapplication. The application consists of animated operator-interface screens, configureddrivers for the PLCs or other I/O devices to be controlled, a database of tags used in theapplication, and optional modules such as alarm logic, trend charts, recipes, schedulers,and a security system. The application can connect to industrial I/O systems and otherWindows applications in the runtime environment.After you complete an HMI application in DesignStudio, you download it to the runtimeworkstation and run it with the OpenHMI SE/PE runtime software. The workstationprocesses scanned data from connected devices according to parameters defined in theapplication and can react to, display, store, and upload the data.This OpenHMI SE/PE, Application Development Technical Reference manual is designedfor any users of DesignStudio. Its objective is to allow you, the user, to quickly findinformation on any aspect of DesignStudio. The chapters are set up in the order in whichyou will generally build an OpenHMI SE/PE application.• Chapter 1 contains basic information, installation, and uninstallation.• Chapter 2 is an overview of the DesignStudio interface.• Chapter 3 contains information on the structure of an application and instructions on

how to create one.• Chapter 4 contains information on tags and the tag database.• Chapter 5 contains information on screen creation.• Chapter 6 contains information on the scripting language used to add logic to an

application control structure.• Chapters 7 through 14 contain information on the optional modules: math

worksheets, alarms, data logging, recipes, reports, scheduler, language translation,and the security system.

• Chapter 15 contains information on I/O device driver configuration.• Chapter 16 contains information on runtime emulation, runtime downloading and

control, and debugging applications.This manual is written with the assumption that you are familiar with the Windows NTenvironment. If you are not, we suggest that you select Help from the Windows desktopStart menu before you continue to work through this guide.

Note: Applications built with DesignStudio can only run on a Xycom AutomationOpenHMI SE/PE workstation.

Page 18: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

18

Related ManualsThe OpenHMI SE/PE, Application Development Getting Started manual is designed tohelp a new user create an OpenHMI SE/PE application right away. The OpenHMI SE/PE,Runtime Quickstart Guide manual provides information on setting up an OpenHMIruntime workstation. The 3400 Series, Hardware Reference and 3406 Workstation,Hardware Reference manuals provide specific runtime workstation hardwareinformation.

Text Conventions Used in this ManualThroughout this manual certain terms are formatted in ways that indicate what type ofobject is being described. Some information is also segregated from the main text to helpyou to quickly read through this manual.Titles, labels, and messages, other that those listed above, are indicated by italic text.Computer filenames and text to be entered by the user will appear a monospace font.Specific items that involve operator input (such as the Start menu button) and keyboardkeys (such as Enter) appear in a narrow bold typeface. Some other text (such as the wordNote) is bolded to emphasize it and draw your attention to it.Some text is segregated into Note and Caution boxes. Notes contain extra informationthat may make it easier to understand the nearby text, especially the text just before thenote. Cautions contain information necessary to prevent damage to the OpenHMIdevelopment station or workstation.

Mouse and Selection ConventionsA mouse isn’t the only pointing device; there are also keystrokes, touchscreens, etc. MostPCs used for application development will be running a version of Windows with amouse, so this manual is written assuming mouse use. Generally, a PC mouse is set up sothat the left mouse button is the primary button and the right mouse button is thesecondary button. Click and select refer to clicking on an object with the left (primary)mouse button. Double-click refers to clicking twice rapidly on an object with the leftmouse button. Right-click refers to clicking on an object with the right (secondary) mousebutton.Select may also be used to indicate highlighting or specifying an item on the computerscreen with your pointing device. Selection with a touchscreen is usually the same asselection with a mouse, except that your finger is used to touch a screen object or section.Selection with a keyboard usually involves use of the Tab key to move around options,use of the Enter key to open menus and to replace the double-click, and use of the Alt keyand an underlined letter to select an object that has an underlined letter.Dragging is holding down the appropriate mouse button after clicking, and moving themouse. Usually an outline of the object will move with the mouse pointer or the outlineof a shape will be defined by the movement of the mouse.

Windows ConventionsDialogs, or dialog boxes, are windows that allow you to input information. Text boxes arespaces in windows where text can be typed. A radio button is a white circle in which ablack dot appears or disappears when clicked by the mouse. A check box is a whitesquare in which a check appears or disappears when clicked by the mouse. Lists are

Page 19: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

19

panes (white boxes) in windows that contain many selectable options. Drop-down listshave arrows that can be clicked to show part or all of an otherwise concealed list.In this manual, interface refers to the entire DesignStudio window. Dockable windowsare windows that can be dragged to an edge of the interface and merge with that edge.Toolbars are dockable windows that contain only buttons and text boxes. Buttons areicons in boxes that appear to be pressed when selected.

System RequirementsTo develop an OpenHMI SE/PE application with the DesignStudio software, werecommend the following hardware and software:• IBM-compatible computer with an Intel® 486 DX-compatible processor• Windows NT/95/98 operating system• Minimum of 32 MB of random-access memory (RAM)• MS Internet Explorer 4.0 or install 40comupd.exe version 4.71 or higher• 30 MB of free hard disk space is required for the program without any application

programs; more is recommended• 3.5" floppy drive• CD-ROM drive (can be on a different computer)• Standard keyboard with function keys F1 through F12• Parallel printer port (optional)• 100% IBM-compatible VGA or SVGA display adapter with 1 MB Video RAM

(VRAM)• Microsoft-compatible pointing device (e.g., mouse, trackball, joystick, touchscreen)• One or two COM ports and adapters for downloading applications (optional)• Ethernet connection for downloading applications (optional)To run a developed application, you must have an OpenHMI PE runtime workstationwith a runtime license.

Page 20: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

20

OpenHMI SE (Standard Edition) FeaturesOpenHMI SE is the standard version of the OpenHMI for Windows CE family. Itsupports the following features:• An integrated Windows environment with toolbars, dialogs, and menus.• Graphic operator instruments like pushbuttons, meters, sliders, switches, text and

numeric displays, and LED-style indicators.• Drawing functions to create custom displays.• Bitmap graphics importing.• Background bitmap layer creation and editing.• Application language translation.• Alarming, annunciation, and acknowledgement.• Real-time trending with up to eight variables.• Logical expressions and a scripting language with over 100 functions.• Screen and object password-protected runtime security (256 levels)• Online remote configuration and serial or Ethernet download capability• TCP/IP networking.• OPC I/O client support and drivers.• Database symbol import from Xycom Automation's ASIC-200, ASIC-300, and

OpenCNTRL PC-based control packages.• 1000 tag runtime.

Note: Features that are supported by OpenHMI PE applications, but not byOpenHMI SE applications, will be pointed out by a note and the symbol to the left.

OpenHMI PE (Professional Edition) FeaturesOpenHMI PE is a more full-featured version of the OpenHMI for Windows CE family.In addition to the features listed above for OpenHMI SE, it supports the followingfeatures:• User-configurable screen object animation effects.• Historical trending and data logging.• Custom report generation to files.• Recipe file management.• Alarm date logging.• Event-driven math worksheets.• Event scheduler based on date, time, or data condition.• 4000 tag runtime.

Note: Features that are supported by OpenHMI PE applications, but not byOpenHMI SE applications, will be pointed out by a note and the symbol to the left.

Page 21: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

21

OpenHMI SE/PE Software InstallationDesignStudio runs on the Microsoft Windows NT operating system. The installationprogram creates directories as needed, copies files to your hard drive, and creates theDesignStudio icons in a desktop folder. DesignStudio is packaged on a CD-ROM. Youmay install the program from this CD-ROM or create installation 3.5" floppy disks.There are four software components that can be installed from the DesignStudioinstallation CD-ROM.• DesignStudio – You need to install DesignStudio to create OpenHMI SE/PE

applications. Installation instructions are given below for installing this program fromthe installation CD-ROM or from floppy disks.

• DesignStudio OPC Add-On – Install this add-on software only if you intend to useOPC functionality to transfer tag values for your OpenHMI SE/PE application. Youcannot install the DesignStudio Add-On without first installing DesignStudio. Thisinstallation process is a simplified version of the DesignStudio installation process. Ifyou have questions about specific windows, look at the DesignStudio installationinstructions (below). If you need to install the software with floppy disks, go to theOPC Install folder and follow the rest of the directions in Creating InstallationFloppy Disks (p. 23) and Installing DesignStudio from Floppy Disk (p. 24).

• MS Internet Explorer 4.0 – This is not the full version of Microsoft Internet Explorer,but is instead some .dll files necessary for DesignStudio installation. Install the40comupd.exe program only if you do not have version Microsoft Internet Explorer4.0 or higher already installed on your computer. If you get message duringDesignStudio installation about not having the correct version of a .dll file, youwill need to install this program. If you need to install software with floppy disks,copy the 40comupd.exe file from the MSIExplore40 folder.

• Adobe Acrobat Reader – Install this program if you do not already have version 4.0or higher installed on your computer. You will need this reader in order to open thedocumentation .pdf files. If you need to install software from floppy disks, you willneed to find a way to install the reader. It is too large for a single floppy disk.Possible ways to install it include downloading it from the Adobe website andzipping and spanning the file across several disks.

Note: You will need Administrator privileges on a Windows NT workstation in order tobe able to install any software, including DesignStudio.

Note: If you want to install DesignStudio from the CD-ROM and if your laptop or PCdoes not have an internal CD-ROM drive, make sure that you have a portable CD-ROMdrive attached to the appropriate port and powered on and that you have the appropriatedevice drivers installed.

If you are installing from 3.5" floppy disks and you are not sure how to create theinstallation disks from the OpenHMI SE/PE CD-ROM, please follow the instructions inthe section titled Creating Installation Floppy Disks (p. 23). When you are finished,install DesignStudio following the instructions in the section titled InstallingDesignStudio from Floppy Disk (p. 24).

Note: You may install a newer version of DesignStudio over an older version. Werecommend that you uninstall the older version first (see p. 26).

Page 22: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

22

Installing DesignStudio from the Installation CD-ROM

1. Power up the development computer and make sure that no programs are running.

2. Insert the installation CD-ROM into the CD-ROM drive or the first installationfloppy disk into the 3.5" disk drive.

3. An autorun.exe file will run and a setup window will open. If the autorun.exefile doesn't start automatically, you can manually start it in Windows Explorer.

4. Select the Install Design Studio button to install DesignStudio. You may select theother buttons to install the Adobe Acrobat reader, Microsoft Internet Explorer 4.0.dll files, or the OPC add-on for DesignStudio.

5. A Setup dialog box will inform you that the InstallShield® Wizard is loading, then thefirst installation window will prompt you. Follow the instructions on the screen toproceed with the installation. Read the Welcome screen and press Next > if you havesatisfied its conditions.

6. Read the license agreement. To accept the license agreement, choose Yes, I acceptagreement and select OK. You must accept the license agreement to continue with thesoftware installation.

7. At the CDKey window CD Key text box, enter the 18-digit registration number fromthe sticker affixed to your CD jewel case. After you have typed the eighteenthcharacter, the OK button will become active. Select it to proceed. If you do not have aregistration number, you will be unable to install DesignStudio.

8. At the Choose Destination Location screen, select Next > unless you have a reasonnot to use the default file folder location. You can browse to a location and specify anonexistent folder that will then be created by the setup utility. If you do this, wesuggest that you name the folder DesignStudio.

9. At the Setup Type screen, choose the Typical radio button unless you have a reason tochoose the other options; select Next >.

Page 23: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

23

10. At the Select Program Folder screen, select Next > unless you have a reason not touse the default file folder name. The installation program will begin to copy programfiles to your hard drive.

11. When prompted to restart Windows, you should select the Yes, I want to restart mycomputer now radio button and select OK.

12. When the computer has restarted, go to Starting DesignStudio (p. 25).

Creating Installation Floppy Disks

1. Locate a computer with functioning CD-ROM and 3.5" floppy drives.

2. Insert the DesignStudio CD-ROM into the CD-ROM drive, close the setup window,and open the contents of the CD-ROM in the My Computer window or inWindows NT Explorer (in the Programs submenu of the Start menu).

Note: These functions are documented in your Windows NT help. Please consult theWindows NT help if you have difficulty executing these steps.

3. Open the Install folder and determine how many disks you will need to format bylooking at the number of Disk<number> folders or the highest <number> value.This number will be referred to as N in the rest of these instructions. Example: IfDisk12 is the highest numbered folder, there will be 12 folders and N is 12.

4. Format the required number of 3.5" floppy disks and label them appropriately. (Wesuggest DesignStudio Installation Disk 1/N through DesignStudio InstallationDisk N/N.)

Note: You can format disks by double-clicking the My Computer icon (this may havea different name on your desktop), selecting the 3½ Floppy (A:) icon, selecting Filethen Format…, and following the directions in the Format A:\ dialog box.

5. Copy the contents of each folder into the appropriate disk. Example: Copy thecontents of the Disk1 folder to DesignStudio Installation Disk 1/N.

Note: Select the top file in the folder with the left mouse button, then hold down theShift key and tap the down arrow key (↓) until all files are selected. Click and dragthe selected files to the 3½ Floppy (A:) icon or right-click on the selected files, selectCopy, right-click on the destination (3½ Floppy (A:)), and select Paste.

Note: You can write-protect your floppy disks by pushing up the movable plastic tabon the back of the disk (upper left corner), leaving an open rectangular hole throughthe disk. It is always a good idea to write-protect installation floppy disks.

6. Go to the next section to install DesignStudio from floppy disks.

Page 24: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

24

Installing DesignStudio from Floppy Disks

1. Follow the directions in the previous section to make the installation floppy disks.

2. Power up the development computer and make sure that no programs are running.

3. Insert the disk labeled DesignStudio Installation Disk 1/N (see previous section).

4. Select the Start button on the Taskbar, then select Run.

5. The Run dialog box will appear. If X:\Setup appears in the Open text box, pressEnter or select OK. If it does not appear, type X:\Setup and press Enter or select OK.(X identifies your drive; it will usually be A for your 3.5" disk drive.)

6. A Setup dialog box will inform you that the InstallShield® Wizard is loading, then thefirst installation window will prompt you. Follow the instructions on the screen toproceed with the installation. Read the Welcome screen and press Next > if you havesatisfied the listed conditions.

7. Read the license agreement. To accept the license agreement, choose Yes, I acceptagreement and select OK. You must accept the license agreement to continue with thesoftware installation.

Page 25: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

25

8. At the CDKey window CD Key text box, enter the 18-digit registration number fromthe sticker affixed to your CD jewel case. After you have typed the eighteenthcharacter, the OK button will become active. Select it to proceed. If you do not have aregistration number, you will be unable to install DesignStudio.

9. At the Choose Destination Location screen, select Next > unless you have a reasonnot to use the default file folder location. You can browse to a location and specify anonexistent folder that will then be created by the setup utility. If you do this, wesuggest that you name the folder DesignStudio.

10. At the Setup Type screen, choose the Typical radio button unless you have a reason tochoose the other options; select Next >.

11. At the Select Program Folder screen, select Next > unless you have a reason not touse the default file folder name. The installation program will begin to copy programfiles to your hard drive.

12. You will be prompted for the next disk in a Setup Needs The Next Disk dialog box.Insert the correct disk into the disk drive and select Enter.

13. When prompted to restart Windows, you should select the Yes, I want to restart mycomputer now radio button and select OK.

14. When the computer has restarted, go to Starting DesignStudio (p. 25).

Starting DesignStudio

1. Double-click the DesignStudio shortcut icon on the desktop or select Programs fromthe Start menu, then select DesignStudio in the DesignStudio Tools submenu.

2. Select OK to acknowledge the Warning window message.

Note: This warning only applies to the runtime emulation (p. 281). The runtimeworkstation that actually runs the DesignStudio application is unaffected by a time limit.

Page 26: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

26

Uninstalling OpenHMI SE/PE DesignStudioShould you find it necessary to remove DesignStudio from your system, follow theseinstructions:

1. Select the Start button on the Taskbar, select Settings, and then select Control Panel toopen the Control Panel window.

2. Double-click the Add/Remove Programs icon in the Control Panel window.

3. In the Add/Remove Programs Properties window select DesignStudio in the lowerpane list and then select the Add/Remove… button.

4. At the Confirm File Deletion dialog, select the Yes button.

Page 27: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

27

5. The Uninstall Shield Wizard and the Remove Programs From Your Computer dialogwill open. When the message Uninstall successfully completed. appears, the OK buttonwill become active. Select it.

6. You will see that DesignStudio is no longer in the list in the lower pane of theAdd/Remove Programs Properties window. Close the window with the Cancel buttonor the close button ( ), then close the Control Panel window.

7. Open the Windows Explorer and browse to the directory that contained theDesignStudio directory.

8. Make sure that all of the DesignStudio files and folders have been deleted. Manuallydelete any that are left.

Page 28: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150
Page 29: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

29

2. The DesignStudio InterfaceOverview

WorkspaceThe blank workspace can be seen when there is no screen or worksheet open.

TitlebarMenu Bar

Workspacewindow

Tools toolbar

Database Spywindow

Output window

Status Bar

Execution Controltoolbar

Tag Propertiestoolbar

Standardtoolbar

Opendisplayscreen

Page 30: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

30

Popup MenusRight-click the mouse in most of the interface (not on an open screen), to open a popupmenu that allows you to close or open windows and toolbars. The menu appears withoutthe Tools toolbar listed if no screen is open (left menu).

The menu lists the three dockable windows (Workspace, Output, and Database Spy) andthree or four toolbars (Standard, Tag Properties, Execution Control, and Tools). Selectingan item opens or closes the corresponding window or toolbar. An item is open when ithas a check or a depressed button. The dockable windows have shortcut keys (Alt+0 forWorkspace, Alt+1 for Output, and Alt+2 for Database Spy) which toggle them withoutopening the menu. The dockable windows can also be toggled with Standard toolbarbuttons and in the View menu.

Titlebar

The titlebar contains, from left to right:• The DesignStudio icon and name.• The name of the active open screen or worksheet, if any.• Minimize button ( ): When pressed the DesignStudio window is minimized.• Resize/Maximize button ( / ): When pressed each button toggles to the other. The

Resize button tiles the DesignStudio window and the Maximize button maximizes it.• Exit button ( ): When pressed, DesignStudio is closed. The database is

automatically saved. You will be prompted to save changed screens or worksheets.This is similar to the Exit command in the File menu.

Page 31: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

31

Status Bar

The status bar contains fields used to identify toolbar buttons and provide information onthe active screen, if any. The fields are, left to right:• Hint field: Displays a short description of any toolbar button touched by the cursor.• Caps Lock field: Displays whether the keyboard Caps Lock is on (CAP) or off

(empty).• Num Lock field: Displays whether the keyboard Num Lock is on (NUM) or off (empty).• Scroll Lock field: Displays whether the keyboard Scroll Lock is on (SCRL) or off

(empty).• ID field: Displays the ID number (p. 98) of a selected screen object.• Screen Coordinate field: Displays the current location of the cursor on the active

screen. The X number is the number of pixels from the left edge of the screen. The Ynumber is the number of pixels from the top of the screen.

• Object Size field: Displays the size of the selected object in pixels. The W number isthe width and the H number is the height.

• No DRAG field: Displays whether dragging (p. 90) is disabled (No DRAG) or enabled(empty) in the active screen.

Page 32: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

32

Menu Bar

The menu bar contains File, Edit, View, Insert, Project, Tools, Window, and Help menus.

Note: Right-clicking will not do anything within the menu bar.

File Menu

New…: Opens a New window, which contains File and Project tabs, allowing you tocreate a new application or a new file that is part of your open application. You can alsoopen the New window by selecting the New button in the Standard toolbar or Document…in the Insert menu.

Page 33: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

33

The File tab allows you to pick new Alarm, Math, OPC Client, Recipe, Report, Scheduler, TCPClient, and Trend worksheets or a new Display screen. When you have added an I/O driverto the application (p. 255), there is an option to open a new driver worksheet. The itemsin the File tab can be accessed in the Workspace window and opened in the Insert menu.

Note : The worksheets for DDE Client and ODBC do not appear in Windows CEapplications.

The Project tab allows you to create a new project. For more information on creating anew project, see the Application Overview chapter (p. 47).Open Project…: Opens an Open window where you can navigate to and open anotherDesignStudio application. You also can open a project by double-clicking on the projectname in a directory in Windows Explorer or by selecting the Open Project button on theStandard toolbar.Open File: Opens a DesignStudio application file. In the Open window, you can select thetype of file from the Files of type drop-down list and browse to the desired file.Close: Closes the active screen or worksheet. You will be prompted to save changes. Thisis the same as the titlebar close button ( ).Close All: Closes all active screens or worksheets. You will be prompted to save changes.Save: Saves any active and open worksheet or screen. You can also use the Save buttonon the Standard toolbar. The Save function is available only when the active file has beenmodified.Save As: Saves the active worksheet or screen and allows you to choose the name andlocation of the file.

Save All: Saves all open worksheets or screens. You can also use the Save All button onthe Standard toolbar. Save All is available only when something has been modified.

Print Setup…: Allows you to configure the printing options. In order to set-up a defaultprinter, go to the Windows Start menu, select Settings, and then select Printers. Right-click the button for the printer you want to use as the default printer, and then select SetAs Default on the popup menu. If there is a check next to Set As Default in the popupmenu, then it is the default printer.Print Preview: This command is like the standard Windows Print Preview command. Youwill see a preview of how the screen or worksheet will look on the printer output in aprint preview window that opens in the workspace. Optional commands are contained inbuttons along the top of the print preview window. You will have the option to Zoom In tocheck details and then Zoom Out to the default size. You may also view the Next Page, theprevious page (Prev Page), or two pages at once (Two Page). At any time, you mayPrint… the pages (which takes you to the same Print window as the Print… command) oryou may Close the print preview window.Print: A Print window is opened. You can print a range of pages or the entire document.In addition, you can specify the printer name, properties, and the number of copies youwould like printed. You can also print the current file by selecting the Print button on theStandard toolbar.Previous File List: Lists the four most recently opened files; select a file to open it.Exit: Exits DesignStudio. When you exit DesignStudio, the database is automaticallysaved. You will prompted to save any screens or worksheets that have unsaved changes.This is similar to the Exit button ( ) in the titlebar.

Page 34: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

34

Edit Menu

Undo: Cancels the last action done while working on a screen. Cancels up to 20 actionstaken prior to the current action. The actions in object properties do not increase Undosteps. You can also use the Undo button on the Standard toolbar.Cut: Removes the selection and stores it onto the clipboard, replacing previously storedselections on the clipboard. You can use Cut to select an object and move it to anotherlocation on screen or move it to another screen. You can also use the Cut button on theStandard toolbar.Copy: Copies the selection to the clipboard. It allows you to paste it in another locationon the screen, paste it to another screen, or make multiple copies of an object. You canalso use the Copy button on the Standard toolbar.Paste: Copies the Windows clipboard contents into the active screen. If the clipboardcontains a selection, it is copied to the upper left corner of the screen. You can also usethe Paste button on the Standard toolbar.Delete: Deletes the selection. To restore an object that you accidentally deleted, use theUndo function. You can also use the Delete button on the Standard toolbar.Copy to…: Opens a Save As window. Copies the selected element (object or group ofobjects and its properties) to a file with a DesignStudio specific format. These objectsmay have static and dynamic properties, as well as bitmap objects.Paste From…: Imports a symbol, bitmap, or cut file to the current screen. .sym files areobjects that have static and dynamic properties. .bmp files are bitmaps (the document isconverted to a bitmap object). .cut files are bitmaps (the document is converted to abitmap object).Paste Link…: A linked object is information (the object) created in a source file (whichcan be another project or another screen). The information is pasted into a screen whilemaintaining a connection to the source. The linked screen object is automatically updatedwhen the source is updated. A linked object does not become part of the screen. Thelinked file should be located within the application folder or a subfolder so that it can bedownloaded with the application to the runtime workstation. This feature does not workin Windows CE applications.Access Level: Allows you to set the security level for a given worksheet. See the SecuritySystem chapter (p. 241) for more information.

Page 35: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

35

Insert Line: Inserts a row into an active worksheet.Select All: Selects all objects on an active screen.Find…: Opens a Find window and allows you to find a word in an active worksheet.

Go to…: Jumps to a line in an open worksheet or selects an object on the screen accordingto its ID number (p. 98). For each object created in the screen, DesignStudio applies asequential identification number (ID), starting from the number 0.

Note: If you have many superimposed objects, you can use this menu option to edit theproperties of an object that is below the others when it is not possible to select it using thepointing device.

View Menu

Workspace: Displays or removes the Workspace window. When this item appears to be adepressed button, the Workspace window is open and usable in the interface. This is thesame as the Toggle Workspace Window button on the Standard toolbar.Database Spy: Displays or removes the Database Spy window. When this item appears tobe a depressed button, the Database Spy window is open and usable in the interface. Thisis the same as the Toggle Database Window button on the Standard toolbar.Output: Displays or removes the Output window. When this item appears to be adepressed button, the Output window is open and usable in the interface. This is the sameas the Toggle Output Window button on the Standard toolbar.Status Bar: Displays the Status Bar at the bottom of the screen. When checked, the StatusBar is open in the interface.Header: This menu option is enabled when a worksheet is active. When checked, aworksheet header is displayed. When not checked, the header is not displayed.Restore defaults: Restores defaults in active Alarm worksheets. This option is onlyavailable when an Alarm worksheet is open.

Page 36: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

36

Screen Attributes…: Opens the Screen Attributes window (p. 83) that shows thecharacteristics of the active screen.Zoom: Provides a separate window with a magnification of the image that the pointer ispointing to. Right-click twice to decrease the zoom scale. Double-click to increase thezoom scale.Library: Opens the Library window. The Library button is also on the Standard toolbarand the Library folder can be opened in the Graphics tab of the Workspace window. Seep. 88 for more information on the Library.Properties: Shows the Object Properties window of the selected object. Each ObjectProperties window can look different. See p. 98 for more information.

Insert Menu

Tag…: Opens a New Tag window. For more information on creating tags, see the Tagschapter (p. 59).Class…: Opens an Insert Class window. For detailed information on creating tags, see theTags chapter (p. 59).Document…: Opens a New Document window that has the same options as the New…command of the File menu.Driver…: Opens a Communication Drivers window. For more information on configuringa driver, see the I/O Communication chapter (p. 255).User…: Opens a User Account window. For details, see the Security System chapter(p. 241).Security Group…: Opens a Group Account window. For details, see the Security Systemchapter (p. 241).Screen: Opens the Screen Attributes window for creating a new screen (p. 83).

Page 37: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

37

Screen Group…: Opens the Insert Screen Group window. Defines a screen group for anon-Windows CE application (p. 87).Active-X object…: Opens an Insert ActiveX Control window which lists ActiveX objects.This option is not available for Windows CE applications.

Project Menu

Settings…: Opens a Project Settings window with three tabs: Identification, Options, andRuntime Desktop. For more information, see p. 50.Status…: Opens a Project Status window with two tabs: Execution Tasks and Information.The Execution Tasks tab has a list of Tasks with their Status and Startup mode (automaticor manual). The Information tab provides some general, view-only information about thedevelopment system and about the application. You cannot change the information onthis screen. For more information, see p. 47.Test Display: Begins test display mode. The Test Display button on the Execution Controltoolbar also activates test display mode. For details, see the Downloading and TestingApplications chapter (p. 271).Stop display test: Stops test display mode. The Stop Test Display button on the ExecutionControl toolbar also stops test display mode. For details, see the Downloading andTesting Applications chapter (p. 271).Run Application: Begins run application mode, where the application is run locally in theCE Viewer and the open screen is executed. This mode can also be activated by the RunApplication button on the Execution Control toolbar. For details, see the Downloadingand Testing Applications chapter (p. 271).Stop Application: Stops run application mode. This can also be done with the StopApplication button on the Execution Control toolbar. For details, see the Downloadingand Testing Applications chapter (p. 271).Send project to target: When active after the development computer is connected to theruntime workstation, this command can send the application to the workstation. Fordetails, see the Downloading and Testing Applications chapter (p. 271). This can alsobe done with the Send app to target button on the Execution Control toolbar.Execution Environment…: Opens an Execution Environment window with three tabs:Target, Application, and Import. For details, see the Downloading and TestingApplications chapter (p. 271). The Execution Environment window can also be openedby the Execution Environment button found on the Execution Control toolbar.Logon: Opens a Log On window with User Name and Password text boxes. See theSecurity System chapter (p. 241).

Page 38: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

38

Tools Menu

Translation Editor: Opens a Translation Tool window that allows you to create translationworksheets. For detailed information, see the Language Translation chapter (p. 233).Register Controls: Opens a Register Controls window that allows you to registercomponents that DesignStudio is using. This tool can be used when troubleshooting.Convert Resolution: Allows you to convert the screen size. It will back up the last screensize for all screens in a Backup folder located in the Screen folder in your \<application>\directory.Verify Application: Recompiles math worksheets and screen logic and packs the database.When a screen or worksheet is saved, it includes a pointer to the current database version.When the application is executed, the screen or worksheet database is compared to thecurrent application database. If there is a mismatch, any expressions are recompiled. Toavoid doing this during application runtime, you should perform the Verify Applicationfunction before downloading or finishing an application. This function should also beused when converting an application to a new version of the program. See p. 57 for moreinformation on using this function.System Information: Opens a System Information window, which contains information onthe operating system, directories, the processor, discs, the display, and memory. NetworkResources details the your computer's network. Applications lists the applications that arecurrently running. Processes shows all the Windows tasks that are running. Services liststhe Windows NT services used by the program (for Windows NT only).

Window Menu

Cascade: Arranges the opened worksheet windows in a cascade pattern. Opened screensare not affected by this function.Tile Horizontal: Arranges the opened worksheet windows in a tiled horizontal pattern.Opened screens are not affected by this function.Tile Vertical: Arranges the opened worksheet windows in a tiled vertical pattern. Openedscreens are not affected by this function.Arrange Icons: Arranges minimized worksheets at the bottom of the workspace. Openedscreens are not affected by this function.

Page 39: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

39

Close: Closes the active screen or worksheet. You will be prompted to save changes. Thisis the same as the Close command in the File menu and the titlebar close button ( ).Close All: Closes all active screens or worksheets. You will be prompted to save changesfor each file.Window Listing: Open files are listed at the bottom of the Window menu. The currentlyactive file is indicated with a check. Select a file to make it active.

Help Menu

Contents and Index: This command opens the Dstudio.hlp help window. The windowhas two tabs, Contents and Find.License Agreement: Displays the Xycom Automation DesignStudio software licenseagreement.Xycom Home Page: Opens the Xycom Automation web site with your web browser.Communication Drivers: Opens a Communication Drivers window in which you canselect an installed driver and then open a help file for it with the Help button.

About DesignStudio: Displays a window that contains the copyright date, the Version, theProduct Family, and the software key number (Protection field).

Page 40: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

40

ToolbarsThe Standard, Tag Properties, and Execution Control toolbars appear across the top of theworkspace, just below the menu bar. The Tools toolbar, which contains screen editingtools, only appears if there is an active screen. If you close all of three of the top toolbarsthe gray bar containing those toolbars will also disappear, leaving more workspace.A toolbar is also a dockable screen object. To move any toolbar to a different screenlocation, click on its title bar and drag it to the desired location.

Note: To remind yourself about toolbar button functions look at the left side of the statusbar at the bottom of the DesignStudio interface. A brief description of the buttoncurrently highlighted by the mouse appears there.

Standard Toolbar

The Standard toolbar is located at the top left of the interface and includes buttons formany of the main menu bar functions.New: Opens a New window, which contains File and Project tabs, allowing you to create anew application or a new file that is part of your open application. You can also accessthe New window by selecting New… in the File menu or Document… in the Insert menu.

The Project tab allows you to create a new project. For more information on creating anew project, see the Application Overview chapter (p. 47).The File tab allows you to pick new Alarm, Math, OPC Client, Recipe, Report, Scheduler, TCPClient, and Trend worksheets or a new Display screen. When you have added an I/O driverto the application (p. 255), there is an option to open a new driver worksheet. The itemsin the File tab can be accessed in the Workspace window and opened in the Insert menu.

Page 41: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

41

Note: The worksheets for DDE Client and ODBC do not appear in Windows CEapplications.

Open Project: Opens an Open window where you can navigate to and open anotherDesignStudio application. You also can open a project by double-clicking on the projectname in a directory in Windows Explorer or by selecting the Open Project in the Filemenu.Save: Saves any active and open worksheet or screen. You can also select Save from theFile menu. The Save function will not be available if the active file has not been modified.

Save All: Saves all open worksheets or screens. You can also select Save All from the Filemenu. Save All is available only when something has been modified.

Cut: Removes the selection and stores it onto the clipboard, replacing previously storedselections on the clipboard. You can use Cut to select an object and move it to anotherlocation on screen or move it to another screen. You can also select Cut in the Edit menu.Copy: Copies the selection to the clipboard. It allows you to paste it in another locationon the screen, paste it to another screen, or make multiple copies of an object. You canalso select Copy in the Edit menu.Paste: Copies the Windows clipboard contents into the active screen. If the clipboardcontains a selection, it is copied to the upper left corner of the screen. You can also selectPaste in the Edit menu.Delete: Deletes the selection. To restore an object that you accidentally deleted, use theUndo function. You can also select Delete in the Edit menu.Undo: Cancels the last action done while working on a screen. Cancels up to 20 actionstaken prior to the current action. The actions in object properties do not increase Undosteps. You can also select Undo from the Edit menu.Print: A Print window is opened. You can print a range of pages or the entire document.In addition, you can specify the printer name, properties, and the number of copies youwould like printed. You can also print the current file by selecting Print in the File menu.Workspace: Displays or removes the Workspace window. When this button is depressed,the Workspace window is open. The Workspace toggle option is also in the View menu.Database Spy: Displays or removes the Database Spy window. When this button isdepressed, the Database Spy window is open. The Database Spy toggle option is also inthe View menu.Output: Displays or removes the Output window. When this button is depressed, theOutput window is open. The Output toggle option is also in the View menu.Library: Opens the Library window. The Library button is also in the View menu and theLibrary folder can be opened in the Graphics tab of the Workspace window. See p. 88 formore information on the Library.

Page 42: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

42

Tag Properties Toolbar

The Tag Properties toolbar is located at the top of the interface and to the right of theStandard toolbar. It contains special buttons for finding and accessing tags, functions, andtag properties. From left to right the objects are:• Tagname text box• Object Finder button• Cross Reference button• Tag Properties buttonFor detailed instructions on using this toolbar, see Tag Properties Toolbar (p. 68).

Execution Control Toolbar

The Execution Control toolbar is located at the top right of the interface and containsspecial buttons for running and testing applications. From left to right the buttons are:• Test Display button• Stop Test Display button• Run Application button• Stop Application button• Send app to target button• Execution Environment buttonFor detailed instructions on using this toolbar, see the Downloading and TestingApplications chapter (p. 271).

Page 43: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

43

Tools Toolbar

Object Editing ConfigurationThe Tools toolbar with object editing tools is visible when there is an active screen. �It covers the right edge of the interface.

Bitmap Editing ConfigurationThe Tools toolbar can be toggled to a set of bitmap editing �tools that affect the display screen background, with theChange Toolbar button. �

For detailed information on using the Tools toolbars, refer toScreen Construction chapter (p. 83).

Page 44: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

44

Workspace Window

OverviewThe Workspace window is an interface that allows you to quickly find a developmentmodule of the application (tags, screens, worksheets, etc). The application componentsare organized in a tree-view interface, each one having its own icon and customizeddescription. This allows a quick association between the application component and itscharacteristics. The Workspace window can be moved, resized, or hidden from the user.

Organization and NavigationThe Workspace window is divided into four tabs. Each tab, its folders, and componenticons are described in length elsewhere in this manual. Folders can be opened by clickingthe boxed plus ( ) or by double-clicking the folder icon or name. If there is no boxed plusbeside the folder, then it is empty. It cannot be opened until it contains subfolders or files.Unlike Windows folders, these folders cannot be renamed, though certain developedsubfolders’ names can be changed.All folders and component icons respond to right-clicking, which opens a menu with theprincipal actions of open, insert, delete, etc. These four tabs are described briefly below.

Database Tab

The Database tab allows the user to access any available tag from the application andsecurity system components. The Application Tags, Classes, Shared Tags, and InternalTags folder are explained in the Tags chapter (p. 59). The Security folder is explained inthe Security System chapter (p. 241).

Page 45: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

45

Graphics Tab

The Graphics tab allows the user to access all screens and symbols in the application. Fordetails, refer to the Screen Construction chapter (p. 83).

Tasks Tab

The Tasks tab allows the user to create and access tasks worksheets. Alarms are detailedin the Alarms chapter (p. 203), Trend in the Logging Trend Data chapter (p. 215),Recipes in the Recipe chapter (p. 223), Reports in the Reports chapter (p. 227), Math inthe Math Worksheets chapter (p. 197), and Scheduler in the Scheduler chapter (p. 231).

Comm (Communications) Tab

The Comm tab allows the user to access worksheets configured to establishcommunication with another device or software using available protocol. This tab isexplained in the I/O Communication chapter (p. 255).

Page 46: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

46

Database Spy WindowThe Database Spy dockable window is located in the lower left of the screen and can beused for testing and debugging applications. For details, see the Downloading andTesting Applications chapter (p. 271).

Output (Log) WindowThe Output dockable window is located in the lower right of the screen and can be usedfor testing and debugging applications. For more information, refer to the Downloadingand Testing Applications chapter (p. 271).

Page 47: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

47

3. Application OverviewThis chapter contains an overview of components of a DesignStudio application and itssettings. It also contains development and optimization tips.

Application Development Overview

A DesignStudio application consists of a set of screens that the operator will use on theruntime workstation to monitor and control a process or processes. In addition to screens,an application includes programming modules, a built-in set of object properties andfunctions, alarm configuration, trend/history configuration, report generation, recipeusage and generation, security configuration, and scheduling. Driver configuration isnecessary for the application to be able to transmit and receive data and instructions toand from external I/O devices such as PLCs.The first steps in application creation are:• Create the new application (p. 48).• Configure the project settings (p. 50).The next steps can be done in any order.• Application tag database creation (p. 59).• Screen creation (p 83).• Driver configuration (p. 255). This may include OPC Client or TCP/IP Client

worksheets.The optional modules are:• Programming and logical constructs (p. 159).• Alarm configuration (p. 203).• Data logging configuration (p. 215).• Recipe configuration (p. 223).• Report configuration (p. 227).• Scheduler configuration (p. 231).• Security configuration (p. 241).• Language Translation configuration (p. 235).At any time during these steps, the application can be tested and debugged. Usually youshould have at least one screen created before testing, but some of the worksheets(especially Math and driver configuration) can be tested without having a screen. Afterthe application is finished it should be tested and debugged. Then it should bedownloaded to the runtime workstation and tested. After that the application is ready touse. Testing, debugging, and downloading are detailed in the Downloading and TestingApplications chapter (p. 271).

Note: Do not download an application to a runtime workstation without designating anavailable screen to be the Start-up screen in the Runtime Desktop tab of the ProjectSettings window (see p. 53). Your application will not run without a startup screen.

Page 48: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

48

Application Creation and Management

Creating a New ApplicationSelect the New… command in the File menu or select the New button from the Standardtoolbar. These actions will open a New window. Select the Project tab.

Note: You can only work on one application at a time in DesignStudio. Creating a newapplication will close the currently open application.

Application name field: Enter the name of the new application project here.Location field: Displays the directory in which your new project will be stored. This fieldcannot be altered directly. Instead select the Browse button and navigate to the desireddrive and folder.Configuration file field: Displays the path to the new application (.app) file. This fieldcannot be altered directly. It will display any changes made in the Location field, but theapplication folder will always have the same name as the application file.

Note: The folder containing the application should always have the same name as theapplication file and the names should not be changed after application creation. Changingeither of the names or moving a file or folder will cause the application to fail. If youwant to keep a backup of an application, copy the entire application folder to a differentdirectory location without changing any names. The backup can be used if it is copiedback to its original location. You can copy files and directories directly from an existingapplication to a new application, but this may cause application execution problems if itis done incorrectly.

Page 49: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

49

Target platform field: Select the operating system on which the new application will bedeployed upon completion. With a Windows CE registration, your choices will beStandard Edition (SE) - WinCE and Professional Edition (PE) - WinCE. If you have aWindows NT registration, you will also be able to select Enterprise Edition (EE) – Win2000/NT/95.When these fields contain the correct information, select the OK button. This will openthe Project Wizard window.

Template field: Choose one the options. The Empty Application option opens an applicationwith no screens and no application tags in the database. The Sample Application optionopens an application with developed screens and application tags that you can furthercustomize. The Toolbar and menus option (default) opens a simpler application that stillhas some basic features already configured.Resolution box: Choose the resolution in pixels that matches the screen resolution of theruntime workstation on which the application will be run. The resolution of a 3406 targetworkstation screen is 320 x 240, the resolution of a 3408 or 3410 target workstation screenis 640 x 480 (default), and the resolution of a 3412 target workstation is 800 x 600.When you have made your choices select the OK button. The application that was open inDesignStudio will be closed and saved and the new application will be created andopened. The new application folder will contain the application file, and \alarm,\config, \database, \hst, \screen, and \symbol folders. Files will be added tothese folders as you develop the application. When the new application is opened, theGraphics tab of the Workspace window will be displayed.

Page 50: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

50

Opening an Existing ApplicationSelect the Open Project… command in the File menu or select the Open Project buttonfrom the Standard toolbar. These actions will open an Open window. Browse to theappropriate application folder, select the application (.app) file, and select the Openbutton. (You may also double-click the application file.) The currently open applicationwill be closed and saved and the selected application will be open in DesignStudio.

Note: If you try to open a new project while the Runtime Application task is running, awindow will query whether you want to continue. If you select the Yes button, the taskwill be closed and you will need to repeat the step above to open the new application.

Saving an ApplicationThe only way to save an application is to close DesignStudio or to open a newapplication. Both of these methods will save the old application as it is closed.

Closing an ApplicationThe only way to close an application is to open a new application. DesignStudio alwayshas an application open. The closed application will be saved.

Project Settings

To access the project settings, select the Settings… command in the Project menu. Thisopens the Project Settings window. It has three tabs:Identification tab: Contains comment and remark fields for basic information about theapplication.Options tab: Allows you to enable translation and view information about the runtimeworkstation target and software that can be linked to the DesignStudio application.Runtime Desktop tab: Allows you to set the runtime application display features.When you have set the project settings, click the OK button to close the window.

Note: All project settings can be changed during application development. However, it isrecommended that these settings be configured at the beginning. For example, the Startupscreen field defines which screen or screen group will be opened when the application isstarted and this will affect your efforts to test the application.

Page 51: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

51

Identification TabThe Identification tab contains comment and remark fields for application information.

Application field: Displays the path and file name of the current project.Description field: Enter a brief description of the project.Revision field: Enter the revision number of the current application.Company field: Enter the name of the company with which the current application isassociated.Author field: Enter the name of the author or authors of the current project.Field Equipment field: Enter the equipment on which the final application will be run inthe field.Notes field: Enter any additional information as desired.

Page 52: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

52

Options TabThe Options tab allows you to enable translation and view information about the runtimeworkstation target and software that can be linked to the DesignStudio application.

Automatic Translation Group BoxEnable Translation check box: When selected, the program will automatically locate atranslation file and translate terms according to the file.Translation Filename field: When you select Enable Translation, you can enter a file nameand path in this field or accept the default configuration. For additional information abouttranslations, see the Translation Language chapter (p. 235).

Note: You need to create a translation sheet for each language that you want to configurein your application including our original language. It is necessary to create a blank sheetfor the default language (i.e. English).

The Target System Group BoxThese read-only fields display information about the runtime workstation applicationconfiguration.

Driver and OPC drop-down list: This field is used to determine whether the driver andOPC communications modules of DesignStudio will buffer write commands to anI/O device.

Send last state – Default state. When this option is selected, driver and OPCcommunications do not buffer write commands to an I/O device.Send every state – When this option is selected, driver and OPC communicationsbuffer write commands to an I/O device.

The PC-based Control Group Box.These functions are not enabled in this release of DesignStudio.

Page 53: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

53

Runtime Desktop TabThe Runtime Desktop tab allows you to set the runtime application display features.

The following Runtime Desktop tab options are available for Windows CE applications:Menu check box: Allows you to select menu items for the application. When you selectMenu, the Options… button is enabled.Options… button: Enabled when the Menu check box is selected. This button opens theRuntime menu options window. All selected items will appear under correspondingmenus when your application is viewed in runtime.

On this window you can select from four possible menus that can appear in your runtimeapplication: File, Security, Window, and Tools. Each menu also has several options.

File: These options act like their standard Windows namesakes. Select Open, Close,Print, Print Setup, and Exit. Close, Print, and Print Setup options are not supported inWindows CE applications.Security: Select LogOn, LogOff, and Info. See the Security System chapter for details(p. 241). The Info option is not supported in Windows CE applications.Window: These options act like their standard Windows namesakes, but they are notsupported in Windows CE applications. Select Cascade, Tile, and Arrange Icons.Tools: Select Database Spy and LogWin. Both of these runtime menu items arediscussed in the Downloading and Testing Applications chapter (p. 271).

Page 54: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

54

Touch-screen keypad check box: Allows you to use a touchscreen pointing device toinsert text into an input enabled Text Input/Output field (p. 143) in an application. Whenthis box is checked and you use a touchscreen to select an input enabled TextInput/Output field, a keypad with full alphanumeric and some symbol keys will pop up sothat you can enter text without a keyboard or keypad.Startup screen field: The screen or screen group defined in this field will automaticallyopen when the CEView Emulator is started and when the application is run on theruntime workstation. It is possible to define the startup screen as a single screen (*.scr)or screen group (*.sg), but Windows CE applications do not support the use of screengroups.

Note: Do not download an application to a runtime workstation without designating anavailable screen to be the Start-up screen in the Runtime Desktop tab of the ProjectSettings window (see p. 53). Your application will not run without a startup screen.

Note: Do not use a screen group in the Startup screen field for a Windows CEapplication. This option is not available for Windows CE applications and a downloadedWindows CE application with a screen group in this field will not work.

Options That Do Not Work Under Windows CEThe following options are available with Windows NT only; they are not available withWindows CE.Titlebar check box: Allows you to give your application a title. When this option isselected, the text box is displayed. The title will be displayed in the titlebar of yourapplication. Both Minimize Box and Maximize Box check boxes are enabled only if youselect Titlebar.Minimize Box check box: When selected, a minimize button ( ) appears in the title bar.Maximize Box check box: When selected, a maximize button ( ) appears in the title bar.Start Maximized check box: When selected, the application will start maximized on thecomputer screen.Resize Border check box: When selected, the application window will have borders thatcan be resized by dragging.Status Line check box: When selected, a status line will be displayed at the bottom of theapplication.Stylus check box: Allows you to enable the use of a standard mouse for user input ininteraction with active areas.

Active area indication group boxThis area contains check boxes that allow you to set the interaction between the mousecursor and the active area (such as a button). These options are enabled only when MouseCursor is selected.

Show Object Edge check box: When selected, a border will appear around the activearea on mouse over.Change Mouse Cursor check box: When selected, the cursor will change itsappearance on mouse over.

Page 55: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

55

Necessary Application Creation Tasks

Application Tags DatabaseTags can be created as they are needed in screens and worksheets. Tabbing out of a cellthat contains a new tag name will open a dialog that prompts you to create a new tag.

Note: If you do not want to create a new tag or if you simple misspelled a tag name, goback and delete or correct the name immediately. The application will produce errorsuntil the tag name is correct.

Tags can also be created ahead of time in the tag database. Tag creation through eithermethod is covered in the Tags chapter (p. 59).

Screen CreationScreen creation is detailed in its own chapter (p. 83).

Driver ConfigurationDriver configuration is covered in the I/O Communication chapter (p. 255).

Optional Modules for Application Development

Math WorksheetsMath worksheets, which contain programming and logical constructs, are detailed in aseparate chapter (see p. 197).

AlarmsAlarm configuration is detailed in a separate chapter (see p. 203).

Trend Data LoggingTrend data logging/tag history configuration is detailed in a separate chapter (see p. 215).

RecipesRecipe configuration is detailed in a separate chapter (see p. 223).

ReportsReport configuration is detailed in a separate chapter (see p. 227).

SchedulerScheduler configuration is detailed in a separate chapter (see p. 231).

Page 56: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

56

SecuritySecurity configuration is detailed in a separate chapter (see p. 241).

TranslationLanguage translation configuration is detailed in a separate chapter (see p. 235).

Tips to Optimize Application Development Time and Runtime PerformanceBecause of different processor speeds, applications may run at different speeds andresponse times may vary from the runtime workstation to the CE View emulator (p. 281).Here is a list of techniques that you can use to optimize the speed and response time ofyour application in both locations. At the end of this section is a list of tips to help youdevelop the application more quickly.

Create the New Application CorrectlyWindows CE applications cannot use all of the features that Windows NT applicationscan use. When you create a new application (p. 48), make sure that you choose aWindows CE application option. A Windows NT application can be downloaded to aWindows CE runtime workstation, but some functions and features may not deliverexpected results.

Simplify the ScreenMinimize the number of objects used in a screen. Redrawing several objects can slowscreen changes, loading, and reaction time.Don't use Show on Condition commands (p. 146) when you can use Color Changecommands (p. 145) or Text Output/Input commands (p. 143).

Background Graphics LayerIf you have several static objects on a screen, consider putting them on the backgroundgraphics layer of the screen (p. 149). Objects on this layer of the screen are saved as agraphics file. The objects in this graphics image do not need to be redrawn, so screenschange, load, and react faster than if they had to redraw several objects. The onlydrawback to using a background graphic file is that the application may take a fewminutes longer to download to the runtime workstation.If using a background graphics file for several screens that have similar graphics,consider using the Shared image feature in the Screen Attributes window (p. 83). If youuse the same image more than once, you can save system memory and decreaseapplication size. If you start with the same file and make minor alterations, you can savedevelopment time.

Page 57: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

57

Development Computer Color SettingsApplication performance will be optimized if the development computer has the samecolor settings as the runtime workstation. (Development time will also be reducedbecause their will be fewer color differences between applications running in emulationon the development computer and applications running on the runtime workstation.)OpenHMI 3408, 3410, and 3412 workstations run 256-color and OpenHMI 3406workstations run 16 (4-bit) color.To change the color mode in Windows NT, right-click on an empty area of the desktop,select Properties on the pop-up menu, and change the fields in the Settings tab of thedialog. Refer to your computer documentation for further instructions.If you have already created an application in a higher color mode, you can still gain thesame performance enhancements by:

1. Switching your development computer to 256-color,

2. Opening the pre-existing application in DesignStudio,

3. Selecting the Verify Application command in the Tools menu, and

4. Saving the application and downloading it to the runtime workstation.When developing DesignStudio applications to run on the OpenHMI 3406 workstation,you can achieve even greater application optimization by switching to 16-color. If yourcomputer doesn't support 16-color, you should still optimize the application by using256-color. You should also read the Colors section at the end of Chapter 5 (p. 158).

Driver ConfigurationBefore configuring drivers (p. 255), you should read the driver documentation in theDriver Communications manual.If possible, use the Write on Tag Change writing command rather than the Write Triggerwriting command in the driver worksheet (p. 260). This will minimize communicationwith the I/O device and speed application execution in most applications.If possible, use sequential addresses in each driver worksheet body (p. 260). This oftenimproves I/O device communication performance because communication protocols arebased on transferring blocks of information.

Worksheet CalculationsIf possible, use the Scheduler worksheet (p. 231) to enable worksheet calculation. If thescheduler changes a tag that enables worksheet calculations, the application will runfaster than if worksheet calculations are constantly being performed. Math worksheetsgenerally affect application performance the most, so they should be enabled to calculatewhen necessary rather than running continuously.

Verify ApplicationsAlways use the Verify Application command (p. 38) in the menu bar Tools menu beforedownloading the application to the runtime workstation. This feature speeds applicationperformance by recompiling expressions and worksheets and verifying that expressionsmatch the current version of the tag database. Verify Application will also convert colorsettings as mentioned above in the section on Development Computer Color Settings.

Page 58: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

58

FontsApplications run faster with non-True Type fonts, especially the System font.

Dead BandsUsing dead bands when tags have retentive values (p. 71) will minimize time spentaccessing memory.Using dead bands for trend history file (p. 220) trigger tags will minimize time spentaccessing memory and memory use.

DevelopmentUsing array tags (p. 60) and classes (p. 62) organizes and simplifies the tag database.The translation editor can be used to easily translate words and phrases. If you intend touse it, you should set up the basic translation worksheets and test them before developingthe application because it is easier to debug language translation by itself without addingthe other complications possible during application debugging. See p. 235 for moredetails.The Database Spy (p. 282) and the LogWin/Output window/function (p. 285) are usefuldebugging and testing tools.The Cross Reference button (p. 68) and the Object Finder (p. 68) can be used to find tagand function information quickly.If you find a 320 x 240 screen too small to create fine details, create the screen with alarger resolution and then use the Convert Resolution command in the Tools menu (p. 38)to reduce the screen to the 320 x 240 size. You can also change the Windows screenresolution to a lower resolution such as 640 x 480 which will make a 320 x 240 screenappear larger on your monitor.

Page 59: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

59

4. TagsTags are the variables used in a DesignStudio application. Tags can be used to conveydata to and from I/O devices (such as PLCs), for internal mathematical calculations, asalarm and trend inputs, in recipes, etc.All tags must have a name and a type. In addition each tag is an internal tag, anapplication tag, or a shared tag. Internal tags are predetermined and unchangeable tagsthat are automatically part of DesignStudio. Application tags are created by theapplication developer and are unique to each application. Shared tags are created inanother PC-based control software package and are imported into DesignStudio.Classes are structures that contain tags (called members) similar to the way a foldercontains files. Tags are generally grouped into a class because they are related andbecause tag classes add another level of organization to the application.

Tag NamesA tag name has the following restrictions:• It can be composed of letters, numbers, and the underscore character ( _ ).• It must begin with a letter.• The following characters can not be used to compose a tag name:

~`!@#$%^&*()-=\+[]{}<>?:;‘’“”,./|

Note: The @ character is used as the first letter of an indirect tag. The @ charactershould not be used in any other way in any type of tag.• Its maximum length is 32 characters (for a tag) or 16 characters (for a class member).• Two different tags cannot have the same name.• Tag names are not case sensitive.

Note: Even though tag names are not case sensitive, you can use both uppercase andlowercase characters to make names more readable (for example, TankLevel instead oftanklevel).• The application tag name can not duplicate internal tag names or math functions (see

Scripting Language on p. 159)

Examples of Tag Names: temperature, pressure1, TankLevel, x

Page 60: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

60

Tag TypesA tag’s value can be one of the following types of data. The icons given below are usedto quickly identify tag types in DesignStudio tag lists.

Boolean (16 bits) – Boolean or digital variable (0 or 1).Integer (32 bits) – (32 bits, the 31st bit is the signing bit) – Integer numberequivalent to a long integer in the C language, in either decimal or hexadecimalformat. Hexadecimal numbers must be prefixed with the characters zero and x.The valid value range is ±2,147,483,647 decimal (±7FFFFFFF hexadecimal).Examples: 5, -200, 0x5, -0xBC4.Real (64 bits) – Real (floating point) number internally stored as a double word,equivalent to a double type in the C language. Examples: 0.5, –5.3.String – ASCII character string of up to 255 characters that holds letters,numbers, and special characters (including spaces). Examples: Recipe X123,01/01/90, ** On **.Class – User-defined compound tag.

Square brackets around an icon ( ) indicate that the tag is an array tag. A tag of anytype, including class, can also be an array tag.

Array Tags (Tag Size)Tags can hold a single value or an array of values. An array tag is a tag that has anumerical index. Each different index number specifies a different value. (This is a one-dimensional matrix of size one by n, where n is the largest index number and the size ofthe array.) The maximum size of an array is 512. The syntax of an array tag is:

<Array Tag Name>[<Array Index>]

The array index must be a positive integer, a tag of type integer, or a combination of twointeger tags or an integer tag and an integer using the addition (+) operator.Examples: temp[10], pressure1[tank], x[tank+level], TkLevel1[level+500]

Array tags should be used whenever possible, because their use simplifies the tagstructure and reduces the size of the tag datasheet, which can reduce time spentdeveloping an application. As an example, suppose that you wanted to assign a tag tostore the temperature and high temperature readings in three different tanks. The tablebelow shows compares the number of tags required with and without using array tags.With more elements in an application, the discrepancy in numbers of tags increases. Thetag Size parameter specifies the array size; a tag with a size of zero is not an array tag.

With Array Tags – Two Tags Without Array Tags – Six TagsTemperature[j] Temperature1

Temperature2Temperature3

HighTemperature[j] HighTemperature1HighTemperature2HighTemperature3

Note: An array of size n also has a zeroth tag, such as Temperature[0]. You shouldn’tuse the zeroth tag in the array for regular operations because errors associated with thearray will be written to that tag and will overwrite whatever information is stored there.

Page 61: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

61

Indirect TagsDesignStudio supports indirect access to tags in the database. Indirect tags point to othertags and can read and write to them. Indirect tags are useful for user-defined directionssuch as allowing the user to type a tag name in a text input box in order to pick which taga pen in a trend chart will track. Tags can also be used to simplify programming loops asshown in this example code that is designed to initialize the an array with values of zero:

Mathematical expressions are explained in the Scripting Language chapter (p. 159).Array tags and class tags (Tag_N is both) are explained in their own sections.Consider a string tag X. The value in this tag can be the name of any other tag in thedatabase and it can be a pointer to any other type of tag, including a class type. Thesyntax for an indirect tag is:

@<Indirect Tag Name>

Example: A tag is named Temp and a string tag named X holds the value Temp. Readingand writing to @X provides access to the value of the Temp tag.In the Application Tags worksheet, you can have only the indirect tag name (X) or thepointer indirect tag (@X) explicitly defined to be tags.If you use X, then @X in any mathematical worksheet will point to the value in tag X. Inthis case @X can point to any type of tag since the tag’s name is stored in tag X. However,you have two quantities to keep track of, X and @X.If you use @X explicitly as a tag in the tag database, it must have a type declared and it islimited to pointing to tags of that type. However, there is only one quantity to keep trackof, @X.

Note: Any string tag can be used as an indirect tag (pointer).

Indirect tags have a different format when used to point to members of a class (SeeClasses and Indirect Tags on p. 63).

Page 62: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

62

ClassesClasses are user-defined structures that contain a group of related tags. These tags withinthe class are called members of the class. When a class is created, it is added to the list oftag types available to regular tags. Each class is added individually to the list of types sothat a regular tag’s type can be any specific class. Tags of a certain class type can havethe same name as the class, but they do not need to do this. There can be more than onetag of a given class.A class can hold up to 32 members. These members are normal tags in that they havetypes and descriptions. Members do not have a size parameter, so they cannot be arrays.A tag whose type is a class can be an array tag. The syntax for a tag and class member isthe tag name followed by a period and the member name:

<TagName>.<MemberName>

Examples: Tank.Pressure, Part[1].FluxCapacitorThe class and its members will not be listed in tag lists in the Object Finder window (seep. 69) or in the application Tag List (see p. 65) because they are not tags. The tags with aspecific class as a type will be listed in those locations.Example of class use: An application that monitors the level, pressure, and temperature oftanks can have a class named Tank with members Level, Pressure, and Temperature. Then ascreen object can use an array tag Tank[i] to monitor several tanks. Using a class canincrease tag organization; all class tags are listed together instead of being scattered in theregular tag list. You can also add members to a class and any tag of that class typeautomatically includes the new members.

Note: Two classes may not have the same name and two members of the same classcannot have the same name, but members of different classes may have the same name.

Note: A class of m members can be an array of size n. This will act as a two dimensionalarray (matrix) of size m x n.

Creating a Class and MembersTo create a class, right-click the Classes folder in the Database tab of the Workspacewindow. Click Insert Class on the popup menu that appears to open an Insert Classwindow. Type the name of the new class in the Class text box and click the OK button.

Page 63: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

63

After you click the OK button, a worksheet named Class: <your class name> opens.

Name: This field displays and allows you to change the name of the class member.Type drop-down list: This field displays and allows you to change the type of the classmember.Description: This field displays and allows you to change comments about the classmember. This field does not require input.You enter the member information in the Name and Description cells by clicking a cell toselect it and typing. You enter the Type by clicking the down arrow in the type cell andselecting a type from the drop-down list. For more information on editing this worksheetsee Classes Folder under Finding and Editing Tags (p. 66).

Note: Members of a class may not have any class as their type.

Viewing and Editing Class MembersSee Finding and Editing Tags (p. 64).

Classes and Indirect TagsYou can create an indirect tag (see p. 61) which will point to a member tag of a class.There are two ways to do this, directly and indirectly. To illustrate this, we will use aclass Tank with a member Level and tag TK of type class:Tank.To indirectly point to TK.Level, create a string tag XClass with the value TK.Level.@XClass will contain the value of TK.Level.To directly point to TK.Level, create a string tag XClass with the value [email protected] of the type class.Tank will contain the value of TK.Level.

Page 64: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

64

Using, Finding and Editing TagsTags are used in screen objects and task worksheets in DesignStudio, where they hold orreceive values that are used in the application.Many screen objects (see Screen Construction chapter) and task (Math Worksheets,Alarms, Logging Trend Data, Recipes, Reports, Scheduler, and I/O Communicationchapters) worksheet fields and task worksheet cells can contain tags. In most of thesefields, you can right-click in the field to open a popup menu that will allow you to insert atag or expression, find information on a tag, insert a function or expression, or edit thecontents of the cell. If the field or cell can contain a tag or expression, the InsertTag/Expression popup menu will open (below right). If the field or cell can contain a tag,but not an expression, the Insert Tag popup menu will open (below left). Some fieldshave neither popup menu enabled, but can still contain tags; these fields are documentedas they appear in this manual.

Insert Tag: Selecting this option will open an Object Finder window (p. 69) that containsthe complete list of tags available in the application, but not the functions. You can selectone and it will appear in the field or cell.Insert Tag/Expression: Selecting this option will open an Object Finder window (p. 69)that contains the complete list of tags and functions available in the application. You canselect one and it will appear in the field or cell.Tag Properties: Selecting this option will open a Tag Properties window (p. 71) whereyou can view and edit the tag properties. This command is active only when there is a tagin the field or cell.Undo: This function reverses the last reversible action performed in the DesignStudiointerface. This function is the same as the one associated with the Undo button on theStandard toolbar.Cut, Copy, Paste, and Delete: These are the standard Windows editing functions, the sameas the functions in the Edit menu and on the Standard toolbar. All except for Paste affectonly the highlighted contents of the field or cell.Select All: This function highlights the entire contents of the field or cell.

Page 65: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

65

Finding and Editing TagsDesignStudio provides two ways to find and view tags, the Tag Properties toolbar and thethree Tags and the Classes folders in the Database tab of the Workspace window. Both ofthese viewing methods also allow you to edit the tags or tag properties.

Workspace Window Database TabThe general overview of the Workspace windowis on p. 44. The Database tab contains folders forapplication tags, classes, shared tags, internal tags,and security (p. 241). The Classes folder isexplained in its own subsection at the end of thissection. A folder with a boxed plus beside it is notempty. Double-click such a folder or click theboxed plus to open it.When you open a tags folder, there will be two objects, a Datasheet View file and a TagList folder. Each Tag List folder can be opened and each contains the list of applicabletags listed alphabetically and preceded by a tag type icon.

Double-clicking a tag in a Tag List will open a Properties window (seenext section). Double-clicking a Datasheet View file will open the tagworksheet for the folder that contains the Datasheet View file (see theTag Worksheet section, p. 66). Right-clicking the Application Tags,Internal Tags, or Shared Tags folders and selecting the Open commandwill also open that folder’s tag worksheet. The Refresh command isreserved for future DesignStudio functions and is not discussed in thischapter.

Shared Tags in DesignStudio 3.0Shared tags are reserved for future releases of DesignStudio. Any references to sharedtags in this chapter are correct, but nothing will affect shared tag functions in thissoftware release.

Properties WindowDouble-clicking a tag in the Tag List folder of a Workspace window Database tab tagsfolder opens the Properties window for that tag. This window allows you to view thetag’s properties. Some of the fields can be edited in an application tag Properties window;no fields can be edited in the internal tags and shared tags Properties windows.

Tagname text box: This field displays the name of the tag; it cannot be altered.

Page 66: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

66

Type drop-down list: This field displays and allows you to change the type of the tag.Array Size text box: This field displays and allows you to change the tag array size. A tagwith a size larger than zero is an array tag (see p. 60); a tag with size zero is not.Description text box: This field displays and allows you to change comments about thetag. This field does not require input.

Tag WorksheetDouble-clicking a Datasheet View file in a Workspace window Database tab tags folderwill open that folder’s tag worksheet. Right-clicking the Application Tags, Internal Tags,or Shared Tags folders and selecting the Open command will also open that folder’s tagworksheet. Each worksheet is named for the tags folder that contains it, so the names areApplication Tags, Internal Tags, and Shared Tags. The Application Tags worksheet isshown; the other worksheets contain the same columns.The Internal Tags worksheet is a read-only file; you cannot alter its contents. Shared tagsin the Shared Tags worksheet can be deleted, but their parameters cannot be edited. In theApplication Tags worksheet, you are able to edit any tag fields, including the tag name.

Note: Deleting a tag or changing a tag name without accounting for the deletion or namechange in worksheets or screens that use the tag can cause your application to fail.

Name: This field displays and allows you to change the name of the tag.Size: This field displays and allows you to change the tag array size. A tag with a sizelarger than zero is an array tag (see p. 60); a tag with size zero is not an array tag.Type drop-down list: This field displays and allows you to change the type of the tag.Description: This field displays and allows you to change comments about the tag. Thisfield does not require input.To edit the worksheet, see Editing Application Tags and Class Worksheets (p. 67).

Classes FolderWhen you open the Classes folder, there will be a list ofsubfolders, one for each class in the application. Each classsubfolder contains a Datasheet View file and Member List folder.Each Member List folder can be opened and each contains the list of

Page 67: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

67

applicable tags listed alphabetically and preceded by a tag type icon. Double-clicking atag in a Tag List will open or the Datasheet View file will open a class member tagspreadsheet with a title of Class: classname.

In the class member worksheet, you are able to edit any tag fields.Name: This field displays and allows you to change the name of the class member.Type drop-down list: This field displays and allows you to change the type of the classmember.Description: This field displays and allows you to change comments about the classmember. This field does not require input.See Editing Application Tags and Class Worksheets (next section) for information onediting the worksheet.

Editing Application Tags and Class WorksheetsTo edit a cell or row, you first need to select it. To select a cell, double-click it so that it ishighlighted in blue, or select it so that its edges are highlighted in gray. To select a row,click the row number in the far left gray column or click and drag to highlight the cells inthe row. You may also click and drag to highlight more than one row and you mayhighlight a column by clicking the gray heading box on the top of the column. One cell(the first selected or the last dragged to) will have its edges highlighted.Once an item is selected, you may also delete (cut), copy, or paste rows and cells.Cutting, copying, and pasting can be done using Standard toolbar Cut, Copy, and Pastekeys; the Edit menu Cut, Copy, and Paste commands; the shortcut keys for Cut (Ctrl+X),Copy (Ctrl+C), and Paste (Ctrl+V); and commands in popup menus that appear when youright-click the selected item or items. These are standard Windows commands.When you have selected a column, a row, or several rows, the popup menu includes thecommands, Cut, Copy, Paste, and Insert Line. Insert Line will insert a line above the cellthat has the highlighted edges. When you have selected a cell so that its edges areselected, but it is not highlighted in blue, the popup menu will be the same. When youhave selected a cell by double-clicking so that it is highlighted in blue, the menu willinclude the commands, Undo, Cut, Copy, Paste, Delete, and Select All. Undo undoes theresult of the last command used in the cell. Cut and Delete both remove the cell’scontents. If you delete the text, you can Undo the deletion. If you Cut the text, you canPaste it into another cell or into the same cell, or you can Undo the deletion. If youdouble-click a field with more than one word in it, only one word will be highlighted inblue. You may click and drag or use the Shift and arrow keys to select all of the cellcontents or you may use the Select All command.When you cut or delete a cell or row, a window will open to ask you if you are that wantto proceed. Click Yes to continue or No to cancel the action. If you delete a cell using theCut command from the popup menu that also includes the Undo command, you will notbe asked to proceed. The cell value will disappear and you must use Undo immediately toreverse the deletion. This is the only way to delete a cell without deleting an entire row. If

Page 68: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

68

you choose any other type of Cut command in any cell, the entire row will be deleted.There is no Undo command for this type of deletion.You cannot overwrite any cells by pasting. Pasting a row or rows or a column will insertthe appropriate number of rows. You cannot paste into a Type cell without pasting anentire row. You change the tag type by clicking the down arrow in the tag’s Type cell andselecting a type from the drop-list. When you select cells in more than one column for thepurpose of pasting them elsewhere in the worksheet, you must position the lasthighlighted cell (gray edges) in the same column as the leftmost cell that was selected tobe pasted.Pasting a tag name, whether by pasting a cell or a row, will not paste a copy of theoriginal tag name because no two tags can have the same name. Instead, the pasted copyof the tag name will have the same characters followed by an underscore and the numberone. Each additional copy of the same tag name will paste the tag name with the numberincremented by one. Pasting a tag name into an empty row will create a new tag that hasa default type of Boolean.

Note: When selecting a row or cell, make sure that only the row or cell that you want tocopy is selected. Copying several cells into one cell may create unexpected results.

Note: DesignStudio worksheet cells can be copied to any CSV (comma separatedvariable) Windows application such as MS Excel or MS Word using standard cut, copyand paste commands. Cells from other CSV Windows applications can also be copiedinto a DesignStudio worksheet. Any cells copied into a DesignStudio worksheet willinsert rows instead of overwriting cells.

Note: Cutting a row can be undone and the cut row can be pasted back into theworksheet only if you cut and paste in the Name column cells.

Note: Deleting a tag or changing a tag name without accounting for the deletion or namechange in other spreadsheets or screens that contain the tag can cause application failure.

Note: A fast way to check the use of a particular tag is to use the Cross Reference buttonon the Tag Properties toolbar (p. 68).

Tag Properties ToolbarIn addition to the tag database sheets, you can locate tags and tag properties using the TagProperties toolbar. This toolbar contains one text box and three buttons.

The text box is called the Tagname text box. You can type a tag name here after clickinginside the box with your mouse. The Tagname text box also displays tags that are selectedusing the Object Finder button or the Database tab of the Workspace window.The Object Finder button is always active. At any time you may click it to open theObject Finder window. This window is detailed in its own section below. One of itsprimary functions is to show you the list of tags. If you select one and click OK, the tagwill appear in the Tagname field.The Cross Reference button is not active until a tag name is displayed in the Tagname textbox. When you click the Cross Reference button, a Cross Reference window opens with a

Page 69: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

69

list of all of the locations in which the displayed tag is used. Double-clicking one of theitems in the list will open that particular item. The example below shows worksheets andscreen objects containing a particular tag:

The Tag Properties button is also not active until a tag name is displayed in the Tagnamefield. It will open a tabbed Tag Properties window. This window is different for eachdifferent type of tag and it allows you to view and edit the properties of the tag displayedin the Tagname field. The Tag Properties window is explained in it own section (p. 71).

Object Finder WindowClick the Object Finder button to open the Object Finder window. This window listsApplication, Internal, and Functions folders in the left pane. See Functions (p. 163) formore information.

If you select the Application or Internal folders, all of the tags in those categories will belisted in the right pane. If you select a tag type subfolder in the left pane, all tags of thattype in that category will be listed in the right pane. Tags are listed in the right pane withthe tag type symbol and the tag name in the first column and the Description parameter

Page 70: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

70

(p. 74) in the second column. If the tag type symbol is enclosed in square brackets, thattag is an array tag (p. 60).Selecting a tag will cause its name to appear in the Selection text box. Tag names can bemanually typed in the Selection box as well. If you click the OK button, the Object Finderwindow will close and the tag in the Selection box will appear in the Tagname text box.Double-clicking a tag will also close the Object Finder window and insert the tag into theTagname text box.Clicking the New… button will open a New Tag window and allow you to insert a newtag into the application tag database. This topic is covered on p. 77.Clicking the Cancel button will close the Object Finder window without inserting a taginto the Tagname text box, though any new tags created with the New… button areautomatically saved as soon as they are created.Selecting an array tag will make the [Index] button active. Selecting the [Index] buttonwill open the Select Index window. When the Number radio button is selected, you canselect one of the values of the array tag’s index from the list in the Select Index pane.Clicking OK will close the Select Index window and the array tag with the index willappear in the Object Finder Selection text box.

When the Tag radio button is selected, the Select Index window pane will display a list ofall non-array integer application tags. Selecting one of these and clicking OK will closethe Select Index window and the array tag will appear in the Object Finder windowSelection text box with the selected integer tag as its index.Double-clicking an index will close the Select Index window and display the indexed tagas above. Clicking the Cancel button will close the Select Index window without savingany selections. You do not need to choose an array index in order to select an array tag.Choosing an index just provides more information for a cross reference search or a tagproperties display.Selecting a class (p. 62) will make the .Member button active. Clicking the .Memberbutton opens the Member selection window. You can select one of the class’s membertags from the list in the Member selection window pane. Clicking OK will close theMember selection window and the class and tag will appear in the Object FinderSelection text box with the selected member.

Page 71: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

71

Double-clicking a member closes the window and displays the class and member asabove. Clicking the Cancel button will close the Member selection window withoutsaving any selections. You do not need to choose a class member in order to select aclass, but choosing a member provides more information for a cross reference search ortag properties display.

Tag Properties WindowThe Tag Properties window is opened using the Tag Properties button on the TagProperties toolbar. This window lists some of the parameters of the selected tag. (Theselected tag is the tag that appears in the Tag Properties toolbar Tagname text box, seep. 68.) The parameters are grouped by tab into general parameters (Parameters tab),alarm parameters (alarms tab), and trend/history parameters (history tab). Tag parametersthat are listed in the in the Tag Properties window can be changed and all are optional.The Tag Properties window has one or three tabs depending on the tag type. The TagProperties window for string tags and classes has only a Parameters tab; the TagProperties window for Boolean, integer, and real tags has three tabs, an alarms and ahistory tab as well as the Parameters tab. The alarms tab is detailed in Alarms chapter(p. 203) and the history tab is detailed in the Logging Trend Data chapter (p. 215)because changes to alarm and history tag parameters affect alarm and trend worksheets.

Tag Properties Window Parameters Tab for Boolean Tags

Page 72: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

72

Retentive Value check box: If this box is checked, the tag’s value will be saved every timeit changes. When the application is restarted after being shutdown, the tag will have thelast saved value.

Note: This option requires memory access every time the tag’s value changes. This willslow the application, so use this option judiciously, especially on systems with a rotatingmemory medium such as a hard drive.

Retentive Parameters check box: When this box is checked, all tag parameters are savedto memory as soon as they are changed during runtime or emulation (Downloading andTesting Applications chapter, p. 271).Startup Value text box: This box holds the default startup value for the tag. This valuewill be used every time the application starts unless Retentive Value is checked.

Note: A value outside of the tag’s range (0 or 1) can be put in the Startup Value field, butit will not be used. When this happens, a message will be generated in the LogWin(Output) module (p. 285) indicating that the application tried to write a value that was outof the defined range.

Unit text box: This is a remark field that holds a string of up to nine characters. It isgenerally used to document the units being measured by a particular tag. This parameteris accessible during runtime.

Tag Properties Window Parameters Tab for Integer and Real Tags

Retentive Value check box: If this box is checked, the tag’s value will be saved every timeit changes. When the application is restarted after being shutdown, the tag will have thelast saved value.

Note: This option requires memory access every time the tag’s value changes. This willslow the application, so use this option judiciously, especially on systems with a rotatingmemory medium such as a hard drive.

Page 73: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

73

Retentive Parameters check box: When this box is checked, all tag parameters are savedto memory as soon as they are changed during runtime or emulation (Downloading andTesting Applications chapter, p. 271).Startup Value text box: This box holds the default startup value for the tag. This valuewill be used every time the application starts unless Retentive Value is checked.

Note: A value outside of the tag’s Min and Max field range can be put in the Startup Valuefield, but it will not be used. When this happens, a message will be generated in theLogWin (Output) module (p. 285) indicating that the application tried to write a value thatwas out of the defined range.

Engineering Units Group BoxThis group box holds fields that affect the range of values that a number tag may hold.These fields are also used for scaling values from an I/O device (see p. 262).Min text box: This field holds the minimum value that the tag can have. This parameter isaccessible during runtime.Max text box: This field holds the maximum value that the tag can have. This parameteris accessible during runtime.Unit text box: This is a remark field that holds a string of up to nine characters. It isgenerally used to document the units being measured by a particular tag. This parameteris accessible during runtime.

Signal Conditioning Group BoxDead Band check box: Checking this box enables the use of a dead band. A dead band isa range of numbers found by adding and subtracting a dead band parameter number toand from a certain number. In this case the number is the current value of the tag and thedead band parameter number is the number typed in the Dead Band text box. Until a valuethat would be read into a tag changes enough to be outside of the dead band, the tag’svalue will not change. When the tag’s value has been changed due to a large enoughvariation, the new tag value will stay until another large enough variation has occurred.Example: If the current tag value is 60 and the dead band parameter number is 5,variations from 55 to 65 will not cause the tag value to change.Dead Band text box: The value of the dead band parameter number is typed here. Thisbox is not active until the Dead Band check box is checked.

Note: By allowing a tag value to change only for a user-defined significant variation, adead band can be used to filter noise in a signal. A dead band is useful when the RetentiveValue option is checked because it can limit the number of times a tag’s value changesand this limits the number of times memory is accessed to write the new tag value.

Smoothing check box: When this box is checked the rate of change of the tag’s value isreduced because the application will make the newest value of the tag the average of thelast value and the newest reading.Example: The initial value of a tag is 50. If the next recorded value of the tag is 60, thesystem will store the average of 50 and 60 in the database, making the new value 55.

Page 74: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

74

Tag Properties Window Parameters Tab for String Tags and Classes

Retentive Value check box: If this box is checked, the tag’s value will be saved every timeit changes. When the application is restarted after being shutdown, the tag will have thelast saved value.

Note: This option requires memory access every time the tag’s value changes. This willslow the application, so use this option judiciously, especially on systems with a rotatingmemory medium such as a hard drive.

Retentive Parameters check box: When this box is checked, all tag parameters are savedto memory as they are changed during runtime or emulation (Downloading and TestingApplications chapter, p. 271).Startup Value text box: This box holds the default startup value for the tag. This valuewill be used every time the application starts unless Retentive Value is checked.

Note: A value outside of the tag’s Min and Max field range can be put in the Startup Valuefield, but it will not be used. When this happens, a message will be generated in theLogWin (Output) module (p. 285) indicating that the application tried to write a value thatwas out of the defined range.

Tag ParametersEach tag has several parameters. Tag names and tag types are explained at the beginningof this chapter. Other parameters can be configured in worksheet fields (see ScriptingLanguage, p. 159), in the Tag Properties window (see below, p. 71) accessed by the TagProperties button in the Tag Properties toolbar (p. 68), and in the Database Spy window(p. 282).

Tag Parameter ListThese tag parameters are accessed through several DesignStudio windows. All of thesefields have user-defined values. Alarm and trend parameters are explained in context inthe Alarms (p. 203) and Logging Trend Data (p. 215) chapters.Ack – This field indicates whether alarms associated with the tag have beenacknowledged. A value of zero indicates that the alarm has been acknowledged; anonzero value indicates that the alarm has not been acknowledged. This tag parameter isaccessible during runtime and runtime emulation.

Page 75: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

75

AlrDisable – This field indicates whether an alarm associated with the tag has beendisabled. A value of zero indicates that the alarm is not disabled; a nonzero valueindicates that the alarm is disabled. This tag parameter is accessible during runtime andruntime emulation.AlrStatus – This field indicates whether any alarms associated with the tag are active. Avalue of zero indicates that there are no active alarms; a nonzero value indicates that atleast one alarm associated with the tag is active. This tag parameter is accessible duringruntime and runtime emulation.B0 to B31 – These fields are the individual bits of an integer tag. This tag parameter isaccessible during runtime and runtime emulation.Description – This is a 255-character descriptive field. It has no use beyond providinginformation on the tag. This tag parameter is accessible during runtime and runtimeemulation.DevM – A nonzero value in this field indicates that a low deviation (deviation minus)alarm is enabled. This tag parameter is accessible during runtime and runtime emulation.DevMLimit – This field holds the low deviation alarm setpoint. This tag parameter isaccessible during runtime and runtime emulation.DevP – A nonzero value in this field indicates that a high deviation (deviation plus) alarmis enabled. This tag parameter is accessible during runtime and runtime emulation.DevPLimit – This field holds the high deviation alarm setpoint. This tag parameter isaccessible during runtime and runtime emulation.Hi – A nonzero value in this field indicates that a high alarm is enabled. This tagparameter is accessible during runtime and runtime emulation.HiHi – A nonzero value in this field indicates that a high high alarm is enabled. This tagparameter is accessible during runtime and runtime emulation.HiHiLimit – This field holds the high high alarm setpoint. This tag parameter is accessibleduring runtime and runtime emulation.HiLimit – This field holds the high alarm setpoint. This tag parameter is accessible duringruntime and runtime emulation.Lo – A nonzero value in this field indicates that a low alarm is enabled. This tagparameter is accessible during runtime and runtime emulation.LoLimit – This field holds the low alarm setpoint. This tag parameter is accessible duringruntime and runtime emulation.LoLo – A nonzero value in this field indicates that a low low alarm is enabled. This tagparameter is accessible during runtime and runtime emulation.LoLoLimit – This field holds the low low alarm setpoint. This tag parameter is accessibleduring runtime and runtime emulation.Max – This field holds the maximum value that the tag can have. This tag parameter isaccessible during runtime and runtime emulation.Min – This field holds the minimum value that the tag can have. This tag parameter isaccessible during runtime and runtime emulation.Name – This is name of the tag. Full details are found on p. 59.

Page 76: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

76

Quality – This field contains the quality of the tag’s value. This is only used withcommunication protocols such as OPC drivers that have algorithms to update this field.Good quality is indicated by the value 192 and bad quality is indicated by other values(often 0). This tag parameter is accessible during runtime and runtime emulation.Rate – A nonzero value in this field indicates that a rate of change alarm is enabled. Thistag parameter is accessible during runtime and runtime emulation.RateLimit – This field holds the rate of change alarm setpoint. This tag parameter isaccessible during runtime and runtime emulation.Size – This field determines the size of an array tag. Nonarray tags have size zero. Thistag parameter is accessible during runtime and runtime emulation.Startup Value – This field holds the default value of the tag that will be loaded duringapplication startup.Tag – This is the same as the name field; see Name above.TimeStamp – This field’s value indicates the last time and date when the tag’s valuechanged. This tag parameter is accessible during runtime and runtime emulation.Type – This field determines the type of data a tag can store (see p. 60).Unit – This nine-character field is a description field. It is often used to indicate the unitsof the numbers used in the Max and Min fields. This tag parameter is accessible duringruntime and runtime emulation.

Runtime/Emulation ParametersThese parameters can be viewed in the runtime application and during runtime emulation.The values of these parameters can be overwritten in the Database Spy window (p. 282)and they can be used anywhere a tag can be used in mathematical expressions. Thesyntax for referencing an alarm parameter is:

Tag Name -> Parameter Name

This is an example of disabling a HiHi alarm for the tag Tank[1].Level in the DatabaseSpy window:

AckAlrDisableAlrStatusB0–B31DescriptionDevMDevMLimitDevPDevPLimit

HiHiHiHiHiLimitHiLimitLoLoLimitLoLoLoLoLimitMax

MinQualityRateRateLimitSizeTimeStampUnit

Page 77: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

77

Alarm Tag ParametersThe use of these parameters is explained in the Alarms chapter (see p. 203).AckAlrDisableAlrStatusDevMDevMLimitDevP

DevPLimitHiHiHiHiHiLimitHiLimitLo

LoLimitLoLoLoLoLimitRateRateLimit

Creating and Defining a New Tag (Application Tags Only)There are several ways to create a new tag in the DesignStudio interface.• Select the Database tab of the Workspace window. Right-click the Application Tags

folder, its Tag List subfolder, or its Datasheet View file to open a popup menu thatincludes the Insert Tag… command. Select this command to open a New Tagwindow.

• Select the Object Finder button on the Tag Properties toolbar to open the ObjectFinder window. The New… button in the Object Finder window will open a New Tagwindow.

• Select the Insert menu and select the Tag… option to open a New Tag window.• Double-click the Application Tags folder in the Database tab of the Workspace

window to open it. Double-click the Datasheet View file to open the Application Tagsworksheet. You can type tag information directly into the cells of the worksheet; eachrow is a separate tag. See the New Tag Window section (p. 77) for more details onthe tag fields. See Tag Worksheet (p. 66) for information on editing this worksheet.

New Tag Window

Name text box: Type a tag name in this mandatory field. The maximum name size is 32characters and the first character must be a letter. You cannot use a tag name that isalready in use. See Tag Names (p. 59) for more information.Array Size text box: This mandatory field has a range of 0 to 255, the number of arrayelements (see Array Tags, p. 60). A tag with array size zero is not an array; it is just asingle tag. The default is zero.Type drop-down list: This is a mandatory field. Select the down arrow and select a tagtype. The default in this window is Integer. See Tag Types (p. 60) for more information.

Page 78: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

78

Description text box: This optional field can hold 255 characters of text for remark ordocumentation purposes.

Internal TagsInternal tags have predetermined functions (time, date, acknowledge alarms, storage ofthe logged user, and so forth) and can not be deleted or modified, however, their valuescan be accessed from any DesignStudio task and they can be copied and used elsewhere.Examples: Date holds the current date in string format, Time holds the current time instring format

Editing and Viewing Internal TagsInternal tags cannot be edited or deleted, but they can be used in application worksheetsand screens just like other tags. See the Finding and Editing Tags (p. 64) for moreinformation.

Internal Tag ValuesInternal tags can be written to, but most of them should not because the system will bewriting to them. The tags which are often written to are AckAll, AckAlr, LptOff, and BeepOff.These four tags are examined by the system for alarm management purposes and shouldbe used with alarm screen objects (p. 112). Example: A button on a screen that willtoggle AckAll lets the system know that all active alarms have been acknowledged.The other internal tags that should be written to are Goto, Next, and Label. These three tagsare used in mathematical expressions (p. 167). The other internal tags should generallynot have their values changed manually.

Internal Tags ListValid value ranges, formatting information, and page references are given in parenthesesin the description column.

NAME SIZE TYPE DESCRIPTIONDate 0 String Date (format: mm-dd-yyyy)Time 0 String Time (format: hh:mm:ss)Hour 0 Integer Hour (valid range: 0 to 24)Minute 0 Integer Minute (valid range: 0 to 59)Second 0 Integer Second (valid range: 0 to 59)Day 0 Integer Day (valid range: 0 to 31)Month 0 Integer Month (valid range: 1 to 12)Year 0 Integer Year (valid range: 1994 - )DayOfYear 0 Integer Day of year (valid range: 1 to 366)Weekday 0 Integer Day of the week

(valid range: 0=Sunday to 6=Saturday)Yesterday 0 Integer Yesterday (valid range: 1 to 31)Tomorrow 0 Integer Tomorrow (valid range: 1 to 31)Goto 0 String Math function (see p. 167)

Page 79: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

79

NAME SIZE TYPE DESCRIPTIONNext 0 Integer Math function (see p. 167)Label 0 String Math function (see p. 167)Alarm 0 String Highest priority unacknowledged alarmHint 0 String Currently displayed hintBlinkSlow 0 Boolean Slow blink trigger (1 is On, 0 is Off)BlinkFast 0 Boolean Fast blink trigger (1 is On, 0 is Off)Reserved___1 0 Boolean Reserved tagReserved___2 0 Boolean Reserved tagAckAlr 0 Boolean Whether the message displayed by the Alarm

internal tag is acknowledged (1 is On, 0 is Off)AckAll 0 Boolean Whether all alarms are acknowledged

(1 is On, 0 is Off)LptOff 0 Boolean Disable alarm printing (1 is On, 0 is Off)BeepOff 0 Boolean Disable alarm beep (1 is On, 0 is Off)Beep 0 Boolean Beep state (1 is On, 0 is Off)UserName 0 String Current userGroupName 0 String Current user groupGroupLoLevel 0 Integer Start of current security level rangeGroupHiLevel 0 Integer End of current security level rangeInputOutOfRange 0 Boolean Whether a user input is out of range

(1 is On, 0 is Off)InputMinRange 0 Real Minimum value related to InputOutOfRangeInputMaxRange 0 Real Maximum value related to InputOutOfRangeGroupCNFLoLevel 0 Integer Start of current security level range to CNFGroupCNFHiLevel 0 Integer End of current security level range to CNFCrispInput 0 String Crisp status bar input valueCrsipOutput 0 String Crisp status bar output valueCrispDisplay 0 Integer Crisp status bar output valueAnalogValue_ 0 Real Simulation analog tagDigitalValue_ 0 Boolean Simulation digital tagLastCodeChar 0 Integer Last code character in the emulation viewerReserved___6 0 Boolean Reserved tagReserved___7 0 Boolean Reserved tagReserved___8 0 Boolean Reserved tagReserved___9 0 Boolean Reserved tagReserved___10 0 Boolean Reserved tag

Page 80: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

80

Database MergeThe database merge utility allows you to combine two application tag databases into one.In order to use this utility, you should have two applications that contain an applicationtag database and a third new destination application that contains no application tags.

Note: If you use an application that already contains tags as the destination application,the existing tags will be overwritten and lost.

Select the Database Merge program in the DesignStudio Tools folder of the Programsfolder of the Windows Start button menu to open the Database Merge window:

The First Database Folder and Second Database Folder text boxes hold the names of thetwo application tag databases to be merged. Text cannot be typed directly into these graytext boxes. Instead select the Select… button to open a Browse for Folder window andbrowse to the \database folder of the desired application. Select the \database folder andselect the OK button. Another Browse for Folder window will open. Browse to the\database folder of the second application, select it, and select the OK button.

Note: If you do not select the database folders of the two applications, you will get anerror message in the next step and you will need to start over.

Page 81: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

81

After you have selected both application database folders, the Database Merge windowwill have both text boxes filled in. Select the Merge… button. Another Browse for Folderwindow will appear and you must browse to the \database folder of the application thatwill receive the merged database. Select the \database folder and select the OK button.After this step, you are done. You may close the Database Merge window or you maymerge two other databases.

Note: If you do not select the \database folder of the destination application, there willbe no error message, but the merge will not occur.

Page 82: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150
Page 83: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

83

5. Screen ConstructionScreens are user interface displays that are created using static and dynamic objects. Theoperator will be able to see output on the screen and provide input, all through specificobjects. Each screen has two layers, an object layer and a bitmap layer. The object layeris saved in the \application\screen folder as a screen (.scr) file and the bitmaplayer is saved in the same folder as a bitmap (.bmp) file with the same name. If thebitmap layer is not edited, there will be no bitmap file.

Creating and Managing a Screen

Creating a ScreenThere are three ways to start to create and open a new screen:• Select the New… option in the File menu to open a New window and select the

Display option (double-click or select and click OK) in the File tab. You may also usethe New button in the Standard toolbar.

• Select the Document… option in the Insert menu to open a New Document windowand select the Display option (double-click or select and click OK).

• Select the Graphics tab of the Workspace window, right-click the Screens folder, andselect the Insert command on the popup menu.

Any of these methods will open a Screen Attributes window.

Description text box: Use this field for documentation purposes. In Windows NTapplications, the contents of this field appears in the status bar of the runtime emulationviewer.

Page 84: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

84

Background Picture group box:Enable Background field: The check box enables the use of a graphic file in thebackground layer of the screen. The drop-list contains graphic file format options.The choices are BMP, PCX, TIF, DXF, EPS, WMF, IMG, JPG, WPG, PCD, PNG, FMF,FPX, FAX, and TGA. Windows CE applications only support the use of Windowsbitmap (.bmp) files and the drop list will be inactive. For a Windows CE application,just use the check box to enable/disable bitmap use.

Note: When the Enable Background option is enabled, the Background Color option,on both the screen right-click menu (p. 90) and the Tools toolbar (p. 43), is disabledand the Change Toolbar button (p. 93) on the Tools toolbar is enabled.

Shared Image check box: The graphics file named in this field will be used as adefault graphic file in the screen background graphics layer (p. 149). The advantageof this is that a single graphics file can be used in several screens, savingdevelopment time and memory usage. For Windows CE applications, the Windowsbitmap file must be stored in the \application\screen folder. For Windows NTapplications, the field can include a path name. The default folder is still the\application\screen folder. You cannot use a tag name in this field.

Size group box: The size of the screen is defined in the Width and Height text boxes. Thenumbers must be positive integers and the units are in pixels. The default values are thevalues defined when creating the application (see p. 48).Location group box: The location of the screen on the display of the runtime workstationis defined in these text boxes. The numbers must be positive integers and the units are inpixels. The default values for both are zero.

Top text box: This box holds the offset from the top of the runtime display in pixels.Left text box: This box holds the offset from the left of the runtime display in pixels.

Note: If you modify the window size (Thin or Resizing Style, see below) with apointing device (mouse), and then open the Screen Attributes window, you will beprompted to update the current screen size and location values.

Security text box: Sets the window security level defined under Security on the Databasetab. The default value is 0 (zero).Hide check box: When checked, the screen remains loaded in memory after being calledfor the first time. Screen Logic math worksheets (p. 85) are executed normally. Thisenables fast loads when you open the screen, but uses more system resources. The defaultvalue of this field is disabled.Runtime Properties group box: Defines the window properties when running in runtimeemulator. These properties are available for Windows NT applications only; not forWindows CE applications.

Titlebar field: Type the name that will appear on the title bar of the viewing screenduring the runtime emulation. The check box activates or deactivates the text box.System Menu check box: Enables the system menu.Maximize check box: Activates or deactivates the Maximize button.Minimize check box: Activates or deactivates the Minimize button.Style drop-down list: Defines the window style. The default is Replace. Styles are:

Page 85: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

85

Dialog: The window is opened in front of the other windows, which are inactive(cannot be in focus) until this window is closed.Overlapped: The window is opened without closing any other. This screen will notbe automatically closed by another screen.Popup: The window is opened in front of the other windows, which are notclosed. The focus (which one is active) can be changed between the differentscreens, but the Popup screen will always be in the foreground.Replace(Partial): The window is opened, closing any other Replace(Partial) orReplace(Complete) windows that it partially or completely overlaps. This is thedefault and only option for Windows CE applications.Replace(Complete): The window is opened, closing any other Replace(Partial) orReplace(Complete) windows that it completely overlaps.

Border drop-down list: Defines the window border. Choices (default Resizing) are:None: No border. With no border there is no titlebar or ability to resize thewindow.Thin: Thin window border that does not allow resizing in runtime.Resizing: Normal border that can be resized in runtime.

Don't Redraw text box: Receives a tag or value that controls refreshing the screendynamics. When this value is higher than 0, all the screen dynamics are inactive.

Screen Logic group box: Executes mathematical functions while the screen is in a certainstate during runtime or runtime emulation. The three states are On Open, While Open, andOn Close. Each state has a check box and a button. When a check box is checked, thebutton associated with the check box is enabled. Selecting a button will open a ScreenMath window with a math worksheet for the state.Each worksheet has Tag Name and Expression columns. The return value of theexpression in the Expression column is assigned to the tag in the Tag Name column. Formore information on math worksheets and expressions, see the Scripting Languagechapter (p. 159) and the Math Worksheet chapter (p. 197).

On Open: The math worksheet is executed once, from the top line to the bottom line,when the screen is opened.While Open: The math worksheet is executed from the top line to the bottom linewhile the screen is open. This worksheet has an optional Trigger field. When there isa tag in this field, the worksheet is executed once whenever the value of the tagchanges. When this field is blank, the worksheet is executed in the minimum timeslice the system can execute it in. Continually executing a math worksheet in thebackground can slow an application, especially during runtime. It is a good idea touse the Trigger field to execute the While Open worksheet whenever feasible.On Close: The math worksheet is executed once, from the top line to the bottom line,when the screen is closed.

All three worksheets are labeled Screen Math and look similar except for the line of textat the top of the window and the Trigger field in the While Open Screen Math window.

Page 86: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

86

Opening a ScreenTo open an already created screen, select the Graphics tab of the Workspace window andeither double-click the Screens folder or select the boxed plus beside it to open it. Thiswill display the list of screens. Double-click one of them or right-click one and select theOpen option in the popup menu.

Note: In a Windows NT application, when a screen larger than the workspace is openedit is not maximized and the maximize button is not visible without scrolling. Tomaximize the screen, double-click its titlebar.

Saving a ScreenTo save a screen, select the active Save or Save All button on the Standard toolbar orselect the Save, Save As…, or Save All options in the File menu. If these options are notactive, you have not made changes to the screen.You may also close the screen and if you have made changes, you will be prompted tosave it. If this is a newly created screen, you will also be prompted to name the screen ina Save As window. You may accept the default screen name by selecting Save, or youmay change the name and select Save.

Deleting a ScreenTo delete a screen, select the Graphics tab of the Workspace window and either double-click the Screens folder or select the boxed plus beside it to open it. This will display thelist of screens. If the screen is not open, you can use the Delete key or right-click thescreen you want to delete and select the Delete option in the popup menu.

Page 87: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

87

Workspace Window Graphics TabThe Graphics tab of the Workspace window includes folders for screens and othergraphics objects used in DesignStudio applications.

Screens folder: Contains the screens created by the user as well as any screens that arepreconfigured by the application.Group Screen folder: This combines individual screens from the Screens folder into moremanageable groups. This option does not work in Windows CE applications.Library icon: This is a library of symbols provided by DesignStudio.Symbols folder: This is a collection of user-made symbols. It is initially empty.

Screens FolderThe Screens folder contains a list of screens. Right-click the folder to get a menu withInsert as the option. Selecting Insert will start the screen creation process.When the folder has a boxed plus beside it, the folder has at least one screen in it. Selectthe boxed plus or double-click the folder to open it and display a list of screens. Double-click a screen to open it.Each screen also has a right-click popup menu:

Open: Opens the screen in the DesignStudio workspace. If this is thefirst screen opened, the Tools toolbar will appear.Delete: Deletes the screen. This option only works if the screen isclosed.

Send to library: This option will add the screen to the library. It will be listed by thescreen name in the library screens list. Each object in the screen will now be accessible asa normal library object.

Group ScreenA screen group is a combination of individual screens that are designed to be displayedtogether. This option is only available for Windows NT applications. Screen groups canbe opened or deleted from a menu that appears when you right-click the screen groupsubfolder in the Group Screen folder.

Page 88: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

88

Creating New Screen GroupsRight-click the Group Screen folder and select Insert screen group, or select the ScreenGroup… option in the menu bar Insert menu, to open an Insert Screen Group window.

Name text box: Assign a name for the folder containing the group of selected screens.List of screens pane: Lists screens in Screen folder. Highlighted screens are added to thescreen group. Highlight or remove highlight by selecting a screen in the list.

LibraryThe library is a set of objects grouped by meaning in one screen and stored in a specificlocation.To open the Library window, double-click the Library icon in the Graphics tab of theWorkspace window, select the Open Library button in the Standard toolbar, or select theLibrary command in the View menu.

Select a category screen from the left pane of the screen to preview available images.You can select and image and drag it to the screen or use standard Windows copy andpaste commands. You can also double-click your selection to close the Library windowand paste it into the screen.

Page 89: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

89

Note: Most of the library objects have predefined string labels and tags. To change these,use the Replace… button in the Object Properties window (p. 98).

Note: You can add a screen to the library. Develop the screen and then choose the right-click menu Send to library command. A file with the same name and an .scl extensionwill appear in the \DesignStudio\Lib folder.

Note: All Group of Symbols (p. 110) objects—including most symbols and libraryobjects—and all objects with dynamic properties (p. 139) added to them will havemultiple Object Properties windows. These different Object Properties windows, and theproperties listed in them, can be accessed through the Object Properties Selection drop-down list (p. 98).

SymbolsThis is a collection of user-made objects that have been grouped together (p. 95) andsaved. Symbols can contain images and text. The Symbols folder is initially empty. Youwill not be able to open it or to open a right-click popup menu until you have created asymbol and saved the symbol to it (see procedure below).To create a symbol, develop an object in a screen, group it (p. 95), and use the Copy to…command in the Edit menu to save it as a symbol (.sym) file in the\application\symbol folder. To paste an existing symbol into a screen, use the PasteFrom… command in the Edit menu.You can also open the Symbols folder in the Graphics tab of the Workspace window andeither Open or Delete the symbol in each symbol's right-click menu or double-click thesymbol to open it. Once opened, the symbol can be altered or it can be copied into ascreen using standard Windows copy and paste commands.

Note: All Group of Symbols (p. 110) objects—including most symbols and libraryobjects—and all objects with dynamic properties (p. 139) added to them will havemultiple Object Properties windows. These different Object Properties windows, and theproperties listed in them, can be accessed through the Object Properties Selection drop-down list (p. 98).

Page 90: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

90

Screen Control Menus

Screen Right-Click Popup MenuRight-click any part of the screen that does not contain an object to open this menu.

Paste: Copies the Windows clipboard contents into the active screen. If the clipboardcontains a selection, it is copied to the upper left corner of the screen. You can also usethe Paste button on the Standard toolbar and the Paste command in the Edit menu.Select All: This command selects all objects in the screen.Test Display: Begins test display mode. The Test Display button on the Execution Controltoolbar and the Test Display command in the Project menu also activate test display mode.For details, see the Downloading and Testing Applications chapter (p. 271).To end test display mode, use the Stop Test Display button on the Execution Controltoolbar or the Stop display test command in the Project menu.Grid Settings: This command opens the Grid window where you can alter grid and handle(boxes around an object that indicate it is selected and that allow you drag and alter itssize) settings.

Visible check box: When checked, the grid is visible on the screen. This check boxperforms the same function as the Grid button on the Tools toolbar.Grid Size group box: The grid size in pixels is set in the Horizontal and Vertical textboxes. The default for both is 80 pixels. The two numbers may be different.Line Style group box: Specify the grid line style by choosing one of the four radiobuttons: Solid, Dashed, Dotted, or Dashed-Dotted. The default is Dotted.

Page 91: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

91

Tracker size text box: This box specifies the height and width, in pixels, of theselection handles used for object sizing. The default value is 3 pixels.Grid Color box: Selecting this box opens a 16-color Color window. To change thegrid line color, select a color box and select the OK button or double-click a color.

Screen Attributes: This command opens the Screen Attributes window (p. 83). You canalter the screen attributes window fields after screen creation.Background color: This command opens a 48-color Color window. To change the screenbackground color, select a color box and select the OK button or double-click a color.This is the same as the Tools toolbar Background color button. Neither this command northe button is active if you have checked Enable Background in the Screen Attributeswindow.Close: This command closes the screen. You will be prompted to save changes. This isthe same as the Close command in the File menu and the titlebar close button ( ).Disable Drag: Toggling this option on (a depressed checked box will appear) disables theability to drag an object with a pointing device. When this option is on, the message NoDRAG will appear at the right end of the DesignStudio status bar.

Note: If the objects on a screen can't be moved, look for the No DRAG message or tryCtrl + D to toggle on object dragging.

Screen Window Control Drop-Down MenuSelect the icon in the upper left corner of the screen to open the window control drop-down menu. It listed the standard Windows window control options: Restore, Move, Size,Minimize, Maximize, Close, and Next.

Restore: This command brings the window into focus (makes it the active window).Move: This command allows you to move the window using the keyboard arrow keys.Size: This command allows you to resize the window using the keyboard arrow keys.Minimize: This command minimizes the window, like the titlebar minimize button ( ).Maximize: This command maximizes the window, like the titlebar maximize button ( ).Close: This command closes the screen. You will be prompted to save changes. This isthe same as the Close command in the File menu and the titlebar close button ( ).Next: This command opens the window that was previously in focus (active).

Page 92: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

92

Screen Object Creation and EditingA screen is composed of background graphics and objects. Objects can be simple lines,shapes, or text or they can be complex trend charts, alarm boxes, list objects, or smartmessages. Simpler objects can be combined into symbols and DesignStudio has a Libraryof complex objects.

Object Editing Configuration of the Tools ToolbarObjects can have static properties such as color, shape, font type, and line weight anddynamic properties such as movement, color change, and appearance change. The ObjectEditing configuration of the Tools toolbar contains the buttons used to create andconfigure objects. To use any of these buttons, select it with the mouse. The mouse isalso used to define object dimensions and to navigate through object configurationwindows. The keyboard is used to enter text and for pixel-by-pixel movement.

Selection (p. 87)

Open Polygon (p. 95)

Button (p. 95)Rounded Rectangle (p. 95)

Change Toolbar (p. 87)

Flip Horizontally (p. 87)Rotate (p. 87)

Fill Color (p. 124)

Alarm List (p. 106) Trend (p. 106)List Box (p. 106)

Bargraph (p. 133)Colors (p. 133)

Size (p. 133)

Resize Width (p. 87)Align Left (p. 87)Align Top (p. 87)

Center Vertically (p. 87) Center Horizontally (p. 87)Evenly Space Horizontally (p. 87) Evenly Space Vertically (p. 87)

Move to Back (p. 87) Move to Front (p. 87)Group (p. 87) Ungroup (p. 87)

Grid (p. 87) Background Color (p. 87)

Align Bottom (p. 87)Align Right (p. 87)Resize Height (p. 87)

Dynamic Rotation (p. 133)Position (p. 133)Text I/O (p. 133)

Smart Message (p. 106)Command (p. 126)

Fonts (p. 124)Line Color (p. 124)

Text (p. 95)

Flip Vertically (p. 87)

Pushbutton (p. 128)

Rectangle (p. 95)Ellipse (p. 95)Closed Polygon (p. 95)

Line (p. 95)

Page 93: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

93

Screen Parameter ToolsThis section details the Change Toolbar, Grid, and Background Color buttons. Thesebuttons affect the screen, but are not used directly to alter objects in the screen.Change Toolbar button: When this button is depressed, the Tools toolbar toggles betweenthe object editing configuration and the graphics editing configuration. At the same time,the screen displayed toggles between the foreground (object editing) layer and thebackground (graphics editing) layer to match the toolbar configuration. When a screen isopened, the default settings are the object editing Tools toolbar and the foreground(object editing) layer. For more information on graphics editing, see p. 149.This button is not active until Enable Background check box is checked in the ScreenAttributes window (p. 83).Grid button: When this button is depressed (default), grid lines appear on the screen.When this button is not depressed, there are no grid lines. Grid line parameters can bechanged and the grid lines can be toggled on and off in the Grid window accessed by thepopup menu that appears when right-clicking the screen (p. 90).Background color button: You can use this button to select a screen background color. Ifyou just want a single-color screen background, use this option because there is nobackground layer file and the application will be smaller and load faster. If you wantmore complicated static background graphics, edit the background graphic screen layer(see p. 149).Depress this button to open the full 48-color Color window (p. 157). White is the defaultcolor. To change colors, select a color and select OK or double-click a color.If the Enable Background option in the Screen Attributes window (p. 83) is checked, thiscolor will not be displayed and the Background color button will not be available onlyavailable. Disabling Enable Background will restore any preexisting Background colorsettings.

Note: Runtime workstations like the OpenHMI 3406 Runtime Workstation only support16-color palettes. Not all of the 48 Basic colors and none of the Custom colors in theColor window will be available to applications run on these workstations, even thoughthese colors can be selected during application development. If you use one of theseruntime workstations, see p. 158 for details.

Object Editing Tools and Object PropertiesSeveral of the Tools toolbar are used to manipulate the size, shape, dimensions, andorientation of an object. This section details these operations and includes descriptions ofthe Selection (p. 93), Group (p. 95), Ungroup (p. 95), Resize width (p. 95), Resize Height(p. 95), Align left (p. 96), Align right (p. 96), Align top (p. 96), Align bottom (p. 96), CenterVertically (p. 96), Center Horizontally (p. 96), Evenly space horizontally (p. 97), Evenlyspace vertically (p. 97), Flip Horizontally (p. 97), Flip Vertically (p. 97), Rotate (p. 97),Move to back (p. 98), and Move to front (p. 98) buttons.

Object SelectionThe Selection button must be depressed (default setting) to select an object on the screen.When the Selection button is depressed, the cursor will be an arrow. If the Selectionbutton is not depressed, an object drawing button is. After you finish creating mostobjects, this button is depressed. Always make sure that the Selection button is depressed

Page 94: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

94

before you try to select an object. If it is not, you will end up drawing an unwanted objecton the screen.You can select objects by highlighting them directly or by drawing a selection boxaround them. Selected objects have eight handles (boxes) around their edges, one at eachcorner and one at the midpoint of each side. These handles indicate that the object isselected and they are used to resize the object. When multiple objects are selected, thelast object selected will have solid black handles; the other objects will have unfilledhandle squares.

You can highlight an object directly with a pointing device or by starting with ahighlighted object and using the Tab key until the correct object is selected. Whenselecting an object directly with a pointer, you will see a four-pointed arrow at the base ofthe cursor arrow. To highlight several objects directly, hold down the Shift key and selectanother object with the pointer, then release the Shift key.You can also draw a selection box around single or multiple objects. To draw a selectionbox, click the pointer on a spot of the screen and drag it to form a gray dotted-linerectangle that completely encloses all of the objects that you desire to select. When yourelease the pointer, all objects completely enclosed in the selection box will be selected.When you point to an empty part of the screen there will be a small gray selection box atthe base of the cursor arrow.

Deselecting ObjectsTo deselect all objects, select a blank area of the screen. To deselect a specific object,hold down the Shift key and double-click the object.

Object MovementYou can drag an object around the screen by selecting and dragging it. Another way tomove a selected object is to hold down the Shift key and use the arrow keys to move theobject a pixel at a time. Objects cannot be moved off of the screen.

Note: If the object won't move, you have probably disabled the ability to drag objects(p. 90). After you have objects situated exactly where you want them on the screen, it isoften a good idea to disable the ability to drag because any mouse click on an object canmove it inadvertently.

If you select multiple objects, the whole group of objects can be moved as though it isone object. You cannot resize multiple selected objects or access the Object Propertieswindow for multiple selected objects until you have either grouped them (see ObjectGrouping and Ungrouping, p. 95) or selected only one object.

Page 95: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

95

Object Grouping and UngroupingAfter you select several items, you can group them using the Group button or by using theGroup command in the object popup menu (p. 99). Grouped objects are treated as a singleobject for the purposes of object selection and manipulation, but each part of the groupcan be accessed in the Object Properties window (p. 98). Library objects (p. 88) andsymbols (p. 89) are grouped objects.Any grouped object can be separated into its individual components with the Ungroupbutton or the Ungroup command in the object right-click menu (p. 99). A grouped objectmay contain several individual groups of objects, so it may be necessary to selectsubgroups and ungroup repeatedly to completely ungroup a complex object.

Note: All Group of Symbols (p. 110) objects—including most symbols (p. 89) and libraryobjects (p. 88)—and all objects with dynamic properties (p. 139) added to them will havemultiple Object Properties windows. These different Object Properties windows, and theproperties listed in them, can be accessed through the Object Properties Selection drop-down list (p. 98).

Resizing ObjectsA selected object or group of objects has eight selection handles (handles) around itsedge, one at each corner and one at the midpoint of each side. You can select a handleand drag it to elongate the object in the direction indicated by the arrows that appearwhen the pointing device is over the handle. For finer size control, you can select andhold a handle with the left mouse button and use the arrow keys to move the handle (andthe corresponding side of the object) by one pixel at a time. Handle size can be adjustedin the Grid window (p. 90).

Note: When you resize an object, the mouse cursor displays arrows to indicate theavailable directions for resizing. After you start resizing, the mouse cursor switches to acrosshair.

If a symbol or group of objects is resized, then all the objects within the symbol or groupare resized accordingly.When you place the pointer cursor on a handle of an open or closed polygon (p. 101),there is a boxed square as the base of the cursor. Dragging this handle will move itsposition and change the shape of the polygon. To resize the whole polygon, draw aselection box around it to select the whole polygon and group it (p. 95).Resize width button: Sets the width of all selected objects to the width of the last objectselected (the one with the filled handles). This can be used on one selected object to setits width equal to its height.Resize height button: Sets the height of all selected objects to the height of the last objectselected (the one with the filled handles). This can be used on one object to set its heightequal to its width.

Page 96: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

96

Copying and Pasting ObjectsAfter selecting an object or objects, you can cut the selection to remove it and place it inthe Windows clipboard or copy the selection to place a copy of it in the Windowsclipboard. Pasting puts a copy of the contents of the Windows clipboard in the upper leftcorner of the screen. You can access the cut, copy, and paste functions in these ways:• Use the standard Windows shortcut keys: Ctrl+X for cut, Ctrl+C for copy, and Ctrl+V

for paste.• Use the Cut, Copy, and Paste buttons on the Standard toolbar.• Use the Cut, Copy, and Paste commands in the Edit menu.• Use the Cut and Copy commands in the object popup menu (p. 99) and then use any

of the paste function options.• Use any cut or copy function options and then use the Paste command in the screen

right-click popup menu (p. 90).

Note: Cut, copy, and paste are standard Windows functions, but you shouldn't use themto copy material from another Windows application to DesignStudio or vice versa unlessyou know that the two Windows applications are compatible for these commands.

Note: If dragging (p. 90) is not allowed, you will not be able to move the pasted objects.

There is another way to make a copy of an object in the same screen. Select an object,hold down the Ctrl key, and click-and-drag a copy of the object from the original. Makesure that dragging is enabled (p. 90) or you will create a stack of superimposed objects.

Object AlignmentThe six alignment buttons are inactive until two or more objects are selected (p. 93).When two or more objects are selected, the alignment buttons are used to align theobjects according to the location of the last object selected. The last object selected hassolid handles instead of empty box handles (p. 93).Align left button: Aligns the left edges of all the selected objects to the left edge of the lastobject selected.Align right button: Aligns the right edges of all the selected objects to the right edge of thelast object selected.Align top button: Aligns the top edges of all the selected objects to the top edge of the lastobjected selected.Align bottom button: Aligns the bottom edges of all the selected objects to the bottomedge of the last object selected.Center Vertically button: Aligns the vertical centers of all selected objects to the verticalcenter of the last object selected. See the figures below.Center Horizontally button: Aligns the horizontal centers of all selected objects to thehorizontal center of the last object selected. See the figures below.

a) b)Unequal objects a) centered vertically and b) centered horizontally.

Page 97: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

97

Spacing Objects EquallyThe two spacing buttons are inactive until two or more objects are selected (p. 93). Whentwo or more objects are selected, the spacing buttons are used to affect the interobjectspacing.Evenly space horizontally button: Makes the horizontal space between the selected objectsthe same.Evenly space vertically button: Makes the vertical space between the selected objects thesame.

Note: The spacing functions may move the last object selected (the one with solidhandles instead of empty box handles, see p. 93) by no more than a few pixels in order tomake all of the interobject spaces equal.

Object OrientationThe three object orientation buttons are inactive unless a single object is selected (p. 93).This object may be a grouped object (p. 95), but the buttons are not active if multipleobjects are selected.Flip Horizontally button: When this button is pressed, the selected object is invertedhorizontally. It appears as if it was rotated about an imaginary line through its horizontalcenter or as an image in a vertical mirror placed beside it and perpendicular to the screen.Flip Vertically button: When this button is pressed, the selected object is invertedvertically. It appears as if it was rotated about an imaginary line through its vertical centeror as an image in a horizontal mirror placed above or below it and perpendicular to thescreen.

a) b) c) a) An object b) flipped vertically and c) flipped horizontally

Rotate button: When this button is pressed, the selected object is rotated 90 degrees (aquarter turn) clockwise. See the figures below.

a) b) a) An object b) rotated 90 degrees clockwise.

Page 98: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

98

Changing Object LayersEach object on the screen has an ID number that appears in the DesignStudio status barwhen the object is selected (p. 93). The ID number also determines whether an objectappears to be behind or in front of another object on the screen. An object with a lowerID number will appear to be behind an object with a higher ID number. ID numbersalways start at zero and range up to the total number of objects on the screen. No twoobjects have the same ID number. Even when a group of objects is sent to the back orbrought to the front, the selected objects will still appear to be behind or in front of eachother. The object layer buttons are available whenever an object or group of objects isselected. Both the Move to back and Move to front functions can also be found on theobject popup menu (p. 99).Move to back button: When this button is pressed, any selected objects are given thelowest ID numbers and appear to be behind all other objects on the screen.Move to front button: When this button is pressed, any selected objects are given thehighest ID numbers and appear to be in front of all other objects on the screen.

Object Properties WindowTo open the Object Properties window, double-click the object, use the Alt-Enter keyswith the object highlighted, or right-click the object and select Properties from the popupmenu. Object Properties window is different for different types of objects and objecttools. The basic window is shown here with only the fields that all Object Propertieswindows have in common. Each Tools toolbar button description in this manual willinclude a description of the appropriate Object Properties window, if any.

Always on Top button: When the pushpin button in the upper left corner of the ObjectProperties window is pushed in, the window will stay open and on top until it is manuallyclosed. The default setting is not pushed (shown above). When the button is not pushed,the Object Properties window will close whenever an empty section of the screen isselected.Replace… button: If there are any tags or string labels associated with the object, pressingthis button will open a replace window where you can replace any tags and text labels atone location. The Replace window has two tabs, Replace Tags and Replace Strings. Eachtab has two columns of text boxes, Current Tag and New Tag in the Replace Tags tab andCurrent String and New String in the Replace Strings tab. The text boxes in the currentcolumns are read-only and display any existing tag names or string labels. If there are anyexisting tags or string labels, there will be an active text box in the new columns with thesame tag name or string label.You can edit the value in these text boxes and changes will take effect when the OKbutton is selected. If there are more tags or string labels than can be displayed in onewindow, you can use the Pg Up and Pg Down buttons to navigate the list. When a tagname or string label is edited, all instances of the tag or label in the object are changed.Tag names and labels may be deleted in the Replace window. If you use a new tag name,you will be prompted to create the new tag (p. 77).

Page 99: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

99

Note: In fields where you enter a tag or a numeric value, you may also enter a constant.A constant (defined by the # character) is equivalent to a numeric value, except that itappears in the Replace Tags tab of the Replace window. It is useful for documentationand to create generic objects. Example: #Name:100. The number after the colon is theconstant value; Name is only a constant mnemonic that is not added to database.

Hint text box: This box contains a string that is assigned to the internal tag (p. 78) Hintwhenever the pointer cursor touches the object during runtime or runtime emulation(p. 271). When the cursor is moved off of the object, the value of Hint clears. The value ofHint can be used as an event trigger in conjunction with this field, using the syntax:

Hint=<hint text box string>

In Windows NT applications, the Hint value appears on the runtime application status bar.Selection drop-down list: The drop-down list in the upper right corner of the ObjectProperties window lists all of the objects in a grouped object or symbol and all of theobject properties that apply to the object. The selected item on this list dictates theproperties and fields displayed in the Object Properties window.

Object Popup MenuIf you right-click on an object or a group of selected objects, the following popup menuappears allowing fast access to object editing functions.

Properties: This command opens the Object Properties window (p. 98) for the object.This command is unavailable if more than one object is selected.

Page 100: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

100

Cut: Removes the selection and stores it onto the clipboard, replacing previously storedselections on the clipboard. You can use Cut to select an object and move it to anotherlocation on screen or move it to another screen. You can also use the Cut button on theStandard toolbar and the Cut command in the Edit menu.Copy: Copies the selection to the clipboard. It allows you to paste it in another locationon the screen, paste it to another screen, or make multiple copies of an object. You canalso use the Copy button on the Standard toolbar and the Copy command in the Editmenu.Delete: Deletes the selection. To restore an object that you accidentally deleted, use theUndo function. You can also use the Delete button on the Standard toolbar and the Deletecommand in the Edit menu.Group: This command groups several selected objects into one object. This is the samefunction as the Tools toolbar Group button. See p. 95 for more information.Ungroup: This command ungroups a grouped object. This is the same function as theTools toolbar Ungroup button. See p. 95 for more information.Move to back: When this command is selected, any selected objects are given the lowestID numbers and appear to be behind all other objects on the screen. See p. 98 for details.Move to front: When this command is selected, any selected objects are given the highestID numbers and appear to be in front of all other objects on the screen. See p. 98 fordetails.

Page 101: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

101

Simple ObjectsThis section details simple objects that have only static parameters, parameters whichwill not change during runtime. These static properties include shape, color, line type,and captions. Some static properties can be altered with static property buttons (p. 133)and dynamic properties can be added with dynamic property buttons (p. 139). Thebuttons in this section are Line (p. 101), Open Polygon (p. 102), Closed Polygon (p. 103),Rectangle (p. 104), Rounded Rectangle (p. 104), Ellipse (p. 106), Text (p. 108), and Button(p. 109).Most of these objects (with the exception of text objects) are drawn by clicking anddragging or by clicking to establish line segment endpoints. Most of these objects (withthe exception of text and button objects) can also be created in the graphics backgroundlayer of the screen (p. 149). Bitmap objects, which have an Object Properties window butno toolbar button, are also detailed in this section. Bitmap objects are imported into theobject editing layer of the screen, and are not created using the object editingconfiguration of the Tools toolbar.

Orthogonal LinesLine button: Use this button to draw straight vertical or horizontal lines. Select oneendpoint on the screen and then move the pointer (no dragging required) to create theline. To end the line, select or double-click a point on the screen. This button remainsactive after you drawn a line so that you can continue to draw lines. When you want tostop drawing lines, select another button, such as the Selection button.To open the Object Properties window, double-click the line, use the Alt-Enter keys withit highlighted, or right-click it and select Properties from the popup menu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Line group box: This box determines the line characteristics.

Choose a line style by selecting one of the radio buttons: No Line, Solid Line (default),or Dashed Line.Color box: This box is used to set the line color. The default color is black. To changethe color, select the Color box to open a 16-color Color Selection window (p. 157).Select a color and select the OK button or double-click a color.Weight text box: The positive integer number (range 1 to 50) in this field is theweight (thickness) of the line in pixels. The default is 1.

Page 102: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

102

Freehand Open Objects (Open Polygons)Open Polygon button: Use this button to draw freehand open (not able to be filled) shapescomposed of line segments. Select an area on the screen and move to pointer (nodragging required) to another point on the screen. Select this spot and a line segmentconnecting the two selected spots will appear. Move the pointer and select again to formanother line segment and repeat until you have created the desired object.To create a less angular freehand object, click-and-drag to form the object. When you dothis the cursor will look like a pencil. Even though this object will look more like a curve,it is still composed of line segments.To stop drawing the open polygon, double-click the screen at the end of the final linesegment you want to draw. This button remains active after you drawn a polygon so thatyou can continue to draw more polygons. When you want to stop drawing open polygons,select another button, such as the Selection button.A line segment ends at a vertex. When the open polygon is selected, each vertex has ahandle box. When the pointer cursor is positioned over a vertex, a handle box symbolappears at the base of the cursor. At this point the handle can be selected and moved,changing the shape of the entire open polygon.When the open polygon is selected, it cannot be moved by the pointer without grouping(p. 95) all of the line segments. Selecting a handle will only allow you to reshape theopen polygon. The open polygon can be moved without grouping the line segments byholding down the Shift key and using the arrow keys.To open the Object Properties window, double-click the open polygon, use the Alt-Enterkeys with it highlighted, or right-click it and select Properties from the popup menu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Line group box: This box determines the line characteristics.

Choose a line style by selecting one of the radio buttons: No Line, Solid Line (default),or Dashed Line.Color box: This box is used to set the line color. The default color is black. To changethe color, select the Color box to open a 16-color Color Selection window (p. 157).Select a color and select the OK button or double-click a color.Weight text box: The positive integer number (range 1 to 50) in this field is the weight(thickness) of the line in pixels. The default is 1.

Page 103: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

103

Irregular PolygonsClosed polygons button: Use this button to draw freehand closed (able to be filled) shapescomposed of line segments. Select an area on the screen and move to pointer (nodragging required) to another point on the screen. Select this spot and a line segmentconnecting the two selected spots will appear. Move the pointer and select again to formanother line segment. A line segment connecting the first selected spot with the lastselected spot will also appear. Repeat until you have created the desired object.To create a less angular freehand object, click-and-drag to form the object. When you dothis, the cursor will look like a pencil. Even though this object will look more like acurve, it is still composed of line segments.To stop drawing the polygon, double-click the screen at the end of the final line segmentyou want to draw. This button remains active after you drawn a polygon so that you cancontinue to draw more polygons. When you want to stop drawing polygons, selectanother button, such as the Selection button.A line segment ends at a vertex. When the polygon is selected, each vertex has a handlebox. When the pointer cursor is positioned over a vertex, a handle box symbol appears atthe base of the cursor. At this point the handle can be selected and moved, changing theshape of the entire polygon.When the polygon is selected, it cannot be moved by the pointer without grouping (p. 95)all of the line segments. Selecting a handle will only allow you to reshape the polygon.The polygon can be moved without grouping the line segments by holding down the Shiftkey and using the arrow keys.To open the Object Properties window, double-click the polygon, use the Alt-Enter keyswith it highlighted, or right-click it and select Properties from the popup menu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Line group box: This box determines the line characteristics.

Choose a line style by selecting one of the radio buttons: No Line, Solid Line (default),or Dashed Line.Color box: This box is used to set the line color. The default color is black. To changethe color, select the Color box to open a 16-color Color Selection window (p. 157).Select a color and select the OK button or double-click a color.Weight text box: The positive integer number (range 1 to 50) in this field is the weight(thickness) of the line in pixels. The default is 1.

Fill group box: This box determines the fill color, if any, of the object.Choose whether there is a fill color by picking one of the radio buttons, No Fill or Fill.Color box: This box is used to set the fill color. The default color is light gray. Tochange the color, select the Color box to open a 48-color Color window (p. 157).

Page 104: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

104

Select a color and select the OK button or double-click a color. Even though the Colorcan still be chosen, it will not appear unless the Fill radio button is selected.

RectanglesRectangle button: Use this button to create a rectangle on the screen. Click-and-drag onthe screen to form the rectangle. When you release the pointer button, the rectangle willbe formed. You can continue to create rectangles by repeating this process but as soon asyou click anywhere on the screen, the Selection button will be selected and you will needto reselect the drawing button if you want to continue drawing.Use the Resize height or Resize width buttons (p. 95) to turn the rectangle into a square.To open the Object Properties window, double-click the rectangle, use the Alt-Enter keyswith it highlighted, or right-click it and select Properties from the popup menu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Line group box: This box determines the line characteristics.

Choose a line style by selecting one of the radio buttons: No Line, Solid Line (default),or Dashed Line.Color box: This box is used to set the line color. The default color is black. To changethe color, select the Color box to open a 16-color Color Selection window (p. 157).Select a color and select the OK button or double-click a color.Weight text box: The positive integer number (range 1 to 50) in this field is the weight(thickness) of the line in pixels. The default is 1.

Fill group box: This box determines the fill color, if any, of the object.Choose whether there is a fill color by picking one of the radio buttons, No Fill or Fill.Color box: This box is used to set the fill color. The default color is light gray. Tochange the color, select the Color box to open a 48-color Color window (p. 157).Select a color and select the OK button or double-click a color. Even though the Colorcan still be chosen, it will not appear unless the Fill radio button is selected.

Rounded RectanglesRounded Rectangle button: Use this button to create a rounded rectangle on the screen.Click-and-drag on the screen to form the rounded rectangle. When you release the pointerbutton, the rectangle will be formed. You can continue to create rectangles by repeatingthis process but as soon as you click anywhere on the screen, the Selection button will beselected and you will need to reselect the drawing button if you want to continuedrawing.Use the Resize height or Resize width buttons (p. 95) to turn the rounded rectangle into arounded square.

Page 105: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

105

When the rounded rectangle is selected, there will be one extra handle box inside it, in thelower right quadrant. Dragging this rectangle will change the degree of curvature of therectangle's corners. To do this, position the pointer cursor over handle until a four-pointedarrow appears, then select it and drag. Dragging it toward the center increases thecurvature and vice versa.To open the Object Properties window, double-click the rounded rectangle, use the Alt-Enter keys with it highlighted, or right-click it and select Properties from the popupmenu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Line group box: This box determines the line characteristics.

Choose a line style by selecting one of the radio buttons: No Line, Solid Line (default),or Dashed Line.Color box: This box is used to set the line color. The default color is black. To changethe color, select the Color box to open a 16-color Color Selection window (p. 157).Select a color and select the OK button or double-click a color.Weight text box: The positive integer number (range 1 to 50) in this field is the weight(thickness) of the line in pixels. The default is 1.

Fill group box: This box determines the fill color, if any, of the object.Choose whether there is a fill color by picking one of the radio buttons, No Fill or Fill.Color box: This box is used to set the fill color. The default color is light gray. Tochange the color, select the Color box to open a 48-color Color window (p. 157).Select a color and select the OK button or double-click a color. Even though the Colorcan still be chosen, it will not appear unless the Fill radio button is selected.

Page 106: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

106

Ellipses and Other Curved ShapesEllipse button: Use this button to create a rounded rectangle on the screen. Click-and-dragon the screen to form the ellipse. When you release the pointer button, the ellipse will beformed. You can continue to create ellipses by repeating this process but as soon as youclick anywhere on the screen, the Selection button will be selected and you will need toreselect the drawing button if you want to continue drawing.Use the Resize height or Resize width buttons (p. 95) to turn the ellipse into a circle.To open the Object Properties window, double-click the ellipse, use the Alt-Enter keyswith it highlighted, or right-click it and select Properties from the popup menu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Style group box: This box has no user-changeable options in Windows CE applications.In Windows NT applications, this group box includes options that allow you to changethe ellipse to an arc, chord, or ring (see the end of this section).Line group box: This box determines the line characteristics.

Choose a line style by selecting one of the radio buttons: No Line, Solid Line (default),or Dashed Line.Color box: This box is used to set the line color. The default color is black. To changethe color, select the Color box to open a 16-color Color Selection window (p. 157).Select a color and select the OK button or double-click a color.Weight text box: The positive integer number (range 1 to 50) in this field is the weight(thickness) of the line in pixels. The default is 1.

Fill group box: This box determines the fill color, if any, of the object.Choose whether there is a fill color by picking one of the radio buttons, No Fill or Fill.Color box: This box is used to set the fill color. The default color is light gray. Tochange the color, select the Color box to open a 48-color Color window (p. 157).Select a color and select the OK button or double-click a color. Even though the Colorcan still be chosen, it will not appear unless the Fill radio button is selected.

Page 107: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

107

For Windows NT applications only—the Style group box: In a Windows NTapplication, the drop-down list on the left is active and it includes Ellipse, Chord, Arc, andRing style options. These objects are shown below. Each one of them is as big as theoriginal ellipse. The name of the object also appears in the Selection drop-down list in theupper right corner of the Object Properties window,The non-Ellipse objects (especially Arc and Ring) appear as quadrants of a larger object.When you pick any option except Ellipse, another drop-down list appears to the right ofthe first. This list includes the options Left-Bottom (upper left quadrant), Left-Top (lowerleft quadrant), Right-Top (lower right quadrant), and Right-Bottom (upper right quadrant).Another way to think of these options for the Chord object is that they define the directionof the diagonal line, starting on the left or the right and going to the top or the bottom.

Filled Ellipse, Chord, Arc, and Ring (all Left-Bottom options)

Bitmap ObjectsA bitmap object is a static graphic that is imported from a bitmap (.bmp) file using thePaste From… command in the Edit menu (p. 34) or by pasting a bitmap file from theWindows clipboard. Objects such as symbols and library objects may also have Bitmapproperties that can be accessed in the Object Properties Selection drop-down list.To open the Object Properties window, double-click the bitmap object, use the Alt-Enterkeys with it highlighted, or right-click it and select Properties from the popup menu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Transparent check box: When this box is checked (default not checked), the color in theColor box to the right is transparent in the bitmap. This means that the selected color isnot drawn on the bitmap, so whatever is behind that part of the bitmap will show though.This is often used to eliminate the square background surrounding a nonsquare object.Color box: This box is used to set the Transparent color (default white). To change thecolor, select the bitmap object and drag the handle box that is inside the bitmap objectover a section of the object that is the color that you want to make transparent. Using thehandle guarantees that you select a color that is present in the bitmap.

Page 108: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

108

TextText button: Use this button to create text objects on the screen. To create a text object,select this button and select a spot on the screen. A flashing cursor will appear. Starttyping the text using a keyboard or keypad. If you select the text or any other object orspot on the screen, the Text button will be deselected and the Selection button will beselected. If you do not type any text, there will be no text object.To open the Object Properties window, double-click the text object, use the Alt-Enter keyswith it highlighted, or right-click it and select Properties from the popup menu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Caption text box: Use this field to edit the text.Align drop-down list: This field is read-only for Windows CE applications and is set toLeft aligned text. For Windows NT applications, text can be aligned around the originalcursor location Left, Center, or Right.Fonts button: This button is used to open the Fonts window (p. 138) where you can setfont parameters for the text object.Border Color check box: When checked, there is line border around the text box.Border Color box: This box is used to set the text box border line color. The default coloris black. To change the color, select the Color box to open a 16-color Color Selectionwindow (p. 157). Select a color and select the OK button or double-click a color.BackColor box: This box is used to set the fill color of the text box. The default color isblack. To change the color, select the Color box to open a 16-color Color Selectionwindow (p. 157). Select a color and select the OK button or double-click a color.Transparent check box: When checked, it makes the BackColor color transparent. Thismeans that the color will not be drawn and the text will appear directly on whatever isbehind the text object.Extern Translation check box: Enables the text to be translated automatically usingpreconfigured translation worksheets. See Language Translation (p. 235).

Note: Any number sign characters (#) can be used as character placeholders for textinput and output (p. 143). Because of this any # character will take up as much space asthe widest possible font character to allow space for any character replacing it.

Page 109: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

109

ButtonsButton button: Use this button to create rectangular buttons on the screen. Click-and-dragon the screen to form the button. When you release the pointer button, the rectangle willbe formed. You can continue to create buttons by repeating this process but as soon asyou click anywhere on the screen, the Selection button will be selected and you will needto reselect the drawing button if you want to continue drawing. Buttons appear asrectangles with slightly rounded corners and shading that makes them appear to be 3-Dobjects. They also have a default caption label, Text.Use the Resize height or Resize width buttons (p. 95) to turn a rectangular button into asquare button.Buttons are similar to other simple objects, combining rectangle and text objectproperties with some 3-D shading. They can be used as simple objects, such as raisedrectangles, by deleting the text, but they can't be directly created in the graphicsbackground layer of the screen (p. 149). They are intended to be used as a pushbuttonusing the Commands dynamic property.To open the Object Properties window, double-click the button, use the Alt-Enter keyswith it highlighted, or right-click it and select Properties from the popup menu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Caption text box: Use this field to edit the text. The default caption is Text.Fonts button: This button is used to open the Fonts window (p. 138) where you can setfont parameters for the text.Extern Translation check box: Enables the text to be translated automatically usingpreconfigured translation worksheets. See Language Translation (p. 235).

Page 110: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

110

Compound ObjectsThis section details active objects that are composed of other objects that have beengrouped together. Compound objects include symbols, library objects, and groupedobjects. The buttons associated with compound objects are Group and Ungroup (p. 95).Compound objects can have static and dynamic parameters. Dynamic parameters arethose that can change during runtime, often due to data input or a trigger. Staticproperties include shape, color, line type, and captions. Dynamic properties includepushbuttons, input and output text and graphics, and object size, shape, orientation, andposition change. Additional static properties can be altered with static property buttons(p. 133) and dynamic properties can be added with dynamic property buttons (p. 139).All of these types of grouped objects will have one of two different Object Propertieswindows. If the grouped object contains only objects with static properties (p. 133), theobject will be called Symbol in the Selection drop-down list. If the grouped objectcontains objects with dynamic properties, it will be called Group of Symbols. All Group ofSymbols (p. 110) objects—including most symbols and library objects—and all objectswith dynamic properties added to them (p. 139) will have multiple Object Propertieswindows. These different Object Properties windows, and the properties listed in them,can be accessed through the Object Properties Selection drop-down list (p. 98).To open the Object Properties window, double-click the grouped object, use the Alt-Enterkeys with it highlighted, or right-click it and select Properties from the popup menu.

Group of SymbolsThe Group of Symbols Object Properties window contains no properties. Properties ofspecific components of the group are accessible only through selecting that component inthe Selection drop-down list.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.

SymbolThe Symbol Object Properties window contains properties, but properties specific toindividual components of the grouped object are inaccessible unless the object isungrouped so that the components can be selected individually. If a Symbol property doesnot apply to a component or if the Symbol property has been disabled in the component,changing that Symbol property will not change the component.

Page 111: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

111

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.

Note: All Group of Symbols (p. 110) objects—including most symbols and libraryobjects—and all objects with dynamic properties (p. 139) added to them will havemultiple Object Properties windows. These different Object Properties windows, and theproperties listed in them, can be accessed through the Object Properties Selection drop-down list (p. 98).

Line group box Color box: This box is used to set the line color. The default color isusually black. To change the color, select the Color box to open a 16-color ColorSelection window (p. 157). Select a color and select the OK button or double-click acolor.Fill group box Color box: This box is used to set the fill color. The default color is usuallylight gray. To change the color, select the Color box to open a 48-color Color window(p. 157). Select a color and select the OK button or double-click a color.

SymbolsA symbol is a collection of user-made objects that have been grouped together and saved.To paste an existing symbol into a screen, use the Paste From… command in the Editmenu (p. 34). For information on saving and accessing symbols, see p. 89.

Library ObjectsLibrary objects are drawn and grouped objects that can be pasted into a screen from theDesignStudio object library and then modified. Developers can create their own libraryobject windows, but there are also many library objects that are supplied withDesignStudio. For more information, see p. 88. Most library objects have dynamicproperties and Group of Symbols Object Properties windows.

Grouped ObjectsGrouped objects are created by selecting and grouping multiple objects. Grouped objectscan be saved by the developer as symbols or library objects.

Page 112: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

112

Active ObjectsThis section details active objects that have static and dynamic parameters. Dynamicparameters are those that can change during runtime, often due to data input or a trigger.Static properties include shape, color, line type, and captions. Dynamic properties includepushbuttons, input and output text and graphics, and object size, shape, orientation, andposition change. Additional static properties can be altered with static property buttons(p. 133) and dynamic properties can be added with dynamic property buttons (p. 139).The buttons in this section are Alarm (p. 112), Trend (p. 117), List Box (p. 126), SmartMessage (p. 129), and Pushbutton (p. 133).

AlarmsTag alarm parameters are detailed in the Alarms chapter (p. 203). This section details thecreation of box that will display alarm information on the screen. Most of the AlarmWindow screen object parameters are configured in the Alarm window Object Propertiesbox, but some of the properties are configured in the Alarm worksheet. You must have aproperly configured Alarm worksheet before any alarm information will be processedand displayed.Alarm button: Use this button to create a box (Alarm Window) that displays alarmmessages and information. Click-and-drag on the screen to form the rectangle that willdisplay the alarm information. When you release the pointer button, the rectangle will beformed. You can continue to create alarm window rectangles by repeating this processbut as soon as you click anywhere on the screen, the Selection button will be selected andyou will need to reselect the drawing button if you want to continue drawing.

During development, the Alarm Window will display the formatting of the outputincluding the type of data to be output and the number of characters. When using TestDisplay mode (p. 281), the formatting characters will disappear and during runtime orruntime emulation (p. 271), only relevant output will be displayed.To open the Object Properties window, double-click the alarm window, use the Alt-Enterkeys with it highlighted, or right-click it and select Properties from the popup menu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Display type radio buttons: These buttons determine whether the Alarm Window displaysreal-time alarms or alarm history information from a file. Only one can be picked for agiven Alarm Window. The default is On Line.

On Line radio button: When this radio button is selected, the current alarms aredisplayed in the Alarm Window.

Page 113: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

113

History radio button: When this radio button is selected, a history of the alarms isdisplayed in the Alarm Window. To store alarm history to a file, you first need toconfigure an Alarm worksheet and at a minimum check the Disk check box (p. 206).

Border color box: This box is used to set the color of the Alarm Window border line. Thedefault color is black. To change the color, select the Border box to open a 16-color ColorSelection window (p. 157). Select a color and then the OK button or double-click a color.Win color box: This box is used to set the fill color of the Alarm Window. The defaultcolor is light gray. To change the color, select the Win box to open a 16-color ColorSelection window (p. 157). Select a color and select the OK button or double-click acolor.PgUp text box: Optional parameter. A tag name is entered in this field. When the tagvalue changes, the Alarm Window list will scroll up by one full window.PgDown text box: Optional parameter. A tag name is entered in this field. When the tagvalue changes, the Alarm Window list will scroll down by one full window.Message Format group box: The fields in this group box define the contents and the fontparameters of the alarm messages. The alarm message can include the date, time, tagname, message, and status information.

Font… button: This button is used to open the Fonts window (p. 138) where you canset font parameters for the text.DD, MM, YY check boxes: When these boxes are checked, the corresponded parts ofthe date of the alarm are displayed. DD is day; MM is month, and YY year. Theseboxes are checked by default.HH, MM, SS, MSS check boxes: When these boxes are checked, the correspondingparts of the time of the alarm are displayed. HH is hour, MM is minute, SS is second,and MSS is millisecond. These boxes, except for MSS are checked by default.* check box: When this box is checked, an asterisk (*) is displayed between the alarmtime and the tag name on an unacknowledged alarm. When the alarm isacknowledged, this asterisk disappears. This box is checked by default.Tag text box: The positive integer in this text box indicates how many characters ofthe alarm tag name will be displayed. The default is 12. The text box will acceptvalues up to 999, but tag names are limited to 32 characters.Message text box: The positive integer in this text box indicates how many charactersof the alarm message will be displayed. The default is 10. The text box will acceptvalues up to 4000, but alarm messages are limited to 255 characters.Ack check box: When this box is checked, the time that the alarm was acknowledgedis also displayed using the same time format as the alarm time. This box is notchecked by default.End check box: When this box is checked, the time that the alarm tag returned to itsnormal state is also displayed using the same time format as the alarm time. This boxis not checked by default.

Page 114: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

114

Selection… button: Opens an Alarm Filters window:

Alarm Filters WindowThis window is used to filter the alarms that are shown in the Alarm object. It has twodifferent configurations, one for On Line alarms and one for History alarms.

Note: If an Alarm object in a running application is not showing the correct alarms, thesettings in the Alarm Filters window may need to be changed.

On Line Alarm Filters window:

History Alarm Filters window:

Group text box: This filtering field specifies whether the alarms from a specific Alarmworksheet are displayed in the Alarm Window. The integer in this field is matched to theinteger in the Group Number field of the Tag Properties window Alarms tab and theworksheet number of a saved Alarm worksheet. If the integer in this field is zero, alarmsfrom all Alarm worksheets will be displayed in the Alarm object. The default is zero.

Note: The value of the Group field of the Alarm Filters window must match the integervalue of the Alarm worksheet number, not the value of the Group Name field of the Alarmworksheet.

Selection text box: This filtering field specifies which alarms will be displayed. TheSelection string may be no more than seven characters. Any alarms with matching strings

Page 115: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

115

in the Selection fields of the Tag Properties window Alarms tab and the Alarm worksheetwill be displayed. A tag may be put into this field using the syntax {tag name}.Priority range group box: This filtering field specifies which alarms are displayed basedon alarm priority. The two text boxes form a range of alarm priorities. Legitimate valuesfor either of these text boxes are 0 to 255. Any alarms with Priority values (in the TagProperties window Alarms tab or Alarm worksheet Priority fields) within the range enteredin the text boxes will be displayed. For example, if you have alarm with Priority values inthe range of 1 to 5 and you configure a Priority range from 0 to 4, then only alarms withpriorities 0 to 4 will be displayed, not alarms with priority 5. The default range is 0 in theleft box and 255 in the right box.Sort group box: The radio buttons in this group box determine whether the alarms in theAlarm Window will be sorted by Time (the time the alarm was received) or Priority(assigned in the Tag Properties window Alarms tab or Alarm worksheet Priority fields).The default is Time.Month text box: Optional field. Type a month number (1 to 12) in this field to show onlyalarms that were generated during that month. If you don't want to filter alarms by month,then leave this field empty. This field can have a number tag typed into it. The defaultvalue is 0. A value of zero in this field or in the tag in this field will cause the alarms forall months to be shown.Year text box: Optional field. Type a four-digit year number in this field to show onlyalarms that were generated during that year. If you don't want to filter alarms by year,then leave this field empty. This field can have a number tag typed into it. The defaultvalue is 2000. A value of zero in this field or in the tag in this field will cause the alarmsfor all years to be shown.Month days text boxes: Optional fields. Type day numbers in this field to show onlyalarms that were generated during this range of days in the given Year and Month. If youdon't want to filter alarms by days in the month, then leave this field empty. This fieldcan have a tag typed into it. The default values are 1 to 31. A value of zero in these fieldsor in the tags in these fields will cause the alarms for all days to be shown.

Note: If one of these Month days fields (or tags) has a nonzero value, but the otherdoesn't, then no alarms will be shown.

Print tag text box: Optional field. When the value of the tag in this field changes, allalarms specified in the Group, Selection, and Priority range fields are printed. This field isnot available for Windows CE applications.Ack tag text box: Optional field. When the value of the tag in this field changes, either thelast active alarm (Sort group box Time radio button selected) or the highest priority activealarm (Sort group box Priority radio button selected) specified in the Group, Selection,and Priority range fields is acknowledged.Ack All tag text box: Optional field. When the value of the tag in this field changes, allalarms specified in the Group, Selection, and Priority range fields are acknowledged.

Page 116: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

116

View % text box: Optional field. When there are more alarms than can be shown at oncein the Alarm Window, the alarm list can be scrolled through using the PgUp and PgDownfields in the Object Properties window. Each screen of alarm can be considered a page ofalarms. A real tag in the View % field is assigned a value corresponding to the page ofalarms that is currently shown. The value is expressed as a real percentage, with0.000000 as the first page at the top of the list, 100.000000 as the last page at thebottom of the list, and the values in between varying based on the number of pages. Thisis an output field; manual changes to the View % tag will not change anything in theAlarm Window. Example: If there are 100 alarms but only 20 can be shown, there will befive pages. The View % tag will be assigned the value 0.000000 if the first page isshown, 20.000000 if the second page is shown, 40.00000 if the third page is shown,80.00000 if the fourth page is shown, and 100.000000 if the last page is shown.

Page 117: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

117

Trend GraphTag history files can be created and configured following the instructions given in theLogging Trend Data chapter (p. 215). Trend objects on the screen can be used to showreal time tag value information or to show historical tag information from a file. Theexample Trend object shown below displays the values of three tags as the values changeover time.

Trend objects can display up to eight different curves, each curve tracking a different tagvalue. Each Trend object is also limited to 16,000 displayed data points, after which itwill stop displaying new data. This limitation should be considered when creating the sizeand the range of the Trend object.Trend button: Use this button to create a box (Trend object) that will display tag valueinformation. Click-and-drag on the screen to form the rectangle. When you release thepointer button, the rectangle will be formed. You can continue to create Trend objectrectangles by repeating this process but as soon as you click anywhere on the screen, theSelection button will be selected and you will need to reselect the drawing button if youwant to continue drawing.To open the Object Properties window, double-click the alarm window, use the Alt-Enterkeys with it highlighted, or right-click it and select Properties from the popup menu.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Display type radio buttons: These buttons determine whether the Trend object displaysreal-time trend data or historical trend data from a file. Only one can be picked for agiven Trend object. The default is On Line.

On Line radio button: When this radio button is selected, the real-time trend data isdisplayed in the Trend object. Online trends should be used for current data.History radio button: When this radio button is selected, historical trend data isdisplayed in the Trend object. To store tag history to a file, you first need toconfigure a Trend worksheet (p. 215). Historical trends should be used for noncurrentdata and data from files.

Page 118: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

118

Note: History Trend objects are supported in OpenHMI PE applications, but not inOpenHMI SE applications.

Trigger text box: When the value of the tag in this field changes, the trend curves areredrawn. This field is required for On Line Trend objects; it is inactive for History Trendobjects. The default tag in this field is the internal tag second, which means that the trendchart values are updated every second. To change the tag, you can either type a tag namein the text box or use the browse button (see margin) to the right of the text box to openthe Object Finder window (p. 69).Update text box: This field is used only in with Crisp curves. Since Crisp curves are notsupported in Windows CE applications, the field is inactive in them as well.Curve type drop-down list: Defines the type of the curve used in the Trend object. Thedefault is X/t.

X/t: This curve plots the tag values versus time. On Line and History options are bothactive when this option is selected, but the Update field is inactive. The time valuesare configured in the Horizontal Scale window (p. 119) and the dependent (X)variables are defined in the Pens window (p. 124).X-Y: This curve plots tag values (dependent tags) versus another tag value (theindependent tag), which takes the place of time in an X/t curve. On Line and Historyoptions and the Update field are inactive when this option is selected, but History isautomatically chosen (because the tag information does not change with time). Thistype of trend chart is also known as a scatter plot. The independent (X) variable isdefined in the Horizontal X/Y Scale window (p. 119) and the dependent (Y) variablesare defined in the Pens window (p. 124).

Border Color box: This box is used to define the color (default black) of the Trend objectborder line. To change the color, select the Color box to open a 16-color Color Selectionwindow (p. 157). Select a color, then the OK button or double-click a color.Background color box: This box is used to define the fill color (default white) of theTrend object. To change the color, select the Color box to open a 16-color Color Selectionwindow (p. 157). Select a color, then the OK button or double-click a color.Horizontal Scale button: Selecting this button opens the Horizontal Scale or HorizontalX/Y Scale window (p. 119), where the horizontal axis properties of the Trend object aredefined.Vertical Scale button: Selecting this button opens the Vertical Scale window (p. 123),where vertical axis properties of the Trend object are defined.Pens button: Selecting this button opens the Pens window (p. 124), where the curve tagsand properties are defined.

Page 119: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

119

Horizontal Scale and Horizontal X/Y Scale WindowThis window is used to set the parameters of the independent axis (horizontal axis) of theTrend object. The Curve type and the display type determine which fields are available.X/t curve and On Line display type (default settings):

X/t curve and History display type:

X-Y curve:

Page 120: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

120

Note: Because History Trend objects are supported in OpenHMI PE applications, but notin OpenHMI SE applications, any fields that are only in the X/t curve and History displaytype Horizontal Scale window will not be available in OpenHMI SE applications.

Scale Visible check box: When this box is checked, the labels created in the Number ofLabels field are visible. The default is checked.Number of Labels text box: This field specifies the number of labels on the horizontalaxis. The value must be an integer with a value between 0 and 100.

Note: In an X/t curve Trend object, after the application has run for the period of timegiven in the Horizontal axis Duration field, the rightmost label will have the currentsystem time and the leftmost label will have the value of the current system time minusthe Horizontal axis Duration value. The division amounts will be this difference divided bythe Number of Labels value.

In an X-Y curve Trend object, the rightmost label will have the Min field value, theleftmost label will have the Max field value, and the amount of each division will bedifference (the Max value minus the Min value) divided by the Number of Labels value.

Grid group box:Divisions text box: This field specifies the number of horizontal divisions (which areused to place vertical gridlines) in a grid covering the area of the Trend object. Gridsmay contain horizontal divisions (vertical lines), vertical divisions (horizontal lines),or both. This field may contain a tag.

Note: In order to have the horizontal axis labels line up with the vertical grid lines,specify two fewer divisions. This is because a label is assigned to the right and leftedges of the Trend object.

Note: If there are a large number of divisions relative to the horizontal size of theTrend object, the last division may be a different size than the rest because screenpixels cannot be divided. In order to evenly space divisions, subtract two pixels (forthe left and right borders) from the object width (read from the status bar, p. 31) anddivide by the number of divisions. If the quotient is an integer you will have evendivisions; if not you can resize the object or redefine the number of divisions.

Color box: This box defines the color of the gridlines. To change the color, select theColor box to open a 16-color Color Selection window (p. 157). Select a color, thenthe OK button or double-click a color. If the color in this box is the same as the colorin the Trend object Object Properties window Background color box, the gridlineswill not be visible.

Scale String Format group box: These fields are used to format the horizontal axis labels.Fonts… button: This button is used to open a Fonts window (p. 138) where you canset font parameters for the text.DD, MM, YY check boxes: X/t curve field only. When these boxes are checked, thecorresponded parts of the date are displayed in the horizontal axis labels. DD is day;MM is month, and YY is year (last two digits). These boxes are not checked by default.HH, MM, SS check boxes: X/t curve field only. When these boxes are checked, thecorresponding parts of the time are displayed in the horizontal axis labels. HH is hour,MM is minute, and SS is second. These boxes are checked by default.

Page 121: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

121

Note: These labels will run together and be unreadable if there are too many of thesecheck boxes checked or if too many labels are set in the Number of Labels field.

Width text box: X-Y curve field only. This field is used to define the number ofcharacters (5 default) before the decimal place in the labels.Decimals text box: X-Y curve field only. This field is used to define the number ofdecimal places (0 default) after the decimal place in the labels.

Vertical Cursor group box: This box contains fields that affect the appearance andproperties of a vertical cursor in the Trend object. The vertical cursor appears as a verticalline in the Trend object. It can be moved back-and-forth by a tag value or it can be movedby clicking-and-dragging. The coordinates of the point on a plot that the cursor intersectscan be read into other tags. The tag that reads the horizontal (independent) component isconfigured in this group box. The tag that reads the vertical (dependent) component isconfigured in the Pens window (p. 124).

Enable check box: When this box is checked, the vertical cursor is enabled. Thedefault is not checked.Color box: This box is used to specify the color of the vertical cursor. To change thecolor, select the Color box to open a 16-color Color Selection window (p. 157). Selecta color, then the OK button or double-click a color.Position (0-100) text box: The real tag in this field is used to move the cursorhorizontally in the Trend object. When the value of the tag is 0.000000, the cursoris positioned at the left edge of the Trend object. When the value of the tag is100.000000, the cursor is positioned at the right edge of the Trend object. Anyvalue in between positions the cursor at the corresponding percentage of the distancebetween the left and right edges.

Note: When this tag is used to move the cursor, it can be associated with an objectsuch as button that has the Position dynamic property (p. 146) added and Slider fieldchecked. This creates a position slider that moves the cursor.

Date/Time output text box: X/t curve field only. The tag named in this field willreceive the horizontal (time) position of the vertical cursor.X's Value output text box: X-Y curve field only. The tag named in this field willreceive the horizontal (Tag X value) position of the vertical cursor.

Horizontal Axis Duration text box: X/t curve and On Line display type only field. The realnumber value or tag in this field specifies the time range of the horizontal axis. Thenumber's units are hours. The default value is 0.1. Example: If the value is 0.03333, thetime range shown on the horizontal axis is roughly two minutes. This field may include atag.Duration (hours) text box: X/t curve and History display type only field. The real numbervalue or tag in this field specifies the time range of the horizontal axis. The number'sunits are hours. The default value is 0.1. Example: If the value is 0.03333, the timerange shown on the horizontal axis is roughly two minutes. This field may include a tag.Hours Before Now text box: X/t curve and On Line display type only field. If there is anumber value or tag in this field, the displayed data is from a time period equal to thatnumber of hours earlier than the current system time. Fractional hours may be used. Thedefault is having no value in this field.

Page 122: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

122

Note: When using the Hours Before Now field, you are using historical data, so youmust configure a Trend worksheet and read the data from a file using the worksheet.

Types of History Files group box: X/t curve and History display type only fields. Definesthe history file type. The choices are Date (Default) (the default) or Batch.

Date (Default) radio button: When selected, history files configured in a Trendworksheet (p. 215) and based on date are used. This option is more useful with acontinuous process. In this case, the file is stored in the application \hst folder andnamed \hst\ggyyyymmdd.hst (gg is the historical group number in hexadecimalformat and yyyymmdd refers to the year, month, and day the file was created).Batch radio button: When selected, Batch history files configured in a Trendworksheet (p. 215) are used. This option is more useful if you have a batch process.The file is found in the application \hst folder and has a .hst extension. When thisradio button is checked, the StartDate and StartTime fields will change:

Hours Before text box: X/t curve and History display type only field with the Batchradio button selected. If there is a number value or tag in this field, the displayed datais from a time period equal to that number of hours earlier than the current systemtime. Fractional hours may be used. The default is having no value in this field.History File text box: X/t curve and History display type only field with the Batch radiobutton selected. Enter the name of a Batch file that has been configured in a Trendworksheet. You may use a tag for part or all of the file name using the syntax:{tag name} or {tag name}.hst. Do not use a file extension in the tag name if youexplicitly type out the extension outside of the curly brackets.

StartDate text box: X/t curve and History display type only field with the Date (Default)radio button selected. The string or string tag in this field specifies the start date of thedata displayed in the History display Trend object. The date format of the string must beMM/DD/YYYY.StartTime text box: X/t curve and History display type only field with the Date (Default)radio button selected. The string or string tag in this field specifies the start time of thedata displayed in the History display Trend object. The time format of the string must beHH:MM:SS.Tag X text box: X-Y curve field only. The values of the array tag specified in this field areplotted along the horizontal axis of the Trend object. The starting position of this tag mustbe declared in this field using the syntax: <array tag>[<n>].Points text box: X-Y curve field only. This text box contains an integer value or tagcontaining the number of the last array tag position used in the X-Y plot. Example: If theTag X field contains the tag TagX[1] and the Points field contains the value 10, elements 1through 10 of the array tag TagX[n] will be used.Min text box: X-Y curve field only. The number or number tag in this box specifies theleftmost value of the Trend object horizontal axis. If there are labels, the leftmost labelwill display this value. This field may include a tag.

Page 123: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

123

Max text box: X-Y curve field only. The number or number tag in this box specifies therightmost value of the Trend object horizontal axis. If there are labels, the rightmost labelwill display this value. This field may include a tag.

Note: Traditionally, the range of the horizontal axis goes from the lowest (minimum)value on the left to the highest (maximum) value on the right. This is why the leftmostvalue goes in the Min field and rightmost value goes in the Max field. You may reverse theorder of values so that the maximum value is to the left and the minimum value is to theright. If you do this, you should probably make sure that the horizontal axis labels aredisplayed because most people will assume that the traditional method is used.

Vertical Scale WindowThis window is used to set the parameters of the dependent axis (vertical axis) of theTrend object. It is the same for every type of curve and display.

Scale Visible check box: When this box is checked, the labels created in the Number ofLabels field are visible. The default is checked.Number of Labels text box: This field specifies the number of labels on the vertical axis.The value must be an integer with a value between 0 and 100.

Note: The bottom label will have the Min field value, the top label will have the Max fieldvalue, and the amount of each division will be difference (the Max value minus the Minvalue) divided by the Number of Labels value.

Grid group box:Divisions text box: This field specifies the number of vertical divisions (which areused to place horizontal gridlines) in a grid covering the area of the Trend object.Grids may contain horizontal divisions (vertical lines), vertical divisions (horizontallines), or both. This field may include a tag.

Note: In order to have the vertical axis labels line up with the horizontal grid lines,specify two fewer divisions than labels. This is because a label is assigned to theupper and lower edges of the Trend object.

Page 124: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

124

Note: If there are a large number of divisions relative to the vertical size of theTrend object, the division may not be uniform because screen pixels cannot bedivided. In order to evenly space divisions, subtract two pixels (for the upper andlower borders) from the object height (read from the status bar, p. 31) and divide bythe number of divisions. If the quotient is an integer you will have even divisions; ifnot you can resize the object or redefine the number of divisions.Color box: This box defines the color of the gridlines. To change the color, select theColor box to open a 16-color Color Selection window (p. 157). Select a color, thenthe OK button or double-click a color. If the color in this box is the same as the colorin the Trend object Object Properties window Background color box, the gridlineswill not be visible.

Scale String Format group box: These fields are used to format the vertical axis labels.Fonts… button: This button is used to open a Fonts window (p. 138) where you canset font parameters for the text.Width text box: This field is used to define the number of characters (5 default) beforethe decimal place in the labels.Decimals text box: This field is used to define the number of decimal places (0default) after the decimal place in the labels.

Scale Range group box:Min text box: The number or number tag in this box specifies the minimum valuedisplayed on the Trend object vertical axis. If there are labels the lowest label willdisplay this value. This field may include a tag.Max text box: The number or number tag in this box specifies the maximum valuedisplayed on the Trend object vertical axis. If there are labels the highest label willdisplay this value. This field may include a tag.

Pens WindowThis window is used to configure the tags whose values will be plotted and thecharacteristics of the plotting lines. It is the same for every type of curve and display.

Tag text box: Enter the name of the tag that will have its value plotted in the Trend object.A total of eight different tags can be plotted at one time. If the Trend object is displayingan X-Y curve, this tag must be an array tag whose elements match up with those of thearray tag in the Tag X field of the Horizontal X/Y Scale window.

Page 125: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

125

Note: To make a generic Trend object or a Trend object where you can reconfigure thetags to be plotted during runtime, you can use an indirect tag (p. 61) in the Tag field.

Line box: Selecting one of these boxes opens a Line Selection window, where you canconfigure the plot line characteristics.

To change the line color, select a color, then the OK button or double-click a color.Line group box: The only available choice for line type is Solid Line, but the lineweight can be changed.

Weight text box: The positive integer number (range 1 to 50) in this field is theweight (thickness) of the line in pixels. The default is 1.

Min text box: This field can hold the minimum value of the tag that will be displayed.This field may include a tag.Max text box: This field can hold the maximum value of the tag that will be displayed.This field may include a tag.

Note: The Min and Max values of each tag do not need to be the same as the Min and Maxvalues of the vertical axis that are configured in the Vertical Scale window (p. 123).

Cursor value text box: If the vertical cursor is enabled in the Horizontal Scale orHorizontal X/Y Scale window (p. 119), a tag named in this field will receive the(vertical) value of the tag plot line at the point that the vertical cursor intersects it.

Page 126: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

126

List Box ObjectsA list box object is a list of messages. If the list is longer than the size of the object, theobject can contain scroll bars. The operator is able to select a message in the list. Whenthis message is selected a value can be written to a tag.During application execution, an active list object will display several messages with oneof them highlighted. If there is only one list box object and no text input boxes, the listbox object will be active. If there are multiple list box objects and text input boxes, use apointing device (mouse, touchscreen) to activate one or use the Tab key until the list boxis selected and active. Once a list box object is activated, a message in it can be selectedwhich will cause the message value to be written to the write tag.Selection of a message in the active list box object can be configured in two differentways, depending on whether the Object Properties window Enter Reqd field is checked. Ifthe Enter Reqd field is checked, then you can scroll to the message you want to selectusing keyboard/keypad keys, list controls objects from the Library, pointing devices, oruser defined keys that use the PostKeys() function (p. 184). When you find the messageyou want to select, use the Enter key to select it and to write its value to the write tag. TheEsc and Tab keys will return you to the previously selected message at any time prior tousing the Enter key. If the Enter Reqd field is not checked, then whenever a message ishighlighted, it is also selected and its value is written to the write tag.To add a list box object to a screen, select the List Box button on the object editingconfiguration of the Tools toolbar, then position the mouse on the screen and click anddrag to create an expanding rectangle. The height of the rectangle determines the numberof messages that will be shown at a time and the width will determine the length of eachmessage that can be shown. The rectangle can be resized normally after creation and thefont characteristics can be changed to allow more and longer messages to be shown in agiven space. A screen can contain more than one list box object.

Double-click the object, use the Alt-Enter keys with the object highlighted, or right-clickthe object and select Properties to open the Object Properties window.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Value drop-down list: This list below the Replace… button allows you to choose the tagvalues that are used to index the message list. The choices are Boolean, Integer (default),and LSB (least significant bit). See the Messages Configuration window State field formore information.

Page 127: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

127

User Enable text box: This field can be filled with a tag, expression, or a number. If thisvalue is nonzero, an operator can select a message in the runtime application. The defaultis 1 (true, enabled).Control Enable text box: This field can be filled with a tag, expression, or a number. Ifthis value is nonzero, the message selected will depend on the current value of theread/search tag. This is based on the Value associated with the selected message in theMessages Configuration window. The default is 1 (true, enabled). Enabling this field willallow process tag changes to affect which window is displayed.Read/Search Tag text box: This field contains the integer or Boolean tag that points to theselected message based on the message Value field in the Messages Configurationwindow. This tag can be altered by the operator or the process depending on the ControlEnable and User Enable field values.Write Tag text box: Optional field. This field contains a string tag that receives theMessage value of the last selected message. When the screen containing the list boxobject is closed and reopened, the write tag value will determine which message isdisplayed in the list box.Row check box: When this box is checked, the list box object scroll bar will include theset up ( ) and set down ( ) arrows.Page check box: When this box is checked, the list box object scroll bar will include thepage up ( ) and page down ( ) arrows.Start/End check box: When this box is checked, the list box object scroll bar will includethe home ( ) and end ( ) arrows.

List wrap check box: When this box is checked, when you have scrolled to the beginningor end of the list, the list will continue to be displayed starting at the opposite end.Enter Reqd check box: When this box is checked, only an Enter key will select a message.The Tab key will not select a message.Color Boxes: These color boxes control the appearance of the list box object. To changea color, select the color box. This opens the 48-color Color window (p. 157), or the 16-color Color Selection window (p. 157) for the Border Color box. Select a color and selectthe OK button or double-click the color.

Highlight Color box: This is the color (blue default) used to highlight the message.Text Color box: This is the color (black default) used for the highlighted message text.Win Color box: This is the color (white default) used for the box background.Border Color box: This is the color (black default) used for the box border.

Fonts button: This button opens a Font window (p. 138). Use this window to change thecharacteristics of the message font.

Page 128: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

128

Messages button: This button opens the Messages Configuration window.

State field: This is a read-only field that indexes the individual messages. The State fieldis numbered based on the choice of read/search tag type:

Boolean: There are two valid states, 0 and 1.Integer: There are 255 valid states, labeled 1 to 255.LSB: There are 32 valid states (32 bits in an integer value) labeled 0 to 31.

Message field: This field contains the string value message that is displayed in the listbox object. Tags can be used in messages using the syntax {tag name}.Value field: This field contains that message value that is matched by the value of theread/search tag. This is also the value that is written to the write tag. If the choice in theObject Properties Value field is LSB, this field is not used and the State value is used forboth the read/search tag and the write tag.Text Foreground color box field: Selecting one of these color boxes opens the 16-colorColor window. To change the color, select a color and select OK or double-click a color.Text Blink check box field: When this box is checked, this message will blink once persecond when it is displayed.

Page 129: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

129

Smart Message ObjectsSmart Message objects are used display messages and graphics. There are three types ofsmart message objects that vary in ability to display messages and graphics, the ability towrite to a tag, and the maximum number of messages and graphics that can be shown.The types are Message Display, Multistate Indicator, and Multistate Pushbutton.Any of the smart message objects can receive operator or process input that determineswhich message to display. A Message Display smart message object can display any oneof multiple messages within a single screen object. A Multistate Indicator does the samething, but it has the capability to use bitmap images with the messages. A MultistatePushbutton displays messages and bitmap images and it allows the operator to switchmessages by toggling it. In this way, it resembles a multiposition switch.During application execution, the smart message will show the selected message andoptional graphic (depending on configuration).To add a Smart Message object to a screen select the Smart Message button, then positionthe mouse on the screen and click and drag to create an expanding rectangle. The size ofthe rectangle determines how much text and how large a bitmap image can be displayed.The rectangle can be resized normally after creation and the font characteristics can bechanged to allow longer messages to be shown in a given space. A screen can containmore than one smart message object.

Double-click the object, use the Alt-Enter keys with the object highlighted, or right-clickthe object and select Properties to open the Object Properties window.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Type drop-down list: This list allows you to choose the smart message objectconfiguration. The choices are Message Display (default), Multistate Indicator, and MultistatePushbutton. See the Configuration window for more information. This field and the Valuefield determine the maximum number of messages available. When Multistate Pushbuttonis chosen, the gray inactive fields in the Object Properties window become active:

Page 130: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

130

Value drop-down list: This list allows you to choose the tag values that are used to indexthe message list. The choices are Boolean, Integer (default), and LSB (least significant bit).See the Configuration window State field for more information. This field and the Typefield determine the maximum number of messages available.Read Tag text box: This field contains the integer or Boolean tag that points to themessage to be displayed based on the message in the Configuration window State field.Write Tag text box: Optional field for use with the Multistate Pushbutton. This field containsa string tag that receives the Value of the last selected message. When the screen is closedand then opened the value in the write tag is used to determine which message isdisplayed.Event drop-down list: If the smart message is configured as a Multistate Pushbutton, thisfield determines how the messages are displayed, when the pushbutton is pushed (OnDown, default), while the pushbutton is held down (While Down), or when the pushbuttonis released (On Up). When the While Down option is selected, the messages will be scrolledthrough in the order they appear in the Configuration window. The messages will beswitched as fast as they can be by the computer.Security text box: This field accepts an integer value in the range of 0 to 255 that sets thesecurity level necessary to toggle the Multistate Pushbutton. See Security System(p. 241) for more information. A value of zero or no value in this field means that thepushbutton is always enabled.No line check box: If checked, no line will appear to define the smart message objectrectangle.Key box: The fields in this box configure a keyboard key or combination of keys whichwill switch the to the next message in the order established in the Configuration window.This only works for the Multistate Pushbutton.

Key drop-down list: A key can be typed in the text box or a nonalphanumeric key canbe chosen from the drop-list. Only a single character or key can be entered here.Numbers are not valid entries in this field.Shift, Ctrl, and Alt check boxes: Checking any of these boxes adds the named key tothe combination of keys. These check boxes are the only way to have a combinationof keys.Function keys on the OpenHMI runtime workstations do not use the F11-F20 choicesin the drop-down list. Instead they use key combinations as shown on this table:

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

F11 Shift + F1 PF1 Ctrl + F1 PF7 Alt + F1F12 Shift + F2 PF2 Ctrl + F2 PF8 Alt + F2F13 Shift + F3 PF3 Ctrl + F3 PF6 Alt + F3F14 Shift + F4 PF4 Ctrl + F4 PF10 Alt + F4F15 Shift + F5 PF5 Ctrl + F5 PF11 Alt + F5F16 Shift + F6 PF6 Ctrl + F6 PF12 Alt + F6F17 Shift + F7F18 Shift + F8F19 Shift + F9F20 Shift + F10

Page 131: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

131

Fonts button: This button opens a Font window (p. 138). Use this window to change thecharacteristics of the message font.Configuration button: This button opens the Configuration window:

Smart Message Configuration WindowEach type of smart message object, Message Display, Multistate Indicator, and MultistatePushbutton, has different fields in the Configuration window. The Multistate PushbuttonConfiguration window contains all the fields. The Multistate Indicator Configurationwindow does not contain the Value field. The Message Display Configuration windowdoes not contain the Value, Graphic File, Transparent fields. The fields are:State field: This is a read-only field that indexes the individual messages. The Error staterow contains the message that will be displayed if the read/search tag contains an invalidvalue (Boolean or Integer Value option) or has no set bits (LSB Value option). There isno Error State for Multistate Pushbutton smart messages. The State field is numberedbased on the choice of Value and Type fields in the Object Properties window:

Boolean: There are two valid states, 0 and 1, for any type of smart message.Integer: There are 500 valid states, labeled 0 to 499, for Message Display andMultistate Indicator smart messages. There are 16 states, labeled 0 to 15, forMultistate Pushbutton smart messages.LSB: There are 32 valid states (32 bits in an integer value), labeled 0 to 31, forMessage Display and Multistate Indicator smart messages. There are 16 states,labeled 0 to 15, for Multistate Pushbutton smart messages.

Message field: This field contains the string value message that is displayed in the smartmessage object. Tags can be used in messages using the syntax {tag name}.Value field: This field contains that message value that is matched by the value of theread/search tag. This is also the value that is written to the write tag. If the choice in theObject Properties Value field is LSB, this field is not used and the State value is used forboth the read/search tag and the write tag.Text (FG) color box field: This field controls the text foreground color for this message.Selecting the color box opens a 16-color Color window. To change colors, select a colorand select OK or double-click a color.Text (BG) color box field: This field controls the text background color for this message.Selecting the color box opens a 16-color Color window. To change colors, select a colorand select OK or double-click a color.Text Blink check box field: When this box is checked, the message will blink whendisplayed.Rec (FG) color box field: This field controls the text foreground color for the rectanglewhen this message is displayed. Selecting the color box opens a 16-color Color window.To change colors, select a color and select OK or double-click a color.Rec (BG) color box field: This field controls the text foreground color for the rectanglewhen this message is displayed. Selecting the color box opens a 16-color Color window.To change colors, select a color and select OK or double-click a color.Rec Blink check box field: When this box is checked, the rectangle will blink when themessage is displayed.Graphic File field: Enter the name of a bitmap (.bmp) file here. The file must be in the\application\symbol folder for Windows CE applications. For Windows NT

Page 132: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

132

applications, this field can include a path so the file can be in another location. Thedefault file location is still the \application\symbol folder.Transparent color box field: The color in this color box is the color that will betransparent in the displayed bitmap. Selecting the color box opens a 16-color Colorwindow. To change colors, select a color and select OK or double-click a color.Message Display Smart Message Configuration Window

Multistate Indicator Smart Message Configuration Window

Multistate Pushbutton Smart Message Configuration Window

Page 133: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

133

Preconfigured PushbuttonsPushbuttons can be created using the Command dynamic object property with an objector preconfigured pushbuttons can be used. These preconfigured pushbuttons have threeconfigurations (types): Momentary, Maintained, and Latched. All three types mimic thestandard panel buttons of the same name. There are also four styles of Pushbutton: all arerectangular with or without a faceplate and indicator light and with a 3-D or a floatingappearance. The default type is Momentary and the default style is Rectangle withoutfaceplate and indicator and a Floating appearance.To add a preconfigured Pushbutton to a screen, select the Pushbutton button, thenposition the mouse on the screen and click and drag to create an expanding rectangularbutton. The size of the button determines how much text can be displayed and how mucharea is available to be touched on a touchscreen. The Pushbutton can be resized normallyafter creation and the font characteristics can be changed to allow longer messages to beshown in a given space. A screen can contain more than one Pushbutton.

Double-click the object, use the Alt-Enter keys with the object highlighted, or right-clickthe object and select Properties to open the Object Properties window.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Type drop-down list: This list allows you to choose the smart message objectconfiguration. The choices are Momentary (default), Maintained, and Latched:

Momentary: This Pushbutton changes state (Open or Closed) while pressed andchanges back to the initial state while released. This type of Pushbutton is only usedin a single screen.Maintained: This Pushbutton changes state (Open or Closed) when pressed and doesnot change back when released. It must be pressed to change its state again. This typeof Pushbutton maintains its state across screen changes.Latched: This Pushbutton changes state (Open or Closed) when pressed and it kept inthis state until it is released by a change in the Reset tag.

State drop-down list: This list allows you to choose the default state of the Pushbutton.The choices are Normally Open (default) and Normally Closed. When the button is pressed,it changes to the nondefault state and changes back according to the nature of its Type. Inits initial state, it conforms to the characteristics in the group box of the same name (Openor Closed) in Configuration window (see below). When toggled, it conforms to thecharacteristics in the other group box (Open or Closed).

Page 134: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

134

Tag/Exp text box: The tag in this field will receive the value in the Write Value from theappropriate state (Open or Closed) group box in the Configuration window. If there is anexpression in this field, it will be executed when the button is toggled.Indicator text box: If the Pushbutton style includes an indicator (configured in the Styledrop-down list in the Configuration window), the indicator will change color to the colorspecified in the toggled (Closed for Normally Open or vice versa) group box when a tag inthis field has a nonzero value. When the tag in the Indicator field has a value of 0, theindicator will have the color configured in the untoggled (Open for Normally Open or viceversa) group box.If there is no tag in this field and the Pushbutton style includes an indicator, the indicatorwill change color when the button is pressed. If the button style doesn't include anindicator, the button color will be changed as if it is an indicator.Reset text box: This field is active only for the Latched type of Pushbutton. When the tagin this field has a value of 0, the button stays in a latched state. When the tag has anonzero value, a latched button will become unlatched.Key box: The fields in this box configure a keyboard key or combination of keys whichwill toggle the Pushbutton. This is used when there is no pointing device such as a mouseor a touchscreen or when it is better to have shortcut keys as well as buttons that can bepushed. Single keys can be selected from the drop-down list or key combinations can becreated with the check boxes and the drop-down list.

Key drop-down list: A key can be typed in the text box or a nonalphanumeric key canbe chosen from the drop-list. Only a single character or key can be entered here.Numbers are not valid entries in this field.Shift, Ctrl, and Alt check boxes: Checking any of these boxes adds the named key tothe combination of keys. These check boxes are the only way to have a combinationof keys.Function keys on the OpenHMI runtime workstations do not use the F11-F20 choicesin the drop-down list. Instead they use key combinations as shown on this table:

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

F11 Shift + F1 PF1 Ctrl + F1 PF7 Alt + F1F12 Shift + F2 PF2 Ctrl + F2 PF8 Alt + F2F13 Shift + F3 PF3 Ctrl + F3 PF6 Alt + F3F14 Shift + F4 PF4 Ctrl + F4 PF10 Alt + F4F15 Shift + F5 PF5 Ctrl + F5 PF11 Alt + F5F16 Shift + F6 PF6 Ctrl + F6 PF12 Alt + F6F17 Shift + F7F18 Shift + F8F19 Shift + F9F20 Shift + F10

Disable text box: When a tag in this field has a nonzero value, this Pushbutton is disabledand pushing it with not cause anything to happen. The default is an empty box, whichalso enables the command property.Ext Trans. check box: Enables the text to be translated automatically using preconfiguredtranslation worksheets. See Language Translation (p. 235).

Page 135: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

135

Security text box: The security level (see p. 241) of the command (a positive integer) isentered in this field. When the logged on user does not have this security level, thecommand is inactive. A value of 0 or a blank field activates the command property at alltimes and security levels.Config… button: This button opens the Configuration window where the style and stateparameters are configured:

Style drop-down list: Use this drop-down list to select the Pushbutton style. The choicesare Rectangle (default) and Rectangle with Indicator.Effect drop-down list: Use this drop-down list to select the Pushbutton 3-D effect. Thechoices are Floating (default) and 3D. Floating buttons resemble a flat object with ashadow; 3D buttons look like they have beveled edges and look like they are depressedinto the screen when pushed.The Style and Effect choices allow you to create four different button appearances, shownbelow. The top left Pushbutton is a Floating Rectangle (default appearance), the bottom leftone is a 3D Rectangle, the middle one is a Floating Rectangle with Indicator, and the one onthe right is a 3D Rectangle with Indicator.

Button Color color box: This field allows you to choose the default color of the buttonportion of the Pushbutton object when the button Style includes an indicator andfaceplate. When the color box is selected, the 48-color Color window (p. 157) opens. Tochange colors, select a color and select OK or double-click a color.Legend Plate Color color box: If the Pushbutton Style includes an indicator, thePushbutton object will include a legend plate that encloses the button and the indicatorlight. This field allows you to select the color of this legend plate. When the color box isselected, the 48-color Color window (p. 157) opens. To change colors, select a color andselect OK or double-click a color. This field is inactive if the Pushbutton Style doesn'tinclude an indicator.

Page 136: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

136

Open and Closed group boxes: The fields in these group boxes are used to configure theappearance of the Pushbutton object for each of its states (Open and Closed).

Color color box: When the Pushbutton Style includes an indicator, this field allowsyou to choose the color of the indicator for each State. When the Pushbutton styledoesn’t include an indicator, this field allows you to choose the color of the buttonfor each State. When the color box is selected, the 48-color Color window (p. 157)opens. To change colors, select a color and select OK or double-click a color.Blink drop down list: This field allows you to choose whether the color specified inthe Color field to the left blinks and how fast it blinks. Each of these drop-down listsspecify whether the color blinks and how quickly. The choices are None (noblinking—default), Slow, and Fast. If the color blinks it will alternate between thecolor specified in the Color box and either the Legend Plate Color (if an indicator) orthe Button Color (if a button).Caption text boxes: These three text boxes contain the text of the top, middle, andbottom lines (by position) that will appear on the button (if the Pushbutton Style doesnot include an indicator) or the legend plate (if the Pushbutton Style includes anindicator.)Fonts… button: This button opens a Font window (p. 138). Use this window tochange the characteristics of the message font.Text Blink drop-down list: Each of these drop-down lists specify whether the textblinks and how quickly. The choices are None (no blinking—default), Slow, and Fast.Unlike a blinking color, blinking text appears and disappears.Write Value text box: A value in either of these fields is written to the tag specified inthe Tag/Exp field in the Object Properties window whenever the Pushbutton is in theappropriate state (Open or Closed).

Page 137: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

137

Static Object PropertiesThis section covers the buttons that are used to configure static object properties that arenot configured directly in an Object Properties window. Static properties are objectproperties that do not change during application runtime. The buttons in this section areFill Color (p. 137), Line Color (p. 137), and Fonts (p. 138). These buttons open windows,but do not have associated Object Properties windows.

Fill ColorFill Color button: Use this button to change object fill color or set default object fill color.When this button is selected, the 48-color Color window (p. 157) opens. To changecolors, select a color and select OK or double-click a color. When an object with anenabled fill color property is selected, the new fill color is applied to that object. Unlikethe fill fields in the Object Properties window, the new fill color does not appear on thescreen until you perform another action. When no object is selected, the selected fill coloris made the default for any subsequently created objects that have a fill color property.The default color is light gray.

Line (and Border) Color and StyleLine Color button: Use this button to change object line color or set default object linecolor and style. When this button is selected, the Line Selection window (below) opens.When an object with enabled line color or type properties is selected, the new lineproperties are applied to that object. When no object is selected, the selected propertiesare made the defaults for any subsequently created objects that have line properties. Thedefault color is black.

To change the line color, select a color, then the OK button or double-click a color.Line group box: To change the line style, choose either of the Solid Line (default) orDashed Line radio buttons.

Weight text box: The positive integer number (range 1 to 50) in this field is the weight(thickness) of the line in pixels. The default is 1.

Page 138: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

138

FontsFonts button: Use this button to change object text (caption) properties or to set defaultobject text properties. When this button is selected, the Font window (below) opens.When an object with enabled text fields is selected, the new text properties are applied tothat object. When no object is selected, the selected properties are made the defaults forany subsequently created objects that have text fields.

Font combo box: Scroll through this list and highlight the desired font.Font style combo box: Highlight the desired font style from this list.Size combo box: Highlight the desired font size from this list.Effects group box:

Strikeout check box: When this box is checked, the font will appear with a strikeoutline through it, like this: strikeout.Underline check box: When this box is checked, the font will appear with anunderline.Color drop-down list: Scroll through this list and highlight the desired font color.These are the color choices as in the 16-color Color Selection window (p. 157).

Sample field: This field displays a preview of how the text will look with the currentlyselected options.Script drop-down list: Scroll through this list and highlight one of the standard Windowskeyboard script selections. The choices are Western (default), Greek, Turkish, Baltic, CentralEuropean, and Cyrillic.

Page 139: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

139

Dynamic Object PropertiesDynamic properties are properties which can change or create display changes duringapplication runtime or runtime emulation (p. 271). The active objects already havedynamic properties. These dynamic object property buttons can be used to add dynamicproperties to any object that can use them. To determine if an object can use a dynamicproperty, select it and check the dynamic property button. If the button is active, then thatproperty can be added to the object.To add the property to the object, select the object property while the object is selected.The Object Properties window can be open or closed when you add the property. If theObject Properties window is open, it will automatically change to the Object Propertieswindow for the newly added dynamic property.

Note: All Group of Symbols (p. 110) objects—including most symbols and libraryobjects—and all objects with dynamic properties (p. 139) added to them will havemultiple Object Properties windows. These different Object Properties windows, and theproperties listed in them, can be accessed through the Object Properties Selection drop-down list (p. 98).

The buttons in this section are Command (p. 139), BarGraph (p. 142), Text I/O (p. 143),Colors (p. 145), Position (p. 146), Size (p. 147), and Dynamic Rotation (p. 148).

Pushbutton or Keystroke Commands Added to ObjectsCommand button: When this button is selected the object becomes a pushbutton that willexecute logical statements when selected with a pointing device or when a certainkeystroke combination is used. The Command property can be added to any simple object(p. 101) and to certain compound objects (p. 110).While the Object Properties window is open, select the Commands button or select theCommand button and double-click the object, use the Alt-Enter keys with the objecthighlighted, or right-click the object and select Properties to open the Object Propertieswindow.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Release check box: This field determines how any results of an On Up action (see below)are executed. This field does not affect any other type of action (On Down or On While).When this check box is not checked (default), if the pointer (clicked and held mouse,finger on touchscreen, etc.) is moved off of the object, the On Up action is not executed. Ifthe Command property is applied to a Button object (p. 109), the button will visiblychange to its up position even though no action is executed.

Page 140: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

140

When this check box is checked, if the pointer (clicked and held mouse, finger ontouchscreen, etc.) is moved off of the object, the On Up action is not executed until thepointer is released (mouse button released, finger raised from touchscreen, etc.). If theCommand property is applied to a Button object (p. 109), the button will visibly change toits up position when the On Up action would occur, even if there is no On Up action.

Note: A pointer (finger on touchscreen, mouse button, etc.) cannot engage a secondobject on the screen without releasing the screen (finger) or being released (mousebutton).

Mathematical Worksheet SectionThis section includes the Tag cells, the Expression cells, the Action drop-down list, andthe Rate text box. The Tag and Expression cells are used like the similarly named cells inany Math worksheet (p. 197) using the standard scripting language (p. 159).

Tag cells (Tag Name cells in the More window): If a tag is named in one of thesecells, that tag will receive the value generated in the Expression cell of the same row.Expression cells: Mathematical expressions in these cells are executed from the toprow down when the when the object is selected with a pointing device or the properkeystroke combination is typed.More >> button: When this button is selected, a More window is opened with twelvemore math worksheet lines and an Action drop-down list and Rate text box that arethe same as the fields in the Object Properties window. These math lines are executedin order (top to bottom) after the second line in the Object Properties window.

Action drop-down list: Select the action that triggers execution of the math statementsin this list. The choices are On Down (default), On While, and On Up:

On Down – Expressions are executed on the down stroke of the pointer button orkey combination. The complete set of math statements is executed once from thetop line to the bottom line.On Up – Expressions are executed on the upstroke of the pointer button or keycombination. The complete set of math statements is executed continuously fromthe top line to the bottom line at the rate set by the Rate field.

Page 141: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

141

On While – Expressions are executed while the pointer button or key combinationis pressed. The complete set of math statements is executed once from the topline to the bottom line.

Rate text box: The number in this box is the delay (in units of milliseconds) betweenexecuting the set of mathematical expressions. This only happens when the Action listselection is On While, so this field is inactive unless On While is chosen. The defaultvalue, 0, is used to continuously execute the math statements in the minimum timeslice the system is capable of.

Note: Continually executing a math worksheet in the background can slow anapplication, especially during runtime.

Key group box: The fields in this box allow you to specify keyboard or keypad keys thatcan be used to toggle the command function. This is used when there is no pointingdevice such as a mouse or a touchscreen or when it is better to have shortcut keys as wellas buttons that can be pushed. Single keys can be selected from the drop-down list or keycombinations can be created with the check boxes and the drop-down list.

Key drop-list: A key can be typed in the text box or a nonalphanumeric key can bechosen from the drop-list. Only a single character or key can be entered here.Numbers are not valid entries in this field.Shift, Ctrl, and Alt check boxes: Checking any of these boxes adds the named key tothe combination of keys. This is the only way to have key combinations.Function keys on the OpenHMI runtime workstations do not use the F11–F20 choicesin the drop-down list. Instead they use key combinations as shown on this table:

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

F11 Shift + F1 PF1 Ctrl + F1 PF7 Alt + F1F12 Shift + F2 PF2 Ctrl + F2 PF8 Alt + F2F13 Shift + F3 PF3 Ctrl + F3 PF6 Alt + F3F14 Shift + F4 PF4 Ctrl + F4 PF10 Alt + F4F15 Shift + F5 PF5 Ctrl + F5 PF11 Alt + F5F16 Shift + F6 PF6 Ctrl + F6 PF12 Alt + F6F17 Shift + F7F18 Shift + F8F19 Shift + F9F20 Shift + F10

Disable text box: When a tag in this field has a nonzero value, the command property forthis object is disabled. The default is an empty box, which also enables the commandproperty.Beep check box: When selected, a beep will sound when the command is executed.Security text box: The security level (see p. 241) of the command (a positive integer) isentered in this field. When the logged on user does not have this security level, thecommand is inactive. A value of 0 or a blank field activates the command property at alltimes and security levels.

Page 142: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

142

Force check box: Default is unchecked. When this box is checked, any tags listed in theTag/Tag Name cells of the mathematical worksheet section of the Object Propertieswindow (see above) will be flagged to have changed values whenever the commandproperty is toggled. (This is generally done by selecting the object with the commanddynamic property). This is done to ensure that tag values are constantly being updated inthe following modules of the DesignStudio application whether or not the tag's value hasactually changed.

TCP/IP worksheet (p. 264): Tag values that have been flagged as changed will beupdated to the remote station configured on the worksheet.OPC Client worksheet (p. 266): Tag values that have been flagged as changed will bewritten to the OPC server configured on the worksheet.Driver Insert worksheets (p. 258): Tag values that have been flagged as changed willbe written to the I/O device if the Enable Write on Tag Change field currently containsa nonzero value.Scheduler worksheet (p. 231): Tag values that have been flagged as changed will beupdated in the Trigger field.

Object Color Filling (Bar Graph)

Note: The BarGraph dynamic object property is supported in OpenHMI PE applications,but not in OpenHMI SE applications.

BarGraph button: When this button is selected, the object will fill with a color based on afield value change. This property can be added to any simple object that can have a fillcolor (p. 137) and to certain compound objects (p. 110). Closed polygons must begrouped (p. 95). Excluded simple objects are those created with the Line, Open Polygon,Text, and Button buttons.The object to be filled has a minimum value that corresponds to being unfilled and amaximum value that corresponds to being completely filled. The Tag/Expression value isevaluated and if the value falls within the range of the Minimum Value and the MaximumValue, the object is fractionally filled. The fraction by which the object is filled is:

While the Object Properties window is open, select the BarGraph button or select theBarGraph button and double-click the object, use the Alt-Enter keys with the objecthighlighted, or right-click the object and select Properties to open the Object Propertieswindow.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.

ValueMinimumValueMaximum ValueMinimumvaluesionTag/Expres

−−

Page 143: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

143

Tag/Expression text box: Insert a tag or expression in this field. The value of this tag orexpression is used to determine the extent of object fill as discussed above.Minimum Value text box: Defines the Tag/Expression value at which the object is unfilled.Any larger value starts to fill the object. The default value is a constant (#Min:0)so thatit can be changed in the Replace Tags tab of the Replace window (p. 98). The value inthis field can be a number, a number constant, or a number tag.Maximum Value text box: Defines the Tag/Expression value at which the object iscompletely filled. The default value is a constant (#Max:100) so that it can be changed inthe Replace Tags tab of the Replace window (p. 98). The value in this field can be anumber, a number constant, or a number tag.Foreground Color box: This field specifies the dynamic fill color (default dark blue).Select the color box to open a 48-color Color window (see p. 157). To change colors,select a color and select OK or double-click a color.Direction group box: Determines if the object will be filled vertically (Vertical radiobutton—default) or horizontally (Horizontal radio button).Orientation group box: Determines the orientation of the object fill. The options are Up(default), Center, and Down.

Up: The object is filled from the bottom (Vertical fill) or the left (Horizontal fill).Down: The object is filled from the top (Vertical fill) or the right (Horizontal fill).Center: The object is filled from the vertical or horizontal centerline of the object,depending on the choice in the Direction group box.

Text Input and OutputText I/O button: This property can only be added to a text object. With this property anynumber sign (#) characters become variable characters that can be used to output tag orexpression values or during runtime. With a field change (Input Enabled), any #characters now form an input field in which text can be input during runtime using akeypad or keyboard. This button is not active unless a text object with # characters isselected.

Note: Do not rotate a text object when has the Text Input/Output property.

While the Object Properties window is open, select the Text I/O button or select the TextI/O button and double-click the object, use the Alt-Enter keys with the object highlighted,or right-click the object and select Properties to open the Object Properties window.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Tag/Expression text box: When the Input Enabled box is not checked, the value of anyexpression or tag in this field is output in place of the # characters during runtime. When

Page 144: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

144

the Input Enabled box is checked, any value input to the text object during runtime isassigned to this tag.

Note: Do not check Input Enabled when an internal tag that is constantly beingoverwritten is in the Tag/Expression field. This can slow the system.

Note: Match the number of # characters to the number of expected output characters.

Note: If you are using a touchscreen OpenHMI workstation and you want to enter textinto this object without using another pointing device, be sure to enable the Touch-screenkeypad field in the Runtime Desktop tab of the Project Settings window (p. 53).

Minimum Value text box: When a number value is defined in this field, that value is theminimum value that will be able to be input into this field during runtime that will bestored to the tag in the Tag/Expression field. This field is inactive until the Input Enabledbox is checked.Maximum Value text box: When a number value is defined in this field, that value is themaximum value that will be able to be input into this field during runtime that will bestored to the tag in the Tag/Expression field. This field is inactive until the Input Enabledbox is checked.Input Enabled check box: When this box is checked, an operator may enter text into thetext object field during runtime using a keypad or keyboard. The default is not checked.Several other fields only apply to text input and are inactive until this box is checked.They are Minimum Value, Maximum Value, Password, Disable, and Security.Password check box: When this box is checked, any text input to this object is not shown,but each keystroke is indicated with an asterisk character (*). This function is usuallyused to hide passwords. This field is inactive until the Input Enabled box is checked.Fmt drop-down list: From this list you can select the number format for the input/outputfield. The options are Decimal (default), Hexa (hexadecimal), and Binary. This field isinactive for Windows CE applications, where it is permanently set to Decimal.

Disable text box: When a tag in this field has a nonzero value, the command property forthis object is disabled. The default is an empty box, which also enables the commandproperty. This field is inactive until the Input Enabled box is checked.Security text box: The security level (see p. 241) of the use of the object (a positiveinteger) is entered in this field. When the logged on user does not have this security level,the command is inactive. A value of 0 or a blank field activates the command property atall times and security levels. This field is inactive until the Input Enabled box is checked.

Page 145: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

145

Object Color Change

Note: The Colors dynamic object property is supported in OpenHMI PE applications,but not in OpenHMI SE applications.

Colors button: When this property is added to eligible object. The fill color of that objectcan change during runtime based on the value of a tag or expression. This can be done forfour different value ranges (each with a unique color). For text objects, the color isapplied to the font, not the text box.While the Object Properties window is open, select the Colors button or select the Colorsbutton and double-click the object, use the Alt-Enter keys with the object highlighted, orright-click the object and select Properties to open the Object Properties window.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Tag/Expression text box: The value of any expression or tag in this field is used to triggerthe color changes based on the values in the Change Limit text boxes.Change Limit text boxes: The number values (number or tag) in these text boxesdetermine when the color in the Color box associated with that particular Change Limitbox is applied to the object. Each color change is permanent until the value in anotherChange Limit box is matched.Color boxes: This field specifies the color associated with each Change Limit field. Selectthe color box to open a 48-color Color window (see p. 157). To change colors, select acolor and select OK or double-click a color.Blink drop-down list: Each of these drop-down lists specify whether the color blinks andhow quickly. The choices are None (no blinking—default), Slow, and Fast.

Page 146: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

146

Object Movement

Note: The Position dynamic object property is supported in OpenHMI PE applications,but not in OpenHMI SE applications.

Position button: When this property is added to an object, the object position can beadjusted according to tag value changes. There are also two other configurable options.The first allows the object to be shown on the screen only under certain conditions. Thesecond allows the object to be moved on the screen with a pointer. This property can beadded to any simple object (p. 101) or active object (p. 112) and to certain compoundobjects (p. 110).While the Object Properties window is open, select the Position button or select thePosition button and double-click the object, use the Alt-Enter keys with the objecthighlighted, or right-click the object and select Properties to open the Object Propertieswindow.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Show on condition text box: This field may contain a tag, a number value or anexpression. When value of the item in this field is nonzero the object is visible; otherwiseit is hidden. Leaving this field blank (default) makes the object always visible.Slider check box: When checked, this object acts as a slider during runtime. It acceptspointer dragging, applying the corresponding position values to tags in the Move Tagfields. The default is not checked.Sec text box: The security level (see p. 241) of the use of the object (a positive integer) isentered in this field. When the logged on user does not have this security level, thecommand is inactive. A value of 0 or a blank field activates the command property at alltimes and security levels. This field is inactive until the Slider box is checked.Move fields: There are two rows of fields: Horz fields for object horizontal movement andVert fields for object vertical movement. Movement in a positive horizontal direction is tothe right of the screen. Movement in a positive vertical direction is to the bottom.

Tag text box: Changes in the value of an integer tag in this field trigger changes in thehorizontal or vertical (depending on row) position of the object. The degree ofchange is determined in the Range and Position fields.Range text box: These two text boxes hold the upper and lower limits of the value ofthe tag in the Tag field. Any tag values outside these limits will not be used. Whenthe tag value is changed, the object is moved in the appropriate direction by a numberof pixels equal to the difference of the Position boxes divided by the difference of theRange boxes (minimum of one pixel per move). The default values are 0 to 100.Position text box: The values in these text boxes determine a range that is comparedwith the range in the Range boxes to determine the number of pixels moved per Tag

Page 147: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

147

tag value change. A negative number in the second box allows negative (top or left)movement (see Move fields above). The default values are 0 to 100.Reference drop-down list: If the object is resized as it moves (see Size property,p. 147), this list selection determines the reference edge (or the center) of the objectfrom which it is resized. The options for horizontal movement are LEFT (default),Center, and RIGHT. The options for vertical movement are TOP (default), Center, andBOTTOM.

Object Resizing

Note: The Size dynamic object property is supported in OpenHMI PE applications, butnot in OpenHMI SE applications.

Size button: When this property is added to an object, the object size can be adjustedaccording to tag value changes. This property can be added to any simple object (p. 101)or active object (p. 112) and to certain compound objects (p. 110).While the Object Properties window is open, select the Size button or select the Sizebutton and double-click the object, use the Alt-Enter keys with the object highlighted, orright-click the object and select Properties to open the Object Properties window.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Resize fields: There are two rows of fields: Height fields for object height changes andWidth fields for object width changes.

Tag text box: Changes in the value of an integer tag in this field trigger changes in theheight or width (depending on row) of the object. The degree of change is determinedin the Range and Size (%) fields.Range text box: These two text boxes hold the upper and lower limits of the value ofthe tag in the Tag field. Any tag values outside these limits will not be used. Whenthe tag value is changed, the object is scaled along the appropriate direction by apercentage of size equal to the difference of the Position boxes divided by thedifference of the Range boxes times the change in the Tag value. The default valuesare 0 to 100.Size (%) text box: The values in these text boxes determine a percentage change rangethat is compared with the range in the Range boxes to determine the size change perTag tag value change. Numbers greater than 100 cause the object to be increased insize; numbers less than 100 cause the object to be shrunk. The default values are 0 to100, which will cause the object to be full-sized at 100 and disappear at 0.Reference drop-down list: This list selection determines the reference edge (or thecenter) of the object from which it is resized. The options for height are TOP(default), Center, and BOTTOM. The options for width are LEFT (default), Center, andRIGHT.

Page 148: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

148

Object Rotation

Note: The Dynamic Rotation dynamic object property is supported in OpenHMI PEapplications, but not in OpenHMI SE applications.

Dynamic Rotation button: This property can only be added to lines created with the Linebutton (p. 101). This property allows the line to be rotated during runtime based on a fieldvalue change.While the Object Properties window is open, select the Dynamic Rotation button or selectthe Dynamic Rotation button and double-click the object, use the Alt-Enter keys with theobject highlighted, or right-click the object and select Properties to open the ObjectProperties window.

The top row of objects—the Always on top button, the Replace… button, the Hint text box,and the Selection drop-down list—are detailed on p. 98.Tag/Expression text box: The value of the tag or expression in this field is used with thevalues in the Range and Rotation (degrees) group boxes to determine the amount of linerotation.Range group box: These two text boxes hold the upper (Maximum) and lower (Minimum)limits of the value of the Tag/Expression field. Any values outside these limits will not beused. When the value is changed, the object is rotated in appropriate direction by anumber of degrees equal to the Rotation (degrees) fields divided by the difference of theRange fields times the amount of change of the Tag/Expression value. There are nodefault values.Rotation (degrees) group box: The values in these text boxes determine a range that iscompared with the range in the Range boxes to determine the number of degrees movedper Tag value change and the maximum number of degrees that can be moved. If the Startvalue is nonzero, the object will be shifted by that many degrees automatically duringapplication runtime. A positive Start or End value specifies clockwise rotation; a negativeStart or End value specifies counterclockwise rotation. The default values for Start andEnd are both are 0.Reference drop-down list: Defines the point about which the line is rotated. The choicesare LeftTop (default—the left end of a horizontal line or the top end of a vertical line),Center, and RightBottom (the right end of a horizontal line or the bottom end of a verticalline).

Page 149: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

149

Screen Bitmap EditingThis section describes the background (bitmap editing) layer of the screen and the bitmapediting configuration of the Tools toolbar. The bitmap editing tools are used to draw andedit bitmap pictures in the background. Bitmap pictures can also be pasted into thebackground layer of the screen using the Paste From… command in the Edit menu (p. 34).Objects in the background layer are static in the running application and should be usedinstead of foreground screen objects to minimize system resource usage during runtime(p. 271). When the background layer of the screen is created and the foreground (objectediting, p. 92) layer is toggled by the Change Toolbar button (p. 150), the entirebackground layer is saved as a bitmap that it is saved with the same name as the screenand a .bmp extension.In order to display the graphics created in the background layer of the screen, the EnableBackground check box in the Screen Attributes window (p. 83) must be checked. If thisbox is not checked, the graphics will still be present but they will not be displayed duringobject layer editing (p. 92) or during runtime or runtime emulation (p. 271). When theEnable Background box is checked so that the background layer graphics are displayed,the Background Color option (p. 93) will be inactive and any color selected with thisoption will not be displayed.

Note: In Windows NT applications, graphics file types other than .bmp can be imported.In Windows CE applications, only .bmp files can be imported. See p. 83 for details.

Bitmap Editing Configuration of the Tools ToolbarUnlike foreground layer screen objects (p. 92), bitmap objects only have static propertiessuch as color, size, position, shape, font type, and line weight. The bitmap editingconfiguration of the Tools toolbar, which is toggled by the Change Toolbar button(p. 150) contains the buttons used to create and configure background bitmap objects. Touse any of these buttons, select it with the mouse. The mouse is also used to define objectdimensions and to navigate through object configuration windows. The keyboard is usedfor pixel-by-pixel movement.

Toggle Transparent Color (p. 141)Change Colors (p. 141)

Lines (p. 136)

Selection (p. 138)

Open Polygon (p. 136)

Select Area (p. 138)Unfilled Rounded Rectangle (p. 137)

Select Transparent Color (p. 141)Grid (p. 136)

Change Toolbar (p. 136)

Line Color (p. 140)Pixel Editing (p. 141)

Flood Fill (p. 141)Flip Horizontally (p. 139)

Rounded Rectangle (p. 137)

Closed Polygon (p. 136)

Unfilled Ellipse (p. 137)Unfilled Rectangle (p. 137)

Ellipse (p. 137)Rectangle (p. 137)

Flip Vertically (p. 139)Rotate (p. 139)Erase Area (p. 141)Fill Color (p. 140)

Page 150: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

150

Screen Parameter ToolsThis section details the Change Toolbar and Grid buttons. These buttons affect the screen,but are not used directly to alter objects in the screen.Change Toolbar button: When this button is depressed, the Tools toolbar toggles betweenthe object editing configuration and the graphics editing configuration. At the same time,the screen displayed toggles between the foreground (object editing) layer and thebackground (graphics editing) layer to match the toolbar configuration. When a screen isopened, the default settings are the object editing Tools toolbar and the foreground(object editing) layer. For more information on object editing, see p. 92.Grid button: When this button is depressed (default), grid lines appear on the screen.When this button is not depressed, there are no grid lines. Grid line parameters can bechanged and the grid lines can be toggled on and off in the Grid window accessed by thepopup menu that appears when right-clicking the screen (p. 90).

ObjectsThis section details creation and importing of objects. Object manipulation (p. 152) andobject characteristic changes (p. 154) are detailed in later sections. These objects aresimilar to the simple objects (p. 101) created in the object layer of the screen.

Bitmap ObjectsA bitmap object is a static graphic that is imported from a bitmap (.bmp) file using thePaste From… command in the Edit menu (p. 34). Bitmap objects appear in the upper leftcorner of the screen and can be dragged into position. Until the Change Toolbar button isused, the bitmap is a treated as a separate object that can be moved and manipulatedindependently of the rest of the background layer. After toggling back to the foregroundscreen with the Change Toolbar button, the bitmap is merged with the rest of thebackground layer bitmap.

Creating Line ObjectsUse the line object buttons to draw straight or curved lines. Select one endpoint (thecrosshairs indicate the point) on the screen and then move the pointer (no draggingrequired) to create the line. To end the line, double-click the endpoint on the screen. Thisbutton remains active after you drawn a line so that you can continue to draw lines. Whenyou want to stop drawing lines, select another button, such as the Selection button.Line button: Use this button to draw straight vertical or horizontal lines. To end the line,select or double-click a point on the screen. The cursor does not need to be on the line,the line being drawn will extend in a horizontal or vertical position that most closelyfollows the direction of cursor movement.Open Polygon button: Use this button to draw freehand open shapes composed of linesegments. Select an area on the screen and move to pointer (no dragging required) toanother point on the screen. Select this spot and a line segment connecting the twoselected spots will appear. Move the pointer and select again to form another linesegment and repeat until you have created the desired object.To create a less angular freehand object, click-and-drag to form the object. When you dothis the cursor will look like a pencil. Even though this object will look more like a curve,it is still composed of line segments.

Page 151: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

151

A line segment ends at a vertex. When the open polygon is selected, each vertex has ahandle box. When the pointer cursor is positioned over a vertex, a handle box symbolappears at the base of the cursor. At this point the handle can be selected and moved,changing the shape of the entire open polygon.Closed Polygon button: Use this button to draw freehand closed shapes composed of linesegments. Select an area on the screen and move to pointer (no dragging required) toanother point on the screen. Select this spot and a line segment connecting the twoselected spots will appear. Move the pointer and select again to form another linesegment. A line segment connecting the first selected spot with the last selected spot willalso appear. Repeat until you have created the desired object.To create a less angular freehand object, click-and-drag to form the object. When you dothis, the cursor will look like a pencil. Even though this object will look more like acurve, it is still composed of line segments.A line segment ends at a vertex. When the polygon is selected, each vertex has a handlebox. When the pointer cursor is positioned over a vertex, a handle box symbol appears atthe base of the cursor. At this point the handle can be selected and moved, changing theshape of the entire polygon.

Creating Two-Dimensional ObjectsTwo create one of these objects, first select the appropriate button. Then move the cursor(which will appear as a crosshair) to the location where you want one of the corners ofthe object (if rectangular) or the box that would enclose the object (if not rectangular).Then click-and-drag the cursor to form an object. The further you drag the mouse beforereleasing it, the larger the object. You can then click somewhere else on the screen anddraw another object. To stop drawing objects, click and release the cursor or selectanother button.The filled objects have a default fill color than can be changed by the Fill Color buttonwhen selected, though all objects can be filled using the Flood fill button. See p. 155.Rectangle button and Unfilled Rectangle button: Use either of these buttons to create arectangle on the screen. Squares can be created by hand using these buttons.Rounded Rectangle button and Unfilled Rounded Rectangle button: Use either of thesebuttons to create a rounded rectangle on the screen. Rounded squares can be created byhand using these buttons.When the rounded rectangle is selected, there will be one extra handle box inside it, in thelower right quadrant. Dragging this rectangle will change the degree of curvature of therectangle's corners. To do this, position the pointer cursor over handle until a four-pointedarrow appears, then select it and drag. Dragging it toward the center increases thecurvature and vice versa.Ellipse button and Unfilled Ellipse button: Use either of these buttons to create an ellipticalshape on the screen. Circles can be created by hand using these buttons.

Page 152: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

152

Object and Screen ManipulationThis section details the methods of manipulating the objects and properties of shape, size,and orientation. Color is detailed in its own section.

Object SelectionThe Selection button must be depressed (default setting) to select an object on the screen.When the Selection button is depressed, the cursor will be an arrow. If the Selectionbutton is not depressed, another button is. Always make sure that the Selection button isdepressed before you try to select an object. If it is not, you will end up drawing anunwanted object on the screen.Except for imported bitmap objects, you can select single objects only after drawing oneand only if the next action is selecting the Selection button. If you then move the cursorto the screen, the object will be selected. If though you cannot draw a selection box withthe cursor when the Selection button is selected, nothing in the box will be selected.Selected objects have eight handles (boxes) around their edges, one at each corner andone at the midpoint of each side. These handles indicate that the object is selected andthey are used to resize the object.

You can continue to select this object until you have performed another action in thebackground layer. After another action has been performed the formerly selected objecthas been merged with the bitmap. To deselect an object, select another area of the screen.

Bitmap Object SelectionWhen a bitmap is imported into the background layer, it is a separate object that is notmerged into the background layer bitmap until the Change Toolbar button is pressed. Itcan be selected at any time until then.

Area SelectionSelect Area button: When this button is selected, click-and-drag to draw a selectionrectangle (see below). When you release the pointer button, the selected rectangle will beselected and surrounded by handles (see Object Selection above). This selected area istreated as a separate bitmap object that has been Cut from the screen for the purpose ofobject manipulation. If you move this selected rectangle, the color of the rectangle leftwhere it was will be the color last selected using the Select transparent color button (). Todeselect the area, select a spot on the screen outside of the selected area or select a buttonthat deselects the area such as the Selection button.

Note: The background color in the selected area will be treated as part of the object andwill be moved with it leaving a rectangle (usually white) behind.

Page 153: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

153

Resizing Objects and AreasA selected object or area has eight handles around its edge, one at each corner and one atthe midpoint of each side (unless a side is too short for midpoint handles, as shownbelow). You can select a handle and drag it to elongate the object in the directionindicated by the arrows that appear when the pointing device is over the handle. Handlesize can be adjusted in the Grid window (p. 90).

The Open Polygon and Closed Polygon objects can be reshaped using their handles(pp. 102, 103).

Object OrientationThe three object orientation buttons are inactive unless an object or area is selected(p. 93). The buttons are explained below and graphic examples are shown on p. 97.Flip Horizontally button: When this button is pressed, the selected object or area isinverted horizontally. It appears as if it was rotated about an imaginary line through itshorizontal center or as an image in a vertical mirror placed beside it and perpendicular tothe screen.Flip Vertically button: When this button is pressed, the selected object or area is invertedvertically. It appears as if it was rotated about an imaginary line through its vertical centeror as an image in a horizontal mirror placed above or below it and perpendicular to thescreen.Rotate button: When this button is pressed, the selected object or area is rotated 90degrees (a quarter turn) clockwise.

Copying and Pasting ObjectsAfter selecting an area, you can cut the selection to remove it and place it in the Windowsclipboard or copy the selection to place a copy of it in the Windows clipboard. Pastingputs a copy of the contents of the Windows clipboard in the upper left corner of thescreen. You can access the cut, copy, and paste functions in these ways:• Use the standard Windows shortcut keys: Ctrl+X for cut, Ctrl+C for copy, and Ctrl+V

for paste.• Use the Cut, Copy, and Paste buttons on the Standard toolbar.• Use the Cut, Copy, and Paste commands in the Edit menu.• Use the Cut and Copy commands in the object popup menu (p. 99) and then use any

of the paste function options.

Note: Cut, copy, and paste are standard Windows functions, but you shouldn't use themto copy material from another Windows application to DesignStudio or vice versa unlessyou know that the two Windows applications are compatible for these commands. Theexception to this is using the DesignStudio Edit menu Paste From… command.

Note: If dragging (p. 90) is not allowed, you will not be able to move the pasted objects.

Note: Selected single objects cannot be copied and pasted into the background layer.

Page 154: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

154

There is another way to make a copy of an object or area. Select the object or area, holddown the Ctrl key, and click-and-drag a copy of the object from the original. Make surethat dragging is enabled (p. 90) or you will create a stack of superimposed objects.

Color ManipulationThese buttons are used to change the color the entire graphics layer bitmap, parts of thebitmap, and objects drawn in the graphics layer. One of these buttons, the Line Colorbutton, can also affect line thickness. These buttons are divided between object colorparameters and graphics layer parameters, thought the Fill Color button is used by bothgroups of buttons.

Object and Screen Area Color ParametersThese two buttons are used to preconfigure fill color and the line color, thickness, andstyle. To preconfigure these properties use the buttons and select the properties. Everyobject created subsequently will have these selected properties. Objects that have beenselected (p. 93) can also have their altered with these buttons, but after an object hasbecome part of the background layer, these buttons no longer affect it.

Line Color and StyleLine Color button: Use this button to change object line color or set default object linecolor and style. When this button is selected, the Line Selection window (below) opens.When an object with enabled line color or type properties is selected, the new lineproperties are applied to that object. When no object is selected, the selected propertiesare made the defaults for any subsequently created objects that have line properties.

To change the line color, select a color, then the OK button or double-click a color. Thedefault color is black.Line group box: To change the line style, choose either of the Solid Line (default) orDashed Line radio buttons.

Weight text box: The positive integer number (range 1 to 50) in this field is the weight(thickness) of the line in pixels. The default is 1.

Fill ColorFill Color button: Use this button to change object or screen area fill color or set defaultobject fill color. When this button is selected, the 48-color Color window (p. 157) opens.To change colors, select a color and select OK or double-click a color. When an objectwith an enabled fill color property is selected, the new fill color is applied to that object.The new fill color does not appear on the screen until you perform another action. Whenno object is selected, the selected fill color is made the default for any subsequentlycreated objects that have a fill color property. The default color is light gray.

Page 155: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

155

Object Color ParametersThese parameters affect any part of the background graphics layer. Using any of thesebuttons will deselect a selected single object.Flood fill button: Use this button to apply a preselected color to an enclosed area of thescreen or to the part of the screen that is outside of any enclosed areas. An enclosed areais any area that is surrounded by any objects, lines, or areas of color. More than oneobject, line, or area of color can together surround an enclosed area.When this button is selected the cursor will become a paint can icon exactly line the oneon the button except that the icon will have a white pixel at the end of the "spilling paint"part of the icon. This white pixel is the pointer that indicates which area of the screen willbe filled with the preselected color. The color is selected using the Fill Color button(p. 154).Pixel editing button: Use this button to edit the screen pixel by pixel. Select the button,then move the cursor, which will be shaped like a magnifying glass, to the area of thescreen you want to edit. Select the area to open a Zoom window that will show amagnified area of the screen 78 pixels wide by 38 pixels high centered around the centerof the icon's magnifying glass.

The preview window shows the area within the main Zoom window frame at its normalsize. This is how the area will look on the screen.The two color boxes specify the colors that can be applied by the left and right mousebuttons, respectively (left box for the left mouse button; right box for the right mousebutton). To apply the displayed color, click-and-drag in the main Zoom window framewith the appropriate mouse button.To change the displayed colors in a color box, select it to open the 16-color ColorSelection window (p. 157), then select a color and select OK or double-click a color.Erase area button: Use this button to erase an area on the screen. When this button isselected, the cursor will look like a crosshair. Click-and-drag it to form a rectangular areathat has the same color as the last color selected using the Fill Color button. Thisrectangular area can be treated as an object for the purposes of selecting and manipulatingit. After another action is performed in the screen, this area becomes part of the screen.

Page 156: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

156

Change colors button: Use this button to copy a pasted bitmap object or an area selectedwith the Select area button. The bitmap or area object copied will become part of thescreen, but the copy can be manipulated like a selected area. Using this button to copy anarea (instead of cutting the area from the background with the Select area button, p. 152)will preserve the area instead of moving it.

Note: When this function is used to copy the most recently drawn object with a borderthe border of the copies of that object will be changed to the color selected by the Selecttransparent color button.

Select transparent color button: Use this button to set a transparent color and abackground color used with the Select area (p. 152), Change colors (p. 155), and Toggletransparent color (see below) buttons. Selecting this button opens a 16-color ColorSelection window. To change colors, select a color and then the OK button, or double-click a color.This button works in two different ways:1. When nothing is selected on the screen, the color selected with the Select transparent

color button is the background color that will appear when an area selected with theSelect area button is moved and when a color is turned transparent using the Toggletransparent color. The default background color is white.

2. When an area is selected with the Select area button and then the Select transparentcolor button is selected, the color selected is the color within that selected area thatwill be turned transparent with the Toggle transparent color button. When thisselected color is turned transparent, the background color (selected in step 1 above)will be shown in its place. The default transparent color is white. This step must bedone individually with each selected area.

Toggle transparent color button: When a color is designated as a transparent color withthe Select transparent color button (see step 2 above), this button is used to specifywhether the transparent property is applied to a selected area or not. When this button isdepressed, the transparent property is applied. The default for this button is not depressed.

Page 157: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

157

ColorsColors for objects may be set in many of the Object Properties windows, with the staticproperty buttons (p. 133), and in an Alarm worksheet (p. 203). Color can be used in staticand dynamic object properties. If you are going to use a 16-color workstation such as theOpenHMI 3406 runtime workstation, you should read the about the color restrictions forthese workstations (p. 158).

Object Color SelectionTo change a fill (background) color or a line color, you select theappropriate color box. This will open one of two windows. Mostfill color boxes will open the 48-color Color window (below) andmost line color boxes will open the 16-color Color Selectionwindow (right). In either, you can change the color in the color boxby selecting a new color and selecting the OK button or by double-clicking a new color.

The 48-color Color window also allows you define 16 custom colors at a time. To do thisselect the Define Custom Colors >> button. This will extend the Color window. Theextended portion includes a color matrix (the large area of colors) where a color can beselected, a darkness slider beside the color matrix, a Color|Solid box that displays thecreated color, and six text boxes that can be used to create the color.In the extended portion there are four different ways to select a color. At any time, if thecolor displayed in the Color|Solid box is the one you want, you can add it to the Customcolors section of the window by selecting the Add to Custom Colors button.1. You can create a custom color by selecting a point in the color matrix with your

pointing device. If you want to make the color darker or lighter, slide the arrowbeside the darkness slider (up to add white and lighten the color, down to add blackand darken the color). Selecting a point in the matrix and using the darkness sliderwill alter the text boxes below the color matrix. Moving left in the color matrix willincrease the number in the Hue box and moving right will increase it. Moving up inthe color matrix will increase the saturation (Sat) and moving down will decrease it.Moving up in the darkness slider will increase the luminosity (Lum) and the numbersin the Red, Green, and Blue boxes.

Page 158: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

158

2. You can specify a color hue (Hue, range 0 to 239), saturation (Sat, range 0 to 240),and luminosity (Lum, range 0 to 240) by typing in the text boxes. This will alter thecursor position in the color matrix, the arrow position on the darkness slider, and thenumbers in the Red, Green, and Blue boxes.

3. You can specify the amount of red, green, and blue in the color by typing in the Red,Green, and Blue text boxes. The range in each of these boxes is 0 to 255. This willalter the cursor position in the color matrix, the arrow position on the darkness slider,and the numbers in the Hue, Sat, and Lum boxes.

4. You can use a combination of the three methods.

Colors Available for 16 Color Runtime Workstation ApplicationsRuntime workstations like the OpenHMI 3406 Runtime Workstation only support 16-color palettes. Applications built for these workstations still have the same standard colorpalettes available during development. The table and the 16-color palette below it showthe colors available to 16-color applications with code letters. The standard color paletteto the right shows the standard 48 colors with the code of the equivalent color that willappear in a 16-color application.

Color Code Color CodeRed R Dark Red DR

Blue B Dark Blue DB

Green G Dark Green DG

Gray X Dark Gray DX

Cyan C Dark Cyan DC

Purple P Dark Purple DP

Yellow Y Dark Yellow DY

Black K White W

OpenHMI 3408/3410/3412 runtime workstations use the full color palette.

Page 159: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

159

6. Scripting LanguageThe DesignStudio scripting language is a powerful tool that allows you to executecommands and logical operations in response to operator input, timing, tag valuechanges, etc. These features support a large array of application options. Understandingthe scripting language will increase your capability to create applications and solvecomplex problems.Scripting is used in the following parts of an application. All of these items will have atleast two columns, a Tag or Tag Name column and an Expression column.• Screen object Object Properties dialog windows (p. 83)• Mathematical worksheets (p. 197)• Scheduler worksheets (p. 231)• Screen Math worksheets accessed through the Screen Attributes dialog (p. 85)• Database Spy dockable window and runtime Database Spy dialog (p. 282)The Expression column holds a logical statement or a tag name that defines the valueheld by the tag whose name is in the same row Tag/Tag Name column. If there areseveral expressions on a worksheet, they will be executed from the top of the sheet to thebottom.Sometimes an Expression column can have no corresponding tag, but there is no reasonto have a tag without a corresponding expression. Mathematical worksheets can havesimple programming constructions such as nested FOR..NEXT loops. Care should betaken with FOR..NEXT loops and GOTO statements (see Functions, p. 163) not tocreate a logically impossible set of instructions or an infinite loop that will haltapplication execution. Care should also be taken to avoid mathematical problems such asdividing by zero. Expression format follows these rules:• The scripting language and tag names are not case sensitive.• Expression fields can have 255 characters; see the Tags chapter (p. 59) for tag

specifications.• Remarks can be put in the Expression column by first typing two forward slashes

(//). The slashes can be put at the beginning of the Expression cell, so that the entirecell is used for remark purposes or the slashes can be used after an expression to adda remark. You do not need to use any character at the end of the comment to end it.Anything after the slashes is considered a comment. These comments do not increaseapplication execution time.

• Comparison and logic operators are Boolean operators; they do not allow you todefine the value of an item that is within the expression box (see p. 161)

Page 160: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

160

Data TypesNumber and character strings can be used in math expressions and as function arguments.There are integer and real (floating point) numbers and character strings. Boolean valuesare treated as integers in expression fields and Boolean tags can be used anywhere anumber can be used.Integer (32 bits, the 31st bit is the sign bit) – Integer number (long integer in C) in eitherdecimal or hexadecimal format. Hexadecimal numbers must be prefixed with thecharacters 0 and x. The valid value range is –2,147,483,648 to 2,147,483,647 decimal(±7FFFFFFF hexadecimal). Examples: 0, 5, -200, 0x5, 0xBC4.Real (64 bits) – Real (floating point) number stored as a double word (double type in C).The value range is from ±4.94 x10-324 to ±1.79 x 10308. Examples: 0.5, -753.436.String – ASCII character string up to 255 characters that holds letters, numbers, andspecial characters (including spaces). Strings in functions are enclosed in double quotesunless otherwise noted. Examples: “Recipe X123”, “01/01/90”, “** On **”.

Operators

Operators compare, alter, or combine in some way one or more tags. Each type ofoperator is discussed in its own section. Operators can be used with in functionarguments (see Functions, p. 163).Operations are performed from left to right unless an operator is stated to act beforeanother operator (the operator that acts first has precedence over the other operator). Inorder to set an operator to act first, enclose the operator and the tags it affects inparentheses. A set of parentheses can be used to prioritize an operation that is withinanother set of parentheses. This is called nesting parentheses.The order in which operators act is: multiplication/division, then addition/subtraction andcomparison operators, then logical operators.Example: 2*(1+2)=6 but 2*1+2=4 because multiplication occurs before addition. Theparentheses allow the addition operation to happen before the multiplication operation.Example: 2/(10*(5+7)) is an example of nested parentheses.

Arithmetic OperatorsThese are the standard mathematical operators.+ Addition- Subtraction* Multiplication/ DivisionExample: The expression 7*(Temp-1) will return a value of 14 if the tag Temp has thevalue 3.

Page 161: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

161

Boolean Operators

Comparison OperatorsThese operators are used for comparisons between quantities; a statement involving aBoolean operator is evaluated for truth. If it is true, the statement is equivalent to a one; ifit is false, the statement is equivalent to a zero.Examples: A=2 in an Expression cell will return a value of one if the value of A is two andzero if not. If this is the only operation in the cell, the tag in Tag cell will be assigned theone or the zero. The expression can be more complicated. 7*(A=2) will assign a value ofzero or seven.= Equal to> Greater than< Less than>= Greater than or equal to<= Less than or equal to<> Not equal to

Logic OperatorsThese operators also return a Boolean value—one if the statement is true, and zero if thestatement is false. Compared values do not need to be Boolean; any nonzero value isconsidered the same as a one (true) when used with a Boolean logic operator.AND If both of compared values are true, this operation returns a true value.OR If either or both of the compared values is true, this operation returns a true

value. (OR is sometimes called inclusive or.)XOR If only one of the compared values is true, this operation returns a true value.NOT This operator works with only one value and returns a value opposite of that

value.Using NOT and AND or OR, you can also construct two other logic operators:NOT (…AND…) (also known as nand) This combination of operators will return a true

value only if both of the compared values are not true.NOT (…OR…) (also known as nor) This combination of operators will return a true value

only if both of the compared values are false.The syntax for these functions is:

<tag1> <operator> <tag2>

Not operations have precedence over the other Boolean operations.Examples: Tag1 and Tag2, Not Tag2, Not (Tag1 and Tag2)Example: Tag Bool1 is true (on, 1) and tag Bool2 is false (off, 0). The expression Bool1

and (not Bool2) returns the value 1 (on, true).

Page 162: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

162

It is possible to construct a truth table illustrating all of the results possible whencomparing any two true or false values:

Tag Values Boolean Operations

X Y X and Y X or Y X xor Y not X not Y X nand Y X nor Y

0 0 0 0 0 1 1 1 1

0 1 0 1 1 1 0 1 0

1 0 0 1 1 0 1 1 0

1 1 1 1 0 0 0 0 0

Bit OperatorsThese operators are used to compare individual bits of an integer value or tag. The formatof the individual bits is B0 through B31, with B31 being the signing bit. (If B31 is a one,the integer is negative; if B31 is a zero, the integer is positive.)An integer’s 32 bits appear as eight groups of four bits (words). The bits are countedfrom right (B0) to left (B31). Bit 31 (B31), the leftmost bit, is the signing bit. Each bitcontains a one or a zero and the decimal equivalent of a bit is equal to its value times tworaised to the power of its number position:

Decimal Value = (0 or 1) x 2N

The total decimal equivalent of the binary number is found by adding the values of all ofthe individual bits.In the examples given below leading zeros are not explicitly listed, so integer value 4 hasa binary value 10 (the actual 32 bits are 0000 0000 0000 0000 0000 0000 0000 0010).

Bitwise Boolean Logic OperatorsEach bit can have a value of one (true) or zero (false). These operators compare each bitin an integer and return a new integer composed of the results of comparing each bit witha Boolean result (one if true, zero if false). For more information on specific operations,see Logic Operators (p. 161).& AND operation – returns a true result only if both bits are true.| OR operation – returns a true result if either or both bits are true.^ XOR operation – returns a true result if only one of the bits is true.~ NOT operation – returns the opposite of the bit valueExample: The tag Int1has the integer value 3 (11 in binary) and the tag Int2 has theinteger value 2 (10 in binary). The expression Tag1 & Tag2 will return a value of 2 (10in binary), indicating that only the second bits of both tags are both on (1, true).

Bit Rotation OperatorsThese two operators shift the bits in an integer to the left or to the right by a certainnumber of places. Bits shifted beyond the B0 or the B31 place are lost from the integerand bit places left without a value are filled with zeros.>> N Shifts the bits N places to the right.<< N Shifts the bits N places to the left.The format for this is:

Page 163: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

163

Tag1 >> N, where Tag1 is an integer tag and N is an integerExample: Tag1 has the integer value 2 (10 in binary). Tag1 << 2 returns the value 8(1000 in binary) and Tag1 >> 2 returns the value 0 (the 1 is shifted beyond the 0th bitand lost.)The value of N is constrained as follows:• N should be in the range of 1 to 31.• Shifting to the left should not be used to clear all of the on (1, true) bits. Example: if

you want to clear the first three bits and shift the fourth bit back to its position, do notshift right by 4. This will clear all of the bits.

You can use multiple bit rotation operators in one expression, but you shouldn't shift bitsout of the range of the 0th to 31st bit places.

FunctionsFunctions perform operations that are more complex than those performed by theoperators (see p. 160). Functions are used in the same locations and are used withoperators. Functions perform system operations, extend the limits of the mathematicaland logic operators, and are used to create programming structures such as loops. Thefunctions are listed by operational type and then each function is fully described.A function’s syntax is a name followed by a set of parentheses (no space between thename and the parentheses). The parentheses may contain an argument or arguments.Arguments are the input values for the operation or the parameters that determine howthe function performs its operation. Arguments are often tags or constants of theappropriate data types. The function name is given with initial capital letters for eachseparate word for easier readability, but functions are case insensitive. The arguments arelisted by data type and name. Data types are string, number, and integer. The numbertype includes integer and floating point numbers. String data must be typed in doublequotation marks, but tags of string type do not need to be enclosed in quotes. If the typeisn't specified, then it can be of any type. Certain arguments must be enclosed in quoteseven if they are tag names. This will be indicated by the presence of double quotationmarks in the argument listing.

Note: An empty set of parentheses must still appear after the function name even if thereare no arguments.

Functions are listed in a Functions folder in the Object Finder window that is opened bythe Object Finder button on the Tag Properties toolbar (see p. 68).

Page 164: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

164

Functions Listed By Operational Type

Log Messages Functions (Debugging)Trace(argument1)

Arithmetic FunctionsAbs(number argument1)Div(number argument1, number argument2)Format(string format flag, number argument1)GetBit(integer argument1, integer argument2)Mod(number argument1, number argument2)Pow(number argument1, number argument2)ResetBit("integer tag name", integer argument1)Round(number argument1)SetBit("integer tag name", integer argument1)Sqrt(number argument1)Swap16(string tag name1) — Not Usable in Windows CESwap32(string tag name1) — Not Usable in Windows CETrunc(number argument1)

Statistics FunctionsAvg(number argument1, number argument2, … , number argumentN)Max(number argument1, number argument2, … , number argumentN)Min(number argument1, number argument2, … , number argumentN)Rand( ) — Not Usable in Windows CE

Logarithmic FunctionsExp(number argument1)Log(number argument1)Log10(number argument1)

Logic FunctionsFalse(argument1)If(condition, result if true, result if false)True(argument1)

String Functions (String Manipulation)Asc2Str(argument1, argument2, … , argumentN)CharToValue("string tag name", "integer array tag name")CharToValueW("string tag name", "integer array tag name")NCopy(string argument1, integer argument1, integer argument2)Num(argument1)Str(number argument1)Str2Asc(single character argument1)StrLeft(string argument1, integer argument1)StrLen(string argument1)StrLower(string argument1)StrRChr(string argument1, single character argument1)

Page 165: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

165

StrRight(string argument1, integer argument1)StrStr(string argument1, string argument2)StrStrPos(string argument1, string argument2)StrTrim(string argument1, integer parameter1)StrUpper(string argument1)ValueToChar("integer array tag name", integer argument1)ValueWToChar("integer array tag name", integer argument1)

Date and Time ManipulationClockGetDate(integer argument1)ClockGetDayOfWeek(integer argument1)ClockGetTime(integer argument1)DateTime2Clock(string argument1, string argument2)GetClock( )Hour2Clock(string argument1)SetSystemDate(string argument1)SetSystemTime(string argument1)

Trigonometric FunctionsAcos(number argument1)Asin(number argument1)Atan(number argument1)Cos(number argument1)Cot(number argument1)Pi( )Sin(number argument1)Tan(number argument1)

Opening and Closing Windows FunctionsClose(string argument1) — Not Usable in Windows CEOpen(string argument1, x1, y1, x2, y2)

Security System FunctionsCreateUser(string user name, string group name, string password) — Not Usable in Windows CERemoveUser(string user name) — Not Usable in Windows CE

Module Activation FunctionsAppActivate(string application title, integer parameter1)AppIsRunning(string application title)AppPostMessage(string application title, wParam, lParam) – Not all options are available forWindows CEAppSendKeys(argument1, argument2, …, argumentN) — Not Usable in Windows CECleanReadQueue( ) — Not Usable in Windows CECloseSplashWindow( ) — Not Usable in Windows CEDisableMath( ) — Not Usable in Windows CEEnableMath( ) — Not Usable in Windows CEExitWindows(integer parameter1) — Not Usable in Windows CEIsScreenOpen(string screen name1) — Not Usable in Windows CE

Page 166: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

166

IsViewerInFocus( ) — Not Usable in Windows CELogOff( )Logon(string user name, string password)Math(integer argument1)NoInputTime( ) — Not Usable in Windows CEPostKey(0, hexadecimal number wParam, 0)Recipe("operation:recipe filename")Report("operation:report filename")SetAppPath(string path and file name1) — Not Usable in Windows CESetViewerInFocus( ) — Not Usable in Windows CEShutdown( )ViewerPostMessage(string screen title, wParam, lParam)Wait(integer argument1)Winexec(string path and file name1, integer parameter1)

File Manipulation FunctionsFileCopy(string path and file name1, string path and file name2)FileDelete(string path and file name1)FileLength(string path and file name1)FileRename(string path and file name1, string path and file name2)FindFile(string path and file name1)GetFileAttributes(string file name1)GetFileTime(string file name1, number parameter1)Print(string path and file name1) — Not Usable in Windows CERDFileN(string filename1, string path name1, string mask1, number parameter1)

Graphics Screen Printing FunctionsPrintWindow(string screen name) — Not Usable in Windows CE

Text Translation FunctionsExt(string argument1)SetTranslationFile(string filename)

Multimedia FunctionsPlay(string filename) — Not Usable in Windows CE workstation

System Information FunctionsDBVersion( )GetAppHorizontalResolution( ) — Not Usable in Windows CEGetAppVerticalResolution( ) — Not Usable in Windows CEGetComputerName( ) — Not Usable in Windows CEGetHardkeyModel( ) — Not Usable in Windows CEGetHardkeySN( ) — Not Usable in Windows CEGetOS( )GetPrivateProfileString(string file section, string parameter name, string failure message,string path and file name)GetProductPath( )GetTickCount( )

Page 167: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

167

InfoAppAlrDir( )InfoAppDir( )InfoAppHstDir( )InfoDiskFree(string argument1) — Not Usable in Windows CEInfoResources(integer parameter1)NoInputTime( ) — Not Usable in Windows CEProductVersion( )SetAppAlarmPath (string path name)SetAppHstPath(string path name)SetDateFormat(string single character, string date format)

Database Access FunctionsForceTagChange(string tag name, argument1)

Loop Functions (Programming)For(number initial value, number final value, number increment)

ODBC Functions — Not Usable in Windows CEThese functions are reserved for future releases of DesignStudio.

Internal Tags Used With Functions (Programming)These internal tags are used with functions. They are found in the Object Finder windowInternal tags folder, not in the Functions folder. Next is used with the loop function For.GotoLabelNext

Log Message Functions (Debugging)

Trace(argument1)Description: A debugging function used with the Log Output (LogWin) window(p. 285). The value of argument1 is output to the LogWin screen or file as a string.Parameters: Argument1 can be a character string, a tag, or an expression.Examples: Trace("The value has changed.") outputs this string. Trace(Date)outputs the value of the tag Date as a string. Trace(Abs(Check)) outputs the returnvalue of the Abs() function.

Note: You can construct a string in the Trace() argument that includes tags and stringcharacters. Example: Trace("The date is" + Date + ".") will return a stringsentence that includes the value of the internal tag Date.

Arithmetic Functions

Abs(number argument1)Description: Returns the absolute value of argument.Example: If the real tag Level holds the value –20.13, Abs(Level) will return 20.13.

Page 168: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

168

Div(number argument1, number argument2)Description: Performs the division operation and returns the truncated quotient (theinteger part of the quotient).Example: Div(5.658, 2) returns the value 2.

Format(string format flag1, number argument1)Description: Creates a formatted string from a number. Options include several integerformats (decimal, hexadecimal, etc.), floating point (real), scientific notation, string,ASCII, and time.Parameters: String format flag1 has the syntax: "%<n><flag>". The n parameter isoptional; it specifies the number of characters in formatted output, the number of decimalplaces shown, or the number of leading zeros (if n includes a zero followed by a number,leading zeros will fill in characters up to that number). If you specify fewer charactersthan required for an integer output, the integer output will use the minimum numberinstead of n. The flag parameter specifies the number format of the output. Specific flagsare shown in the table below. Some of the flags are case sensitive. Number argument1 isthe number to be formatted.

Flag Output Explanation

b, B Integer portion of number argument1 in binary format

c, C ASCII character equivalent to integer portion of number argument1

D Integer portion of number argument1 in decimal format

e, E Scientific notation format (floating point)

F Real number format (floating point)

g, G Compact floating point format (compact version of e, E, f format)

h, H Time in seconds equivalent to the integer portion of number argument1

O Integer portion of number argument1 in octal format

S String output of integer portion of number argument1

X Integer portion of number argument1 in hexadecimal format with small letters

X Integer portion of number argument1 in hexadecimal format with capital letters

Examples:

Expression Output

Format("%b", 8) 1000

Format("%C", 87) W

Format("%d", 0xFF) 256

Format("%E", 0x7FFFFFFF) 2.147484E+009

Format("%f", 237.8) 237.800000

Format("%0.1f", 12.34) 12.3

Format("%G", 0x7FFFFFFF) 2.14748E+009

Format("%G", 237.8) 237.8

Format("%H", 0xFFFF) 18:12:15

Format("%o", 8) 10

Format("%s", 0xFFFF) "65535"

Page 169: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

169

Expression Output

Format("%04s", 12) "0012"

Format("%x", 255) Ff

Format("%X", 255) FF

Format("%1X", 255) FF

Format("%2X", 15) 0F

Note: The flags used in the Format( ) function are the same as the flags used in the Cfunction printf( ), but only one value can be formatted in each cell.

GetBit(integer argument1, integer argument2)Description: Returns the value of a bit from integer argument1.Parameters: Integer argument2 is the number of the bit being read; it must be an integer inthe range of 0 to 31.

Note: If integer argument1 is a tag, it can be put in quotes so that the error code is enabledto appear. However, quotes should not be used around integer argument1 when it is in anExpression cell of an Object Properties window (p. 98).

Return Value: The output will be either the bit value (0 or 1) or an error code.Error Codes: The error code is –2 (tag enclosed in quotation marks does not exist).Example: GetBit(minute, 2) returns the value of the second bit of the value of thetag minute.

Mod(number argument1, number argument2)Description: Returns the remainder from the division of number argument1 (the dividend)by number argument2 (the divisor).Return Value: The number (the modulus) that is returned will be either an integer (ifpossible) or a floating point number (if necessary).

Note: Dividing the modulus by the divisor using the arithmetic division slash operator(/) will return the remainder of the division operation in integer or floating point format.

Examples: Mod(20, 7) returns the value 6.

Pow(number argument1, number argument2)Description: Returns the value of number argument1 (the base) raised to a power ofnumber argument2 (the exponent).Examples: Pow(2, 3) returns the value 8.

Page 170: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

170

ResetBit("integer tag name1", integer argument1)Description: Resets a bit (specified by integer tag1) from the tag (integer tag name1).Resetting a bit sets its value to zero.Parameters: Integer argument1 is the number of the bit being read. Integer argument1should be an integer in the range of 0 to 31.Return Value: The output will be either a zero or an error code.Error Codes: The error codes are 1 (invalid parameter) and 2 (tag does not exist).Example: ResetBit("hour",1) resets the first bit of the value of the tag hour to 0.

Round(number argument1)Description: Rounds the value of number argument1 to the closest integer value.Examples: Round(-23.44) returns the value –23.

SetBit("integer tag name1", integer argument1)Description: Resets a bit (specified by integer tag1) from the tag (integer tag name1).Setting a bit sets its value to one.Parameters: Integer argument1 is the number of the bit being read. Integer argument1should be an integer in the range of 0 to 31.Return Value: The output will be either a zero or an error code.Error Codes: The error codes are 1 (invalid parameter) and 2 (tag does not exist).Example: SetBit("hour",1) sets the first bit of the value of the tag hour to 1.

Sqrt(number argument1)Description: Returns the square root of number argument1.

Examples: Sqrt(24) returns the value 4.898979.

Swap16(string tag name1)Description: Swaps the two lower bytes of the tag and returns the value of the newinteger in decimal format. Each byte is eight bits.Example: If the value of test16 is 61455 (1111 0000 0000 1111 binary), the expressionSwap16(test) will return the value 4080 (0000 1111 1111 0000 binary).

Swap32(string tag name1)Description: Swaps the two words of the tag and returns the value of the new integer indecimal format. Each word is two bytes (16 bits), so this function swaps the leftmost 16bits with the rightmost 16 bits.Example: If the value of test32 is 4080 (0000 0000 0000 0000 0000 1111 1111 0000binary), the expression Swap32(test32) will return the value 267386880 (0000 11111111 0000 0000 0000 0000 0000 binary).

Trunc(number argument1)Description: Returns the integer part of number argument1.

Example: Trunc(15.2345) returns the value 15.

Page 171: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

171

Statistics Functions

Avg(number argument1, number argument2, ... , number argumentN)Description: Returns the arithmetic average (floating point number) of the numberarguments.Examples: The expression Avg(12,24,32,88) returns the value 39.000000.

Max(number argument1, number argument2, ... , number argumentN)Description: Returns the highest value from all of the number arguments. If one of thenumber arguments is a floating point, the answer will be a floating point.Examples: Max(12,24,32,88) returns the value 88.

Min(number argument1, number argument2, ... , number argumentN)Description: Returns the lowest value from all of the number arguments. If one of thenumber arguments is a floating point, the answer will be a floating point.Examples: Min(12,24,32.6,88) returns the value 12.000000.

Rand( )Description: Generates a random floating point number between 0.000000 and1.000000.Example: Trunc(5.999999*Rand())+1 randomly picks a number between 1 and 6.

Logarithmic Functions

Exp(number argument1)Description: Returns the result of e (e = 2.71828...) raised to the power numberargument1.Examples: Exp(3.091) returns the value 21.99906.

Log(number argument1)Description: Returns the natural logarithm of number argument1. The natural logarithm isbase e (e = 2.71828...).Example: Log(22) returns the value 3.091042.

Log10(number argument1)Description: Returns the base 10 logarithm of number argument1.

Example: Log10(22) returns the value 1.342423.

Page 172: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

172

Logic FunctionsThese functions evaluate whether a given argument is true (nonzero) or false (0). A stringvalue is always evaluated as true even if the string is "0".

False(argument1)Description: Indicates whether argument1 (value, tag, or expression) is false (0).Return Values: 1 if argument1 is false; 0 if argument1 is true.Examples: False(2>1) returns the value 0.

If(condition, result if true, result if false)Description: This function conditionally executes one or two statements. It acts as an if-then-else statement.Parameters: Condition is an expression, tag, or value that is evaluated as either true(nonzero) or false (0).Result if true is a value, tag, or expression that is returned if condition is true.Result if false (optional parameter) is a value, tag, or expression that is returned if conditionis false.Example: The expression if (account>=10, account=0, account+1) will setthe tag account to 0 if it value is 10 or higher, otherwise the value of account will beincremented by one. The result if true expression could be 0 if the tag account is in the tagcolumn opposite this expression so that it receives the return value of this expression.Example: If(account=5,0) returns the value 0 if the value of account is 5.

True(argument1)Description: Indicates whether argument1 (value, tag, or expression) is true (nonzero).Return Values: 1 if argument1 is true; 0 if argument1 is false.Examples: True(2>1) returns the value 1.

Functions for String Manipulation

Asc2Str(argument1, argument2, ... , argumentN)Description: Strings together character strings and characters in ASCII code to form asingle character string.Parameters: Each argument is either a character string or a number value that isinterpreted to be its corresponding ASCII character. The character strings and ASCIIcharacters are combined to form one long character string. Character string argumentsmust be enclosed in double quotes.Example: The expression Asc2Str(“test”, 49, 50) returns the character stringtest12, because 49 is the ASCII code for the character 1 and 50 is the ASCII code for thecharacter 2.

Note: Your version of windows may use different fonts and return nonstandard ACSIIcharacters for higher ASCII numbers.

Page 173: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

173

CharToValue("string tag name", "integer array tag name")Description: Converts a string to number array by storing each character in the string inorder by its corresponding ASCII value. Each ASCII value is one byte (eight bits).Parameters: The index of the tag array indicates the first array element that stores aword. If no index is given, the 0th element will be the first to be written. Normally, youshould start at the first element as shown in the example below (see Array Tags, p. 60).Return Values: In addition to performing its primary function, this function will returnthe number of array elements written, which equals the number of characters in the string.It will return a zero if there is an error.Example: There is a tag TestStr that holds the string ABC and there is an integer array tagTest with size three. CharToValue("TestStr", "Test[1]") returns the value 3(three characters in the string) and Test[1] holds the value 65 (ASCII A), Test[2] holds thevalue 66 (ASCII B), and Test[3] holds the value 67 (ASCII C).

CharToValueW("string tag name", "integer array tag name")Description: Converts a string to number array by storing each pair of characters in thestring in order by their corresponding ASCII values. Each ASCII value is one byte (eightbits), so each element of the array stores one word (two bytes, sixteen bits). The twobytes are stored in reverse order in the word, so the first word contains the byte for thesecond character followed by the byte for the first character.Parameters: The index of the tag array indicates the first array element that stores aword. If no index is given, the 0th element will be the first to be written. We recommendthat you start at the first element as shown in the example below (see Array Tags, p. 60).Return Values: In addition to performing its primary function, this function will returnthe number of array elements written, which equals the number of characters in the stringdivided by two and rounded up. It will return a zero if there is an error.Example: There is a tag TestStr that holds the string ABC and there is an integer array tagTest with size two. CharToValueW("TestStr", "Test[1]") returns the value 2(three characters in the string). Test[1] holds the value 16961 (the integer equivalent tothe hexadecimal word formed by the digits of the value of ASCII B being placed beforethe digits of the value of ASCII A) and Test[2] holds the value 67 (ASCII C).

NCopy(string argument1, integer argument1, integer argument2)Description: Returns a substring (portion of the string).Parameters: String argument1 is a string or string tag from which you want to extract thesubstring.Integer argument1 indicates the initial character of the substring (reading the string fromleft to right and starting with position 0). Using a position that doesn't exist will result inno output being generated.Integer argument2 indicates the number of characters, starting with the initial characterindicated by integer argument1, included in the substring. If this argument would printmore characters than are available in the string, the substring output will stop at the endof the string.Example: NCopy("System",3,2) returns the string te. (S is the 0th character.)

Page 174: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

174

Num(argument1)Description: Converts the value of argument1 to a real (floating point) number.Parameters: Argument1 can be any tag or string. If it is not a number, the value returnedwill be 0.000000.Example: If string tag Test4 has a value 4, Num(Test4) returns the value 4.000000.

Str(number argument1)Description: Converts the value of number argument1 to a character string.Example: If the tag Dummy2[1] has the value 9.134, Str(Dummy2[1]) returns thestring 9.134000.

Str2Asc(single character argument1)Description: Returns the ASCII code of a character.Parameters: The argument should be a single character. If there is more than onecharacter, the return value will be for the first character; any others are ignored.Example: Str2Asc("B") returns the value 66 (ASCII code for B).

StrLeft(string argument1, integer argument1)Description: Returns string characters from string argument1 starting from the leftmostcharacter.Parameters: The number of returned characters is determined by integer argument1. Ifinteger argument1 is larger than the number of characters in the string, the entire string willbe returned. If integer argument1 is zero, no characters will be returned.Example: StrLeft("platypus", 5) returns the string platy.

StrLen(string argument1)Description: Returns the length in characters of string argument1.Example: StrLen("platypus") returns the value 8.

StrLower (string argument1)Description: Converts the uppercase letters in string argument1 to lowercase letters.Example: StrLower("TestB") returns the string testb.

StrRChr(string argument1, single character argument1)Description: Finds the first occurrence of single character argument1 in string argument1and returns a substring that starts with this character and includes the characters to theright of it. If single character argument1 is not found, the NUL character (ASCII value 0)isreturned.Example: StrRChr("Platypus", "y") returns the string ypus.

Page 175: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

175

StrRight(string argument1, integer argument1)Description: Returns a substring from string argument1.Parameters: The position of the first character returned is determined by integerargument1 reading from right to left, with the last character in the string being at position1. The number of returned characters is equal to the value of integer argument1. If integerargument1 is larger than the number of characters in the string, the entire string will bereturned. If integer argument1 is zero, no characters will be returned.Examples: StrRight("platypus", 5) returns the string typus.

StrStr(string argument1, string argument2)Description: Finds the first occurrence of string argument2 in string argument1 and returnsa substring that starts with this string and includes the characters to the right of it. If stringargument2 is not found, the NUL string (ASCII value 0) will be returned.Example: StrStr("Platypus", "at") returns the string atypus.

StrStrPos(string argument1, string argument2)Description: Searches for the first occurrence of string argument2 in string argument1 andreturns the number of its position counting from the left.Return Values: Integer number of the position of the first character in string argument2,counting from the leftmost character in string argument1, or an error code. The leftmostcharacter in string argument1 is counted as position zero.Error Codes: –1 (string not found)Example: StrStrPos("Platypus", "at") returns the value 2.

StrTrim(string argument1, integer parameter1)Description: Removes blank spaces from the ends of string argument1 in a methoddetermined by integer parameter1.Parameters: Integer parameter1 is optional; there are three different options. The defaultmethod is to remove all spaces on the right and the left. Using a number other than 0, 1,or 2 will return the NUL string (ASCII value 0).

0 Remove spaces on the right and the left (default).1 Remove spaces on the left.2 Remove spaces on the right.

Examples: StrTrim(" Test ",0) returns the string Test without any spaces.

StrUpper(string argument1)Description: Converts all lower case letters in string argument1 to uppercase letters.Examples: StrUpper("test") returns the string TEST.

Page 176: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

176

ValueToChar("integer array tag name", integer argument1)Description: Converts an integer array to string by converting the values stored in eacharray element to their ASCII character equivalents and returns the string formed fromthese characters. This function reverses the effects of the CharToValue( ) function.Parameters: The integer array must contain integer values that have ASCII equivalentcharacters in order for this function to work. The function will stop converting numbersto ASCII characters at the first empty array element. If the first array element holds azero, there will be no output. If an index number is specified in the array name, thatelement will be the one that the function starts with. If no index is specified, the functionwill start with the 0th element.Integer argument1 can be larger than the number of elements; the output will be the sameas if integer argument1 is the same as the total number of array elements.Example: An integer array Test[n] has elements Test[1] containing the value 65 (ASCIIA), Test[2] containing the value 66 (ASCII B), and Test[3] containing the value 67 (ASCIIC). The expression ValueToChar("Test[1]",3) returns the string ABC.

ValueWToChar("integer array tag name", integer argument1)Description: Converts an integer array to string by converting the values stored in eacharray element to their ASCII character equivalents and returns the string formed fromthese characters. This function reverses the effects of the CharToValueW( ) function.Parameters: The integer array must contain integer values that are equivalent to wordsholding two bytes (in reverse order) containing ASCII equivalent characters in order forthis function to work. The function will stop converting numbers to ASCII characters atthe first empty array element. If the first array element holds a zero, there will be nooutput. If an array element does not contain a full word, the function will stop conversionwith that element.If an index number is specified in the array name, that element will be the one that thefunction starts with. If no index is specified, the function will start with the 0th element.Integer argument1 can be larger than the number of elements; the output will be the sameas if integer argument1 is the same as the total number of array elements.Example: An integer array Test[n] has an element Test[1] containing the value 16961.This is the decimal value of the binary number composed of the hexadecimal bytes fortwo ASCII characters B (66) and A (65). It also has the element Test[2] containing thevalue 67 (ASCII C). The expression ValueWToChar("Test[1]", 2) returns the stringABC.

Date and Time ManipulationThese function use the seconds that have elapsed since a certain date as a basis forcalculating the date, day, and time. The original date is based on the developmentcomputer's Regional Settings. (See your system documentation for details.) You can findyour base date and time by using ClockGetDate(0) and ClockGetTime(0). Often thesefunctions are used to compare recent dates. In this case, use DateTime2Clock() to getelapsed seconds and use this value in the arguments of the other functions. All of theexamples in this list of functions are based on a starting time of 19:00:00 on 31 Dec 1969.Your system will often vary from this starting time.

Page 177: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

177

ClockGetDate(integer argument1)Description: Returns the date corresponding to integer argument1 in seconds.Parameter: Integer argument1 is elapsed seconds.Return Value: The date in a string in DD/MM/YYYY format.Example: ClockGetDate(633000000) returns the string 22/01/1990 (22 Jan 1990).

ClockGetDayOfWeek(integer argument1)Description: Returns the day of the week corresponding to integer argument1 in seconds.Parameter: Integer argument1 is elapsed seconds.Return Value:

Number Day Number Day0 Sunday 4 Thursday1 Monday 5 Friday2 Tuesday 6 Saturday3 Wednesday

Example: ClockGetDayOfWeek(0) returns the value of the day of the system startingtime.

ClockGetTime(integer argument1)Description: Returns the time corresponding to integer argument1 in seconds.Parameter: Integer argument1 is elapsed seconds.Return Value: The time as a string in 24-hour HH:MM:SS format.Example: The expression ClockGetTime(633000000) returns the string "04:20:00"

DateTime2Clock(string argument1, string argument2)Description: Returns the number of elapsed seconds from the system starting time.Parameters: String argument1 must be the date in DD/MM/YYYY format. Stringargument2 must be the time in 24-hour HH:MM:SS format.Example: DateTime2Clock("10/10/1990","11:02:30") returns the value6555700950.

GetClock( )Description: Returns the number of seconds elapsed since the system starting time.Example: When this was written, the expression GetClock( ) returned the value938468597.

Hour2Clock(string argument1)Description: Converts a time to a number of seconds.Parameters: String argument1 is string containing the time in 24-hour HH:MM:SS format.Examples: The expression Hour2Clock("10:20:30") will return the value 37230.

Page 178: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

178

SetSystemDate(string argument1)Description: Modifies the system date in your computer.Parameters: String argument1 contains the desired date in DD/MM/YYYY format.Example: SetSystemDate("22/09/1995") sets the system date to September 9,1995.

SetSystemTime(string argument1)Description: Modifies the system time in your computer.Parameters: String argument1 contains the desired time in 24-hour HH:MM:SS format.Example: The expression SetSystemTime("13:00:00") will set the system time to1:00:00 p.m.

Trigonometric FunctionsAll of the trigonometric functions use radians rather than degrees. If you have a value thatis measured in degrees, to convert it to radians, multiply the number of degrees by ππππ(pi = 3.1415926…) and divide the result by 180. If you want to convert a radian result ofone of the trigonometric functions to degrees, multiply the number in radians by 180 anddivide it by ππππ.Examples: The expression Acos(number argument1)*180/Pi() will return a number indegrees rather than in radians. Cos(number of degrees*Pi()/180) will convert thenumber of degrees to a number of radians (which is a usable number argument1) and return acorrect answer.

ACos(number argument1)Description: Returns the arccosine of number argument1.Parameters: Number argument1 is the cosine of the return value. It has a value between–1 and 1.Return Values: The units of the arccosine will be in radians from 0 to 3.141593 (ππππ).Example: The expression ACos(0.997495) will return the value 0.070796.

Asin(number argument1)Description: Returns the arcsine of number argument1.Parameters: Number argument1 is the sine of the return value. It has a value between –1and 1.Return Values: The units of the arcsine will be in radians from 0 to 3.141593 (ππππ).Example: The expression ASin(0.997495) will return the value 1.500000.

ATan(number argument1)Description: Returns the arctangent of number argument1.Parameters: Number argument1 is the tangent of the return value.Return Values: The units of the arctangent will be in radians from 0 to 3.141593 (ππππ).Example: The expression ATan(14.101420) will return the value 1.500000.

Page 179: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

179

Cos(number argument1)Description: Returns the cosine of number argument1.Parameters: Number argument1 must be in radians.Example: The expression Cos(1.5) will return the value 0.070737.

Cot(number argument1)Description: Returns the cotangent of number argument1.Parameters: Number argument1 must be in radians.Example: The expression Cot(1.5) will return the value 0.070915.

Pi( )Description: Returns the value of the numeric constant pi (ππππ) to six decimal places(3.141593).

Sin(number argument1)Description: Returns the sine of number argument1.Parameters: Number argument1 must be in radians.Example: The expression Sin(1.5) will return the value 0.997495.

Tan(number argument1)Description: Returns the tangent of number argument1.Parameters: Number argument1 must be in radians.Example: The expression Tan(1.5) will return the value 14.101420.

Functions for Opening and Closing Windows

Close(string argument1)Description: Closes a window during runtime execution or emulation.Example: Close(“screenlb”) is the same as Close("screenlb.scr").

Note: For Windows NT applications only: When you open a Replace window (see p. 84),it automatically closes Replace and Popup windows that touch the new window, so theClose() function is not necessary.

Open(string argument1, x1, y1, x2, y2)Description: Opens a screen or group of screens of an application during runtimeexecution or emulation.Parameters: String argument1 is the name of the screen (default; extension .scr) or screengroup (extension .sg). X1, y1, x2, and y2 are optional parameters that define the initialscreen coordinates of the window to be opened.Return Values: 0 (function executed successfully) or 1 (function cannot be executed)Example: Open("screenlb") is the same as Open("screenlb.scr").

Page 180: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

180

Security System

CreateUser(string user name, string group name, string password)Description: Adds a user to the security database (see p. 241).Parameters: See the security system chapter for information on these parameters(p. 241).Return Values:

0 Success1 Invalid number of parameters2 Wrong parameter type3 User already exists.4 Group does not exist.5 It is not possible to safely write the data.6 It is not possible to use the CreateUser function.

Example: CreateUser("John","Projects","8763")

RemoveUser(string user name)Description: Removes a user from the security database (see p. 241).Parameters: See the security system chapter for information on these parameters(p. 241).Return values:

0 Success1 Invalid number of parameters2 Wrong parameter type3 User does not exist.4 It is not possible to safely write the data.

Example: RemoveUser("John")

Page 181: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

181

Module Activation Functions

AppActivate(string application title, integer parameter1)Description: Activates an application.Parameters: Integer parameter1 (optional) has the following values. See your Windowsdocumentation for information about these options.

0 SW_HIDE1 SW_SHOWNORMAL2 SW_SHOWMINIMIZED3 SW_SHOWMAXIMIZED4 SW_SHOWNOACTIVATE5 SW_SHOW6 SW_MINIMIZE7 SW_SHOWMINNOACTIVE8 SW_SHOWNA9 SW_RESTORE (default) Must be 9.

Note: AppActivate() moves the target application to be in the foreground. Because of this,it cannot be tested in the Database Spy dialog. (The Toggle button function is triggered onthe button being pressed down, which brings the Database Spy dialog to the foreground.)

Note: When using AppActivate() with a DesignStudio application screen button, set thebutton to execute on up, otherwise the target application won't be in the foreground and itwon't respond.

Example: AppActivate("Untitled - Notepad")

AppIsRunning(string application title)Description: Verifies if an application is being executed.Return value: 1 (application is running) or 0 (application was not found).Example: AppIsRunning("Microsoft Word - test.doc")

AppPostMessage(string application title, wParam, lParam)Description: Sends a command message to a Windows application.Parameters: String application title is the name of the Windows application that will beaffected.wParam is a Windows parameter. See your Windows documentation for moreinformation. The possible wParam values usable by this function are MINIMIZE,MAXIMIZE, RESTORE, and CLOSE. The integers 0 and 16 also can be used in place ofCLOSE. These string arguments are not case-sensitive.lParam is a Windows parameter. See your Windows documentation for more informationand for possible values. This is an optional parameter. The integer 0 is the same as havingno parameter.Return Values: 0 (success) or 1 (failure).

Page 182: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

182

Example: The expression AppPostMessage("Calculator", "CLOSE",0) willclose the Windows Calculator application, as will AppPostMessage("Calculator",16).AppPostMessage("Test.txt – Notepad", "MAXIMIZE") will maximize theWindows Notepad application window and open the file test.txt.

AppSendKeys(argument1, argument2, ..., argumentN)Description: Sends keyboard codes to the active (foreground) Windows application.Parameters: Each argument is tag or value of string or integer type that specifies akeystroke that will be sent to the active Windows application. Each consecutivekeystroke is sent to the application after a delay of 200 ms.Legitimate strings for these arguments are <ALT>, <BACKSPACE>, <BREAK>,<CAPSLOCK>, <CTRL>, <DELETE>, <DEL>, <DOWN>, <END>, <ENTER>, <ESCAPE>,<ESC>, <F1> through <F12>, <HOME>, <INSERT>, <LEFT>, <NUMLOCK>, <PGDN>,<PGUP>, <PRTSC>, <RIGHT>, <TAB>, <UP>, and all alphanumeric characters. Because ofits use with special keys, the less than triangular bracket must be typed twice to be sent(<<). Other alphanumeric characters are sent without triangle brackets.

Note: AppSendKeys() should be used to send commands to Windows applications. Thereare other DesignStudio functions which send data and these work more efficiently.

Note: AppSendKeys() requires the target application to be in the foreground, so theAppActivate() function should be used first to move the application to the foreground.Because of this, AppSendKeys() cannot be tested in the Database Spy dialog. (The Togglebutton function is triggered on the button being pressed down, which brings the DatabaseSpy dialog to the foreground.)

Note: When using AppSendKeys() with a DesignStudio application screen button, set thebutton to execute on up, otherwise the target application won't be in the foreground and itwon't respond.

Example: If you use AppActivate("Untitled - Notepad", 3) first to bring theNotepad application to the foreground, AppSendKeys("<ALT>F", "O") will open anew file.

CleanReadQueue( )Description: Removes all read messages from the communication drivers.Example: CleanReadQueue()

CloseSplashWindow( )Description: Closes the splash window.Example: CloseSplashWindow()

DisableMath( )Description: Stops the execution of the mathematical task until the call of theEnableMath( ).Example: DisableMath()

Page 183: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

183

EnableMath( )Description: Enables the execution of the mathematical task after the use of theDisableMath( ).Example: EnableMath()

ExitWindows(integer parameter1)Description: Exits Windows.Parameters: Integer parameter1 has the following legal values:

0 Reboot Windows.1 Log off.2 Shut down; unsaved data is lost

Example: ExitWindows(1)

IsScreenOpen(string screen name1)Description: Verifies whether a screen is open in the Viewer.Return values: 0 (the screen is not open) or 1 (the screen is open).Example: IsScreenOpen("menu.scr") is the same as IsScreenOpen("menu").

IsViewerInFocus( )Description: Verifies if Viewer is in the focus (is the active window).Return Values: 0 (the Viewer is not in focus) or 1 (the Viewer is in focus).

Example: IsViewerInFocus()

LogOff( )Description: Logs off the current user. When this function is used the Guest account isautomatically activated as the current security group (see the Security chapter, p. 241).Return Values: The return value is always 1.Example: LogOff()

LogOn(string user name, string password)Description: Activates the Log On/Off runtime function or logs on a valid user.Parameters: Both parameters are optional. Using no parameters just activates the LogOn/Off runtime function and logs the user on in the Guest group. Using parameters logson the specified user.Return Values: 0 (security system is disabled) or 1 (security system is not disabled).Examples: LogOn(“Smith”,”senha”), LogOn()

Math(integer argument1)Description: Executes the Math worksheet (p. 197) with the number specified by integerargument1. All lines in the Math worksheet will execute once and then the next commandafter the Math() command will be executed. In this way, the Math() command acts as asubroutine call in a program.Example: The expression Math(5) executes Math worksheet 5.

Page 184: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

184

Note: The Math worksheet that is being called must have a blank Execution field(p. 200).

Note: The Background Task (p. 293) needs to be running for a Math worksheet toexecute.

NoInputTime( )Description: Returns the time since the last keyboard action in seconds.Example: NoInputTime()

PostKey(0, hexadecimal number wParam, 0)Description: Sends keyboard key codes to the active List Box object.Parameters: The first parameter must be fixed at zero. The third parameter is a WindowswParam that must be set to zero for this function. The second parameter sets the key codesent using the values in the table:

Hex Number Key Code0x0D Enter0x1B Esc0x21 Page Up0x22 Page Down0x23 End0x24 Home0x26 Set Up0x28 Set Down

Example: PostKey(0, 0x0D, 0)

Page 185: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

185

Recipe("operation:recipe data file name")Description: Performs operations involving recipe files (see p. 223).Parameters: The format of the argument is a string containing an operation followed bya colon and the name of a recipe file, with no spaces between the elements of the string.Valid operation values are:

Save Saves values to recipe file.Load Loads values from recipe file.Delete Deletes the recipe data file.Init Initializes values in recipe file.

Return Values: Error codes:

0 No errors.1 The tag is numeric.2 Expression doesn’t contain the colon.3 Invalid operation name.4 File not found by the system.5 Disk error.

Example: Recipe("load:recipe1.rcp")

Note: The Recipe() function accesses two kinds of files: configuration files and data files.The configuration file contains the tag declarations that form a part of a recipe worksheet(or group). It has an .rcp extension and is located in the \<application>\config\ folder.After recipe values have been saved using the Save operation, a data file with the samename and a .dat extension is located in the \<application>\ folder.

Note: The Background Task execution task (see p. 293) must be running in order toexecute the Recipe() function.

Page 186: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

186

Report("operation:report file name")Description: Performs operations involving report files configured in Report worksheets(see p. 227).Parameters: The format of the argument is a string containing an operation followed bya colon and the name of a recipe file, with no spaces between the elements of the string.Valid operation values are:

Disk Sends report values to a file.Prn Sends report values to a printer. This

value does not work in Windows CEapplications.

Note: The Report() function uses only the name of the file that is specified in the Reportworksheet Output File field. Do not include the extension in the report file name parameter.

Return Value: Error codes:

0 No errors.1 The tag is numeric.2 Expression doesn’t contain the colon.3 Invalid operation name.4 File not found by the system.5 Disk error.

Example: Report("disk:report1")

Note: If no extension is given in the Report worksheet Output File field, the file defaultsto a .txt file, unless an .rtf file has been saved (then the file is saved without anextension). Any extension can be specified, though .txt, .doc, .rtf, .wri, .csv, andsimilar extensions are recommended. The report file and is located in the\<application>\config\ folder.

Note: The Background Tasks task (see p. 293) must be running to execute the Report()function.

Page 187: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

187

SendKeyObject(number event, string main key, number Shift, number Ctrl,number Alt, string target screen)Description: This function sends key codes to objects on the opened application screenand is used to trigger the Command dynamic object properties of those objects. It mimicsthe setup of the Key group box found in the Command dynamic object property (p. 139),the Pushbutton active object (p. 133), or the Multistate Pushbutton configuration of theSmart Message active object (p. 129).Parameters: Number event determines which Command dynamic object property event istriggered by the function. Each number matches a choice on the Event drop-down list inthe Object Properties window.

0 On Down1 While Down2 On Up

Note: If 2 (On While) is used, the Command worksheet will be executed just once, notcontinuously.

String main key is the parameter that is sent to any objects on screen. The possible valuesare the functions F1 through F10, +, -, *, /, HOME, END, INSERT, DELETE, DOWN, UP,LEFT, RIGHT, PAGEUP, PAGEDOWN, SPACE, RETURN, BACKSPACE, ESCAPE, and theletters A through Z. The letters are not case-sensitive.Function keys on the OpenHMI runtime workstations do not use the standard F11-F20function keys. Instead they use key combinations as shown on this table:

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

RuntimeWorkstationKeypad Key

DesignStudioKey Combo

F11 Shift + F1 PF1 Ctrl + F1 PF7 Alt + F1F12 Shift + F2 PF2 Ctrl + F2 PF8 Alt + F2F13 Shift + F3 PF3 Ctrl + F3 PF6 Alt + F3F14 Shift + F4 PF4 Ctrl + F4 PF10 Alt + F4F15 Shift + F5 PF5 Ctrl + F5 PF11 Alt + F5F16 Shift + F6 PF6 Ctrl + F6 PF12 Alt + F6F17 Shift + F7F18 Shift + F8F19 Shift + F9F20 Shift + F10

Note: The letters A through Z are not case-sensitive. If CAPSLOCK is on, SHIFT plus aletter is not the same as a capital letter. If CAPSLOCK is off, SHIFT plus a letter is thesame as a capital letter.

Number Shift, Number Ctrl, and Number Alt are optional parameters that are used to add aSHIFT, CTRL, or ALT key to the sent key command. Each parameter has two possiblevalues: 0 or 1. Zero means that the key is not included; one means that it is. If any ofthese parameters is used, they all must be used; just use 0 for the keys that you don't want(see the examples below).

Page 188: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

188

String target screen is the name of the screen that the values will be sent to. This is used toselect one specific screen if more than one screen is open. Like other functions that callscreens, the screen name is enclosed in quotes and the .scr extension is optional.Return Values: -2 (memory allocation error), -1 (viewer is not running), 0 (invalidparameters), or 1 (success).Example: SendKeyObject(0, "F1") will send the F1/On Down key code to all objectsin the open screen.SendKeyObject(2, "V", 1, 0, 0) will send the SHFT+V/On Up key code to allobjects in the open screen. Note that even though the CTRL and ALT keys are not used,there must still be zeros for their parameters because the SHIFT key parameter is used.

SetAppPath(argument)Description: Points the subdirectories \hst and \alarm for the current application.Parameters: Argument is a tag or value of the string type with the name of the newapplication directory.Return value: 0 (failure) or 1 (success)Example: SetAppPath ("C:\Application")

SetViewerInFocusDescription: Puts the Viewer task (see p. 281) in focus (makes it the active window).

ShutDown( )Description: Closes the DesignStudio active runtime programs , but does not close theconfiguration application, the database, or the LogWin window.Return Values: The return value is always a 1.Example: ShutDown()

ViewerPostMessage(string screen title, wParam, lParam)Description: Sends a command message to an application screen that is active in theCEView emulation window (see p. 281).Parameters: String screen title is the name of the Windows application that will beaffected.wParam is a Windows parameter. See your Windows documentation for moreinformation. The possible wParam values usable by this function are "MINIMIZE","MAXIMIZE", "RESTORE", and "CLOSE". The integers 0 and 16 also can be used inplace of "CLOSE". These string arguments are not case-sensitive.lParam is a Windows parameter. See your Windows documentation for more informationand for possible values. This is an optional parameter. The integer 0 is the same as havingno parameter.Return Values: 0 (success) or 1 (failure).Example: The expression ViewerPostMessage("demo.scr", "CLOSE",0) willclose the demo.scr application screen, as will AppPostMessage("demo", 16).

Page 189: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

189

Wait(integer argument1)Description: Interrupts the execution of a set of instruction for integer argument1milliseconds.Example: The expression Wait(200) provides an interrupt time of 200 ms.

Note: The Wait() function cannot be used in Expression cells of Screen Logic windows,Expression cells of Command Object Properties windows, the Tag/Exp field of thePushbutton Object Properties window, or in any other Object Properties fields that canhold an expression.

WinExec(string path and file name1, integer parameter1)Description: Activates a program that is external to DesignStudio. WinExec() argumentsresemble command lines in DOS or in the Windows Run window.Parameters: The string path name is the path and name of the program (and optionallythe file) to be executed. Integer parameter1 (optional) can have the following values thatcontrol how the program starts up:

0 Hides the application (puts it in the background).1 Activates and displays the application (default).2 Activates the application and displays it as an icon.3 Activates the application and maximizes it.4 Shows the application at its previous size. The application is still active.7 Shows the application as an icon. The application is still active.

Return Value: 0 (the program was not successfully executed) or 1 (the program wassuccessfully executed).Example: WinExec("c:\program files\windows\accessories\notepad.exemytext.txt") opens the file mytext.txt in the Notepad program.

Example: WinExec("\DesignStudio\Bin\pserver.exe myprint.txt") printsthe file myprint.txt.

Note: Windows NT Only – You cannot print from a Windows CE DesignStudioapplication.

Example: WinExec(“\DesignStudio\Bin\logon.exe /OFF) deactivates theDesignStudio Log On/Off utility (see p. 251).

File Manipulation Functions

FileCopy(string path and file name1, string path and file name2)Description: Copies the file string path and file name1 to file string path and file name2.Similar to the DOS Copy command.Example: FileCopy("\file.txt","\file.bak")

Page 190: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

190

FileDelete(string path and file name1)Description: Deletes the file string file name1.Example: FileDelete("\file.txt")

Note: Using this function to delete .exe or .app files is not recommended.

FileLength(string path and file name1)Description: Returns the size of file string filename1 as a floating point number.Error Codes: 0 (the FileLength command failed)Examples: FileLength("\Text.txt")

FileRename(string path and file name1, string path and file name2)Description: Renames the file string path and file name1 to string path and file name2.Example: FileRename("\file.txt","\new_file.txt")

Note: Using this function to delete .exe or .app files is not recommended.

FindFile(string path and file name1)Description: Verifies that the indicated string path and file name1 files exist.Parameters: String path and file name1 can be a single file or can include wild cardoperators (* and ?—see Windows documentation for more information).Return Values: 1 (files exist) or 0 (files do not exist)Example: FindFile("\disk\appl\hst\*.hst")

GetFileAttributes(string path and file name1)Description: This function returns one or more number codes representing different fileattributes.Parameters: String path and file name1 is a string or string tag that points to the file to beexamined. The default path is the main folder of the open application.Return Values:

Return Value File Attribute–1 Error

1 Read Only2 Hidden4 System

16 Directory32 Archive

128 Normal256 Temporary

Example: On a 3400 series workstation, GetFileAttributes("\Disk\<ApplicationFolder Name>\<Application File Name>") will return the value 32 (archive file).

Page 191: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

191

GetFileTime(string path and file name1, number parameter1)Description: The function returns the modification date and/or time of a file.Parameters: String path and file name1 is a string or string tag that points to the file to beexamined. Number parameter1 determines what is returned based on the following table:

Parameter Value Return Value0 Both date and time1 Date only2 Time only

Example: On a 3400 series workstation, GetFileTime("\Disk\<Application FolderName>\<Application File Name>") will return a value similar to 31/01/2000 17:27:54.

Note: This function does not work for executable files in the \Windows directory of theOpenHMI workstations.

Print(string path and file name1)Description: Prints the ASCII file specified in string path and file name1.Example: Print("c:\file.txt")

RDFilen("string filename1", string path name1, string mask1, numberparameter1)Description: This function opens a window in which the operator can select a file. Thename of this file will be written to a tag.Parameters: String filename1 must be a string tag that will receive the name of theselected file; it must be in quotes as shown in the example even if it is a tag. String pathname1 is the path of the folder that it opened. String mask1 is the mask for the type of filesto be displayed (such as *.txt or *.?at). It can include wild card operators (* and ?—see Windows documentation for more information).Number parameter1 (optional) is a flag that determines whether the window opened can benavigated from. If the value of number parameter1 is zero, the operator cannot navigatefrom the initially opened window. If number parameter1 has a nonzero value or if it isomitted from the expression, the operator can navigate from the initially opened window.Return values:

0 Successful1 One of the three string parameters is not a string.2 String filename1 contains an invalid tag name.3 The user canceled the operation. (No file was selected.)

Example: RDFilen("filename", "\Disk\Demo", "*.txt")

Page 192: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

192

Functions for Graphics Screens Printing

PrintWindow(string screen name)Description: Prints any application screen (.scr extension). If the screen is not currentlyopen in on the runtime workstation or in the runtime emulator (see p. 281), it will beloaded into memory, all tag values and mathematical operations will be updated andcalculated, and it will be printed. This operation does not interfere with other openscreens.Example: PrintWindow("screen.scr") is the same as PrintWindow("screen").

Note: You can use the PrintWindow() function to print reports in graphical format.

Functions for Text Translations

Ext(string argument1)Description: Function for text translation in the application (see p. 235).Parameters: String argument1 is the string to be translated.

Example: The function Ext("Text") will return the string containing the translation ofthe word text as it is defined in the translation worksheet defined by the functionSetTranslationFile().

SetTranslationFile(string filename)Description: Function for files translation. The system uses the translation file andchanges all objects with text outputs of the application for its translation (see p. 235).Parameters: String filename contains the name of a translation file that has already beenset up in the application.Return value:

0 Successful1 Invalid number of parameters2 Wrong parameter type3 Translation file could not be opened or located.

Examples: SetTranslationFile("trans1.tra")

Note: You must have a translation file and the translation ability must be enabled (seep. 235) before this function will work.

Multimedia Functions

Play(string filename1)Description: Plays the .wav file named in string filename1.Return Values: 0 (success) or 1 (failure).Example: Play(“songs.wav”)

Note: This function will not work on the Windows CE runtime workstation.

Page 193: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

193

System Information

DbVersion( )Description: Returns the current application database version number, the number oftimes the database has been changed.Example: DbVersion()

GetAppHorizontalResolution( )Description: Function returns the value from the .app file [Info] section. It does nottest the configuration.Example: In a 640 x 480 application, the expressionGetAppHorizontalResolution() will return the value 640.

GetAppVerticalResolution( )Description: Function returns the value from the .app file [Info] section. It does not testthe configuration.Example: In a 640 x 480 application, the expressionGetAppHorizontalResolution() will return the value 480.

GetComputerName( )Description: Returns the local computer name from the Windows configuration.

GetHardkeyModel( )Description: Returns a string with the name of the hardkey model. Nothing will bereturned if the hardkey is not installed or found.

Note: For this function to execution correctly, you must install the hardkey first.

GetHardkeySN( )Description: Returns a string with the serial number of the hardkey. A zero will bereturned if the hardkey is not installed or found.

Note: For this function to execution correctly, you must install the hardkey first.

GetOS( )Description: Returns an operating system identification parameter.Return Values:

0 Windows 3.x1 Windows 952 Windows NT3 Windows CE

GetPrivateProfileString(string file section, string parameter name, stringfailure message, string path and file name)Description: Reads parameters from .ini files.

Page 194: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

194

Parameters: String file section is the section of the .ini file. It is written without thesquare brackets. String parameter name is the parameter that you want to read. Stringfailure message is the message you want to return if the parameter is not found or if itsvalue is NULL. String path and file name is the path and file name of the .ini file to beexamined.Example: GetPrivateProfileString("File", "Path", "Value notfound.", "\Disk\CEApp.ini") will return the value of the parameter Path in thesection [File] of the file CEApp.ini in the directory \Disk. If there is no suchparameter, the return value will be the string "Value not found.".

GetProductPath( )Description: Returns the path to the DesignStudio directory.Example: The expression GetProductPath() can return the "C:\ProgramFiles\DesignStudio\".

GetTickCount( )Description: Returns the current value of the system clock tick counter.Return Value: Integer with the milliseconds counted by the clock since computerinitialization.

InfoAppDir( )Description: Returns the application’s current directory.

Example: The expression InfoAppDir() can return "D:\DesignStudio\DEMO".

InfoAppAlrDir( )Description: Returns the alarm directory of the current application.

Example: The expression InfoAppAlrDir() can return"D:\DesignStudio\DEMO\Alarm\".

InfoAppHstDir( )Description: Returns the data historic directory of the current application.

Example: The expression InfoAppHstDir() can return"D:\DesignStudio\DEMO\Hst\".

InfoDiskFree(string argument1)Description: Returns an integer value with the usable free disk space on the diskspecified in string argument1.

Example: InfoDiskFree("C")

InfoResources(3)Description: Returns available system memory.

Example: InfoResources(3)

NoInputTime( )Description: Returns the time in seconds since the last input (keyboard, mouse, etc.)action.

Page 195: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

195

Example: NoInputTime()

ProductVersion( )Description: Returns the DesignStudio version number.Example: When this entry was written, ProductVersion() returned the value3.000000.

SetAppAlarmPath(string path name)Description: Sets the current alarm application path to the string path name.Example: SetAppAlarmPath("D:\DesignStudio\DEMO\Alarm\")

SetAppHstPath(string path name)Description: Sets the current hst application path to the string path name.Example: SetAppHstPath("D:\DesignStudio\DEMO\Hst\")

SetDateFormat(string single character, string date format)Description: Sets the separator and date format (DMY, DYM, MDY, MYD, YDM, orYMD).Error Codes: 0 (no error) or 1 (invalid parameter).Example: SetDateFormat(":", "YMD") will change the date string format from thedefault of DD/MM/YYYY to YYYY:MM:DD.

Database Access Functions

ForceTagChange(string tag name, argument1)Description: In some cases, you may want to write a value in a tag, forcing the system toact as if it were a new value. This function forces the value argument1 on the tag string tagname.Return Values: 0 (function failed) or 1 (function succeeded).Example: ForceTagChange("count", 100) will write the value 100 to the tagcount.

Page 196: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

196

Loops

FOR(number initial value, number final value, number increment)

NEXTDescription: Implements a For..Next programming loop. For precedes lines of loopexpressions and Next follows them. Next must be in the Tag or Tag Name cell. For musthave a tag to assign values to. This counter tag is generally given a single character namelike i. The loop starts with For assigning the number initial value to the counter tag, then allof the following lines of loop expressions are executed until the line containing Next.When the Next line is reached, For increases the value of the counter tag by the value ofnumber increment and the loop expressions are executed again. This continues until thecounter tag value reaches number final value. Then the loop expressions are executed onemore time and the program ignores Next instead of returning to the For line.Example: This example shows two nested For..Next loops initializing the values of anarray and class tag to zero. The inner (second) loop runs through 15 iterations of the twolines expressions that assign values to the tags Pointer and @Pointer and then i isincremented. This compact program loads 150 (15 x 11) tags with the value zero in asmall number of worksheet lines.

Note: Any For function must have a corresponding Next tag.

Note: The For() function cannot be used in Expression cells of Screen Logic windows,Expression cells of Command Object Properties windows, the Tag/Exp field of thePushbutton Object Properties window, or in any other Object Properties fields that canhold an expression.

ODBC Functions — Not Usable in Windows CEThese functions are not supported in Windows CE applications.

Page 197: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

197

Internal Tags Used With Functions (Programming)

GOTO

LABELDescription: Goto is a tag that is assigned a value by an expression. When Goto has avalue, the next worksheet line that is executed is the line containing a Label tag that isassigned the same value. This allows a program to skip over intervening worksheet lines.There can be multiple Goto..Label pairs in a worksheet, but Goto points to a Label below itin a worksheet. Goto cannot be used to go to a Label line that is above the Goto line. Gotocan also only find a Label in the same worksheet. It cannot allow execution of lines onanother worksheet. Goto is often use with an If() function in the expression column. Thisallows different condition to reference different lines in the worksheet.

Note: The Goto and Label tags cannot be used in Expression cells of Screen Logicwindows, Expression cells of Command Object Properties windows, the Tag/Exp field ofthe Pushbutton Object Properties window, or in any other Object Properties fields thatcan hold an expression.

Page 198: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150
Page 199: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

199

7. Math WorksheetsThe Math worksheet is a central location to put any scripted program steps, tagassignments, and calculations. These options allow you to use the scripting language toconfigure and augment the basic functionality of DesignStudio. See the ScriptingLanguage chapter (p. 159) for more information on mathematical expressions.The Math worksheet contains a list of programming lines that are executed as one of thebackground tasks during runtime. The rows are executed from the top of the worksheet tothe bottom. If the worksheet is still enabled to execute, then the rows will be executedfrom top to bottom again. The Background Tasks execution task (p. 293) must be activein order for the worksheet math to execute during runtime or runtime emulation.

Note: Math worksheets are supported in OpenHMI PE applications, but not inOpenHMI SE applications.

Creating and Managing a Math Worksheet

Creating a Math WorksheetThere are three ways to create and open a new Math worksheet.• Select the New… option in the File menu to open a New window and select the Math

Worksheet option (double-click or select and click OK) in the File tab. You may alsouse the New button in the Standard toolbar.

• Select the Document… option in the Insert menu to open a New Document windowand select the Math Worksheet option (double-click or select and click OK).

• Select the Tasks tab of the Workspace window, right-click the Math folder, and selectthe Insert command on the popup menu.

Opening a Math WorksheetTo open an already created Math worksheet, select the Tasks tab of the Workspacewindow and either double-click the Math folder or select the boxed plus beside it to openit. This will display the list of Math worksheets. Double-click one of them or right-clickone and select the Open option in the popup menu.

Saving a Math WorksheetTo save a Math worksheet, select the active Save or Save All button on the Standardtoolbar or select the Save, Save As…, or Save All options in the File menu. If these optionsare not active and you have made changes to the worksheet, select an empty cell in theworksheet and try a now active button or command.You may also close the worksheet and if you have made changes in it, you will beprompted to save it. If this is a newly created worksheet, you will also be prompted tochoose a sheet number. You may accept the sheet number by selecting OK, or you maychange the number and select OK. The sheet numbers automatically increment as you

Page 200: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

200

create new worksheets and the worksheets are stored in the Math folder in order of sheetnumber.

Deleting a Math WorksheetTo delete a Math worksheet, select the Tasks tab of the Workspace window and eitherdouble-click the Math folder or select the boxed plus beside it to open it. This will displaythe list of Math worksheets. Right-click the one you want to delete and select the Deleteoption in the popup menu.

Math Worksheet Overview

Math Worksheet HeaderDescription field: This field is both a remark field for documentation and the field used togenerate a title for the worksheet in the Math folder. If nothing is entered here, theworksheet will be listed in the Math folder only by its sheet number.Execution field: When a nonzero value (number or tag value) is in this field the worksheetwill execute its expression lines. A constant nonzero value will enable the Mathworksheet to execute continuously. A tag in this field can be used to trigger the Mathworksheet to execute or not based on tag value changes.

Note: If you have called a Math worksheet from another worksheet using the Math()function (p. 183), make sure that the Execution field is blank.

Page 201: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

201

Note: If possible, use the Scheduler worksheet (p. 231) to enable worksheet calculation.If the scheduler changes a tag that enables worksheet calculations, the application willrun faster than if worksheet calculations are constantly being performed. Math worksheetsgenerally affect application performance the most, so they should be enabled to calculatewhen necessary rather than running continuously.

Math Worksheet BodyThe Math worksheet consists of several lines containing tag and expression cells. Thescreen above shows where a tag, an expression, and a comment are placed in theworksheet.Tag Name field: A tag in this cell will receive the return value generated by the statementin the Expression cell of the same row.Expression field: An expression, a tag, or a value and an optional comment are written inthis cell. If there is a value placed or calculated here or a return value from an expression,it will be written to the tag in the same row Tag Name column. See Scripting Language(p. 159) for information on expressions.

Editing the Math Worksheet

To edit a cell or row, you first need to select it. To select a cell, double-click it so that it ishighlighted in blue, or select it so that its edges are highlighted in gray. To select a row,click the row number in the far left gray column or click and drag to highlight the cells inthe row. You may also click and drag to highlight more than one row and you mayhighlight a column by clicking the gray heading box on the top of the column. One cell(the first selected or the last dragged to) will have its edges highlighted.Once an item is selected, you may also delete (cut), copy, or paste rows and cells.Cutting, copying, and pasting can be done using Standard toolbar Cut, Copy, and Pastekeys; the Edit menu Cut, Copy, and Paste commands; the shortcut keys for Cut (Ctrl+X),Copy (Ctrl+C), and Paste (Ctrl+V); and commands in popup menus that appear when youright-click the selected item or items. These are standard Windows commands.When you have selected a column, a row, or several rows, the popup menu includes thecommands, Cut, Copy, Paste, and Insert Line. Insert Line will insert a line above the cellthat has the highlighted edges. When you have selected a cell so that its edges areselected, but it is not highlighted in blue, the popup menu will be the same. When youhave selected a cell by double-clicking so that it is highlighted in blue, the menu willinclude the commands, Undo, Cut, Copy, Paste, Delete, and Select All. Undo undoes theresult of the last command used in the cell. Cut and Delete both remove the cell’scontents. If you delete the text, you can Undo the deletion. If you Cut the text, you canPaste it into another cell or into the same cell, or you can Undo the deletion. If youdouble-click a field with more than one word in it, only one word will be highlighted inblue. You may click and drag or use the Shift and arrow keys to select all of the cellcontents or you may use the Select All command. When you select cells in more than onecolumn for the purpose of pasting them elsewhere in the worksheet, you must positionthe last highlighted cell (gray edges) in the same column as the leftmost cell that wasselected to be pasted.When you cut or delete a cell or row, a window will open to ask you if you are sure thatyou want to proceed. Click Yes to continue or No to cancel the action. If you delete a cellusing the Cut command from the popup menu that also includes the Undo command, you

Page 202: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

202

will not be asked to proceed. The cell value will disappear and you must use Undoimmediately to reverse the deletion.You cannot overwrite any cells by pasting. Pasting a row or rows or a column will insertthe appropriate number of rows.

Note: When selecting a row or cell, make sure that only the row or cell that you want tocopy is selected. Copying several cells into one cell may create unexpected results.

Note: DesignStudio worksheet cells can be copied to any CSV (comma separatedvariable) Windows application such as MS Excel or MS Word using standard cut, copyand paste commands. Cells from other CSV Windows applications can also be copiedinto a DesignStudio worksheet. Any cells copied into a DesignStudio worksheet willinsert rows instead of overwriting cells.

Page 203: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

203

8. AlarmsAlarms are used to inform the operators of any problem or change of state during aprocess so that corrective action can be taken. Alarm setup can be accessed through theAlarm worksheet and through the Tag Properties window. Using either of these methods,you can define alarm group characteristics and alarm messages that DesignStudio reportsin alarm conditions. Alarms can have three states: normal, alarm (meeting alarmconditions), and acknowledged (alarm has been acknowledged).To show alarm messages on a screen, you must create an alarm object with the Alarm listbutton on the object editing configuration of the Tools toolbar (see p. 112).Alarm parameters can be set up in the Tag Properties windows and in Alarm worksheets,but alarms will not function unless there is a properly filled-in worksheet.

Alarm TypesAlarm types are Boolean (on or off) tag parameters. They are enabled (on) or disabled(off) in an Alarm worksheet or a Tag Properties dialog. The alarm types are as follows:High High (HiHi), High (Hi), Low (Lo), Low Low (LoLo): These alarms are triggeredwhen the value of a tag equals or exceeds (higher than for high high and high; lower thanfor low low and low) a setpoint. High and low alarms are generally used for warnings toindicate that a value is close to exceeding acceptable limits. High high and low lowalarms are generally used to show that a value's limits have reached unacceptable limits.HiHiLimit, HiLimit, LoLimit, and LoLoLimit are the setpoints for each type of alarm. Thesealarms can be configured in either the Alarm worksheet or the Tag Properties dialog.Rate: An alarm at a given a rate of change of a tag value and defined in two parts as anumber per time unit. RateLimit is the setpoint. It can be set in either the Alarm worksheetor the Tag Properties dialog. The time unit defaults to per second (setpoint per second).This can only be changed in the Tag Properties dialog.Deviation: (DevM, DevP) An alarm based on deviation from a given setpoint(DevSetpoint). DevPLimit (linked to DevP) is the deviation limit greater than theDevSetpoint setpoint and DevMLimit (linked to DevM) is the deviation limit lower than theDevSetpoint setpoint.Dead Band: This is not an alarm, but it is range that is added to a deviation. If the valuefalls in the range defined by this additional value, the alarm will not be activated and thealarm state will not be set back to normal.Example of a Deviation Alarm with a Dead Band: Deviation Setpoint is 50, positivedeviation (DevP) is 5, negative deviation (DevM) is 5, and Deviation Dead Band is 0.5. Analarm will be generated when value is greater than 55.5 or less than 44.5. The return tothe normal will occur when value returns to greater than 45 or temp less than 55.HiHi, Hi, Lo, LoLo, Rate, DevM, and DevP are tag parameters which can be read (0 off, 1on) during application testing and runtime (see p. 271).The alarm limits (HiHiLimit, HiLimit, LoLimit, LoLoLimit, DevSetpoint, DevPLimit, andDevMLimit) are tag parameters. Their values can be read and changed during applicationtesting and runtime (p. 271).

Page 204: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

204

Creating and Managing an Alarm Worksheet

Creating an Alarm WorksheetThere are three ways to create and open a new Alarm worksheet.• Select the New… option in the File menu to open a New window and select the Alarm

Worksheet option (double-click or select and click OK) in the File tab. You may alsouse the New button in the Standard toolbar.

• Select the Document… option in the Insert menu to open a New Document windowand select the Alarm Worksheet option (double-click or select and click OK).

• Select the Tasks tab of the Workspace window, right-click the Alarms folder, andselect the Insert command on the popup menu.

Opening an Alarm WorksheetTo open an already created Alarm worksheet, select the Tasks tab of the Workspacewindow and either double-click the Alarms folder or select the boxed plus beside it toopen it. This will display the list of Alarm worksheets. Double-click one of them or right-click one and select the Open option in the popup menu.

Saving an Alarm WorksheetTo save an Alarm worksheet, select the active Save or Save All button on the Standardtoolbar or select the Save, Save As…, or Save All options in the File menu. If these optionsare not active and you have made changes to the worksheet, select an empty cell in theworksheet and try a now active button or command.You may also close the worksheet and if you have made changes in it, you will beprompted to save it. If this is a newly created worksheet, you will also be prompted tochoose a sheet number. You may accept the sheet number by selecting OK, or you maychange the number and select OK. The sheet numbers automatically increment as youcreate new worksheets and the worksheets are stored in the Alarm folder in order of sheetnumber.

Deleting an Alarm WorksheetTo delete an Alarm worksheet, select the Tasks tab of the Workspace window and eitherdouble-click the Alarms folder or select the boxed plus beside it to open it. This displaysthe list of Alarm worksheets. Right-click the one you want to delete and select the Deleteoption in the popup menu.

Page 205: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

205

Alarm Worksheet Overview

Alarm Worksheet HeaderAlarm worksheets are defined by the group name. All alarms in a group are related bygroup name and the worksheet defines the common characteristics of the group. If youare creating several alarm groups either save each sheet before changing the group nameand making a new group of alarms or close each sheet and insert a new sheet.Group Name field: Optional field. Enter a descriptive name for this group of alarms foryou information only. This field value is not used elsewhere.Description field: Optional field. This field is both a remark field for documentation andthe field used to generate a title for the worksheet in the Alarms folder. If nothing isentered here, the worksheet will be listed in the Alarms folder only by its sheet number.Disable field: Optional field. Place a tag in this field to enable all alarms in thisgroup/worksheet as long as the tag has a nonzero value. Enabled tags can be displayed inscreen alarm objects and can be used with alarm history files.Remote Ack field: Optional field. Place a tag in this field to toggle the alarmacknowledgment status. The alarms are acknowledged when this tag value changes. Thisis the same field as the Remote Ack field in the Tag Properties window.Total Active field: Optional field. An integer tag in this field will receive the value of thetotal number of active alarms. Active alarms for this field include active andunacknowledged alarms. The system will change this value when one of the tags changesits alarm condition.Total Active or Unack field: Optional field. An integer tag in this field will receive thevalue of the total number of unacknowledged alarms. The system will change this valuewhen one of the tags changes its alarm condition.

Page 206: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

206

Display/Save Group BoxSummary check box: Optional field. When selected, alarm messages are sent to an Alarmscreen object on the screen.

Note: If Summary is not selected, the alarms of this group will not appear in the screenalarm list objects.

Ack check box: Optional field. Demands the acknowledgment of the alarm messages.(The messages will not disappear from the Alarm screen object until they have beenacknowledged. This is usually done by toggling the AckAlr or AckAll internal tags.) Onlyavailable if the Summary field is enabled.Beep check box: Optional field. Sounds the beep until the alarm is acknowledged. Onlyavailable if the Ack and Summary fields are enabled.To Printer check box: Optional field. Sends the alarm messages of this group to theprinter. This is will not work in Windows CE applications.Save To Disk check box: Optional field. Sends the alarm messages of this group to acomputer file. You must select this option if you want to have historical alarm messagesdisplayed in an Alarm screen object. See Alarm History File (p. 209).Generate Ack Messages check box: Optional field. Generates messages whenever thealarms of this group are acknowledged. Only available if the Disk or Printer fields areenabled.Generate Norm Message check box: Optional field. Generates messages whenever thealarms of this group return to their normal state. Only available if the Disk or Printerfields are enabled.

Colors Group BoxAll optional fields. Defines the colors of the alarm summaries to thealarm list screen object (see p. 112). Each alarm message will beshown in the alarm object in the colors defined for its group. Tochange a color in a color rectangle, select it to display a 16-colorColor window. Double-click the selected color or select the colorand the OK button. The FG (foreground) box determines the textcolor; the BG (background) box determines the text box colorbehind the message text.

Enable check box: If this box is checked the colors configured in the Colors groupbox are used. If unchecked, the Alarm object on the screen uses the default colors ofthe Alarm screen object as configured in the Win color box and the object Fontssetup.Start color rectangle: This is the color that an alarm list screen object (see p. 112) willuse for alarm state messages. The default colors are red text on a white background.Ack color rectangle: This is the color that an alarm list screen object (see p. 112) willuse for acknowledged alarm messages. The default colors are green text on a whitebackground.Norm color rectangle: This is the color that an alarm list screen object (see p. 112)will use for messages for alarms that have returned to non-alarm levels but have notbeen acknowledged. The default colors are blue text on a white background.

Page 207: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

207

Alarm Worksheet BodyThe body of the Alarm worksheet defines the group tags, alarm conditions, and messages.Tag Name field: Name the tag to be monitored by the alarm group.Type drop-list: Choose the type of alarm (HiHi, Hi, Lo, LoLo, Rate, Dev+, Dev-: Dev+ is thesame as DevP; Dev- is the same as DevM.). You can change any of these fields in theruntime module. For additional information see p. 76. Specific limit values are:

HiHi: Generates an alarm message when the tag value is equal to or greater than theHiHiLimit value. (HiHiLimit is set in the Limit column of the alarm row.)Hi: High limit, generating an alarm when the tag value is equal to or greater than theHiLimit value. (HiLimit is set in the Limit column of the alarm row.)Lo: Low limit, generating an alarm when the tag value is lower than or equal to theLoLimit value. (LoLimit is set in the Limit column of the alarm row.)LoLo: Too low limit, generating an alarm when the tag value is lower than or equal tothe LoLoLimit value. (LoLoLimit is set in the Limit column of the alarm row.)Rate: Determines the speed of the variation rate for a tag. If the variation speed ishigher than the established one in this field, it generates an alarm. (RateLimit is set inthe Limit column of the alarm row. The per time units defaults to seconds; this can bechanged in the Tag Properties dialog to minutes or hours.)Dev+: Deviation for a higher value, generating an alarm when an augmentation in thetag value equal to or higher than the established limit occurs. (DevPLimit is set in theLimit column of the alarm row. The deviation setpoint, DevSetpoint, can only be set inthe Tag Properties window.)Dev-: Deviation for a lower value, generating an alarm when a diminution in the tagvalue equal to or higher than the established limit occurs. (DevMLimit is set in theLimit column of the alarm row. The deviation setpoint, DevSetpoint, can only be set inthe Tag Properties window.)

Limit field: Put the setpoint for the alarm in this cell. This field is the same in the Alarmworksheet and in the Tag Properties window.Message field: Put the alarm message to be displayed in this cell. This field is the same inthe Alarm worksheet and in the Tag Properties window. An alarm message can hold anytag using the syntax {tag name}.Priority field: Optional field. Indicates the priority within a group. This field can be filledwith an integer number (range 0 to 255). A higher number indicates a higher priority.This field is the same in the Alarm worksheet and in the Tag Properties window. Alarmsof the same priority will be listed with the oldest (by date) first.Selection field: Optional field. A user-defined string that works as a filter for a screenalarm object. If the Alarm Filters window (p. 114) Selection field value matches thealarm Selection value, the alarm will be displayed. This field is the same in the Alarmworksheet and in the Tag Properties window. The Selection value can have a maximumof 7 characters (excess characters are ignored).

Page 208: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

208

Editing the Alarm Worksheet BodyTo edit a cell or row, you first need to select it. To select a cell, double-click it so that it ishighlighted in blue, or select it so that its edges are highlighted in gray. To select a row,click the row number in the far left gray column or click and drag to highlight the cells inthe row. You may also click and drag to highlight more than one row and you mayhighlight a column by clicking the gray heading box on the top of the column. One cell(the first selected or the last dragged to) will have its edges highlighted.Once an item is selected, you may also delete (cut), copy, or paste rows and cells.Cutting, copying, and pasting can be done using Standard toolbar Cut, Copy, and Pastekeys; the Edit menu Cut, Copy, and Paste commands; the shortcut keys for Cut (Ctrl+X),Copy (Ctrl+C), and Paste (Ctrl+V); and commands in popup menus that appear when youright-click the selected item or items. These are standard Windows commands.When you have selected a column, a row, or several rows, the popup menu includes thecommands, Cut, Copy, Paste, and Insert Line. Insert Line will insert a line above the cellthat has the highlighted edges. When you have selected a cell so that its edges areselected, but it is not highlighted in blue, the popup menu will be the same. When youhave selected a cell by double-clicking so that it is highlighted in blue, the menu willinclude the commands, Undo, Cut, Copy, Paste, Delete, and Select All. Undo undoes theresult of the last command used in the cell. Cut and Delete both remove the cell’scontents. If you delete the text, you can Undo the deletion. If you Cut the text, you canPaste it into another cell or into the same cell, or you can Undo the deletion. If youdouble-click a field with more than one word in it, only one word will be highlighted inblue. You may click and drag or use the Shift and arrow keys to select all of the cellcontents or you may use the Select All command. When you select cells in more than onecolumn for the purpose of pasting them elsewhere in the worksheet, you must positionthe last highlighted cell (gray edges) in the same column as the leftmost cell that wasselected to be pasted.When you cut or delete a cell or row, a window will open to ask you if you are sure thatyou want to proceed. Click Yes to continue or No to cancel the action. If you delete a cellusing the Cut command from the popup menu that also includes the Undo command, youwill not be asked to proceed. The cell value will disappear and you must use Undoimmediately to reverse the deletion.You cannot overwrite any cells by pasting. Pasting a row or rows or a column will insertthe appropriate number of rows. You cannot paste directly into a cell that contains a drop-list (Type column). You can paste a whole row that includes a value for the drop-list cell.

Note: When selecting a row or cell, make sure that only the row or cell that you want tocopy is selected. Copying several cells into one cell may create unexpected results.

Note: DesignStudio worksheet cells can be copied to any CSV (comma separatedvariable) Windows application such as MS Excel or MS Word using standard cut, copyand paste commands. Cells from other CSV Windows applications can also be copiedinto a DesignStudio worksheet. Any cells copied into a DesignStudio worksheet willinsert rows instead of overwriting cells.

Page 209: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

209

Alarm History FileThe alarm history file, when enabled for an alarm group (see Disk check box, p. 205), issaved in the following format in the \alarm directory of the application with the namealyymmdd.alh (yymmdd refers to the year, month, and day the alarm file was created).

(first row)Alarm History(blank row)

(dummy row) <1> <2> <3> <4> <5> <6> <7> <8> <9> <10> <11> <12> <13> <14> <15> <16> <17>(first row) 000| 16/06/1999| 16:30:23| tag| ?| 1| 0| | 0| 1| 0| | | | | | |

(more rows)

<1> is reserved (internal number of the document version; this will be set to 000).<2> is the start date of the alarm in DD/MM/YYYY format.<3> is the start time of the alarm in HH:MM:SS.SSS format.<4> is the tag name.<5> is the alarm message.<6> is either 1 (alarm waiting acknowledgement) or 0 (not awaiting acknowledgement).<7> is alarm state 1 (active) or 0 (not active).<8> is the tag value.<9> is the alarm group number.<10> is the alarm priority number.<11> is the Selection field text.<12> is the alarm type.<13> is either 1 (alarm requests acknowledgement) or 0 (does not requestacknowledgement).<14> is the ending date of the alarm in DD/MM/YYYY format.<15> is the ending time of the alarm in HH:MM:SS.SSS format<16> is the acknowledgement date of the alarm in DD/MM/YYYY format.<17> is the acknowledgement time of the alarm in HH:MM:SS.SSS format

Page 210: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

210

Setting Tag Alarm Parameters In The Tag Properties WindowThe Tag Properties window is opened using the Tag Properties button on the TagProperties toolbar. This window lists some of the parameters of the selected tag. (Theselected tag is the tag that appears in the Tag Properties toolbar Tagname text box, seep. 68.) The parameters are grouped by tab into general parameters (Parameters tab),alarm parameters (alarms tab), and trend/history parameters (history tab). Tag parametersthat are listed in the in the Tag Properties window can be changed and all are optional.The Tag Properties window has one or three tabs depending on the tag type. The TagProperties window for string tags and classes has only a Parameters tab; the TagProperties window for Boolean, integer, and real tags has three tabs, an alarms and ahistory tab as well as the Parameters tab. The alarms tab is detailed in here, theParameters tab is detailed in the Tags chapter (p. 59), and the history tab is detailed in theLogging Trend Data chapter (p. 215).Through the Tag Properties window in the Tag Properties toolbar, you can check andalter the configured alarms for the selected tag. We recommend that you create the alarmgroups using Alarm worksheets before using the Tag Properties window. Both the Alarmworksheet and the Tag Properties window can be open at the same time, but neither willbe updated using values from the other until it is closed and reopened.

Alarms For Boolean Tags

Alarms Enabled check box: Enables alarm checking. This box will automatically bechecked if any of the alarm type check boxes (see below) are checked. If this box iscleared, the alarm type check boxes will also be cleared. This box is related to theAlrDisable tag parameter and may be switched in the Database Spy dialog(see p. 282).Remote Ack field: Place a tag in this field to toggle the alarm acknowledgment status. Thealarms are acknowledged when this tag value changes. This is the same field as theRemote Ack field in the Alarm worksheet.Translation Enabled check box: Enables the translation of messages if the translations aredefined on the Options tab in the Project Settings window under Project on the menu bar.See Language Translation (p. 235).

Note: Alarm messages with the translation enabled are saved in a file called alarm.txtin the \database directory of your application.

Page 211: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

211

Alarm Type Check BoxesOff check box: When selected, an alarm will be generated when the tag value is zero. Thisis equivalent to a LoLo or Lo alarm in the alarm worksheet.On check box: When selected, an alarm will be generated when the tag value is one. Thisis equivalent to a HiHi or Hi alarm in the alarm worksheet.Changed check box: When selected, an alarm will be generated when the tag valuechanges. This type of alarm cannot be set in the Alarm worksheet.If any of the alarm type check boxes are checked, Message, Group Number, Priority, andSelection fields will appear for each checked alarm. These fields are the same as thefields of the same name in the Alarm Worksheet.Message field: Put the alarm message to be displayed in this cell. This field is the same inthe Alarm worksheet and in the Tag Properties window. An alarm message can hold anytag using the syntax {tag name}.Group Number text box: This field accepts an integer that must be the same as the sheetnumber of a saved Alarm worksheet so that the alarm parameters in the Tag Propertieswindow and the Alarm worksheet are linked. If there are any alarms already configuredfor the tag in question, their values will appear in this window. Any changes or additionswill be added to the matching Alarm worksheet the next time it is opened. If a new GroupNumber is specified, a new Alarm worksheet with a matching number must be opened andsaved if you want to take advantage of the features that can only be configured in theAlarm worksheet.

Note: The value of the Group Number field must match the integer value of the Alarmworksheet number, not the value of the Group Name field of the Alarm worksheet.

Priority field: Optional field. Indicates the priority within a group. This field can be filledwith an integer number (range 0 to 255). A higher number indicates a higher priority.This field is the same in the Alarm worksheet and in the Tag Properties window. Alarmsof the same priority will be listed with the oldest (by date) first.Selection field: Optional field. A user-defined string that works as a filter for a screenalarm object. If the Alarm Filters window (p. 114) Selection field value matches thealarm Selection value, the alarm will be displayed. This field is the same in the Alarmworksheet and in the Tag Properties window. The Selection value can have a maximumof 7 characters (excess characters are ignored).

Page 212: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

212

Alarms For Integer And Real Tags

Alarms Enabled check box: Enables alarm checking. This box will automatically bechecked if any of the alarm type check boxes (see below) are checked. If this box iscleared, the alarm type check boxes will also be cleared. This box is related to theAlrDisable tag parameter and may be switched in the Database Spy dialog(see p. 282).Remote Ack field: Place a tag in this field to toggle the alarm acknowledgment status. Thealarms are acknowledged when this tag value changes. This is the same field as theRemote Ack field in the Alarm worksheet.Translation Enabled check box: Enables the translation of messages if the translations aredefined on the Options tab in the Project Settings window under Project on the menu bar.See Language Translation (p. 235).

Note: Alarm messages with the translation enabled are saved in a file called alarm.txtin the \database directory of your application.

Dead Band Value text box: The value in this box will used as an offset to the alarmsetpoint. If an alarm is activated at the setpoint or higher, it will now be activated at the(setpoint + dead band) value. If an alarm is activated at the setpoint or lower, it will nowbe activated at the (setpoint – dead band) value. The tag alarm will not return to a normal(nonalarm) state until the setpoint is reached; the dead band has no effect on the alarmreturning to a normal state.Example: If a tag is configured with a high alarm with a setpoint of 90 and a dead bandof 5, an alarm will be generated when the value meets or exceeds 95. The return tonormal will occur when value drops below 90.Array Index text box: This box displays the element of an array tag that is beingconfigured. This field only appears for array tags.

Page 213: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

213

Alarm Type Check BoxesHiHi check box: When selected, an alarm will be generated when the tag value equals orexceeds the setpoint in the Limit field.Hi check box: When selected, an alarm will be generated when the tag value equals orexceeds the setpoint in the Limit field.Lo check box: When selected, an alarm will be generated when the tag value equals or isless than the setpoint in the Limit field.LoLo check box: When selected, an alarm will be generated when the tag value equals oris less than the setpoint in the Limit field.Rate check box: When selected, an alarm will be generated when the tag value equals orexceeds the setpoint set in the two rate Limit fields.Deviation + check box: When selected, an alarm will be generated when the tag valueequals or exceeds the setpoint established by adding the value in the Deviation Setpointfield and the Limit field.Deviation – check box: When selected, an alarm will be generated when the tag valueequals or is less than the setpoint established by subtracting the value in the DeviationSetpoint field from the Limit field.If any of the alarm type check boxes are checked, Limit, Message, Group Number, Priority,and Selection fields will appear for each checked alarm. These fields are the same as thefields of the same name in the Alarm Worksheet.

Limit field: Put the setpoint for the alarm in this cell. This field is the same in theAlarm worksheet and in the Tag Properties window. Rate alarms have a drop-list aspart of this field. The setpoint is given as a number per unit time. The choices in thetime unit drop-list are 1/second, 1/hour, and 1/day. The complete rate setpoint is readas the number in the Limit text box per the unit of time in the Limit drop-list.Example: The selections 30 and 1/day mean that an alarm will be generated if the tagvalue changes by 30 in one day.Message field: Put the alarm message to be displayed in this cell. This field is thesame in the Alarm worksheet and in the Tag Properties window. An alarm messagecan hold any tag using the syntax {tag name}.Group text box: This field accepts an integer that must be the same as the sheetnumber of a saved Alarm worksheet so that the alarm parameters in the TagProperties window and the Alarm worksheet are linked. If there are any alarmsalready configured for the tag in question, their values will appear in this window.Any changes or additions will be added to the matching Alarm worksheet the nexttime it is opened. If a new Group number is specified, a new Alarm worksheet with amatching number must be opened and saved if you want to take advantage of thefeatures that can only be configured in the Alarm worksheet.

Note: The value of the Group field must match the integer value of the Alarmworksheet number, not the value of the Group Name field of the Alarm worksheet.

Priority field: Optional field. Indicates the priority within a group. This field can befilled with an integer number (range 0 to 255). A higher number indicates a higherpriority. This field is the same in the Alarm worksheet and in the Tag Propertieswindow. Alarms of the same priority will be listed with the oldest (by date) first.

Page 214: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

214

Selection field: Optional field. A user-defined string that works as a filter for a screenalarm object. If the Alarm Filters window (p. 114) Selection field value matches thealarm Selection value, the alarm will be displayed. This field is the same in the Alarmworksheet and in the Tag Properties window. The Selection value can have amaximum of 7 characters (excess characters are ignored).

Deviation SetPoint field: This value is used to calculate the alarm values for deviationalarms. The deviation limits are added to or subtracted from this setpoint. This valuecannot be set in the Alarm worksheet.Deviation Dead Band field: The value in this box will used as an offset to a deviationalarm setpoint. If a deviation alarm is activated at the setpoint or higher, it will now beactivated at the (setpoint + dead band) value. If a deviation alarm is activated at thesetpoint or lower, it will now be activated at the (setpoint – dead band) value. The tagalarm will not return to a normal (nonalarm) state until the setpoint is reached; the deadband has no effect on the alarm returning to a normal state.Example: If a tag is configured with a deviation plus alarm with a setpoint of 90, adeviation limit of 5 and a dead band of 1, an alarm will be generated when the valuemeets or exceeds 96. The return to normal will occur when value drops below 95.

Page 215: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

215

9. Logging Trend DataTag value history (how it changes over time) can be tracked in a file or in a Trend screenobject. This chapter details how to set up trend properties for tags and store the data infiles. This data can be used outside of the application. String tag history is not supported.See the Recipes chapter (p. 223) to for information on storing string values.To show a current or historical trend graph on the screen, you must create a Trend objectwith the Tools toolbar Trend button (p. 117).Trend data logging parameters can be set up in the Tag Properties windows and in Trendworksheets, but data logging will not occur unless there is a properly filled-in worksheet.

Note: Trend worksheets are supported in OpenHMI PE applications, but not inOpenHMI SE applications.

Creating and Managing a Trend Worksheet

Creating a Trend WorksheetThere are three ways to create and open a new Trend worksheet.• Select the New… option in the File menu to open a New window and select the Trend

Worksheet option (double-click or select and click OK) in the File tab. You may alsouse the New button in the Standard toolbar.

• Select the Document… option in the Insert menu to open a New Document windowand select the Trend Worksheet option (double-click or select and click OK).

• Select the Tasks tab of the Workspace window, right-click the Trend folder, andselect the Insert command on the popup menu.

Opening a Trend WorksheetTo open an already created Trend worksheet, select the Tasks tab of the Workspacewindow and either double-click the Trend folder or select the boxed plus beside it to openit. This will display the list of Trend worksheets. Double-click one of them or right-clickone and select the Open option in the popup menu.

Saving a Trend WorksheetTo save a Trend worksheet, select the active Save or Save All button on the Standardtoolbar or select the Save, Save As…, or Save All options in the File menu. If these optionsare not active and you have made changes to the worksheet, select an empty cell in theworksheet and try a now-active button or command. You may also close the worksheetand if you have made changes in it, you will be prompted to save it.If this is a newly created worksheet, you will be prompted to choose a sheet number. Youmay accept the sheet number by selecting OK, or you may change the number and selectOK. The sheet numbers automatically increment as you create new worksheets and theworksheets are stored in the Trend folder in order of sheet number.

Page 216: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

216

Deleting a Trend WorksheetTo delete a Trend worksheet, select the Tasks tab of the Workspace window and eitherdouble-click the Trend folder or select the boxed plus beside it to open it. This displaysthe list of Trend worksheets. Right-click the one you want to delete and select the Deleteoption in the popup menu.

Trend Worksheet Overview

Trend Worksheet HeaderDescription text box: This field is both a remark field for documentation and the fieldused to generate a title for the worksheet in the Trend folder. If nothing is entered here,the worksheet will be listed in the Trend folder only by its sheet number.Disable text box: Disables this worksheet. You can fill this field with a tag. If the value ofthis tag is nonzero, the worksheet is disabled and no trend values are generated. If blank,the worksheet will be always enabled.File Life Time (days) text box: Determines how many days the history file will be kept.After the determined period, the file is automatically erased. This option is available onlyfor files based on a date (Date (Default) option selected). If you position the cursor in thisfield, you will be required to enter a value before you can select another field.Save on Trigger check box: When selected, the trigger in the text box is used to save trenddata.Save on Trigger text box: Optional field. Place a tag in here that will trigger a save to thehistory file every time the tag value changes. This trigger can be an event from aScheduler worksheet.

Page 217: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

217

Note: The trigger tag can have a dead band parameter configured in the Tag Propertieswindow (p. 71) that limits the frequency of tag change. This is useful to limit memoryaccess time during application runtime and to limit memory storage used for trend data.

Save on Tag Change check box: When selected, trend data is saved whenever a valuechange occurs in any of the tags from in this worksheet.Name of History Files group box: Defines the history file method of generation and name.The generation methods are date or batch.

Date (Default) check box: When selected, history files based on date are generated.This option is more useful if you have a continuous process. In this case, thegenerated files are stored in the \hst application folder and named\hst\ggyyyymmdd.hst (gg is the historical group number in hexadecimal formatand yyyymmdd refers to the year, month, and day the file was created).Batch check box: When selected, history files will use the name provided in the Batchtext box.Batch text box: This field contains the location and name of the history file. Thisoption is more useful if you have a batch process. This field can contain a path andfile name or just a file name. If it doesn't contain a path name, the default path is themain application folder. You may use a tag for part or all of the file name using thesyntax: {tag name} or string{tag name}.hst. Do not use a file extension in the tagname if you explicitly type out the extension outside of the curly brackets. Examples:\disk\hst\history.hst, \disk\hst\file{TagBatchNumber}.hst.

Note: To view current trend curves in the screen Trend object, the Date (Default)check box must be chosen. Either method can be used to view historical trend curves.

Trend Worksheet BodyTag Name field: Tag that will have its values saved in the history file.

Note: Each Trend worksheet can hold 100 tags. If you have more tags to record, breakthem up into groups of less than 100.

Dead Band field: Optional field. The value in this field is the minimum tag value changewhich will be recorded when the Save on Tag Change option is used. Example: If a tagdead band is 5 and the tag value changes from 50 to 52, this value will not be recordedbecause it is less than 5. This field should not be used with Boolean tags. This is the samefield as the Log Dead Band field in the Tag Properties dialog history tab.

Page 218: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

218

Editing the Trend Worksheet BodyTo edit a cell or row, you first need to select it. To select a cell, double-click it so that it ishighlighted in blue, or select it so that its edges are highlighted in gray. To select a row,click the row number in the left gray column or click and drag to highlight the cells in therow. You may also click and drag to highlight more than one row and you may highlighta column by clicking the gray heading box on the top of the column. One cell (the firstselected or the last dragged to) will have its edges highlighted.Once an item is selected, you may also delete (cut), copy, or paste rows and cells.Cutting, copying, and pasting can be done using Standard toolbar Cut, Copy, and Pastekeys; the Edit menu Cut, Copy, and Paste commands; the shortcut keys for Cut (Ctrl+X),Copy (Ctrl+C), and Paste (Ctrl+V); and commands in popup menus that appear when youright-click the selected item or items. These are standard Windows commands.When you have selected a column, a row, or several rows, the popup menu includes thecommands, Cut, Copy, Paste, and Insert Line. Insert Line will insert a line above the cellthat has the highlighted edges. When you have selected a cell so that its edges areselected, but it is not highlighted in blue, the popup menu will be the same. When youhave selected a cell by double-clicking so that it is highlighted in blue, the menu willinclude the commands, Undo, Cut, Copy, Paste, Delete, and Select All. Undo undoes theresult of the last command used in the cell. Cut and Delete both remove the cell’scontents. If you delete the text, you can Undo the deletion. If you Cut the text, you canPaste it into another cell or into the same cell, or you can Undo the deletion. If youdouble-click a field with more than one word in it, only one word will be highlighted inblue. You may click and drag or use the Shift and arrow keys to select all of the cellcontents or you may use the Select All command. When you select cells in more than onecolumn for the purpose of pasting them elsewhere in the worksheet, you must positionthe last highlighted cell (gray edges) in the same column as the leftmost cell that wasselected to be pasted. You cannot overwrite any cells by pasting. Pasting a row or rows ora column will insert the appropriate number of rows.When you cut or delete a cell or row, a window will open to ask you if you are sure thatyou want to proceed. Click Yes to continue or No to cancel the action. If you delete a cellusing the Cut command from the popup menu that also includes the Undo command, youwill not be asked to proceed. The cell value will disappear and you must use Undoimmediately to reverse the deletion.

Note: When selecting a row or cell, make sure that only the row or cell that you want tocopy is selected. Copying several cells into one cell may create unexpected results.

Note: DesignStudio worksheet cells can be copied to any CSV (comma separatedvariable) Windows application such as MS Excel or MS Word using standard cut, copyand paste commands. Cells from other CSV Windows applications can also be copiedinto a DesignStudio worksheet. Any cells copied into a DesignStudio worksheet willinsert rows instead of overwriting cells.

Page 219: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

219

Setting Tag History Parameters In The Tag Properties WindowThe Tag Properties window is opened using the Tag Properties button on the TagProperties toolbar. This window lists some of the parameters of the selected tag. (Theselected tag is the tag that appears in the Tag Properties toolbar Tagname text box, seep. 68.) The parameters are grouped by tab into general parameters (Parameters tab),alarm parameters (alarms tab), and trend/history parameters (history tab). Tag parametersthat are listed in the in the Tag Properties window can be changed and all are optional.The Tag Properties window has one or three tabs depending on the tag type. The TagProperties window for string tags and classes has only a Parameters tab; the TagProperties window for Boolean, integer, and real tags has three tabs, an alarms and ahistory tab as well as the Parameters tab. The history tab is detailed in here, theParameters tab is detailed in the Tags chapter (p. 59), and the alarms tab is detailed in theAlarms chapter (p. 203).Through the Tag Properties window in the Tag Properties toolbar, you can check andalter the trend logging configuration for the selected tag. We recommend that you createthe Trend worksheets before using the Tag Properties window. Both the Trend worksheetand the Tag Properties window can be open at the same time, but neither will be updatedusing values from the other until it is closed and reopened.

Boolean History

History Enabled check box: Enables storage of the selected tag value samples.Group Number text box: Defines the group number to which this tag is associated.

Page 220: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

220

Integer and Real History

History Enabled check box: Enables storage of the selected tag value samples.Group Number text box: Defines the group number to which this tag is associated.Log Dead Band field: The value in this field is the minimum tag value change which willbe recorded when the Save on Tag Change option in the Trend worksheet is used.Example: If a tag dead band is 5 and the tag value changes from 50 to 52, this value willnot be recorded because it is less than 5. This field should not be used with Boolean tags.This is the same field as the Dead Band field in the Trend worksheet.

Trend History FilesTrend data is saved in binary form in trend history files named with the syntax,GGYYMMDD.hst. GG, the group number of the trend worksheet, is the number that thesheet is saved as and referenced by in the Trend folder listing. YY is the last two digits ofthe year. MM is the two-digit designation of the month (range 1-12). DD is the two-digitdesignation of the day of the month (range 1-31).The binary trend history files can be converted to ASCII files using the HS2TXT.EXEprogram. This program is available on the \DesignStudio\BIN directory. The syntaxin a command or DOS window is:

hst2txt <filename.hst> [<separator>]

Two ASCII files are created with the same name as the history file and the extensions.txt and .hdr. The .txt file contains the trend data; the .hdr file holds the tag names.When the separator character is not defined, a blank character is used. To define anothercolumn separator to the file, simply pass it as a parameter. Example: hst2txt01970808.hst [;]

Note: The files to be converted and the HST2TXT.EXE program must be in the samedirectory.

Page 221: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

221

These ASCII files can be converted again to binary .HST using the TXT2HST.EXEutility. The syntax is:

txt2hst <filename.txt> [<separator>]

History Files Format

Header (.hdr) File<number of tags configured><tag name 1><tag name n-1><tag name n>

Example:

2MinuteSecond

Text (.txt) File<date> <time> <Tag 1 value> <Tag n-1 value> ... <Tag n value><date> <time> <Tag 1 value> <Tag n-1 value> ... <Tag n value><date> <time> <Tag 1 value> <Tag n-1 value> ... <Tag n value>

Example:

08/10/1999 11:44:26 44.000 26.00008/10/1999 11:44:27 44.000 27.00008/10/1999 11:44:28 44.000 28.000

Page 222: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150
Page 223: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

223

10. RecipesNote: Recipes are supported in OpenHMI PE applications, but not in OpenHMI SEapplications.

The Recipes task reads and writes files from and to the hard disk; it transfers valuesbetween files and real-time memory. Its typical use is to store process recipes, but thesefiles can store any type of information such as operation logs, passwords, and so forth.Recipes can be called in an expression cell of a screen object or a worksheet using theRecipe() function (also p. 185):

Recipe("operation:recipe data file name")Description: Performs operations involving recipe files.Parameters: The format of the argument is a string containing an operation followed bya colon and the name of a recipe file, with no spaces between the elements of the string.Valid operation values are:

Save Saves values to recipe file.Load Loads values from recipe file.Delete Deletes the recipe data file.Init Initializes values in recipe file.

Return Values: Error codes:

0 No errors.1 The tag is numeric.2 Expression doesn’t contain the colon.3 Invalid operation name.4 File not found by the system.5 Disk error.

Example: Recipe("load:recipe1.rcp")

Note: The Recipe() function accesses two kinds of files: configuration files and data files.The configuration file contains the tag declarations that form a part of a recipe worksheet(or group). It has an .rcp extension and is located in the \<application>\config\ folder.After recipe values have been saved using the Save operation, a data file with the samename and a .dat extension is located in the \<application>\ folder.

Note: The Background Task execution task (see p. 293) must be running in order toexecute the Recipe() function.

Page 224: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

224

Creating and Managing a Recipe Worksheet

Creating a Recipe WorksheetThere are three ways to create and open a new Recipe worksheet.• Select the New… option in the File menu to open a New window and select the Recipe

Worksheet option (double-click or select and click OK) in the File tab. You may alsouse the New button in the Standard toolbar.

• Select the Document option in the Insert menu to open a New Document window andselect the Recipe Worksheet option (double-click or select and click OK).

• Select the Tasks tab of the Workspace window, right-click the Recipes folder, andselect the Insert command on the popup menu.

Opening a Recipe WorksheetTo open an already created Recipe worksheet, select the Tasks tab of the Workspacewindow and either double-click the Recipe folder or select the boxed plus beside it toopen it. This will display the list of Recipe worksheets. Double-click one of them or right-click one and select the Open option in the popup menu.

Saving a Recipe WorksheetTo save a Recipe worksheet, select the active Save or Save All button on the Standardtoolbar or select the Save, Save As…, or Save All options in the File menu and save theRCP file for each worksheet in the \config folder of the application. If these options arenot active and you have made changes to the worksheet, select an empty cell in theworksheet and try a now active button or command.

Note: The RCP files must be saved to the \config folder. If they are not, the savedRecipe worksheets will not appear in the Recipes folder.

You may also close the worksheet and if you have made changes in it, you will beprompted to save it. The sheet numbers automatically increment as you create newworksheets and the worksheets appear in the Recipes folder in order of sheet number.

Deleting a Recipe WorksheetTo delete a Recipe worksheet, select the Tasks tab of the Workspace window and eitherdouble-click the Recipes folder or select the boxed plus beside it to open it. This willdisplay the list of Recipe worksheets. Right-click the one you want to delete and selectthe Delete option in the popup menu.

Page 225: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

225

Recipe Worksheet Overview

Recipe Worksheet HeaderDescription field: This field is for documentation purposes and will be listed next to theworksheet file name in the Recipes folder.File Name field: Type the name of an externally created database (.dbf) file or the nameof the file that will be created by DesignStudio. If creating a file through DesignStudio,you can type the name of the file that will be created or type a tag that contains the nameof the file to be used or created. You may use a tag for part or all of the file name usingthe syntax: {tag name} or string{tag name}.dat. Do not use a file extension in the tagname if you explicitly type out the extension outside of the curly brackets. Examples:recipe1, file{TagBatchNumber}.dat, {recipetag}. You do not need to have afile extension; the default .dat file extension will be added if there is no explicitextension.

Recipe Worksheet BodyThe Recipe worksheet consists of several lines containing tag name and number cells.The screen above shows where a tag name and a number are placed in the worksheet.Tag Name: List tags to be updated with file contents or tags whose values will be writtento a file. For more information on tags and tag names, see the Tags chapter (p. 59).If the tag is an array, type the full index that indicates the first element to be used. If noindex is given, the 0th element will be used. We recommend that you start at the firstelement because the 0th element of an array is automatically written to in the case of anerror or overflow. See p. 60.Number of Elements field: Sets how many elements of the array tag will be used. Do notuse this field if you do not have an array tag in the tag name field.

Page 226: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

226

Editing the Recipe WorksheetTo edit a cell or row, you first need to select it. To select a cell, click in the cell so thatthe edges are highlighted in gray. To select a row, click the row number in the far leftgray column or click and drag to highlight the cells in the row. You may also click anddrag to highlight more than one row and you may highlight a column by clicking the grayheading box on the top of the column. One cell (the first selected or the last dragged to)will have its edges highlighted. To select a cell's contents, double-click it so that it ishighlighted in blue.Once an item is selected, you may also delete (cut), copy, or paste rows and cells.Cutting, copying, and pasting can be done using Standard toolbar Cut, Copy, and Pastebuttons; the Edit menu Cut, Copy, and Paste commands; the shortcut keys for Cut(Ctrl+X), Copy (Ctrl+C), and Paste (Ctrl+V); and commands in popup menus that appearwhen you right-click the selected item or items. These are standard Windows commands.When you have selected a column, a row, or several rows, the popup menu includes thecommands, Insert Tag, Cut, Copy, Paste, and Insert Line. Insert Line will insert a lineabove the cell that has the highlighted edges. When you have selected a cell so that itsedges are selected, but it is not highlighted in blue, the popup menu will be the same.When you have selected a cell's contents by double-clicking so that it is highlighted inblue, the menu will include the commands, Undo, Cut, Copy, Paste, Delete, and Select All.Undo undoes the result of the last command used in the cell. Cut and Delete both removethe cell’s contents. If you delete the text, you can Undo the deletion. If you Cut the text,you can Paste it into another cell or into the same cell, or you can Undo the deletion.When you select cells in more than one column for the purpose of pasting themelsewhere in the worksheet, you must position the last highlighted cell (gray edges) in thesame column as the leftmost cell that was selected to be pasted.When you cut or delete a cell or row, a window will open to ask you if you want toproceed. Click Yes to continue or No to cancel the action. If you delete a cell using theCut command from the popup menu that also includes the Undo command, you will notbe asked to proceed. The cell value will disappear and you must use Undo immediately toreverse the deletion.You cannot overwrite any cells by pasting. Pasting a row, rows, or a column will insertthe appropriate number of rows.

Note: When selecting a row or cell, make sure that only the row or cell that you want tocopy is selected. Copying several cells into one cell may create unexpected results.

Note: DesignStudio worksheet cells can be copied to any CSV (comma separatedvariable) Windows application such as MS Excel or MS Word using standard cut, copyand paste commands. Cells from other CSV Windows applications can also be copiedinto a DesignStudio worksheet. Any cells copied into a DesignStudio worksheet willinsert rows instead of overwriting cells.

Page 227: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

227

11. ReportsNote: Reports are supported in OpenHMI PE applications, but not in OpenHMI SEapplications.

The Reports task configures reports using system data. The main purpose of this moduleis to make report creation easier and more efficient. Report information can be stored byconfiguring the Report() function in an expression cell of a screen object or a worksheetusing the following format:

Report("operation:report file name")Description: Performs operations involving report files configured in Report worksheets(see p. 227).Parameters: The format of the argument is a string containing an operation followed bya colon and the name of a recipe file, with no spaces between the elements of the string.Valid operation values are:

Disk Sends report values to a file.Prn Sends report values to a printer. This

value does not work in Windows CEapplications.

Note: The Report() function uses only the name of the file that is specified in the Reportworksheet Output File field. Do not include the extension in the report file name parameter.

Return Value: Error codes:

0 No errors.1 The tag is numeric.2 Expression doesn’t contain the colon.3 Invalid operation name.4 File not found by the system.5 Disk error.

Example: Report("disk:report1")

Note: If no extension is given in the Report worksheet Output File field, the file defaultsto a .txt file, unless an .rtf file has been saved (then the file is saved without anextension). Any extension can be specified, though .txt, .doc, .rtf, .wri, .csv, andsimilar extensions are recommended. The report files are located in the\<application>\config\ folder.

Note: The Background Tasks task (see p. 293) must be running to execute the Report()function.

Page 228: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

228

Creating and Managing a Report Worksheet

Creating a Report WorksheetThere are three ways to create and open a new Report worksheet.• Select the New… option in the File menu or the New button on the Standard toolbar to

open a New window and select the Report Worksheet option (double-click or selectand click OK) in the File tab.

• Select the Document option in the Insert menu to open a New Document window andselect the Report Worksheet option (double-click or select and click OK).

• Select the Tasks tab of the Workspace window, right-click the Reports folder, andselect the Insert command on the popup menu.

Opening a Report WorksheetTo open an already created Report worksheet, select the Tasks tab of the Workspacewindow and either double-click the Reports folder or select the boxed plus beside it toopen it. This will display the list of Report worksheets. Double-click one of them or right-click one and select the Open option in the popup menu.

Saving a Report WorksheetTo save a Report worksheet, select the active Save or Save All button on the Standardtoolbar or select the Save, Save As…, or Save All options in the File menu and save theREP file for each worksheet in the \config folder of the application. If these options arenot active and you have made changes to the worksheet, select an empty cell in theworksheet and try a now active button or command.

Note: The REP files must be saved to the \config folder. If they are not, the savedReport worksheets will not appear in the Reports folder.

You may also close the worksheet and if you have made changes in it, you will beprompted to save it. The sheet numbers automatically increment as you create newworksheets and the worksheets appear in the Reports folder in order of sheet number.

Deleting a Report WorksheetTo delete a Report worksheet, select the Tasks tab of the Workspace window and eitherdouble-click the Reports folder or select the boxed plus beside it to open it. This willdisplay the list of Report worksheets. Right-click the one you want to delete and selectthe Delete option in the popup menu.

Page 229: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

229

Report Worksheet Overview

Report WorksheetDescription field: This field is for documentation purposes and will be listed next to theworksheet file name in the Reports folder.Disk Append check box: When printing to file, this option adds (appends) the new reportto the end of an existing file. If not checked, the new report file will overwrite theprevious report information in that file.

Note: If you want to have single header and multiple appended lines of data in yourReport file, configure one Report worksheet with the report header format and anotherwith the report body format. Put the same file name in the Output File field of bothworksheets, but check the Disk Append check box only in the report body worksheet.

Each time that you call the report body Report worksheet with the Report() function, thedata will be added to the end of the report file. Each time that you call the report headerReport worksheet with the Report() function, the old worksheet will be overwritten and anew report will be started with the header information at the top.

Output File field: This field provides the name of the output file where the information forthe report will be stored. You may use a tag for part or all of the file name using thesyntax: {tag name} or string{tag name}.txt. Do not use a file extension in the tagname if you explicitly type out the extension outside of the curly brackets. Examples:recipe1, file{Number}.txt, {recipetag}. Example: report{day}.txt. In thisexample, the generated file could be report1.txt, report2.txt... and so on, according to thetag day value.You do not need to have a file extension; the default .txt file extensionwill be added if there is no explicit extension.Worksheet area: This area is used to format the report in ASCII format. It is possible toconfigure tags or expressions between braces {} such as {Date } and {Time }. Itis important to allow for the number of spaces required by a tag and to leave that manyspaces (including tag name letters) between the braces. For example: the string value ofthe tag Time requires eight spaces for HH:MM:SS, so the expression including the bracesshould be eight characters long, Time plus two braces ({}) and two spaces.

Page 230: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

230

Edit RTF file button: This button allows you to access an .rtf file to configure the reportwith bitmaps and all the things that can be done in an .rtf editor. This editor acts likethe MS Write editor. You can still insert tag values into the .rtf version of the reportusing the syntax {tag name}, but you do not need be concerned about the space occupiedby a tag value.

Note: If you save an .rtf file, it will take precedence over any ASCII text in the bodyof the Report worksheet. In order to return the report to ACSII format, you must deletethe .rtf file in the \<application>\config directory.

Page 231: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

231

12. SchedulerThe Scheduler task is used to schedule and trigger actions based on regular time intervals,a specific time, or a change in a tag value.

Note: The Scheduler task is supported in OpenHMI PE applications, but not inOpenHMI SE applications.

Creating and Managing a Scheduler Worksheet

Creating a Scheduler WorksheetThere are three ways to create and open a new Scheduler worksheet.• Select the New… option in the File menu to open a New window and select the

Scheduler Worksheet option (double-click or select and click OK) in the File tab. Youmay also use the New button in the Standard toolbar.

• Select the Document option in the Insert menu to open a New Document window andselect the Scheduler Worksheet option (double-click or select and click OK).

• Select the Tasks tab of the Workspace window, right-click the Scheduler folder, andselect the Insert command on the popup menu.

Opening a Scheduler WorksheetTo open an already created Scheduler worksheet, select the Tasks tab of the Workspacewindow and either double-click the Scheduler folder or select the boxed plus beside it toopen it. This will display the list of Scheduler worksheets. Double-click one of them orright-click one and select the Open option in the popup menu.

Saving a Scheduler WorksheetTo save a Scheduler worksheet, select the active Save or Save All button on the Standardtoolbar or select the Save, Save As…, or Save All options in the File menu. If these optionsare not active and you have made changes to the worksheet, select an empty cell in theworksheet and try a now active button or command.You may also close the worksheet and if you have made changes in it, you will beprompted to save it. If this is a newly created worksheet, you will also be prompted tochoose a sheet number. You may accept the sheet number by selecting OK, or you maychange the number and select OK. The sheet numbers automatically increment as youcreate new worksheets and the worksheets are stored in the Scheduler folder in order ofsheet number.

Page 232: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

232

Deleting a Scheduler WorksheetTo delete a Scheduler worksheet select the Tasks tab of the Workspace window andeither double-click the Scheduler folder or select the boxed plus beside it to open it. Thiswill display the list of Scheduler worksheets. Right-click the one you want to delete andselect the Delete option in the popup menu.

Scheduler Worksheet Overview

Scheduler Worksheet HeaderDescription field: This field is for documentation purposes and will be listed next to theworksheet file name in the Scheduler folder.

Scheduler Worksheet BodyEvent drop-down list: Type of event: Clock, Calendar, or Change.

Clock: This event triggers actions based on regular elapsed time intervals. In the Timecolumn, you can configure the base elapsed time (minimum of 100 ms). This eventtype is frequently used with trend graphics. For example, define a tag that isincremented each hour. The Trigger and Date fields are not used with Clock events.Calendar: This event triggers actions based on actual time. You can schedule eventsusing the 24 hour clock in the Time column (HH:MM:SS.SSS format, themilliseconds are optional) and fixed dates in the Date column (DD/MM/YYYYformat). For example, you can define an event that prints a report each day at 4 p.m.(16:00:00). The Trigger field is not used with Calendar events.Change: This event is related to the change of a tag in the Trigger field. Configure atag in the Trigger field that will be used to trigger the event when a change in valuehas occurred. The Time and Date fields are not used with Change events.

Page 233: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

233

Trigger field: A Change event occurs the value of the tag in the Trigger field changes. Thisfield is used only by the Change event.Time field: Sets the time interval in which the event must occur: hours (0 to 23), minutes(0 to 59), and seconds (0 to 59), when used by Clock. This also sets a specific time whenused by Calendar events. Leading zeros must be filled in completely (00:00:01, not:01).Date field: Sets the specific date (DD/MM/YYYY) when a Calendar event must occur:day (1 to 31), month (1 to 12), and year (1900 to 2099). If the field is left blank, the eventoccurs daily. This field is used only by the Calendar event.Tag field: Tag that receives a new value or expression return when the event occurs.Expression: Expression whose return value will be set to the tag. This field is used by allevents. For more information on expressions, see the Scripting Language chapter(p. 159).Disable: Holds a disable condition for the function. When it is left blank or the expressionvalue is equal to zero, the function will be executed. If there is a nonzero value in thefield, the function will not execute.

Editing the Scheduler Worksheet

To edit a cell or row, you first need to select it. To select a cell, click in the cell so thatthe edges are highlighted in gray. To select a row, click the row number in the far leftgray column or click and drag to highlight the cells in the row. You may also click anddrag to highlight more than one row and you may highlight a column by clicking the grayheading box on the top of the column. One cell (the first selected or the last dragged to)will have its edges highlighted. To select a cell's contents, double-click it so that it ishighlighted in blue.Once an item is selected, you may also delete (cut), copy, or paste rows and cells.Cutting, copying, and pasting can be done using Standard toolbar Cut, Copy, and Pastebuttons; the Edit menu Cut, Copy, and Paste commands; the shortcut keys for Cut(Ctrl+X), Copy (Ctrl+C), and Paste (Ctrl+V); and commands in popup menus that appearwhen you right-click the selected item or items. These are standard Windows commands.When you have selected a column, a row, or several rows, the popup menu includes thecommands, Cut, Copy, Paste, and Insert Line. Insert Line will insert a line above the cellthat has the highlighted edges. When you have selected a cell so that its edges areselected, but it is not highlighted in blue, the popup menu will be the same. When youhave selected a cell's contents by double-clicking so that it is highlighted in blue, themenu will include the commands, Undo, Cut, Copy, Paste, Delete, and Select All. Undoundoes the result of the last command used in the cell. Cut and Delete both remove thecell’s contents. If you delete the text, you can Undo the deletion. If you Cut the text, youcan Paste it into another cell or into the same cell, or you can Undo the deletion. Whenyou select cells in more than one column for the purpose of pasting them elsewhere in theworksheet, you must position the last highlighted cell (gray edges) in the same column asthe leftmost cell that was selected to be pasted.When you cut or delete a cell or row, a window will open to ask you if you want toproceed. Click Yes to continue or No to cancel the action. If you delete a cell using theCut command from the popup menu that also includes the Undo command, you will notbe asked to proceed. The cell value will disappear and you must use Undo immediately toreverse the deletion.

Page 234: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

234

You cannot overwrite any cells by pasting. Pasting a row, rows, or a column will insertthe appropriate number of rows.

Note: When selecting a row or cell, make sure that only the row or cell that you want tocopy is selected. Copying several cells into one cell may create unexpected results.

Note: DesignStudio worksheet cells can be copied to any CSV (comma separatedvariable) Windows application such as MS Excel or MS Word using standard cut, copyand paste commands. Cells from other CSV Windows applications can also be copiedinto a DesignStudio worksheet. Any cells copied into a DesignStudio worksheet willinsert rows instead of overwriting cells.

Page 235: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

235

13. Language TranslationOverview

The language translation ability in DesignStudio allows you to reset designatedcomponents of your application to another language or change the language dynamicallyduring application runtime. These can be words or phrases that will be replaced duringruntime in components that are enabled by the developer to allow translation.DesignStudio language translation supports the IBM International Character Set.

Note: Characters not found on your keyboard can be located, copied, and pasted fromthe Character Map. To open the Character Map, from the Windows Start menu, selectPrograms | Accessories | Character Map. You can also manually type the characters usingthe Alt key code that appears in the Character Map window status bar when you highlighta character. You must use the keyboard numeric keypad for these codes.

Configuring Dynamic Language Translation in a Running Application

The process of setting up an application to translate dynamically consists of these steps.

1. Check Enable Translation in the Options tab of the Project Settings window. Open theProject Settings window by selecting Settings… in the Project menu of the menu bar.

2. Enable external translation for objects and alarms.

3. Create translation files.

4. Create an empty translation file.

5. Create a way to initiate translation.

Page 236: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

236

Project SettingsOnce your default (empty) translation file is created, activate the automatic languagetranslation and specify the default language. Under the Project menu, select Settings.Select the Options tab and check the Enable Translation check box. You will not use theTranslation Filename field in this type of translation and you should either delete thedefault value in this field or make sure that you do not use a translation file of the samename.

Enable External Translation for Objects and AlarmsThere are two different locations for translation: screen objects and alarm messages.

Object Properties Windows

For all objects that contain text to be translated, enable the Extern Translation check-boxso that a check appears in their Object Properties window. For example:

Page 237: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

237

Alarms: Tag Properties WindowIf you would like alarms to be translated, select an alarm tag and select the Tag Propertiesbutton on the Tag Properties toolbar. Select the Alarms tab and check the TranslationEnabled box.

Creating Translation FilesSelect Translation Editor from the Tools menu. A Translation Tool worksheet will openand you can create a translation (.tra) file. Type the Original words or phrases and theirTranslation in the worksheet.

Save the file under the desired directory and folder. We recommend that you use thetranslation language in the file name when saving the file. For example, Portug.tra. If youwant to translate into another language, open another worksheet by selecting the File |New menu option on the Translation Tool worksheet. When a translation file is called, theprogram will find all the original words and replace them with the translations.

Page 238: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

238

Creating a Way to Restore the Application to the Original LanguageTo restore your application to the default language, you will need an empty translationfile that can be called. To do this, open a new Translation Tool worksheet by selectingTranslation Editor from the Tools menu or by opening another worksheet by selecting theFile | New menu option on the Translation Tool worksheet if you already have theTranslation Editor open.

Save the empty file in the desired directory and folder. We recommend using the defaultlanguage in the file name or using the application name. For example, English.tra orAppEng.tra.

Note: To activate the Save command when an empty worksheet is open, it might benecessary to navigate down some of the fields in the worksheet without entering any data.

Page 239: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

239

Creating a Way to Initiate Translation

Using Objects to Initiate TranslationWe recommend that you create buttons to easily initiate a translation.

For each button, open its Object Properties by double-clicking on the object and enter theSetTranslationFile() function in the Expression field. For example,SetTranslationFile("<drive>:\<path>\<filename>.tra"). Use the correct drive,path, and file name.

Calling the SetTranslation() Function from Alternate PlacesYou can also call the SetTranslationFile() function from other places in the program. For areference of where functions can be called, see the Functions section, p. 163.

Page 240: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

240

Translating Your Entire ApplicationThe process of setting up an application to translate dynamically consists of these steps.

1. Check Enable Translation in the Options tab of the Project Settings window. Open theProject Settings window by selecting Settings… in the Project menu of the menu bar.This step is different than in Configuring Dynamic Language Translation in aRunning Application (see below).

2. Enable external translation for objects and alarms. This is the same as inConfiguring Dynamic Language Translation in a Running Application (seep. 236).

3. Create a single translation file (see p. 237).

4. Do not create an empty translation file or create a way to initiate translation.

Project SettingsUse this translation option so that you can develop the application in one language andthen convert it to another language.Activate automatic language translation and specify the default language translation file:Under the Project menu, select Settings. Select the Options tab and check the EnableTranslation check box. Enter the drive, path, directory, and file name of the translationfile in the Translation Filename text box and select OK.When you do this, every translation set up in the translation file and enabled in theapplication will be performed. To revert to the original language, simply uncheck theEnable Translation check box. If you want to translate the application to anotherlanguage, simply set up another translation file and specify it in the Translation Filenametext box.

Page 241: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

241

14. Security SystemThe DesignStudio security allows you to set up different security groups with specifiedprivileges at certain security levels and to set up users in each security group. Thesesecurity levels can also be used to disable or render invisible screen objects duringruntime and runtime emulation.

Enabling DesignStudio Security

In the Database tab, right-click the Security folder and select Settings from the menu.

The Security System window will open. (If there is already a security system password inplace, you will be prompted to enter the password.)

Enable Security System checkbox: Check this option to enable the Design Studio securitysystem.

Note: Disabling the security system with this check box allows you to distribute theapplication for testing with your security system intact and without compromising thepasswords.

Page 242: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

242

Main Password button: Select this button to open the Security System Main Passwordwindow where you can define or change the password for the security system.

New Password field: Enter a password that will be used to access the DesignStudiosecurity system. The password fields are case sensitive.Confirm Password field: Confirm the password you typed in the New Password text boxby typing it again and selecting OK. If the confirmed password is different from the newpassword, the system will alert you and allow you to reenter the password. Rememberthat the password fields are case sensitive.

Note: After you specify the password for the security system, you will need to use it thefirst time you access the security system after opening DesignStudio. It is important toremember the password and write it down in a safe place for reference when needed.

Group Accounts

Creating New Group AccountsSetting up security group accounts allows you to customize program restrictions andprivileges by group name.There are four ways to create a security group.

• Right-click on the Security folder in the Database tab and select Settings from thepopup menu. Select the Groups button from the Security System window to open aGroup Account window.

• Double-click on the Security folder or click on the boxed plus beside it in theDatabase tab to open it. Right-click on the Groups folder and select Insert group fromthe popup menu.

• Select the Security Group option in the Insert menu to open a Group Accountwindow.

• New group account functions can be called in a screen using the CreateUser()function. See Functions (p. 163).

Page 243: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

243

Group Account drop list: Lists the different group accounts, allowing you to select anindividual group and edit its security settings.

Note: The Guest group and name is the program default when DesignStudio is openedand when all users logged off in prior sessions. This group is not removable. After settingup your security group accounts, modify the Guest security so that only Start App isenabled. Otherwise, all users will have unlimited access under Group.

New button: Opens a New Group Account window so that you can add a new group.

Delete button: Deletes the selected group account in the Group Account field. You willnot be able to delete the default Guest group.Security Level – Development field: Enter the range of security that the selected group willhave in the development software. The range depends on security levels you assign toscreens, worksheets (alarm, trend, recipe, math, and scheduler worksheets), and objects(input commands, text I/O, and sliders). You can enter a security level between 0 and 255for screens, worksheets, and objects. A level 0 (zero) means that the screen, worksheet, orobject is always enabled. If the security level is not within the group security level rangelogged in at the moment, the worksheet, screen, or object is disabled.Security Level – Runtime field: Enter the range of security that the selected group willhave in the runtime software. The range depends on security levels you assign to objects(input commands, text I/O, and sliders) and screens. You can assign a security levelbetween 0 and 255 to objects and screens. A level 0 (zero) means that the object or screenis always enabled. If the security level is not within the group security level range loggedin at the moment, the object or screen is disabled.Engineering Access group box: Lists engineering (development) tasks that can beaccessed when a user in this group is logged on. It includes enable/disable check boxesfor:

Create, modify tags: When a check appears next to this option, users in the group willbe able to create and modify tags.

Page 244: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

244

Project Settings: When a check appears next to this option, users in the group will beable to access and change project settings.Drivers, Data Sources: When this option is not checked, users in the group will not beable to add or remove drivers (p. 255) or create, modify, or delete driver settings andworksheets (p. 258) or OPC worksheets (OPC worksheet are only available forWindows NT applications).Network Configuration: When option is not checked, users in the group will not beable to create, modify, or delete TCP/IP worksheets (p. 264).

Runtime Access group box: Lists runtime tasks that this group can access when loggedon. It includes enable/disable check boxes for:

Start App: When a check appears next to this option, users in the group will be able toopen and start an application.Close App: When a check appears next to this option, users in the group will be ableto close an application.Database Spy (write): When a check appears next to this option, users in the groupwill be able to read and write tags. Disabling this options will allow users in thegroup only to read tags in the Database Spy window.Task switch enabled: When a check appears next to this option, users in the groupwill be able to switch tasks using the Alt+Tab keys (or the Start button in WindowsNT).CreateUser enabled: When a check appears next to this option, users in the group willbe able to add user accounts during runtime using the CreateUser() function (p. 180).

Opening Group AccountsThere are three ways to open an existing security group.• Double-click on the Security folder or select the boxed plus beside it in the Database

tab to open the folder. Double-click on the Groups folder or select the boxed plusbeside it to open it. Double-click on the group you want to open or right-click thegroup and select Properties from the popup menu. The Group Account window willopen.

• Select the Security Group option in the Insert menu to open a Group Accountwindow. Select a group from the Group Account drop-list.

• Group account functions can be called in a screen using the CreateUser() function(p. 180).

Page 245: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

245

Deleting Group AccountsThere are two ways to delete a group account.• Open the group you want to delete by double-clicking on the Security folder or

selecting the boxed plus beside it in the Database tab to open the folder. Double-clickon the Groups folder or select the boxed plus beside it to open it. Double-click on thegroup you want to open or right-click the group and select Properties from the popupmenu. The Group Account window will open. Select the Delete button.

• Delete group account functions can be called in a screen using the RemoveUser()function. (p. 180).

User Accounts

Creating New User AccountsSetting up security user accounts allows you to specify application users that will be ineach security group. Users logging onto an application under their user name will need apassword.There are four ways to create a user account.• Right-click the Security folder in the Database tab and select Settings from the popup

menu. Select the Users button from the Security System window to open a UserAccount window.

• Double-click the Security folder, or click the boxed plus beside it in the Database tabto open it. Right-click the Users folder and select Insert user from the popup menu.

Page 246: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

246

• Select the User... option in the Insert menu to open the User Account window.• New user account functions can be called in a screen using the CreateUser() function

(p. 180).

The User Account window is where you create and maintain accounts for applicationusers. Define the application users that will be in each group in the Security Group drop-list.User drop-list: Lists all user account names.

Note: The Guest user is the program default and is not removable. If no user is logged onor the current user has logged off, the Guest user is automatically logged on.

The Guest user should always remain assigned to the Guest security group, which hasdefault privileges. Therefore, we recommend setting the Guest group to include as fewprivileges as needed for a start up procedure.

Security Group drop-list: Lists the different security groups. For each user, select theappropriate security group.New button: Opens the New User Account window to create a new user.

Delete button: Deletes the selected user.Password button: Opens the User Password window in which you can define a passwordfor the user.

New Password field: Enter a password that the user will use to log on. The passwordfields are case sensitive.

Page 247: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

247

Confirm Password field: Confirm the password you typed in the New Password text boxby typing it again and selecting OK. If the confirmed password is different from the newpassword, the system will alert you and allow you to reenter the password. Rememberthat the password fields are case sensitive.

Note: It is important to write each user's password down and store the list in a safe placefor reference if needed.

Opening User AccountsThere are three ways to open an existing user account.• Double-click on the Security folder or select the boxed plus beside it in the Database

tab to open the folder. Double-click on the Users folder or select the boxed plusbeside it to open it. Double-click on the user you want to open or right-click the userand select Properties from the popup menu. The User Account window will open.

• Select the User option in the Insert menu to open the User Account window. Select auser from the User drop-list.

• User account functions can be called in a screen using the CreateUser() function(p. 180).

Deleting User AccountsThere are two ways to delete a user account.

Page 248: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

248

• Open the user account you want to delete by double-clicking on the Security folder orselecting the boxed plus beside it in the Database tab to open the folder. Double-clickon the Users folder or select the boxed plus beside it to open it. Double-click on theuser account you want to open or right-click the user and select Properties from thepopup menu. The User Account window will open. Select the Delete button.

• Delete user account functions can be called in a screen using the RemoveUser()function. (p. 180).

Setting Security Level for Display Screens

A security level can be assigned to individual display screens to protect them in thedevelopment environment and prevent access in runtime mode.With the desired display screen open, open the Screen Attributes window by right-clicking on the screen and selecting Screen Attributes from the popup menu or byselecting Screen Attributes from the View menu.

Enter the security level (0-255) in the Security text box. The default is 0 (zero), whichenables access. When the logged on user's security range does not include this number,the user will not be able to edit the screen.

Page 249: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

249

Setting the Security Level for WorksheetsYou can set a security level for alarm, trend, recipe, math, and scheduler worksheets (0-255). With the desired worksheet open, select Access Level… from the Edit menu to opena Security window:

Enter the security level (0-255) in the Access Level text box. The default is 0 (zero),which enables access to anyone. When the logged on user's security range does notinclude the number in this field, the user will not be able to edit the worksheet.

Note: You must highlight a cell in a worksheet before the Access Level… command willbecome active.

Setting the Security Level for ObjectsAny object for data input in the display screen (such as input commands, text I/O, orsliders) has a Security Level field in which you can enter the security level (0-255).Examples follow.

Object Properties - Position

Sec. field: Security level of the object. When using the slider option, this defines thesecurity level required to enable movement of the lever for operator input. When thelogged on user does not have this security level, the object will be disabled. The default is0 (zero), which enables input.

Page 250: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

250

Object Properties – Text I/O

Security field: Security level of the input object. Input Enabled must be checked to enableinput and security measures. When the logged on user does not have this security level,operator input is disabled. The default is 0 (zero), which enables input.

Object Properties – Command

Security field: Security level of the object defined in the security system. When thelogged on user does not have this security level, the command is disabled. The default is0 (zero), which enables the command.

Object Properties – Smart Message

Security field: This field is disabled unless the Type of Smart Message is MultistatePushbutton. The field contains the security level of the object defined in the securitysystem. When the logged on user does not have this security level, the ability to use thepushbutton is disabled. The default is 0 (zero), which enables the command.

Page 251: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

251

Object Properties – Pushbutton

Security field: Security level of the object defined in the security system. When thelogged on user does not have this security level, the command is disabled. The default is0 (zero), which enables the command.

Logging On and Off

Development SoftwareThe Guest user is the default user when a user logs off. When DesignStudio is initialized,the Guest user is the default only if the last user logged off in the prior session. If thesecurity groups and users are configured correctly, Guest will have limited access. Onlyone group can be logged on at a time.To gain the appropriate level of access, users must log on. There are two different waysfor users to log on and off in the development software.• Select Logon... from the Project menu.• Log on or off by using the Scripting Language module activation functions Logon( )

and Logoff( ) (p. 183).

To log on, enter your user name and password and select OK. There can only be onecurrent user. The current user will automatically be logged off when another user logs on.To log off, select the Log Off button. When a LogOff is executed, the Guest user isautomatically logged on.

Note: If a user remains logged on and DesignStudio is closed, then the next timeDesignStudio is initialized, the same user will automatically be logged on.

Note: If the Touch-screen keypad has been enabled in the Runtime Desktop tab of theProject Settings window (p. 53), selecting a field in this window on your runtimeworkstation will open a touchscreen keypad that allows you to enter characters without akeypad or keyboard.

Page 252: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

252

Runtime and Runtime Emulation ModeWhen the DesignStudio runtime or runtime emulator is initialized, the Guest user is thedefault user as long as all users logged off in prior sessions. The Guest user also becomesthe default user as soon as the current user logs off. Only one group can be logged on at atime. If the security groups and users are configured correctly, the Guest user will havelimited access. To gain the appropriate level of access, users must log on. There are twodifferent ways for users to log on and off in runtime mode.• In the development software, you can set up a runtime project to include the log on

and log off security options in a menu bar. For the currently active project, selectSettings from the Project menu. Select the Runtime Desktop tab from the ProjectSettings window (see also p. 53).

Make sure the Menu option is checked. Select the Options... button.

Select Security and the LogOn and LogOff options. Select OK.When the application is running in runtime mode, users will be able to log on and offthrough a menu bar at the top of the screen. From this menu bar, users can select LogOnor LogOff from the Security menu.

Page 253: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

253

• Enable users to log on and off by using the Scripting Language module activationfunctions Logon( ) and Logoff( ) (p. 183).

Note: If a user remains logged on and DesignStudio is closed, then the next timeDesignStudio is initialized, the same user will automatically be logged on.

Page 254: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150
Page 255: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

255

15. I/O CommunicationA component of an HMI application is the I/O communication. Communication, in thiscase, means to read values from or write values to a devices’ memory or a remoteworkstation to the application’s tags. A communication driver is a DLL that containsspecific information about the remote equipment and implements the communicationprotocol. The driver must be configured in the DesignStudio development software andruns when the application starts up on the runtime workstation. DesignStudio has driversfor monitoring and controlling equipment and communicating with most popular serialdevices and PLC networks, as well as a driver to share tag values with a remoteOpenHMI SE/PE workstation through an Ethernet network.The chapter covers general information on configuring a driver for I/O communication.For specific information, like addressing schemes on a brand of PLC, refer to theappropriate communications supplement.

Driver HelpYou can access driver-specific help in three different places in the DesignStudiointerface: the Help menu Communication Drivers selection, the Communication Driverswindow opened by right-clicking the Drivers folder of the Comm tab of the Workspacewindow and selecting Add/Remove Drivers, and the menu that appears when you right-click a specific installed <driver name> folder. The last choice opens a specific help file.The first two open a Communication Drivers window where you can highlight aparticular driver and select the Help button to open a specific help file.

Adding and Configuring Device Drivers

The OpenHMI-PE runtime software acquires the data values from PLCs and other I/Odevices through device drivers. This section addresses I/O driver selection andconfiguration.After you add a driver to a project, you still need to configure the serial channel orexpansion board, specify the parameters of the driver, and link the project’s tags to I/Oaddresses on your device. To configure a communication driver, first specify thecommunication parameters (for example, the station address and the baud rate), thenspecify the addresses in the equipment that are connecting to the specified tags. You canadd several driver worksheets to your project to group associated tags together processedin a similar fashion.

Adding a Driver to a Project1. In the DesignStudio Workspace window, click the Comm tab.

2. Right-click the Drivers folder. A menu will appear with an Add/Remove Driverschoice:

Page 256: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

256

3. Select Add/Remove Drivers, and the Communication Drivers dialog appears:

4. Select the desired driver in the Available Drivers, then select the Select>> button. Thedriver should now appear in the Selected Drivers list.

5. Select OK to close the window and save your changes. The driver that you haveadded will now be listed in the Drivers folder.

Note: You can add only one driver to a Windows CE application.

Communication Parameters

Note: If you make changes to communication parameters and download the project to arunning workstation, the changed parameters will not take effect until you stop and restartthe application on the runtime system.

Note: Each driver will occupy a port. If an I/O port allows you to attach more than onedriver to it, you may use that port to download applications and communicate with adriver.

Specifying Communication Parameters1. In the DesignStudio Workspace window, click the Comm tab.

2. Open the Drivers folder.

3. Right-click on the device driver folder that you want to configure. A menu with Insertand Settings choices will appear.

Page 257: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

257

4. Select Settings. A Communication Parameters dialog appears.

5. Complete the dialog to match the settings on your PLC.

Note: The COM field specifies the serial port on your runtime workstation that connects tothe PLC.

Note: The Long1, Long2, String1, and String2 fields vary according to the specific devicedriver. Refer to the appropriate communications supplement to complete these fields.

6. Click Advanced. The Advanced settings dialog appears.

7. Complete the dialog to change default driver settings.Start Message: Enter a value (0 to 1000) as the maximum time to receive thebeginning of the message from the device (time-out time).End Message: Enter a value (0 to 1000) as the maximum time to receive the end ofthe message from the device from the beginning of the message. (The value zeromean that the driver will not check these times.)Interval between char: Enter a value (0 to 1000) as the maximum time between thecharacters sent from the device

Page 258: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

258

Wait CTS: Enter a value (0 to 1000) as the maximum time to receive the CTS signalafter setting the RTS signal. Valid only if the parameter Verify CTS has the value yes).Control RTS: Specify whether the handshake signal of RTS (Request to Send) is setbefore communication and if there is an echo in the communication.Verify CTS: Specify whether the driver must wait for the handshaking signal of CTS(Clear to Send) before send a message.Disable DTR: If checked, the driver will not set the DTR signal before starting thecommunication.Retries: Enter a value (0 to 9) as the number of communication attempts if failureoccurs.Tx Buffer: Enter a value (0 to 512) as the maximum size of the buffer of informationto be sent from the driver.Rx Buffer: Enter a value (0 to 512) as the maximum size of the buffer of informationto be received from the device.

8. Select OK to close the Advanced dialog and save the advanced settings.

9. Select OK to close the Communication Parameters dialog and save the settings.

Driver Worksheet

The Driver Worksheet is divided into two panes, the body and the header. The body panelinks the project’s tags to PLC addresses and defines other information about how theirI/O values are processed by the HMI application. The header pane includes triggeringinformation that allows you to control when and how the HMI application reads andwrites to the listed tags.

Adding and Modifying Driver WorksheetsDriver worksheets are accessed and maintained as items in the Workspace window.

Adding a Driver Worksheet1. In the DesignStudio Workspace window, click the Comm tab.

2. Open the Drivers folder.

3. Right-click on the device driver folder that you want to add a worksheet to. A menuwith Insert and Settings choices will appear.

4. Select Insert. A device driver worksheet appears.

Page 259: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

259

5. Complete the worksheet. Refer to p. 260 to complete the header and p. 261 to completethe body.

6. To save the worksheet, select the Save button on the toolbar.

7. Close the worksheet window. If you have not saved the worksheet, you will beprompted to save it. Select Yes to save the worksheet or select No to discard theworksheet without saving it.

Modifying a Driver Worksheet1. In the DesignStudio Workspace window, click the Comm tab.

2. Open the Drivers folder.

3. Open the device driver folder that contains the worksheet you want to modify.

4. Right-click on the worksheet that you want to modify. A menu with Open and Deletechoices will appear.

5. Select Open. The worksheet appears.

6. Modify the worksheet. Refer to p. 260 to change fields in the header and p. 261 tochange fields in the body.

7. To save your changes, select the Save button on the toolbar.

8. Close the worksheet window. If you have not saved the worksheet, you will beprompted to save it. Select Yes to save the worksheet or select No to discard theworksheet without saving it.

Page 260: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

260

Deleting a Driver Worksheet1. In the DesignStudio Workspace window, click the Comm tab.

2. Open the Drivers folder.

3. Open the device driver folder that contains the worksheet you want to delete.

4. Right-click on the worksheet that you want to delete.

5. Select Delete from the right-click menu that appears.

Driver Worksheet Header

Description: Enter a description of the worksheet, like what types of addresses, theirrange, and if the sheet is reading, writing, or both. This description will be shown in theworkspace windows in the driver's folder.Increase read priority: Select this check box to have the current sheet read first when aRead Trigger tag used on more than one sheet changes.Read Trigger: When the value of the tag that you enter in this field changes, the driverwill read all tags listed in the worksheet’s body.Enable Read When Idle: Whenever the tag that you enter in this field is a nonzero value,the driver will read all tags listed in the worksheet’s body.Read Completed: Enter a Boolean tag that will have its value toggled when a triggered readfrom the PLC or other device is completed.Read Status: Enter a tag that will have a status value written to it when a triggered readfrom the PLC or other device is completed. If this status value equals zero, the valueswere read successfully. Nonzero values indicate that an error occurred and the valueswere not read successfully. These error codes are device-specific. Refer to the chapterthat covers your device for information about these codes.Write Trigger: When the value of the tag that you enter in this field changes, the driverwill write the tag values of all listed addresses in the worksheet’s body to the PLC orother device.

Caution: When using a Write Trigger, the driver will write the values of all listed tagsinto the PLC memory. If a tag has not been assigned a value, the driver will write a valueof zero to the PLC address. Therefore, you should verify that all tags will have a valuewhen a write trigger occurs or that a value of zero will not cause errors in the system orthe PLC program.

Page 261: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

261

Enable Write on Tag Change: Whenever the tag that you enter in this field is a nonzerovalue, the driver will write only the tag values that have changed and are listed in theworksheet’s body.Write Complete: Enter a tag that will have its value toggled when a triggered write to thePLC or other device is complete.Write Status: Enter a tag that will have a status value written to it when a triggered writeto the PLC or other device ends. If this status value equals zero, the values were writtensuccessfully. Nonzero values indicate that an error occurred and the values were notwritten successfully. These error codes are device-specific. Refer to the chapter thatcovers your device for information about these codes.Station: Enter the PLC ID on its network. You may put a tag in this field using thesyntax: {tag name}.Header: This field is device-specific. Refer to the chapter that covers your device forinformation about these fields. You may put a tag in this field using the syntax:{tag name}.Min / Max: Optional fields. Refer to the Scaling Tag Values section below (p. 262).

Driver Worksheet BodyThe Driver worksheet body is used to assign the PLC memory address to the declaredtags and to apply scaling to data values.

Tag Name: Tag name used by the communication driver that refers to values in the HMIapplication. You may right-click this cell and choose Insert Tag… from the popup menu.Address: Address on the PLC or other device that Tag Name reads from and writes valuesto. Address formats are device-specific. Refer to the chapter that covers your device forinformation about these fields.Div: When scaling is required, enter a division constant that is applied to the values readfrom or written to the PLC or other device. Refer to the Scaling Tag Values sectionbelow (p. 262). Leave the cell blank if you do not want to apply a division constant to thevalues. This field only appears when the Min/Max check box in the header is deselected.The field name is changed to Min when the Min/Max check box is checked.Add: When scaling is required, enter an addition constant that is applied to the valuesread from or written to the PLC or other device. Refer to the Scaling Tag Values sectionbelow (p. 262). Leave the cell blank if you do not want to apply a division constant to thevalues. This field only appears when the Min/Max check box in the header is deselected.The field name is changed to Min when the Min/Max check box is checked.

Note: For read operations the tag value will equal (<value from device>) / Div + Add.For write operations the value written to the device will equal (<tag value> - Add) * Div.

Page 262: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

262

Min: Enter the minimum tag value that the driver will use to apply absolute scaling whenreading from and writing to the PLC or other device. Appears when the Min/Max checkbox in the header is selected. Refer to the Scaling Tag Values section below (p. 262).Max: Enter the maximum tag value that the driver will use to apply absolute scaling whenreading from and writing to the PLC or other device. Appears when the Min/Max checkbox in the header is selected. Refer to the Scaling Tag Values section below (p. 262).

Scaling Tag ValuesThrough driver worksheets, you can adjust the values read from and written to the PLC orother device by percentages, offset values, or to absolute scales.

Scaling With Divisors and Offset Values1. Create or add a worksheet with the tag values that you want to scale (see p. 258).

2. In the worksheet header, deselect the Min/Max checkbox.

3. For each tag that you want to apply percentage scaling to, enter a division constant inthe Div column. Read values will be divided by the constant. Written values will bymultiplied by the constant. For example: to set an application tag value to be 50% ofthe corresponding PLC value, enter a division constant of 2.

4. For each tag that you want to apply an offset to, enter an addition constant in the Addcolumn. The constant will be added to read values and subtracted from writtenvalues. For example: to set an application tag value to be 100 less than the PLCvalue, enter an addition constant of –100.

Scaling To Absolute Values1. Create or add a worksheet with the tag values that you want to scale (see p. 258).

2. In the worksheet header, select the Min/Max checkbox.

3. Enter the global maximum and minimum values that can be sent or read by thedevice in the now-active Min and Max text boxes in the header. These values will beapplied to the values of every tag listing in this worksheet.

4. For each tag to which you want to apply a different set of minimum and maximumvalues, enter the minimum and maximum tag values in the Min and Max columns.

5. Select one of the driver worksheet tags in the Object Finder window (p. 69) so that itappears in the Tag Properties toolbar (p. 68) text box or type the tag name directlyinto the Tag Properties toolbar text box.

Page 263: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

263

6. Select the Tag Properties button on the Tag Properties toolbar to open a TagProperties window (p. 71).

7. In the Engineering Units group box, type the minimum and maximum values for thetag in the Min and Max text boxes.

8. Repeat this step for every tag in the worksheet for which you would like to scale thePLC/device values. The maximum value of the PLC/device memory location that isset in the Driver worksheet will be scaled to the Max value of the tag that isconfigured in the Tag Properties window, the minimum value of the PLC/devicememory location that is set in the Driver worksheet will be scaled to the Min value ofthe tag that is configured in the Tag Properties window, and all intermediate valueswill be scaled accordingly. This scaling also works in reverse with the minimum andmaximum tag values being scaled to the minimum and maximum device valuesbefore being written to the device.

Note: For example, to store final data values between -100 and 100 in a particulartag, enter -100 in the Min text box and 100 in the Max text box of the Tag Propertieswindow. Assuming an instrument output of 0 to 4096, enter 0 in the Min text box and4096 in the Max text box of the Driver worksheet. The I/O device will output valuesbetween 0 and 4096, but the application will convert these to values between -100and 100 and assign this scaled value to the tag.

Page 264: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

264

TCP/IP CommunicationsThe OpenHMI SE/PE runtime software can acquire data values from other OpenHMISE/PE workstations on an Ethernet network. This section covers the configuration ofTCP/IP communications.

TCP/IP WorksheetThe TCP/IP worksheet is similar to the driver worksheets, but it is less complex withfewer parameters to specify in the header and body. TCP/IP worksheets are accessed andmaintained as items in the Comm tab of the Workspace window.

Adding a TCP/IP Worksheet1. In the DesignStudio Workspace window, select the Comm tab.

2. Right-click on the TCP/IP folder, then select Insert from the menu that appears.

3. A TCP/IP driver worksheet appears.

4. Fill in the following fields in the worksheet header, if applicable:Description text box: This optional field is for documentation only; the worksheetdoes not use it. The default is blank.Connection Status text box: Optional field. The tag in this field will have a statusvalue written to it when the local workstation attempts to connect to the remoteworkstation. The status value will be either 0 (not connected to the remote TCP/IPserver) or 1 (connected to the remote TCP/IP server).Server IP Address text box: Enter the IP address of the remote workstation. This maybe a string tag containing the IP address. You may use a tag for part or all of the filename using the syntax: {tag name} or string{tag name}.

Page 265: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

265

5. In each row of the worksheet’s body, enter a local tag in the Tag Name column andthe corresponding remote tag whose value the local tag will access in the Remote Tagcolumn.

6. To save the worksheet, select the Save button on the toolbar.

7. Close the worksheet window. If you have not saved the worksheet, you will beprompted to save it. Select Yes to save the worksheet or select No to discard theworksheet without saving it.

Modifying an Existing TCP/IP Worksheet1. In the DesignStudio Workspace window, click the Comm tab.

2. Open the TCP/IP folder.

3. Open the description folder that contains the TCP/IP worksheet you want to modify.

4. Right-click on the worksheet that you want to modify. A menu with Open and Deletechoices will appear.

5. Select Open. The worksheet appears.

6. Modify the worksheet. Refer to p. 264 to change fields in the worksheet.

7. To save your changes, select the Save button on the toolbar.

8. Close the worksheet window. If you have not saved the worksheet, you will be promptedto save it. Select Yes to save the worksheet or select No to close the worksheet withoutsaving the changes.

Deleting a TCP/IP Worksheet1. In the DesignStudio Workspace window, click the Comm tab.

2. Open the TCP/IP folder.

3. Open the description folder that contains the TCP/IP worksheet you want to delete.

4. Right-click on the worksheet that you want to delete.

5. Select Delete from the right-click menu that appears.

Page 266: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

266

OPC Client WorksheetThe OPC Client worksheet enables the OpenHMI SE/PE application to communicate withany device that implements an OPC server. This module implements the OPC standard asdescribed in the document OLE for Process Control Data Access Standard Version 1.0Athat is available at http://www.opcfoundation.org. Before using the OPC Clientworksheet, you will need to install and configure an OPC server on the OpenHMI SE/PEruntime workstation.

OPC Client WorksheetThe OPC Client worksheet is similar to the driver worksheets, but it is less complex withfewer parameters to specify in the header and body. OPC Client worksheets are accessedand maintained as items in the Comm tab of the Workspace window.

Adding an OPC Client Worksheet1. In the DesignStudio Workspace window, select the Comm tab.

2. Right-click on the OPC folder, then select Insert from the menu that appears.

3. An OPC Client worksheet appears:

4. Fill in the following fields in the OPC Client worksheet header, if applicable:Description text box: This optional field is for documentation only; the worksheetdoes not use it. The default is blank.Server Identifier drop-down list: Select a server from this list. If you have not alreadyconfigured and registered an OPC server, this list will be empty and you will beunable to use the OPC Client worksheet. The default is blank.

Page 267: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

267

Disable text box: Optional field. Type a number or numeric tag in this field. If thevalue in this field is nonzero, the communication set up in this worksheet is disabled.If this field is blank (the default), the worksheet acts as if the value is zero(communication enabled).Update Rate (ms) text box: Optional field. Enter a number or numeric tag in this field.This number is the time interval (in milliseconds) at which the tag values configuredin the worksheet body (see Tag Name and Item fields below) will be updated by theOPC server configured in the Server Identifier field. If this field is blank (the default)or if the value is too low, the updating will occur in the minimum time slice possibleto the system.Percent Deadband text box: Optional field. The numeric value or value of the numbertag in this field is a percentage by which the value of an OPC server tag named in theItem column of the worksheet must change before its value is updated to theequivalent DesignStudio tag named in the Tag Name column. (More information ontags is given below.) If this field is blank (the default), the Tag Name tag values willbe updated whenever the Item tag values change.Status text box: Optional field. The tag in this field will receive a number value equalto the status or error code corresponding to the state of the OPC client to servercommunication. These values can be sent by the OPC client or the OPC server. Avalue of 0 sent by the OPC client means that the communication status is OK. Anonzero value is a standard OPC error code. The default is blank.Remote Server Name field: Optional field. This read-only field displays the IP address(or DNS name) of the OPC server. You must browse to this remote station over aTCP/IP network using the Browse… button. This function is not available forWindows CE applications.

5. Fill in the OPC Client worksheet body. In each row of the worksheet body, enter aDesignStudio application tag in the Tag Name column and the corresponding OPCserver tag whose value will be assigned to the DesignStudio tag in the Remote Tagcolumn.

The rules for editing this worksheet follow the standard rules for editing worksheets asdescribed in Chapter 7 (p. 197). Double-clicking in a Tag Name cell will open the ObjectFinder window (p. 69) where you can browse through already existing tags or create anew one to be inserted in the cell. Right-clicking the cell will open a popup menu whereyou can select editing commands:

Insert Tag will open the Object Finder window just like double-clicking the cell (seeabove).Cut, Copy, and Paste act like the standard Windows commands.Insert Line will insert a worksheet line above the selected cell.

Page 268: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

268

Right-clicking an Item cell will open another popup menu with editing commands thatyou can select:

OPC Browser will open an OPC Browser window where you can navigate the list of tagsavailable to the OPC server that is specified in the Server Identifier field. If you have notselected an OPC server, this command will not be active.

If you select a tag in this window, it will be inserted into the selected Item cell.Cut, Copy, and Paste act like the standard Windows commands.Insert Line will insert a worksheet line above the selected cell.

6. To save the worksheet, select the Save button on the toolbar.

7. Close the worksheet window. If you have not saved the worksheet, you will beprompted to save it. Select Yes to save the worksheet or select No to discard theworksheet without saving it.

Modifying an OPC Client Worksheet1. In the DesignStudio Workspace window, select the Comm tab.

2. Open the OPC folder.

3. Right-click the OPC worksheet that you want to modify. A menu with Open andDelete choices will appear.

Page 269: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

269

4. Select Open. The worksheet appears.

5. Modify the worksheet. Refer to the section above for information.

6. To save your changes, select the Save button on the toolbar.

7. Close the worksheet window. If you have not saved the worksheet, you will be promptedto save it. Select Yes to save the worksheet or select No to close the worksheet withoutsaving the changes.

Deleting an OPC Client Worksheet1. In the DesignStudio Workspace window, select the Comm tab.

2. Open the OPC folder.

3. Right-click the OPC worksheet that you want to modify. A menu with Open andDelete choices will appear.

4. Select Delete and then select Yes to confirm your action.

Page 270: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150
Page 271: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

271

16. Downloading and TestingApplications

After you complete an HMI application in DesignStudio, you download it to the runtimeworkstation and run it with the OpenHMI SE/PE runtime software. Before you use yourapplication in a real-world situation, however, you will want to test your application. Youcan test the application locally, on the development PC (before downloading) and on theruntime system in a controlled environment. This chapter covers the software tools thatcan help you test the application and the procedures to download an application to aruntime system.

Downloading to the Runtime Workstation

Execution Environment Window – Connecting to the Runtime Workstationor Setting Up Local Emulation

Selecting the Execution Environment button on the Execution Control toolbar or selectingthe Execution Environment from the Project menu opens an Execution Environmentdialog with three tabs. The Target and Application tabs include functions and propertiesfor emulating the runtime system on the local development PC, connecting to the runtimesystem, and downloading projects. The Import tab allows you to transfer directories andfiles from the runtime system to the development PC.

Target TabThe fields in this window tab are used to connect to and disconnect from the runtimeworkstation, to set up local emulation, and to update the runtime workstation OpenHMISE/PE files.

Target Station group box: Select the appropriate method for connecting to the runtimeworkstation (Network IP, Serial Port, or Infra red radio buttons) or select Local to emulatethe runtime workstation on your development station in order to test and debug theapplication before downloading it (see p. 281).

Page 272: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

272

Note: Before the development computer and the OpenHMI runtime workstation canconnect successfully, the OpenHMI runtime workstation COM port or IP address must beconfigured separately. See the OpenHMI SE/PE, Runtime Quickstart Guide for details.

Local radio button: For more information on local emulation and debugging, seeLocal Emulation and Testing (p. 280).Network IP radio button: If you select this connection option enter the IP address ofthe runtime system in the text field.Serial Port radio button: If you select this connection option, select the developmentcomputer serial (COM) port from the drop-down list.Infra red radio button: This option is not enabled in the current version ofDesignStudio.

Connect and Disconnect buttons: Select the Connect button to establish a connection withthe runtime system. Select the Disconnect button to terminate the connection.

Note: If you are trying to connect using the serial connection option and you receive atimeout error message, try again immediately. Sometimes serial connection requires twoattempts.

Status field: This read-only field displays the current connection status to the runtimesystem. When connected, the Execution Environment window will look like this, exceptthat the number after the word CEVIEW will be the current version of the DesignStudiosoftware:

Install system files… button: Before you download a new or updated project from a newversion of the DesignStudio software, you must establish a connection to the runtimesystem, then select this button to send and update the necessary system files. After youinstall the system files, you can select the Application tab to download the project. Youshould also use this button the first time that you download an application to anOpenHMI runtime workstation. This button is not active until you have established aconnection to the runtime workstation with the Connect button.Only newer files check box: When this box is checked (default state), only files that havemore recent modification dates than their counterparts on the runtime workstation will bedownloaded. This saves time by downloading only altered files. This box should usuallyremain checked. This field is not active until you have established a connection to theruntime workstation with the Connect button.

Page 273: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

273

Application TabThe fields in this tab are used to download the application to the runtime workstation andto start and stop the downloaded application remotely (from the connected developmentcomputer). The functions on this tab can only be used after connecting to the runtimeworkstation. Please read the Caution below before downloading any application.

Application Path group box:Local field: This read-only field shows the path to the current application on thedevelopment computer.Target field: This read-only field shows the path to which the application will bedownloaded on the runtime workstation. If this path is incorrect, the information inthis field can be changed using the Browse button.Browse button: Use this button to open a Browse Target window in which you canspecify a new destination path for the downloaded application. Navigate the folderstructure in this window in the same manner as navigating the folder structure in aWindows Explorer window. This button is inactive until a connection to the runtimeworkstation is established.

You must browse to an existing directory or create a new directory (see NewDirectory button below) before you can select it as the download location. When youhave browsed to and/or created the correct path, choose the OK button and the path inthe Current read-only field will be put into the Target field of the Application tab.To browse to an existing to path, double-click existing folders (listed in the pane) toopen them or use the Up One Level button to show the next higher level in thedirectory hierarchy.

Page 274: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

274

Note: You will not be allowed to set the download path to the root directory on theruntime workstation as stated in the Caution below. Do not try to circumvent thissafety precaution.

Note: If you download to both OpenHMI 3406 runtime workstations and OpenHMI3408/3410/3412 runtime workstations, you will need to use the Up One Level buttonto change between the \Disk\ (3408/3410/3412) and \Storage Card\ (3406) rootdirectories. DesignStudio will not automatically sense a change and will give you anerror message when you attempt to download to a dissimilar OpenHMI runtimeworkstation. When you do this, do not forget to browse to or create a newsubdirectory for the actual download destination (see Caution below).

New Directory button: Use this button to create a new folder within the currently opendirectory. Selecting this button will open a New Directory window. Type the newfolder name in the text box and select the OK button.

Note: The application folder should always have the same name as the application.If the names do not match, the application may not run correctly on the runtimeworkstation.

Caution: Do not download an application to the root directory or to systemdirectories. DesignStudio will delete all files and subdirectories in the Targetdirectory before it transfers the project files for the downloaded application. Onlydownload an application to a new directory that you create.

Send to Target button: Select this button to send the application to the specified Targetdirectory. This button is inactive until a connection to the runtime workstation isestablished. See the Caution above before using this button.Send File… button: Use this button to send an individual file from a location in yourdevelopment computer to a non-volatile location on your OpenHMI runtime workstation.When you select this button, a Source File window will open.

Page 275: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

275

This window will automatically open the folder of the application that is currentlyopen in DesignStudio, but you can browse to any location on your developmentcomputer. Select the file you want to copy and then select the Open button. (You canalso double-click the desired file.) After this, a Target Folder window will open:

The Current read-only field shows the folder into which the file will be copied. Thedefault target location is the same application folder on the runtime workstation.Browse to the appropriate location and then select the OK button.Up One Level button: Use this button to navigate up one folder hierarchy level fromthe folder displayed in the Current field. You will not be able to navigate past thenonvolatile storage memory (\Disk\ directory in the OpenHMI 3408, 3410, and3412; \Storage Card\ directory in the OpenHMI 3406).New Folder button: Use this button to create a new subfolder within the folderdisplayed in the Current field.When you have selected the target location, a question window will open:

Choose the appropriate button. If you do not have a copy of the file on your runtimeworkstation, you should generally choose Yes.

Run button: Select this button to start the application on a connected runtime system. Thisbutton is inactive until a connection to the runtime workstation is established.Stop button: Select this button to stop running the application on a connected runtimesystem. This button is inactive until a connection to the runtime workstation isestablished.Status field: This read-only field displays the status or error messages associated withdownloading, remotely starting, or remotely stopping an application on the runtimeworkstation. This field is initially blank.

Page 276: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

276

Import TabThe operations in this tab are used to import files and folders from the runtimeworkstation to the development computer. Please read the Caution and Note belowbefore uploading any folders.

Application Path group box:To field: This read-only field displays the folder to which the contents of the folderspecified in the From field will be copied. The default setting is the most recentlydownloaded application folder. You can use the Browse button to the left of the fieldto choose another folder. See the Note and the Caution below regarding uploading tothe development computer root directory.

Note: Any folder specified in the To field will have its contents overwritten. You areadvised to create a specific folder to which you can upload directories.

The Browse button to the right of the To field is used to navigate to a folder that isdifferent than the default folder. Selecting the button will open a Browse for Folderwindow. The default open folder is the most recently downloaded application folder.Navigate the folder structure in this window in the same manner as navigating thefolder structure in a Windows Explorer window.

Page 277: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

277

New Folder button: Use this button to create a new folder in your developmentcomputer. Selecting this button opens a Create New Directory window. Type the newfolder name in the New Folder Name text box and select the OK button.

From field: This read-only field displays the folder whose contents will be uploadedfrom the runtime workstation using the Get From Target button. The default setting isthe most recently downloaded application folder. You can use the Browse button tothe left of the field to choose another folder. Any folder on the runtime workstationcan be chosen, not just application folders.The Browse button to the right of the From field is used to navigate to a folder that isdifferent than the default folder. Selecting the button will open a Browse Targetwindow. The default open folder is the most recently downloaded application folder.Navigate the folder structure in this window in the same manner as navigating thefolder structure in a Windows Explorer window.

To browse to an existing to path, double-click existing folders (listed in the pane) toopen them or use the Up One Level button to show the next higher level in thedirectory hierarchy.New Directory button: Use this button to create a new folder within the currently opendirectory. Selecting this button will open a New Directory window. Type the newfolder name in the text box and select the OK button.

Page 278: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

278

Get From Target button: Select this button to import the contents of the folder (not thefolder itself) specified in the From field to the directory specified in the To field. Thisbutton is inactive until a connection to the runtime workstation is established.

Caution: You will not be able to import files to the root directory. Do not try to getaround this limitation and transfer files and folders to the root directory or to systemdirectories. DesignStudio will delete all files and subdirectories in the To directory beforeit transfers the project files for the downloaded application. Therefore, never import adirectory into the default To directory of C:\. Only transfer files and folders to a newdirectory that you create.

Get Log File button: Use this button to upload the LogWin celog.txt file (p. 289) to thetarget directory of the development computer specified in the To field. This allows you toimport the LogWin file to the development computer so that you can more easily viewand edit it for debugging purposes. This button is inactive until a connection to theruntime workstation is established.

Note: The celog.txt file will only be created if the LogWin option is turned on (whenit has a check beside it in the menu) in the application menu bar Tools menu (p. 289).

Note: The celog.txt file is located in the \Disk\ folder of the 3408, 3410, and 3412OpenHMI workstations and the \Storage Card\ folder of the 3406 OpenHMI workstation.

Status field: This read-only field displays the status of the import operation. It is initiallyblank.

Downloading an Application – Step-by-Step

Note: Before using this checklist, you should read the previous section, starting onp. 271, and make sure that you understand the Cautions and Notes.

For a real world application, you need to download your application to a runtimesystem before you can start communicating with I/O. You can download multipleOpenHMI SE/PE applications and store them on the runtime system storage medium(flash drive). However, OpenHMI SE/PE workstations will always run the mostrecently downloaded project automatically when the system boots up. If you wish tochange the project that automatically starts, you must download the startup project fromthe development PC, even if the project has already been downloaded to theworkstation.

Note: The Database Spy and LogWin tools (p. 282) are also available on a runtimesystem for further testing of an actively running application. Their implementation onruntime systems is similar to their functionality on a development PC. Refer to theOpenHMI SE/PE, Runtime Quickstart Guide manual for more information.

Connecting a Runtime Workstation and a Development Computer1. Physically connect the two computers. Use a crossover Ethernet cable for a peer-to-

peer direct network connection or use a null modem serial cable to make a directconnection through the computers’ COM ports. Both types of cables are includedwith the DesignStudio development software.

Page 279: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

279

2. Follow the instructions in the OpenHMI SE/PE Runtime Workstation Quick Startmanual to setup the runtime system to receive the downloaded application.

3. Start the DesignStudio software and open the application to be downloaded.

4. Set up the connection on the development PC. Select the Execution Environmentbutton on the Execution Control toolbar to open the Execution Environment window(see p. 271).• To specify a peer-to-peer direct network connection, select the Network IP radio

button and enter the runtime workstation’s IP address.• To specify a serial connection, select the Serial Port radio button. From the drop-

down list select the development computer COM port.5. In the Execution Environment window, select the Connect button. When connected,

the Status box will display Connected to CEVIEW <version number>.

Downloading an ApplicationIf you have not already established a connection between the runtime and developmentcomputers, complete the connection steps above.

6. On the development PC under the Target tab (p. 271) of the Execution Environmentdialog, select Install system files…. This installs and updates the OpenHMI SE/PEfiles on the runtime workstation.

Caution: Do not download applications to the root directory (the root directory is just a\ in the Target field). Sending the application to the workstation's root directory willerase the Windows CE image (files) that the workstation uses to load Windows CE intosystem memory. A workstation with an erased Windows CE image will not boot upcorrectly and will not operate, until the Windows CE image is restored.

7. Under the Application tab, specify the location on the runtime workstation fordownloading your application. Select the browse button to open the Browse Targetdialog.

8. Find the appropriate directory by double-clicking folders to open directories until thedirectory, where you would like to place the project files for the application, appearsin the Current text box. (This is similar to moving through directories in WindowsExplorer.)• For OpenHMI 3406 runtime workstations, download new applications into the

\Storage Card\ directory. All other directories are saved only in memory, andtheir contents are lost when the machine is rebooted.

• For other OpenHMI 3400 series runtime workstations, download the applicationinto the \Disk\ directory. All other directories are saved only in memory, andtheir contents are lost when the machine is rebooted.

• If you are updating or reloading an application, you should then select thesubdirectory, where that application is stored.

• If you are downloading a new application instead of updating an application, youcan select the new folder button to create a new directory.

Note: The application folder should always have the same name as the application.If the names do not match, the application may not run correctly on the runtimeworkstation.

Page 280: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

280

9. Select OK.

10. In the Execution Environment dialog under the Application tab, select the Send ToTarget button. After downloading the application, the Status text box message willdisplay the message Application was updated with success.

Note: You do not need to stop a running application on the runtime workstation in orderto download an application update, such as a new or modified screen; however, since notall changes can take effect on the fly, you should stop and restart your application afterdownloading changes.

Running an Application with the Execution Environment Window ClosedIf the runtime workstation is currently connected to the development computer, theExecution Environment window can be closed and the Run Application and StopApplication buttons on the Execution Control toolbar can start and stop the application onthe runtime workstation. This allows you to work on the application and still be able tocontrol the runtime application to some extent. (You cannot work on an application inDesignStudio while the Execution Environment window is open.)

Saving Changes to an Application on the Runtime WorkstationWhenever the runtime workstation and the development computer are connected,changes made to the application in DesignStudio can be saved to the copy of the sameapplication on the runtime workstation. There are two different kinds of changes:

Graphics ChangesIf the changes affect only graphics objects and do not affect any background tasks or anyprocesses found on the Database, Comm, or Tasks tabs of the Workspace window, thechanges will be automatically saved to the connected runtime workstation at the sametime as they are saved to the development computer. A window will appear and show theprogress in saving the changes to the runtime workstation.If the application is running on the runtime workstation when these types of changes aresaved, the changes will appear in the running application and will work immediately.Example: If a new button (using the Command dynamic property) is added and it usesalready existing tags and makes no calls to new worksheets, it should work after beingsaved. Otherwise it will appear and not work correctly. In this second case, follow thesteps under Other Changes (below) to make the changes take effect.

Other ChangesAlmost everything that isn't purely a graphics change will require a different approach.The graphical parts of the changes will appear on the running application screens, but thechanges will not all work. In order to make the nongraphics changes take effect, you mustdownload the application again using the Send To Target button on the Application tab ofthe Execution Environment window. (To make this process faster, make sure that theOnly newer files check box is checked.) Then you must stop and start the application. Allnew changes will now take effect on the runtime workstation.

Page 281: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

281

Local Emulation and Testing on the Development Computer

Test DisplayYou can use the Test and Stop display buttons as you develop a screen. An open screen’sdata displays and instruments will update according to the static values and calculationsthat remain after running the CEView emulator. Manual controls, like buttons and sliders,will not operate, but displays will changed based on background tasks (p. 293) such asMath worksheets. You can edit the properties and move screen objects while you test thescreen.

Running an Application LocallyIf Local is selected as the Target Station in the Target tab of the Execution Environmentwindow (see p. 271), the Run Application and Stop Application buttons can start and stopan application locally on the development computer.

CE ViewerWhen you start an application locally it runs in the CE Viewer. This task runs anapplication on the development PC as if the application were active on a runtime system.All screen controls and displays, scripting, and other features will run. The CE Vieweremulator is most useful when used with the debugging tools, like the Database Spy andLogWin, while you have tags simulating the data from your I/O.

Note: Due to different processor speeds, applications will often run at a differentresponse speed in the CE Viewer than they will on the runtime workstation.

Running the Emulator1. Open the Execution Environment dialog (see p. 271).

2. On the Target tab, select the Local radio button.

3. Select the Close button.

4. Select the Run Application button from the Execution Control toolbar. The CEViewEmulator will appear and the application will begin to run. The currently open screenwill appear. If no screen is currently open, the Start-up screen designated in theRuntime Desktop tab of the Project Settings window (p. 53) will appear.

Page 282: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

282

Debugging Tools for Both Runtime Workstation and Local EmulationAs you develop an application, it may not always perform the way you expect. To helpyou find and correct these problems, DesignStudio includes a full set of debugging tools.

Database SpyThe Database Spy allows you to read and write to runtime tag values and tag parameters.You can also execute any of the scripting functions (see p. 159) with the Database Spy.You can use the Database spy through a floating dialog or a dockable window interface.The dockable window Database Spy is only available in the DesignStudio developmentenvironment, but the Database Spy floating dialog can be opened from the menu bar ofthe application in both the development computer emulation and the runtime workstation.

Using the Database Spy Floating DialogThe dialog is opened by selecting the Database Spy button on the standard toolbar or byselecting it from the View menu.

Note: You can open several Database Spy floating dialogs to read and write several tagsor functions simultaneously. Each floating dialog is numbered in the title bar.

Tag name text box: Enter the name of the tag that you want to read a value from or writea value to. The drop-down list provides a selection of all internal tags. You can also entera scripting function, and the return value will appear in the Value field when you selectthe Read button.Value text box: This field displays a value when reading a tag or allows the operator toenter a value to write to a tag. It also displays the return value of executed scriptingfunctions.Write button: Select this button to write the specified Value to the specified tag in the Tagname field.Read button: Select this button to display the value of the specified Tag name in theValue field.Toggle button: Toggles the value of a Boolean tag displayed in the Tag name fieldbetween 0 and 1 and also triggers functions in the Tag name field.Continuous check box: Select this check box for the real-time, updating display of thevalues specified in Tag name.Quit button: Selecting this button closes the Database Spy floating dialog.

Page 283: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

283

If you right-click the Database Spy icon in the menu bar, a popup menu is opened.

The Restore, Move, Size, Minimize, Maximize, and Close functions are the standardWindows window control functions.Always on Top: Select this function to make the Database Spy floating dialog alwaysappear on top of any other open windows on the screen. When this function is on, a checkmark appears beside it in the menu.

Using the Database Spy Dockable WindowYou can find a Database Spy window on the DesignStudio main screen, usually in thelower left corner.

When you right-click the window, a popup menu appears:

New Value..: Selecting this command opens the New value dialog. In the New Value field,enter the value you want to apply to the highlighted item in the Database Spy window.This command is active only if there is a tag in the line that was right-clicked to open themenu.

Insert Tag or Expression…: Selecting this command opens the Object Finder dialog(p. 69). Use the Object Finder to select the tag or function that you want to add to thisline of the Database Spy window.

Page 284: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

284

Remove Selection: Selecting this command will delete the contents of any highlightedlines that were right-clicked to open the menu.Hide window: toggles between showing and hiding the Database Spy window in theDesignStudio development interface. This is the same function as the Toggle DatabaseSpy Window button on the Standard toolbar and the Database Spy command in the Viewmenu.

Reading and Writing Tag ParametersYou can read and write to some tag parameters (see Tag Parameters, p. 76) in theDatabase Spy. The syntax for the Database Spy dialog’s Tag name text box or theDatabase Spy window’s Name fields is the tag name followed by a hyphen and a greaterthan character followed by the tag parameter name.Tag->Parameter

Examples:Tank->Size

Dummy[1].Dummy3->TimeStamp

You can read any parameter value, but you cannot write to all parameter values with theDatabase Spy. In the following table the four tag type columns indicate whether theparameter exists for a given type of tag. The Write to Value column indicates whether thetag parameter can be changed in the Database Spy window.

Parameter BooleanTag Type

IntegerTag Type

RealTag Type

StringTag Type

Write toValue

Min no yes yes no noMax no yes yes no noUnit yes yes yes yes noDescription yes yes yes yes noSize yes yes yes yes noTimeStamp yes yes yes yes no*Quality yes yes yes yes no *B0-B31 no yes no no yesAck yes yes yes yes no *AlrDisable yes yes yes no yesAlrStatus yes yes yes no no *HiHiLimit yes yes yes no yesHiLimit yes yes yes no yesLoLimit yes yes yes no yesLoLoLimit yes yes yes no yesDevSetpoint no yes yes no yesDevPLimit no yes yes no yesDevMLimit no yes yes no yesRateLimit no yes yes no yesHiHi yes yes yes no noHi yes yes yes no noLo yes yes yes no no

Page 285: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

285

Parameter BooleanTag Type

IntegerTag Type

RealTag Type

StringTag Type

Write toValue

LoLo yes yes yes no noDevP no yes yes no noDevM no yes yes no noRate no yes yes no no

* The AlrStatus, TimeStamp, Quality, and Ack parameters can be changed with the DatabaseSpy, but to avoid application problems it is not recommended.

LogWinThe LogWin windows display internal error mesages, such as recipe and reportcommands, communication events, tag modifications, and debug messages. There arethree different version of LogWin window: the Output dockable window in theDesignStudio interface (see also p. 46), the LogWin – Log Window dialog window thatcan be accessed from the runtime emulation menu bar, and the LogWin command in theTools menu of the optional toolbar on the application running on the Windows CEruntime workstation. The LogWin runtime task (p. 294) starts when any of these tasks arerunning. Messages that appear in the window are mirrored in the output window.

Note: You can edit the messages in the LogWin windows or files before printing, orbefore copying them to another program.

Development and Runtime Emulation LogWin: Output Dockable WindowWhen you are developing the application or when you are emulating the application,error or informational debugging messages generated by DesignStudio will be displayedin the Output dockable window, usually situated in the lower right corner of theDesignStudio interface.

You may manipulate the data in this window or determine which types of messages aredisplayed here during application emulation by right-clicking inside the window. A menuwill appear:

Cut: This function removes the highlighted text from the window, but leaves it on theWindows clipboard so that it can be pasted elsewhere. This command is visible onlywhen some text is highlighted (you can drag the mouse to highlight text).

Page 286: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

286

Copy: This function copies the highlighted text to the Windows clipboard so that it can bepasted elsewhere. This command is visible only when some text is highlighted (you candrag the mouse to highlight text).Delete: This function removes the highlighted text from the window. This command isvisible only when some text is highlighted (you can drag the mouse to highlight text).Select All: This function highlights all of the text in the window.Settings: This function opens a Log Settings window that allows you to configure whattype of debugging messages are generated and displayed (see below).Pause: This function pauses the logging operation and a check mark appears beside it inthe menu. To resume logging, select Pause again so that the check mark disappears.When you select Settings from the menu, the Log Settings window is opened.

Field Read Commands: Enables messages when a device driver or the Database Spy readstag values.Field Write Commands: Enables messages when a device driver or the Database Spywrites values to a tag.DDE Messages: Enables output of status messages when using DDE functionality. Thisoption is not usable in Windows CE applications.OPC Messages: Enables the output of OPC status messages when using OPCfunctionality.TCP/IP Messages: Enables output of status messages when connecting to a runtimesystem through an Ethernet connection.Recipe/Report: Enables messages from Recipe/Report commands.Display Open/Close: Generates messages when opening and closing displays.Logon/Logout: Enables messages when a user is logged on or off.Trace Messages: Enables messages generated by the Trace() math function (p. 167).Serial Communication: Enables output of status messages when connecting to a runtimesystem through a serial port.Insert Date/Time: When selected, the date and time that a message is generated isappended to the end of the message.

Page 287: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

287

This window allows you to specify tag whose values will be displayed in the Outputwindow when they change.Add… button: Selecting this button opens the Object Finder window (p. 69). Select thecorrect tag in the Object Finder window and it will appear in the empty frame of thiswindow.Remove button: This button will remove any highlighted tag from the frame whenselected.

Runtime Emulation LogWin: LogWin – Log WindowWhen you are running an emulation of your application on your development computer,you can open the LogWin – Log Window to log the error messages or other emulationmessages that are created during application emulation.

The LogWin – Log Window menus are File, Edit, Log, Options, and Help.The File menu options are:

Save (log.txt): Saves the contents of the current window in the log.txt file. Eachproject has its own log.txt file in its project directory.

Page 288: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

288

Save As…: Saves the contents of the current window in a location and file that youspecify.Print…: Prints the current window to the printer specified in Print Setup.Print Setup…: Opens the Print Setup dialog box to specify a printer and its properties.Exit: Exits the LogWin module.

The Edit menu options are:Edit Copy: Copies selected text to the clipboard.Pause: Pauses output to the LogWin window (and a check appears beside Pause inthe menu). F9 is a shortcut key. Pressing Pause again causes the logging operation toresume.Delete Contents: Deletes selected text.Clear All: Clears the contents of the window.

The Log menu provides a list of items that you can select and deselect. The LogWinwindow will display the output of all selected items.

Recipe/Report Commands: Enables messages from Recipe/Report commands.Field Read Commands: Enables messages when a device driver or the Database Spyreads tag values.Field Write Commands: Enables messages when a device driver or the Database Spywrites values to a tag.DDE Messages: Enables output of status messages when using DDE functionality.This option is not usable in Windows CE applications.Trace Messages: Enables messages generated by the Trace() math function (p. 167).TCP/IP Messages: Enables output of status messages when connecting to a runtimesystem through an Ethernet connection.OPC Messages: Enables the output of OPC status messages when using OPCfunctionality.Display Open/Close: Generates messages when opening and closing displays.Logon/Logout: Enables messages when a user is logged on or off.Serial Communication: Enables output of status messages when connecting to aruntime system through a serial port.Tags…: Allows you to define tag values to display in the LogWin window when thevalues change.

The Options menu provides two items to select or deselect.Insert Date/Time: When selected, the data and time that a message is generated isappended to the end of the message.Always on Top: Makes the LogWin window appear above other open windows on thescreen, even if it is not active.

Page 289: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

289

Specifying What Tags to Log in the Emulation LogWin – Log Window

1. Start the LogWin task.

2. Select the Tags item from the Log menu. The Log tags dialog appears.

3. For each tag value that you want to track, click the add button and enter the tag namein the Add to Loglist dialog and select OK. The drop-down list contains all of theinternal tags.

4. When you have added all the tags that you want to track in LogWin, select Close inthe Log Tags dialog.

Runtime LogWin: LogWin Function and CELOG.TXT FileWhen you are running an application on your Windows CE runtime workstation, there isno real-time LogWin window. Instead you can activate the LogWin function in the Toolsmenu of the application menu bar by selecting it (a check mark will appear beside it inthe menu). Doing this will create a file named celog.txt in the main compact flashdirectory on the runtime workstation (\Disk\ in a 3408/3410/3412 or \StorageCard\ in a 3406). This file is not configurable; it will log every type of message exceptthe Serial Communication messages (see the previous two sections for a list of the types oflog messages).You can view the celog.txt file on the runtime workstation by opening it in theUnipad utility (see below) in the Command utility (see the OpenHMI SE/PE RuntimeQuickstart Guide for more information). You can also upload the celog.txt file to yourdevelopment machine using the Get Log File button in the Execution Environmentwindow (p. 276). Once you have uploaded the celog.txt file to your developmentcomputer, you can view it or edit it in any application that views text files (such asNotepad).

Page 290: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

290

UniPad UtilityUniPad is a utility on the Windows CE runtime workstation that allows you to view textfiles, including the celog.txt file that the LogWin function writes to. To run theprogram, you must run the script function WinExec():WinExec("\<primary drive>\Bin\Unipad.exe <filename>")<primary drive> is \Disk\ in a 3408/3410/3412 or \Storage Card\ in a 3406.<filename> is the complete pathname of the file, usually celog.txt.To close the UniPad window, press the <ESC> key or use the math expression:AppPostMessage(“Unipad”, “CLOSE”)

You can set the window position, fonts, and some properties of UniPad in theUNIPAD.INI file:[Tab]

NumSpaces=4

[Font]

nSize=12

nWeight=500

FaceName=CourierNew

[ScreenPosition]

x=100

y=100

Width=400

Height=250

[Alloc]

MaxNumLines=256000

Note: The UNIPAD.INI file is created in the Windows directory where the profile filesare placed.

Page 291: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

291

Project StatusThe Project Status window allows you to view information about the current applicationand to control whether and how execution tasks are started. Execution tasks are thosetasks which run when an application is being tested or run in the CE View emulatorwindow. The Project Status window contains two tabs. The System Information tabprovides general information about the development system and application. TheRuntime Tasks tab allows you to control the execution of each runtime task by displayingthe tasks with their status and startup settings.

System Information Tab

The System Information tab provides read-only general information about thedevelopment system and the application. You cannot change the information from thisscreen.Print… button: Selecting this button prints this screen to your default Windows printer.

Save As… button: Selecting this button opens a Save As window where you can save theinformation on this screen to a text (.txt) file.

Page 292: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

292

Execution Tasks Tab

The Execution Tasks tab allows you to control the testing and execution of a developedapplication. This tab displays the available tasks and the status and startup settings foreach. This is done using the Execution Control toolbar test display and execution controlbuttons. The row containing a selected task is highlighted in blue.

Note: The Execution Tasks tab will not appear if you are connected to the runtimeworkstation through the Execution Environment window. As soon as you disconnect theExecution Tasks tab will be available again.

Task column: Displays the runtime tasks. Not all tasks are available for Windows CEapplications. See the tasks listed below for information on Windows CE availability.Status column: Indicates if each task is started or inactive. When status is blank the taskis inactive. When status is Started, the task has been started.Startup column: Indicates whether a task will start automatically when the project isviewed in runtime or whether it must be manually started.

Automatic: Tasks are started automatically when the CEView Emulator window isopened using the Run Application button on the Execution Control toolbar.Manual: Tasks are started by double-clicking them or by highlighting them andselecting the Start button.

Start button: Selecting this button will start the highlighted task.

Stop button: Selecting this button will stop the highlighted task.

Page 293: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

293

Startup… button: Selecting this button opens the Startup window for the highlighted task.Each task can be configured to start automatically or manually startup by selecting theAutomatic or the Manual radio button in this window. This button is not active forWindows CE applications.

Note: After manually stopping a task (Stop button), you can also start it again byselecting the Start button, even when the task is configured to startup automatically.

Note: For Windows CE applications, all execution tasks required by the application areset to automatic and started at once. The tasks cannot be configured to Automatic orManual.

Execution Tasks List

Background TaskThis task runs in the background when the application is being run or emulated. Itperforms the steps necessary for the following tasks to execute: Alarm, Math, Scheduler,Recipe, Report, and Trend. If one of these types of tasks does not work, use the ExecutionTasks list to verify that the Background Task execution task is running. When this task isrunning on the development computer, the Background Task icon appears in the Windowsstatus bar.

Database SpyStarting this task opens the Database Spy dialog (p. 282) for debugging and testing.

DDE Client RuntimeThis task enables DesignStudio to run as a DDE Client of a DDE Server application suchas Excel or another program that supports Dynamic Data Exchange (DDE). You need tocreate a DDE Client worksheet and the respective DDE Server application and associatedtopic, using the DDE Client Worksheet found in the Workspace window Comm tab.

DDE ServerThis task creates a DDE Server to enable access to the DesignStudio tags database. ThisDDE Server accepts pooling, hot links, and pokes. There is no user interface for thisprogram; all processing is performed in the background. To configure the DDE clientapplication, refer to documentation included with the program to be used as a client. Touse the DDE Server, a client application should use the following parameters:

Application: UNINDDETopic: DBItem: name of tag (Example: second, time, date)

Page 294: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

294

Driver RuntimeThis task executes communications with external devices such as PLC. Its executableprogram needs a command line parameter that is the DLL driver name. The DLL islocated on the \designstudio\Drv directory. When executed, this task loads thedrivers selected in the Drivers folder of the Comm tab of the Workspace window. The tagand addresses are defined in the driver worksheet found in this folder. You can havemultiple drivers running simultaneously, each with one device. You cannot have twodrivers using the same driver .dll file. If you need to do this, call Xycom Automationtechnical support (see Appendix A, p. 297). When this task is running on thedevelopment computer, the Driver Runtime icon appears in the Windows status bar.

Note: When running and testing a communication driver, you should keep this taskrunning, with the options related to the driver enabled.

LogWinStarting this task opens the LogWin window for debugging (see p. 285).

ODBC RuntimeThis task enables translations between the DesignStudio database and any other relationaldatabase that supports ODBC interface such as Excel, Access, Oracle, etc. To use thistask, configure an ODBC Worksheet found in the ODBC folder in the Task tab of theWorkspace window.

OPC Client RuntimeThis task enables DesignStudio to communicate with any device that implements an OPCServer. This task implements the OPC standard as described in the document OLE forProcess Control Data Access Standard Version 1.0A, available athttp://www.opcfoundation.com.

TCP/IP Client RuntimeThe TCP/IP Client Runtime task enables the DesignStudio application database to besynchronized with an application running in another machine that is configured as aTCP/IP server. This task uses TCP/IP protocol to provide communication between theapplications. In the client machine, you need to set the server IP address and the tags youwant to share with the server in the Workspace window Comm tab TCP/IP folder (p. 264).

TCP/IP ServerThis task enables the DesignStudio application database to be a server to otherapplication databases running in other machines configured as TCP/IP clients. In theserver machine, you do not need to configure anything. You just need to run this task.

Note: Before using the TCP/IP Client Runtime or TCP/IP Server tasks, you need toinstall and configure the TCP/IP protocol in the machines that will run these tasks. Whenthis task is running on the development computer, the TCP/IP Server icon appears in theWindows status bar.

Page 295: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

295

ViewerThis task is the CEView emulation window that opens and runs the selected applicationscreen similarly to the Run Application button on the Execution Control toolbar. When theviewer is run by itself from this task list and no other tasks are running, parts of theapplication that are dependent on those other tasks, like Math calculations, will not work.It is recommended that you test the application using the Run Application button (p. 278).

Page 296: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150
Page 297: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

Appendix A – Technica l SupportReaching Technical Support

Xycom Automation Technical Support offers a variety of support options to answer anyquestions on Xycom Automation products and their implementation.In the USA (Chagrin Falls, OH) 440/247-9216In Canada (Mississauga, Ontario) 905/607-3400In Northern Europe (Northampton, England) +44-1604-790-767In Southern Europe (Turino, Italy) +39-011-770-53-11Refer to the relevant chapter(s) in your OpenHMI SE/PE documentation for a possiblesolution to any problem you may have with your OpenHMI SE/PE system. If you find itnecessary to contact OpenHMI SE/PE Technical Support for assistance, please have thefollowing information at your fingertips:

1. Software serial number and workstation model number.

2. The version of OpenHMI SE/PE you are running.

3. The operating system type and version (i.e., Microsoft Windows NT version 4.0).

4. Exact wording of system error messages encountered.

5. Any relevant output listing from the Microsoft Diagnostic utility (MSD) or otherdiagnostic applications.

6. Details of attempts made to rectify the problem(s) and results.

7. The log number assigned from Xycom Automation Technical Support if this is anongoing problem.

8. The name of the Technical Support Engineer with whom you last spoke, if known.

Internet AccessXycom Automation provides both World Wide Web and e-mail access via the Internet.To access the Xycom Automation Home Page, use http://www.xycomautomation.com.This page contains the newest product datasheets, OpenHMI SE/PE references byindustrial sector, and application notes.

E-mailTo reach Xycom Automation Technical Support via email:USA [email protected] [email protected]

Page 298: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

298

FAXYou can fax your questions to Xycom Automation Technical Support at:In the USA (Chagrin Falls, OH) 440/247-9218In Canada (Mississauga, Ontario) 905/607-0141In Northern Europe (Northampton, England) +44-1604-790-722In Southern Europe (Turino, Italy) +39-011-770-53-270

Page 299: Application Development Technical Reference Rev Ee).pdf · 2004-09-02 · 9 Objects.....150 Bitmap Objects.....150

Xycom Automation, Inc.

734-429-4971 • Fax: 734-429-1010

http://www.xycomautomation.com

Canada Sales: 905-825-0281

Northern Europe Sales: +44-1604-790-767

Southern Europe Sales: +39-011-770-53-11

340045(E)340045(E)340045(E)340045(E)