Category security Usage $AccessLevel Remarks This is a read-only tagname for which the value is determined by the Access Level assigned to the currently logged-in user's security profile
Trang 1InTouch ® Reference Guide
Revision C
Last Revision: August 2005
Invensys Systems, Inc.
Trang 2Invensys Systems, Inc No copyright or patent liability is assumed with respect
to the use of the information contained herein Although every precaution has been taken in the preparation of this documentation, the publisher and the author assume no responsibility for errors or omissions Neither is any liability assumed for damages resulting from the use of the information contained herein
The information in this documentation is subject to change without notice and does not represent a commitment on the part of Invensys Systems, Inc The software described in this documentation is furnished under a license or nondisclosure agreement This software may be used or copied only in accordance with the terms of these agreements
© 2002, 2005 Invensys Systems, Inc All Rights Reserved.
Invensys Systems, Inc
26561 Rancho Parkway South
Lake Forest, CA 92630 U.S.A
documentation should not be regarded as affecting the validity of any
trademark or service mark
Alarm Logger, ActiveFactory, ArchestrA, Avantis, DBDump, DBLoad, DT Analyst, FactoryFocus, FactoryOffice, FactorySuite, FactorySuite A2, InBatch, InControl, IndustrialRAD, IndustrialSQL Server, InTouch, InTrack,
MaintenanceSuite, MuniSuite, QI Analyst, SCADAlarm, SCADASuite, SuiteLink, SuiteVoyager, WindowMaker, WindowViewer, Wonderware, and Wonderware Logger are trademarks of Invensys plc, its subsidiaries and affiliates All other brands may be trademarks of their respective owners
Trang 3Introduction 17
Document Conventions 17
About this Manual 18
Technical Support 19
Your FactorySuite License 19
CHAPTER 1: System Tagnames 21
$AccessLevel 22
$ApplicationChanged 23
$ApplicationVersion 23
$ChangePassword 24
$ConfigureUsers 24
$Date 25
$DateString 25
$DateTime 25
$Day 26
$False 26
$HistoricalLogging 26
$Hour 27
$InactivityTimeout 27
$InactivityWarning 28
$Language 28
$LogicRunning 29
$Minute 29
$Month 29
$Msec 30
$NewAlarm 30
$ObjHor 30
$ObjVer 31
$Operator 31
$OperatorDomain 31
$OperatorDomainEntered 32
$OperatorEntered 32
$OperatorName 32
$PasswordEntered 33
$Second 33
$StartDdeConversations 33
$System 34
$Time 34
Trang 4$VerifiedUserName 35
$Year 35
CHAPTER 2: Dotfields and Properties 37
Tagname Types 37
Memory Type Tagnames 38
I/O Type Tagnames 38
Indirect Discrete, Indirect Analog, Indirect Message 39
Miscellaneous Type Tagnames 39
Tagname Type vs Dotfield Usage Matrix 40
.Ack 46
.AckDev 47
.AckDsc 48
.AckROC 49
.AckValue 50
.Alarm 51
.AlarmAccess 52
.AlarmAckModel 53
.AlarmClass 54
.AlarmComment 55
.AlarmDate 56
.AlarmDev 57
.AlarmDevCount 58
.AlarmDevDeadband 58
.AlarmDevUnAckCount 59
.AlarmDisabled 59
.AlarmDsc 60
.AlarmDscCount 61
.AlarmDscDisabled 61
.AlarmDscEnabled 62
.AlarmDscInhibitor 63
.AlarmDscUnAckCount 64
.AlarmEnabled 64
.AlarmGroup 65
.AlarmGroupSel 65
.AlarmHiDisabled 66
.AlarmHiEnabled 66
.AlarmHiHiDisabled 67
.AlarmHiHiEnabled 67
.AlarmHiHiInhibitor 68
.AlarmHiInhibitor 69
.AlarmLimit 70
Trang 5.AlarmLoDisabled 70
.AlarmLoEnabled 71
.AlarmLoInhibitor 72
.AlarmLoLoDisabled 73
.AlarmLoLoEnabled 73
.AlarmLoLoInhibitor 74
.AlarmMajDevDisabled 75
.AlarmMajDevEnabled 75
.AlarmMajDevInhibitor 76
.AlarmMinDevDisabled 77
.AlarmMinDevEnabled 78
.AlarmMinDevInhibitor 79
.AlarmName 80
.AlarmOprName 81
.AlarmOprNode 82
.AlarmPri 83
.AlarmProv 84
.AlarmROC 85
.AlarmROCCount 86
.AlarmROCDisabled 86
.AlarmROCEnabled 87
.AlarmROCInhibitor 88
.AlarmROCUnAckCount 89
.AlarmState 89
.AlarmTime 90
.AlarmTotalCount 90
.AlarmType 91
.AlarmUnAckCount 91
.AlarmUserDefNum1 92
.AlarmUserDefNum2 93
.AlarmUserDefStr 94
.AlarmValDeadband 95
.AlarmValue 95
.AlarmValueCount 96
.AlarmValueUnAckCount 96
.Caption 97
.ChartLength 98
.ChartStart 99
.Comment 99
.DevTarget 100
.DisplayMode 100
.Enabled 101
.EngUnits 102
Trang 6.Freeze 102
.HiHiLimit 103
.HiHiSet 103
.HiHiStatus 104
.HiLimit 104
.HiSet 105
.HiStatus 105
.ListChanged 106
.ListCount 106
.ListIndex 107
.LoLimit 108
.LoLoLimit 108
.LoSet 109
.LoLoSet 109
.LoLoStatus 110
.LoStatus 111
.MajorDevPct 111
.MajorDevSet 112
.MajorDevStatus 113
.MaxEU 114
.MaxRange 115
.MaxRaw 116
.MinEU 117
.MinorDevPct 118
.MinorDevSet 118
.MinorDevStatus 119
.MinRange 120
.MinRaw 121
.Name 121
.NewIndex 123
.NextPage 123
.Normal 124
.NumAlarms 125
.OffMsg 125
.OnMsg 126
.PageNum 126
.Pen1-.Pen8 127
.PendingUpdates 130
.PrevPage 131
.PriFrom 131
.PriTo 132
.ProvidersReq 132
.ProvidersRet 133
Trang 7.Quality 134
.QualityLimit 138
.QualityLimitString 138
.QualityStatus 139
.QualityStatusString 139
.QualitySubstatus 140
.QualitySubstatusString 141
.QueryState 141
.QueryType 142
.RawValue 143
.ReadOnly 144
.Reference 144
.ReferenceComplete 145
.ROCPct 145
.ROCSet 146
.ROCStatus 147
.ScooterLockLeft 148
.ScooterLockRight 148
.ScooterPosLeft 149
.ScooterPosRight 150
.Successful 151
.SuppressRetain 151
.TagID 152
.TimeDate 152
.TimeDateString 152
.TimeDateTime 153
.TimeDay 153
.TimeHour 153
.TimeMinute 154
.TimeMonth 154
.TimeMsec 154
.TimeSecond 155
.TimeTime 155
.TimeTimeString 155
.TimeYear 156
.TopIndex 156
.TotalPages 157
.UnAck 158
.UpdateCount 159
.UpdateInProgress 160
.UpdateTrend 161
.Value 162
.Value 163
.Visible 164
Trang 8CHAPTER 3: InTouch QuickScript
Functions 165
Abs() 166
Ack() 166
ActivateApp() 167
AddPermission() 168
almAckAll() 169
almAckDisplay() 169
almAckGroup() 170
almAckPriority() 171
almAckRecent() 171
almAckSelect() 172
almAckSelectedGroup() 172
almAckSelectedPriority() 173
almAckSelectedTag() 173
almAckTag() 174
almDefQuery() 174
almMoveWindow() 175
almQuery() 176
almSelectAll() 177
almSelectGroup() 177
almSelectionCount() 178
almSelectItem() 178
almSelectPriority() 179
almSelectTag() 180
almSetQueryByName() 180
almShowStats() 181
almSuppressAll() 181
almSuppressDisplay() 182
almSuppressGroup() 182
almSuppressPriority() 183
almSuppressRetain() 183
almSuppressSelected() 184
almSuppressSelectedGroup() 184
almSuppressSelectedPriority() 185
almSuppressSelectedTag() 185
almSuppressTag() 186
almUnSelectAll() 187
almUnSuppressAll() 187
AnnotateLayout() 188
About APU Functions 188
APUFindAlarmGroupInstance() 189
Trang 9APUFindFileInstance() 190
APUFindPrinterInstance() 191
APUGetAlarmGroupText() 192
APUGetConfigurationFilePath() 193
APUGetInstanceCount() 194
APUGetPrinterJobCount() 195
APUGetPrinterName() 196
APUGetPrinterStatus() 197
APUGetQueryAlarmState() 198
APUGetQueryFromPriority() 198
APUGetQueryProcessingState() 199
APUGetQueryToPriority() 200
APUIsInstanceUsed() 200
APUSetAlarmGroupText() 201
APUSetQueryAlarmState() 201
APUSetQueryFromPriority() 202
APUSetQueryToPriority() 203
APUSetTimeoutValues() 204
APUStartInstance() 205
APUStartQuery() 206
APUStopInstance() 207
APUStopQuery() 207
APUTranslateErrorCode() 208
ArcCos() 208
ArcSin() 209
ArcTan() 209
AttemptInvisibleLogon() 210
ChangePassword() 211
ChangeWindowColor() 212
Cos() 213
DateTimeGMT() 213
DialogStringEntry() 213
DialogValueEntry() 215
DText() 217
EnableDisableKeys() 217
Exp() 218
FileCopy() 218
FileDelete() 219
FileMove() 220
FileReadFields() 222
FileReadMessage() 223
FileWriteFields() 224
FileWriteMessage() 225
Trang 10GetAccountStatus() 226
GetNodeName() 227
GetPropertyD() 227
GetPropertyI() 228
GetPropertyM() 228
Hide 229
HideSelf 229
HTGetLastError() 230
HTGetPenName() 231
HTGetTimeAtScooter() 231
HTGetTimeStringAtScooter() 232
HTGetValue() 233
HTGetValueAtScooter() 234
HTGetValueAtZone() 234
HTScrollLeft() 236
HTScrollRight() 236
HTSelectTag() 237
HTSetPenName() 237
HTUpdateToCurrentTime() 238
HTZoomIn() 238
HTZoomOut() 239
InfoAppActive() 240
InfoAppTitle() 240
InfoDisk() 241
InfoFile() 242
InfoInTouchAppDir() 243
InfoResources() 243
Int() 244
InTouchVersion() 244
InvisibleVerifyCredentials() 245
IODisableFailover() 245
IOForceFailover() 246
IOGetAccessNameStatus() 246
IOGetActiveSourceName() 247
IOGetApplication() 247
IOGetNode() 248
IOGetTopic() 248
IOReinitAccessName() 249
IOReinitialize() 249
IOSetAccessName() 249
IOSetItem() 251
IOSetRemoteReferences() 252
IOStartUninitConversations() 253
Trang 11IsAnyAsyncFunctionBusy() 254
IsAssignedRole() 255
Log() 255
LogMessage() 256
LogN() 256
Logoff() 257
LogonCurrentUser() 257
OpenWindowsList() 257
Pi() 258
PlaySound() 259
PostLogonDialog() 260
PrintHT() 260
PrintScreen() 260
PrintWindow() 262
ptGetTrendType() 264
ptLoadTrendCfg() 264
ptPanCurrentPen() 265
ptPanTime() 266
ptPauseTrend() 266
ptSaveTrendCfg() 267
ptSetCurrentPen() 267
ptSetPen() 267
ptSetPenEx() 268
ptSetTimeAxis() 268
ptSetTimeAxisToCurrent() 269
ptSetTrend() 269
ptSetTrendType() 269
ptZoomCurrentPen() 270
ptZoomTime() 270
QueryGroupMembership() 271
RecipeDelete() 271
RecipeGetMessage() 272
RecipeLoad() 273
RecipeSave() 274
RecipeSelectNextRecipe() 275
RecipeSelectPreviousRecipe() 276
RecipeSelectRecipe() 277
RecipeSelectUnit() 278
ReloadWindowViewer() 278
RestartWindowViewer() 279
Round() 279
SendKeys 280
SetPropertyD() 281
Trang 12SetPropertyM() 282
SetWindowPrinter() 283
Sgn() 283
Show 284
ShowAt() 285
ShowHome 285
ShowTopLeftAt() 286
Sin() 286
SPCConnect() 287
SPCDatasetDlg() 287
SPCDisconnect() 288
SPCDisplayData() 288
SPCLocateScooter() 289
SPCMoveScooter() 289
SPCSaveSample() 290
SPCSelectDataset() 290
SPCSelectProduct() 290
SPCSetControlLimits() 291
SPCSetMeasurement() 291
SPCSetProductCollected() 292
SPCSetProductDisplayed() 292
SPCSetRangeLimits() 293
SPCSetSpecLimits() 293
SQLAppendStatement() 294
SQLClearParam() 294
SQLClearStatement() 294
SQLClearTable() 295
SQLCommit() 296
SQLConnect() 297
SQLCreateTable() 300
SQLDelete() 301
SQLDisconnect() 302
SQLDropTable() 302
SQLEnd() 302
SQLErrorMsg() 303
SQLExecute() 303
SQLFirst() 304
SQLGetRecord() 304
SQLInsert() 305
SQLInsertEnd() 305
SQLInsertExecute() 306
SQLInsertPrepare() 306
Trang 13SQLLast() 307
SQLLoadStatement() 307
SQLManageDSN() 308
SQLNext() 308
SQLNumRows() 309
SQLPrepareStatement() 309
SQLPrev() 310
SQLRollback() 310
SQLSelect() 311
SQLSetParamChar() 315
SQLSetParamDate() 315
SQLSetParamDateTime() 316
SQLSetParamDecimal() 316
SQLSetParamFloat() 317
SQLSetParamInt() 317
SQLSetParamLong() 318
SQLSetParamNull() 319
SQLSetParamTime() 320
SQLSetStatement() 321
SQLTransact() 322
SQLUpdate() 323
SQLUpdateCurrent() 324
Sqrt() 324
StartApp 325
StringASCII() 326
StringChar() 327
StringCompare() 327
StringCompareEncrypted() 328
StringCompareNoCase() 328
StringFromGMTTimeToLocal() 329
StringFromIntg() 331
StringFromReal() 332
StringFromTime() 332
StringFromTimeLocal() 334
StringInString() 335
StringLeft() 336
StringLen() 337
StringLower() 337
StringMid() 338
StringReplace() 339
StringRight() 340
StringSpace() 341
StringTest() 342
Trang 14StringToReal() 344
StringTrim() 345
StringUpper() 346
SwitchDisplayLanguage() 346
Tan() 347
Text() 347
Trunc() 348
TseGetClientId() 348
TseQueryRunningOnClient() 349
TseQueryRunningOnConsole() 349
UTCDateTime() 350
wcAddItem() 351
wcClear() 351
wcDeleteItem() 352
wcDeleteSelection() 352
wcErrorMessage() 353
wcFindItem() 354
wcGetItem() 355
wcGetItemData() 356
wcInsertItem() 357
wcLoadList() 358
wcLoadText() 359
wcSaveList() 360
wcSaveText() 361
wcSetItemData() 362
WindowState() 363
WWControl() 364
WWExecute() 365
WWIsDayLightSaving() 365
WWMoveWindow() 366
WWPoke() 367
WWRequest() 368
WWStringFromTime() 369
CHAPTER 4: OLE Automation and InTouch 371
Elements of OLE Automation 371
InTouch OLE Automation Client Extensions 372
InTouch Automation Expressions 372
Creating an Object: OLE_CreateObject 375
Managing an Object: OLE_ReleaseObject 375
Testing for a Valid Object: OLE_IsObjectValid 376
Trang 15Getting a Property Value 377
Setting a Property 378
Calling a Method 379
InTouch Error Handling 381
Frequent Automation Object Errors 384
APPENDIX A: Troubleshooting QuickScript Functions 385
Error Messages for Windows Controls and Distributed Alarms 385
Troubleshooting Recipe Script Functions 386
Error Messages for Alarm Printer Utility Script Functions 388
SPC DDE Item Names 389
SPC Control and Display DDE Items 389
SPC Current Sample DDE Items 391
SPC Manual Input DDE Items 395
SPC Selection DDE Items 396
Troubleshooting SQL Script Functions 399
Specific Database Error Messages 401
Index 403
Trang 17This reference guide provides you with an alphabetic detailed reference for
each tagname dot field (.field), windows controls property, alarm object
property, system tagname and QuickScript function included in the InTouch product suite Including the InTouch add-on products; Recipe Manager, SPC Pro and SQL Access Manager This reference guide consists of:
• Chapter 1, "System Tagnames" details all InTouch pre-defined system tagnames
Note All system tagnames begin with a dollar sign ($).
• Chapter 2, "Dot Fields" details the tagname fields for tagnames, alarms,
distributed alarms, windows controls, system, historical trending and other miscellaneous
• Chapter 3, "InTouch QuickScript Functions" details the built-in InTouch QuickScript functions (string, math, system, historical, windows controls, distributed alarms and miscellaneous functions)
• Chapter 4, “OLE Automation and InTouch” provides a brief outline of the OLE Automation architecture
Document Conventions
With each system tagname, property, dot field and script function table field, the usage category (security, alarm, application, etc.) is listed to provide easier referencing
Examples of Convention Description ChartStart In general, bold text indicates a field,
system tagname or function
placeholders for information you supply
{ HiLimit | HiHiLimit } In syntax, braces and a vertical bar
indicate a choice between two or more items
[ErrorMessage=] Items in square brackets are optional
Trang 18About this Manual
If you are viewing this manual online, when you see text that is green, click the text to "jump" to the referenced section or chapter When you jump to another section or chapter and you want to come back to the original section, a "back" option is provided
Tip These are "tips" that tell you an easier or quicker way to accomplish a
function or task
The InTouch User's Guide will help you familiarize yourself with the
WindowMaker development environment and its tools (read Chapter 1,
"WindowMaker Program Elements.") To learn about working with windows, graphic objects, wizards, ActiveX controls and so on, read Chapter 2, "Using WindowMaker." To learn more about writing InTouch QuickScripts, read Chapter 06, "Creating QuickScripts in InTouch."
For details on the runtime environment (WindowViewer), see your InTouch
Runtime User's Guide.
For details on the add-on program, SPC Pro, see your SPC Pro User's Guide For details on the add-on program, Recipe Manager, see your Recipe Manager
User's Guide.
For details on the add-on program, SQL Access Manager, see your SQL Access
Manager User's Guide.
Online manuals are also included in your FactorySuite software package for all FactorySuite components
Note You must install the Adobe Acrobat Reader to view or print the online
manuals
Assumptions
This manual assumes you are:
• Familiar with the Windows operating system working environment
• Knowledgeable of how to use of a mouse, Windows menus, select options, and accessing online Help
• Experienced with a programming or macro language For best results, you should have an understanding of programming concepts such as variables, statements, functions and methods
Trang 19Technical Support
Wonderware Technical Support offers a variety of support options to answer any questions on Wonderware products and their implementation
Prior to contacting technical support, please refer to the relevant chapter(s) in
your InTouch User's Guide for a possible solution to any problem you may
have with your InTouch system If you find it necessary to contact technical support for assistance, please have the following information available:
1 Your software serial number
2 The version of InTouch you are running
3 The type and version of the operating system you are using
4 The exact wording of system error messages encountered
5 Any relevant output listing from the Log Viewer or any other diagnostic applications
6 Details of the attempts you made to solve the problem(s) and your results
7 Details of how to recreate the problem
8 If known, the Wonderware Technical Support case number assigned to your problem (if this is an on-going problem)
Your FactorySuite License
Your FactorySuite system license information can be viewed through the
license viewing utility that is launched from the WindowMaker Help About
dialog box
To open license utility program
1 On the WindowMaker Help menu, select the About command.
2 Click View License The License Utility - LicView dialog box appears.
Trang 21C H A P T E R 1
System Tagnames
InTouch provides several pre-defined system tagnames These tagnames are built into InTouch and can be identified by a preceding dollar sign ($) During runtime, InTouch acts upon the values of these tagnames in response to system events System tagnames can be used anywhere an InTouch tagname can be used, such as in animation links or QuickScripts
Trang 22Defines the access level of the currently logged-in user
Category security
Usage $AccessLevel
Remarks This is a read-only tagname for which the value is determined by the Access
Level assigned to the currently logged-in user's security profile within
InTouch This profile can be accessed through the Configure Users menu in
WindowViewer
The actual numeric value of $AccessLevel has no meaning to
WindowViewer, except that a value of 9000 or greater is indicative of Administrative privilege, and enables the 'Security' menu within WindowViewer Additional security as desired can be created by the
application developer By utilizing $AccessLevel, you can further customize
security within the system
Data Type Integer (read only)
Valid Values 0 through 9999
Example(s) The following statement is used for the Visibility link to make an object, such
as a button, visible based on the logged on user's access level:
ELSE Show "Access Granted"; {popup window granting access}
ENDIF;
See Also $Operator, $OperatorEntered, $PasswordEntered; $ConfigureUsers
Trang 23Remarks This tagname changes to 1 every time the update signal is generated by
selecting Notify Clients on the Special menu in WindowMaker It is reset to
0 when the application is updated Used for distributed application maintenance
Data Type Discrete (read only)
Example(s) The following statement, if used in a Data Change QuickScript's tagname
field, causes the body of the QuickScript to execute The QuickScript's body could show a window informing the user to restart WindowViewer for the change to take effect
$ApplicationChanged See Also $ApplicationVersion
Contains the current version number of the application This number changes with every change that can be saved or undone
Category application
Usage $ApplicationVersion
Remarks None
Data Type Real (read only)
Example(s) Used in an Analog Display Link, this system tagname displays the current
version of the application that is running within WindowViewer
$ApplicationVersion See Also $ApplicationChanged
Trang 24$ConfigureUsers
Displays the Change Password dialog box Equal to selecting Security then
Change Password on the Special menu in WindowViewer.
Category security
Usage $ChangePassword
Remarks Setting the value to 1 causes the Change Password dialog box to appear
Once the dialog box is closed, InTouch automatically resets the value to 0 Setting this system tagname to a value other than 1 has no meaning, and the results are undefined
Data Type Discrete (write only)
Valid Values 1
Example(s) A discrete pushbutton can be created to allow the operator to open the
Change Password dialog box The pushbutton should have a single Discrete
Pushbutton link attached to it, with the Set option selected When the button
is pressed $ChangePassword, is set to 1 causing the Change Password
dialog box to appear
See Also $AccessLevel, $OperatorEntered, $PasswordEntered, $Operator,
$ConfigureUsers
Displays the generic Configure Users dialog box Equal to selecting
Security then Change Password on the Special menu in WindowViewer.
This function only works under InTouch Security.
Category security
Usage $ConfigureUsers
Remarks Setting the value to 1 causes the Configure Users dialog box to appear Once
the dialog box is closed, InTouch automatically resets the value to 0 The user
must have an $AccessLevel of >9000 to display this dialog box Setting this
system tagname to a value other than 1 has no meaning, and the results are undefined This function is only available for security type "InTouch"
Data Type Discrete (write only)
Valid Values 1
Example(s) A discrete pushbutton can be created to allow the operator to open the
Change Password dialog box The pushbutton should have a single Discrete
Pushbutton link attached to it, with the Set option selected When the button
is pressed $ConfigureUsers, is set to 1 causing the Configure Users dialog
box to appear
See Also $Operator, $OperatorEntered, $ChangePassword, $PasswordEntered,
$AccessLevel
Trang 25{Returns current time}
See Also $DateTime, $DateString, $Day, $Month, $Year
Contains the date in the system 'short date' format (defined in Regional and Language settings)
Category system
Usage $DateString
Remarks The date format is set through the Windows Control Panel
Data Type Memory message (read only)
Example(s) If StringRight($DateString,2)== "00" THEN
LogMessage("The Year 2000!");
ENDIF;
See Also $Date, $DateTime, $Day, $Month, $Year, $Time, $TimeString
Contains the fractional number of days that have passed since 1/1/70
Category system
Usage $DateTime
Remarks None
Data Type Real (read only)
Example(s) dayvalue = 86400 * $DateTime;
If StringFromTime(Dayvalue,4) == "Fri" THEN DisplayMessageTag = "It's Friday!";
ENDIF;
See Also $Date, $DateString, $Day, $Month, $Year, $Time, $TimeString
Trang 26Remarks Contains a value between 1 and 31.
Data Type Integer (read only)
Example(s) If $Day == 15 THEN
Show "Mid-Month Washdown Window";
ENDIF;
See Also $DateTime, $DateString, $Date, $Month, $Year
$False is used to return a FALSE value within an expression It is also used, when migrating applications from earlier versions of InTouch, to replace any usage of obsolete System tags - $AlarmPrinterError, $AlarmPrinterOffline,
$AlarmPrinterOverflow and $AlarmPrinterNoPaper
Category system
Usage $False
Remarks $False is set to False This tag is only valid when migrating an application
from an older version of InTouch
Data Type Discrete (read-only)
Monitors and/or controls starting and stopping of historical logging Equal to
selecting Restart Historical Logging on the Special menu in WindowViewer
or, selecting Stop Historical Logging on the Special menu in
WindowViewer
Category historical
Usage $HistoricalLogging
Remarks Setting this system tagname equal to 0 stops historical logging Setting the
value to 1 restarts historical logging You cannot "start" historical logging via
$HistoricalLogging unless the Enable Historical Logging option is selected
in the Historical Logging Properties dialog box
Data Type Discrete (read / write)
Example(s) IF (InfoDisk("C",4,$Second)/1024)<50 THEN
{Shutdown Historical logging if free space is less than 50MB}
$HistoricalLogging = 0;
ENDIF;
Trang 27Remarks Contains a value between 0 and 23.
Data Type Integer (read only)
Example(s) On True Condition QuickScript:
$Hour == 20 AND $Second == 30
PrintWindow("Day Batch Summary",1,1,0,0,0);
See Also $DateTime, $Minute, $Msec, $Second, $Time, $TimeString
Indicates that the time configured for the automatic log-off of the user has elapsed
Category security
Usage $InactivityTimeout
Remarks Contains the value of 1 when automatic log-off has elapsed To configure the
tagname time, on the Special menu, point to Configure and then, click
WindowViewer or, in the Application Explorer, under Configure,
double-click WindowViewer The WindowViewer Properties dialog box appears with the General properties sheet active Enter the time value in seconds under the Inactivity group.
Note The inactivity timer does not reset for Active-X controls, OLE
Automation controls and SPC wizards
Data Type Discrete (read only)
See Also $InactivityWarning
Example(s) On True Condition QuickScript:
Condition:
$InactivityTimeout == 1
Script:
Show "You have been logged off window";
See Also $InactivityWarning
Trang 28Remarks Contains the value of 1 when log-off is about to occur The inactivity timer is
reset by mouse clicks or keyboard activity only To configure the tagname
time, on the Special menu, point to Configure and then, click
WindowViewer or, in the Application Explorer, under Configure,
double-click WindowViewer The WindowViewer Properties dialog box appears with the General properties sheet active In the Inactivity group, type the
time value in seconds
Note The inactivity timer does not reset for Active-X controls, OLE
Automation controls and SPC wizards
Data Type Discrete (read only)
Example(s) On True Condition QuickScript:
If $InactivityWarning == 1 THEN Show "You are about to be logged off-window";
ENDIF;
See Also $InactivityTimeOut
If multiple languages are defined for an InTouch application, $Language reflects the value of the Language ID for the currently displayed language By default this is the language ID (locale ID) of the base InTouch system (E/F/G/J/SC) Setting this to another ID causes strings with defined values in the new language to be switched
Category system
Data Type Integer (read / write)
Trang 29$Minute
$Month
Monitors and/or controls the running of scripts Equal to selecting Start
Logic on the Logic menu in WindowViewer or selecting Halt Logic on the Logic menu in WindowViewer
Note Asynchronous QuickFunctions that are currently executing cannot be
stopped However, you can prevent new QuickFunctions from executing
Category system
Usage $LogicRunning
Remarks Setting the value to 1 starts the QuickScript logic Setting the value to 0 stops
the QuickScript logic
Data Type Discrete (read / write)
Contains the current minute of the hour
Category system
Usage $Minute
Remarks Contains a value between 0 and 59
Data Type Integer (read only)
Example(s) In an animation link value output string expression:
IF InfoFile("C:\InTouch.32\WIZ.INI",1,$Minute)==1 THEN LogMessage("The File Exists!");
ENDIF;
See Also $DateTime, $Hour, $Msec, $Second, $Time, $TimeString
Contains the current month of the year
Category system
Usage $Month
Remarks Contains a value between 1 and 12
Data Type Integer (read only)
Example(s) IF $Month==10 THEN
CurrentMonthName = "October";
ENDIF;
See Also $Date, $Day, $Year
Trang 30$NewAlarm
$ObjHor
Contains the current milliseconds The rate of update for this system tagname
is increased by changing the settings for Tick Interval and Update Time
Variables On the Special menu, point to Configure and then, click
WindowViewer or, in the Application Explorer under Configure,
double-click WindowViewer The WindowViewer Properties dialog box appears with the General properties sheet active.
Category system
Usage $Msec
Remarks Contains a value between 0 and 999
Data Type Integer (read only)
See Also $DateTime, $Minute, $Second, $Hour, $Time, $TimeString
Indicates that a new alarm has occurred
Category alarms
Usage $NewAlarm
Remarks Contains a value of 1 when a new alarm occurs This is only set when a new
local alarm occurs It is not set for remote alarms
Data Type Discrete (read / write)
Example(s) This tagname can be linked to the PlaySound logic function, causing an
audible alarm to sound An acknowledgment pushbutton can be created to allow the operator to reset this value to 0 and acknowledge the alarm
Contains the horizontal pixel location of the center of a selected object
Category system
Usage $ObjHor
Remarks None
Data Type Integer (read only)
See Also $ObjVer
Trang 31Data Type Integer (read only)
See Also $ObjHor
Returns the current logged on user's user ID
Category security
Usage $Operator
Remarks Contains the name of the user currently logged on
Data Type Message (read only)
Example(s) Access a specific window could be controlled by entering the following
script:
IF $Operator == "DayShift" THEN Show "Control Panel Window";
ELSE Show "Wrong Operator";
ENDIF;
See Also $OperatorEntered, $AccessLevel, $PasswordEntered,
$ChangePassword, $ConfigureUsers
Category Security
Usage If operating system-based security is selected and an operator has
successfully logged on, the $OperatorDomain tag will contain the domain or machine name that was specified at log on If ArchestrA security is selected
a user is logged on, the $OperatorDomain will contain "ArchestrA." If InTouch securty is selected, the $OperatorDomain tag contains the string
"InTouch." If "None" is selected, it is an empty string ""
Remarks N/A
Data Type Message (read only)
Example(s) IF $OperatorDomain == "PRODUCTION" THEN
{Allow change to setpoint }ELSE
{Change denied}
ENDIF;
See Also $Operator
Trang 32$OperatorEntered
$OperatorName
Category Security
Usage Whenever the $PasswordEntered tag changes, a log on is attempted
internally without any GUI being displayed The log on attempt uses the
$*Entered tags as input user name and the string value of
$OperatorDomainEntered as the domain name ( used only if the current mode is operating system-based security ) If the security mode is not operating system-based, this tag is ignored
See Also $Operator
Used to enter a valid user name
Category security
Usage $OperatorEntered
Remarks Creates a custom log-on window Touch-sensitive input objects and/or
QuickScripts can be linked to this tagname to set the "User Name" for the user
Note When $OperatorEntered is valid, $AccessLevel and $Operator will
be set to their pre-defined values
Data Type Message (write only)
See Also $AccessLevel, $Operator, $PasswordEntered, $ChangePassword,
$ConfigureUsers
Category Security
Usage The $OperatorName tag will contain the full legal name of the operator if
operating system-based or ArchestrA authentication is used and someone has logged on and has not logged off Otherwise, the tag will contain the name of the user logged on (same contents as the $Operator tag)
Remarks N/A
Data Type Message (read only)
Example(s) IF $OperatorName <> "" THEN
{Configure some defaults}
ENDIF;
See Also $Operator
Trang 33Remarks This system tagname will always read back as an empty string Display links
tied to $PasswordEntered will always be blank Since the tagname always
returns an empty string, Data Change QuickScripts will never trigger off of
$PasswordEntered Can be used to create a custom log-on window
Touch-sensitive input objects and/or QuickScripts can be linked to this tagname to set the "Password" for the user
Note When $PasswordEntered is valid, $AccessLevel and $Operator will
be set to their pre-defined values
Data Type Message (write only)
See Also $AccessLevel, $Operator, $OperatorEntered, $ChangePassword,
$ConfigureUsers
Contains the current second
Category system
Usage $Second
Remarks Contains a value between 0 and 59
Data Type Integer (read only)
Example(s) Wave=100*Sin(6*$Second);
See Also $DateTime, $Minute, $Msec, $Hour, $Time
Starts uninitiated conversations during runtime when the Special menu has been disabled Equal to selecting Start Uninitiated Conversations on the
Special menu in WindowViewer.
Category system
Usage $StartDdeConversations
Remarks Setting the value to 1 starts uninitiated DDE conversations
Data Type Discrete (read / write)
Trang 34Remarks If a tagname is not assigned to a specific Alarm Group name, it is
automatically assigned to this root group by default All defined Alarm
Groups are descendants of $System.
Data Type System Alarm Group
Example(s) $System.Ack = 1;{Acknowledges All Alarms}
Contains the time in milliseconds since midnight
Category system
Usage $Time
Remarks None
Data Type Integer (read only)
Example(s) Sec_Midnight = $Time/1000;{Number of Seconds since
Midnight}
See Also $DateTime, $Minute, $Msec, $Second, $Hour, $TimeString
Contains the time in the same format defined in the Regional and Language settings in Control Panel
Category system
Usage $TimeString
Remarks The time format is set through the Windows Control Panel
Data Type Message (read only)
Example(s) BatchStartString = $TimeString;
See Also $DateTime, $Minute, $Msec, $Second, $Hour, $Time
Trang 35$Year
Contains the verified user's full name if the call to InvisibleVerifyCredentials() is successful and if the security mode is set to operating system-based or ArchestrA AppServer-based security If the call fails, then the above system tag will be set to null
Category security
Usage $VerifiedUserName
Remarks Whenever the above system tag changes (meaning whenever
InvisibleVerifyCredentials is called), an event will be generated
Data Type Message (read only)
Valid Values A User's full Name
Example(s) Tag = InvisibleVerifyCredentials( "john","password",
"Plant_Floor");{ If the call is successful, the
$VerifiedUserName is set to "John Smith" and an Operator Event is generated If the above call is not successful,
$VerifiedUserName is set to "".}
See Also InvisibleVerifyCredentials(); $OperatorName, $Operator
Contains the current year in four digits
Category system
Usage $Year
Remarks Contains the year in the following format:
2002
Data Type Integer (read only)
Example(s) CurrentYear = $Year;
NoYrsTill2010 = 2010 - CurrentYear;
See Also $Day, $Month
Trang 37C H A P T E R 2
Dotfields and Properties
InTouch uses dotfields to expose properties of objects such as tagnames, historical trends, and windows controls You can use these dotfields to monitor and modify those properties Depending on the object, these properties may be
accessed in one of two ways: directly via a Tagname.field syntax, or indirectly
via a script function
All objects, except windows controls and the distributed alarm object, use the
Tagname.field syntax To access these properties, you simply type the object
name followed by the property you want to access in an InTouch QuickScript
or Animation link For example, to allow runtime changes to the HiHi alarm
limit on tagname Analog_Tag, you could create an Analog - User Input Touch link and then apply it to a pushbutton using Analog_Tag.HiHiLimit for its
expression Then, during runtime, the operator could click the button and type
in a new value for the HiHi alarm limit being used for Analog_Tag.
Windows controls and the distributed alarm object use the GetPropertyX and
SetPropertyX script functions (where X is the data type of the property (D =
Discrete, I = Integer and M = Message.) You can also use these functions in InTouch QuickScripts or Animation links to access properties
For more information on the GetProperty and SetProperty QuickScript
functions, refer to InTouch QuickScript Functions
Tagname Types
When you are defining tagnames in the InTouch Tagname Dictionary, you must assign a specific type to each tagname according to its usage For example, if the tagname is to read or write values coming from or going to another Windows application such as an I/O server, it must be an I/O type tagname The following describes each InTouch tagname type and its usage
Trang 38Memory Type Tagnames
Memory tagname types exist internally within your InTouch application You use them to create system constants and simulations You can also use them to create calculated variables that are accessed by other Windows programs For example, you can define a memory tagname with the initial value of 3.1416 or, you could store recipes in groups of memory tagnames In simulations, you can use memory tagnames to control the actions of a background script For example, you could define a memory tagname "COUNT" that is changed in an action script to cause various animation effects to occur for the current STEP
of a process There are four Memory types:
Memory Message
Text string tagname that can be up to 131 characters long
I/O Type Tagnames
All tagnames that read or write their values from or to another Windows program are I/O type tagnames This includes all inputs and outputs from programmable controllers, process computers and data from network nodes I/O tagnames are accessed either through the Microsoft Dynamic Data Exchange (DDE) protocol or through the SuiteLink transport protocol.When the value of a read/write I/O type tagname changes, it is immediately written to the remote application The tagname may also be updated from the remote application whenever the item to which the tagname is linked changes
in the remote application By default, all I/O tagnames are set to read/write However, you can restrict them to read only by selecting the Read Only option
in the Tagname Dictionary dialog box There are four I/O types:
I/O Discrete
Discrete input/output tagname with a value of either 0 (False, Off) or 1 (True, On)
Trang 39I/O Message
Text string input/output tagname that can be up to 131 characters long
Indirect Discrete, Indirect Analog, Indirect
Message
Indirect type tagnames allow you to create one window and reassign the tagnames in that window to multiple sources For example, you could create a Data Change script that would modify the source for all tagnames in a window based on a value that has changed
Miscellaneous Type Tagnames
There are several special tagname types that you can assign to tagnames to perform complex functions such as creating dynamic alarm displays, historical trends, monitoring or controlling the tagname each historical trend pen is plotting There are also indirect tagname types that you can use to reassign a tagname to multiple sources These special tagname types are described below
This special type is used with historical trend objects You use Tag ID type
tagnames to retrieve information about tagnames being plotted in a historical
trend In most cases, you would use Tag ID tagnames to display the name of
the tagname assigned to a specific pen or, to change the tagname assigned to the pen
For more information on Historical Trending, see your online InTouch User's
Guide.
Trang 40InTouch SuperTags allow you to define composite tagname types You can define SuperTags with up to 64 members and 2 nesting levels Members behave exactly like normal tagnames They support trending, alarming and all
tagname dotfields.
For more information on SuperTags see your InTouch User's Guide.
Tagname Type vs Dotfield Usage Matrix
The matrix below illustrates a quick reference between the Tagname Type and the Dotfield The footnotes below apply to the matrix on the next page
If these Memory type tagnames are requested as I/O points from a client, View (server) provides its local time stamp the moment the value is sent to the client
However, from a local standpoint Memory tagnames always have GOOD quality, and NO Timestamp This means that the timestamp is NOT updated based on the memory values changing in scripts or links
*Supported in InTouch 7.0 or greater
** Supported in InTouch 7.1 or greater
*** Supported in InTouch 7.11 or greater