12.07.2015 Views

InTouch HMI Alarms and Events Guide - Logic, Inc.

InTouch HMI Alarms and Events Guide - Logic, Inc.

InTouch HMI Alarms and Events Guide - Logic, Inc.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>InTouch</strong> ® <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong><strong>Guide</strong>Invensys Systems, <strong>Inc</strong>.Revision ALast Revision: 7/25/07


Copyright© 2007 Invensys Systems, <strong>Inc</strong>. All Rights Reserved.All rights reserved. No part of this documentation shall be reproduced, stored in aretrieval system, or transmitted by any means, electronic, mechanical,photocopying, recording, or otherwise, without the prior written permission ofInvensys Systems, <strong>Inc</strong>. No copyright or patent liability is assumed with respect tothe use of the information contained herein. Although every precaution has beentaken in the preparation of this documentation, the publisher <strong>and</strong> the authorassume no responsibility for errors or omissions. Neither is any liability assumedfor damages resulting from the use of the information contained herein.The information in this documentation is subject to change without notice <strong>and</strong> doesnot represent a commitment on the part of Invensys Systems, <strong>Inc</strong>. The softwaredescribed in this documentation is furnished under a license or nondisclosureagreement. This software may be used or copied only in accordance with the termsof these agreements.Invensys Systems, <strong>Inc</strong>.26561 Rancho Parkway SouthLake Forest, CA 92630 U.S.A.(949) 727-3200http://www.wonderware.comFor comments or suggestions about the product documentation, send an e-mailmessage to productdocs@wonderware.com.TrademarksAll terms mentioned in this documentation that are known to be trademarks orservice marks have been appropriately capitalized. Invensys Systems, <strong>Inc</strong>. cannotattest to the accuracy of this information. Use of a term in this documentationshould 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 A 2 , InBatch, InControl,IndustrialRAD, IndustrialSQL Server, <strong>InTouch</strong>, MaintenanceSuite, MuniSuite, QIAnalyst, SCADAlarm, SCADASuite, SuiteLink, SuiteVoyager, WindowMaker,WindowViewer, Wonderware, <strong>and</strong> Wonderware Logger are trademarks of Invensysplc, its subsidiaries <strong>and</strong> affiliates. All other br<strong>and</strong>s may be trademarks of theirrespective owners.


3ContentsWelcome.......................................... 15Documentation Conventions.............................................15Technical Support .............................................................16Chapter 1 Overview of <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> .............. 17About <strong>InTouch</strong> <strong>Alarms</strong>......................................................18Alarm Priorities..............................................................19Alarm Sub-States ...........................................................19Alarm Acknowledgement ...............................................20Alarm Groups .................................................................20About <strong>InTouch</strong> <strong>Events</strong>.......................................................21Types of <strong>InTouch</strong> <strong>Alarms</strong> ..................................................22Discrete <strong>Alarms</strong> ..............................................................22Analog <strong>Alarms</strong> ................................................................23<strong>InTouch</strong> Distributed Alarm System .................................25Alarm Providers <strong>and</strong> Consumers ..................................27Distributed Alarm Group Lists......................................29Summary <strong>Alarms</strong> versus Historical <strong>Alarms</strong>.................30Alarm Disablement, Inhibition, <strong>and</strong> Suppression ........30Terminal Services Alarm Support.................................31Distributed Alarm System Data Storage ......................32<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


4 ContentsChapter 2 Configuring <strong>Alarms</strong>...............................33Defining Alarm Hierarchies .............................................33Creating an Alarm Group ..............................................34Modifying an Alarm Group............................................36Deleting an Alarm Group ..............................................37Configuring Tags with Alarm Conditions........................37Configuring Discrete <strong>Alarms</strong> .........................................37Configuring Value <strong>Alarms</strong> .............................................39Configuring Deviation <strong>Alarms</strong>.......................................41Configuring Rate of Change <strong>Alarms</strong> .............................43Disabling <strong>Alarms</strong>............................................................44Inhibiting <strong>Alarms</strong>...........................................................44Setting Event Properties for Individual Tags..................46Configuring Global Settings for <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>.......46Configuring the Alarm Buffer Size ...............................47Enabling <strong>Events</strong> .............................................................48Making Alarm Enabling Retentive ...............................49Creating an Alarm Group List File..................................50Chapter 3 Alarm Queries.....................................53Example Alarm Queries....................................................55Getting More <strong>InTouch</strong> Query Information ......................56Chapter 4 Viewing Current <strong>Alarms</strong>.........................57Configuring an Alarm Viewer Control.............................58Configuring the Appearance of the Grid.......................58Configuring the Display Font ........................................62Selecting <strong>and</strong> Configuring Display Columns................62Controlling Which Features Users CanAccess at Run Time....................................................66Configuring Which <strong>Alarms</strong> to Show..............................68Creating Custom Saved Queries UsingQuery Favorites .........................................................70Configuring Colors for Various Types ofAlarm Records............................................................71Configuring the Shown Time Format ofAlarm Records............................................................73Configuring the Sort Order of Alarm Records ..............75<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Contents 5Using an Alarm Viewer Control at Run Time .................76Underst<strong>and</strong>ing Status Bar Information........................77Using Query Favorites at Run Time .............................78Using Alarm Viewer Control ActiveX Properties ............80Configuring Colors for ActiveX Controls.......................87Using Alarm Viewer Control ActiveX Methods ...............88Acknowledging <strong>Alarms</strong> ..................................................88Suppressing <strong>Alarms</strong> .......................................................94Retrieving Information About an Alarm.......................99Running Queries.............................................................99Moving <strong>and</strong> Freezing the Display................................102Sorting Alarm Records .................................................103Showing Other Information.........................................104Selecting Specific <strong>Alarms</strong>.............................................105Showing the Context Menu..........................................108Error H<strong>and</strong>ling When Using Methods<strong>and</strong> Properties ..............................................................108Using ActiveX <strong>Events</strong> to Trigger Scripts .......................108Running a Script When a New Alarm is Detected .....109Chapter 5 Acknowledging <strong>Alarms</strong> in Real Time........111Underst<strong>and</strong>ing Alarm Acknowledgement Models.........112Condition Acknowledgement Alarm Model ................112Exp<strong>and</strong>ed Summary Alarm Model ..............................112Event-Based Alarm Model ...........................................114Checking the Acknowledgement Model ofa Tag at Run Time ...................................................115Using Dotfields to Acknowledge <strong>Alarms</strong>........................116Acknowledging <strong>Alarms</strong> or Alarm Groups ...................116Acknowledging Value <strong>Alarms</strong>......................................118Acknowledging Discrete <strong>Alarms</strong>..................................120Acknowledging Deviation <strong>Alarms</strong> ...............................121Acknowledging Rate-of-Change <strong>Alarms</strong>......................122Using Script Functions to Acknowledge <strong>Alarms</strong> ...........123Ack() Function ..............................................................123Using Automatic Acknowledgement Whenthe Tag Value Returns to Normal ...............................124Using Alarm Clients to Acknowledge <strong>Alarms</strong> ...............124Using Alarm <strong>and</strong> Acknowledgement Comments ...........126<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


6 ContentsChapter 6 Controlling Alarm Properties of Tags <strong>and</strong>Groups at Run Time .......................... 127Determining if Tags or Alarm Groups are inan Alarm Condition......................................................137$NewAlarm System Tag ..............................................138$System System Tag ....................................................138.Alarm Dotfield .............................................................139.Normal Dotfield...........................................................140.AlarmDsc Dotfield.......................................................141.AlarmDev Dotfield ......................................................142.AlarmROC Dotfield .....................................................143.LoStatus Dotfield ........................................................144.LoLoStatus Dotfield ....................................................145.HiStatus Dotfield ........................................................146.HiHiStatus Dotfield ....................................................147.MinorDevStatus Dotfield............................................148.MajorDevStatus Dotfield ............................................149.ROCStatus Dotfield.....................................................150Determining if Alarm Limits Are Set for Tags..............151.LoLoSet Dotfield..........................................................151.LoSet Dotfield..............................................................152.HiSet Dotfield..............................................................153.HiHiSet Dotfield..........................................................154.MinorDevSet Dotfield .................................................155.MajorDevSet Dotfield..................................................156.ROCSet Dotfield ..........................................................157Enabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tagor Alarm Group ............................................................158Enabling/Disabling All <strong>Alarms</strong>....................................158Enabling/Disabling LoLo <strong>Alarms</strong> ................................160Enabling/Disabling Low <strong>Alarms</strong> .................................162Enabling/Disabling High <strong>Alarms</strong> ................................164Enabling/Disabling HiHi <strong>Alarms</strong> ................................166Enabling/Disabling Discrete <strong>Alarms</strong>...........................168Enabling/Disabling Minor Deviation <strong>Alarms</strong> .............170Enabling/Disabling Major Deviation <strong>Alarms</strong> .............172Enabling/Disabling Rate-Of-Change <strong>Alarms</strong>..............174Changing a Tag's Alarm Limits .....................................176.LoLoLimit Dotfield......................................................176.LoLimit Dotfield ..........................................................177<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Contents 7.HiLimit Dotfield ..........................................................178.HiHiLimit Dotfield ......................................................179.MinorDevPct Dotfield..................................................180.MajorDevPct Dotfield..................................................181.DevTarget Dotfield ......................................................182.ROCPct Dotfield ..........................................................183Changing a Tag's Alarm Deadb<strong>and</strong>s..............................184.AlarmValDeadb<strong>and</strong> Dotfield ......................................184.AlarmDevDeadb<strong>and</strong> Dotfield......................................185Changing the Alarm Comment Associatedwith a Tag.....................................................................186.AlarmComment Dotfield.............................................186Associating User-Defined Information withan Alarm Instance........................................................187.AlarmUserDefNumX Dotfields...................................187.AlarmUserDefStr Dotfield ..........................................188Determining the Inhibitor Tag of a Tag orAlarm Group.................................................................190.AlarmDscInhibitor Dotfield ........................................190.AlarmLoLoInhibitor Dotfield......................................192.AlarmLoInhibitor Dotfield ..........................................193.AlarmHiInhibitor Dotfield ..........................................194.AlarmHiHiInhibitor Dotfield......................................195.AlarmMinDevInhibitor Dotfield.................................196.AlarmMajDevInhibitor Dotfield .................................197.AlarmROCInhibitor Dotfield ......................................198Counting the Number of Active orUnacknowledged <strong>Alarms</strong> .............................................199.AlarmTotalCount Dotfield ..........................................200.AlarmUnAckCount Dotfield .......................................201.AlarmValueCount Dotfield .........................................202.AlarmValueUnAckCount Dotfield..............................203.AlarmDscCount Dotfield.............................................204.AlarmDscUnAckCount Dotfield .................................205.AlarmDevCount Dotfield ............................................206.AlarmDevUnAckCount Dotfield.................................207.AlarmROCCount Dotfield...........................................208.AlarmROCUnAckCount Dotfield ...............................209<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


8 ContentsChapter 7 Viewing Alarm Hierarchies ................... 211Configuring an Alarm Tree Viewer Control ..................212Configuring the Appearance <strong>and</strong> Colors .....................212Configuring Fonts ........................................................215Configuring Automatic Refresh...................................215Controlling Which Features Users canAccess at Run Time..................................................216Configuring Which Providers <strong>and</strong> Groupsto Show .....................................................................217Creating Custom Saved Queries UsingQuery Favorites .......................................................219Configuring the Sort Order for Alarm Groups ...........220Using an Alarm Tree Viewer Control at Run Time ......221Underst<strong>and</strong>ing Status Bar Information......................222Using Query Favorites.................................................222Using Alarm Tree Viewer Control ActiveX Properties .223Using Alarm Tree Viewer Control ActiveX Methods ....225Retrieving Information About the Control .................225Retrieving Information About Specific Entries ..........226Freezing the Tree .........................................................232Creating a Query String from a Selection ..................232Running Queries ..........................................................233Error H<strong>and</strong>ling when Using Methods <strong>and</strong>Properties .....................................................................234Using Alarm Tree Viewer Control ActiveX<strong>Events</strong> to Trigger Scripts.............................................234Chapter 8 Printing <strong>Alarms</strong> ................................. 235Configuring Alarm Printing <strong>and</strong> Logging......................236Configuring Printer Settings .......................................236Configuring Which <strong>Alarms</strong> to Print ............................238Configuring the Format of Print <strong>and</strong> File Output......239Configuring Log Files for <strong>Alarms</strong>................................243Saving <strong>and</strong> Loading Configuration Files ....................245Printing <strong>Alarms</strong>...............................................................246Logging <strong>Alarms</strong> to a File.................................................247Starting Alarm Printer with a Specific Configuration..248Controlling the Alarm Printer Using Scripting.............248Stopping <strong>and</strong> Starting <strong>and</strong> Alarm PrinterInstance or Query ....................................................249Querying Alarm Query Information ...........................252Querying Instance Information...................................260<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Contents 9Querying Printer Information .....................................265Setting Alarm Query Information ...............................267H<strong>and</strong>ling Alarm Printer Errors...................................272Chapter 9 Recording <strong>Alarms</strong> into anAlarm Database................................273SQL Server Accounts for Alarm DB LoggerManager........................................................................274Using the Alarm DB Logger Manager ...........................274Configuring Alarm Database Logging............................275Configuring the Database Connection ........................275Configuring Which <strong>Alarms</strong> to Log...............................276Configuring the Logging Interval................................278Configuring Alarm DB Logger as a Service................279Starting <strong>and</strong> Stopping Alarm Database Logging ..........280Alarm Database Views....................................................280Alarm History View......................................................281Event History View ......................................................283Alarm Event History View...........................................284AlarmSuite Alarm Log View........................................287Alarm Database Stored Procedures ...............................288Calling a Stored Procedure ..........................................288AlarmCounter Database Stored Procedure ................289EventCounter Database Stored Procedure .................290Chapter 10 Viewing Recorded <strong>Alarms</strong> ...................291Configuring the Alarm DB View Control.......................292Configuring the Database Connection ........................293Configuring the Appearance of the Grid .....................294Configuring the Display Font ......................................295Selecting Alarm or Event Data....................................296Selecting <strong>and</strong> Configuring Display Columns ..............297Controlling Which Features You CanAccess at Run Time..................................................300Configuring the Shown Time Format <strong>and</strong>Time Zone for Alarm Records..................................301Selecting the Time Period of Data fromthe Alarm Database.................................................303Creating Custom Filters <strong>and</strong> UsingFilter Favorites ........................................................306Configuring Colors for Various Types ofAlarm Records..........................................................312Configuring the Sort Order for Alarm Records...........314<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


10 ContentsUsing an Alarm DB View Control at Run Time ............315Sorting Records ............................................................315Underst<strong>and</strong>ing Status Bar Information......................316Using Alarm DB View ActiveX Properties ....................316AckAlmBackColor Property.........................................316AckAlmBackColorRange1 Property ............................317AckAlmBackColorRange2 Property ............................317AckAlmBackColorRange3 Property ............................318AckAlmBackColorRange4 Property ............................318AckAlmForeColor Property .........................................319AckAlmForeColorRange1 Property .............................319AckAlmForeColorRange2 Property .............................320AckAlmForeColorRange3 Property .............................320AckAlmForeColorRange4 Property .............................321AckRtnBackColor Property .........................................321AckRtnForeColor Property ..........................................322AlmRtnBackColor Property.........................................322AlmRtnForeColor Property..........................................322AutoConnect Property..................................................323ColorPriorityRange1 Property.....................................323ColorPriorityRange2 Property.....................................324ColorPriorityRange3 Property.....................................324ColumnResize Property ...............................................324ConnectStatus Property...............................................325CustomMessage Property ............................................325DatabaseName Property..............................................325DisplayMode Property .................................................326DisplayedTimeZone Property ......................................326Duration Property ........................................................327EndTime Property........................................................328EventBackColor Property ............................................328EventForeColor Property.............................................329FilterFavoritesFile Property........................................329FilterMenu Property ....................................................329FilterName Property....................................................330FromPriority Property .................................................330GroupExactMatch Property.........................................331GroupName Property...................................................331MaxRecords Property...................................................332Password Property .......................................................332PrimarySort Property ..................................................332ProviderExactMatch Property.....................................333ProviderName Property ...............................................333<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Contents 11QueryTimeZoneName Property...................................334RefreshMenu Property.................................................334ResetMenu Property.....................................................334RowCount Property ......................................................335RowSelection Property .................................................335SecondarySort Property ...............................................335ServerName Property ..................................................336ShowFetch Property.....................................................336ShowGrid Property.......................................................336ShowHeading Property ................................................337ShowMessage Property ................................................337ShowStatusBar Property .............................................337SilentMode Property ....................................................338SortMenu Property.......................................................338SortOrder Property ......................................................339SpecificTime Property ..................................................339StartTime Property ......................................................340Time Property...............................................................340ToPriority Property ......................................................340TotalRowCount Property .............................................341UnAckAlmBackColor Property....................................341UnAckAlmBackColorRange1 Property .......................342UnAckAlmBackColorRange2 Property .......................342UnAckAlmBackColorRange3 Property .......................343UnAckAlmBackColorRange4 Property .......................343UnAckAlmForeColor Property ....................................344UnAckAlmForeColorRange1 Property........................344UnAckAlmForeColorRange2 Property........................345UnAckAlmForeColorRange3 Property........................345UnAckAlmForeColorRange4 Property........................346UnAckOrAlarmDuration Property..............................346UserID Property ...........................................................346Using Alarm DB View ActiveX Methods........................347Controlling Database Connections ..............................347Retrieving Records from the Database .......................348Retrieving Information About an Alarm.....................350Sorting the Alarm Records...........................................351Showing the Context Menu..........................................352Accessing Filter Favorites............................................352Showing Other Information.........................................352Error H<strong>and</strong>ling When Using Methods <strong>and</strong> Properties..353Using Alarm DB View ActiveX <strong>Events</strong>to Trigger Scripts .........................................................354<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


12 ContentsChapter 11 Analyzing Alarm DistributionAcross Tags ..................................... 355Configuring an Alarm Pareto ActiveX Control..............355Configuring the Connection to the AlarmDatabase...................................................................356Configuring the Appearance <strong>and</strong> Colors ofthe Alarm Pareto Control ........................................357Configuring the Display Font ......................................360Configuring Which Features Users canAccess at Run Time..................................................360Configuring Which <strong>Alarms</strong> to Analyze .......................362Creating Custom Filters Using Filter Favorites ........364Configuring the Presentation of theAnalysis Results.......................................................368Using an Alarm Pareto Control at Run Time................369Underst<strong>and</strong>ing Information Shown on theStatus Bar ................................................................369Using Alarm Pareto ActiveX Properties ........................370Using Alarm Pareto ActiveX Methods ...........................373Controlling Database Connections..............................373Retrieving Records from the Database .......................374Retrieving Information About Specific Pareto Bars...374Showing Miscellaneous Information ...........................377Error H<strong>and</strong>ling When Using Methods <strong>and</strong>Properties .....................................................................377Using Alarm Pareto ActiveX <strong>Events</strong> toTrigger Scripts..............................................................378Chapter 12 Maintaining the Alarm Database........... 379Configuring Purge or Archive Settings..........................380Configuring the Database Connection ........................380Configuring How Much Data to Purge fromthe Server .................................................................381Configuring the Archive of Purged Data ....................382Configuring Log File Settings......................................384Manually Purging <strong>and</strong> Archiving the Database.........386Setting a Schedule for Automatic Purging .................388Restoring the Alarm Database .......................................389Configuring the Database Connection ........................390Configuring Which Files to Restore ............................391Starting a Database Restore Operation......................393<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Contents 13Chapter 13 Enhancing Plant Security Through AlarmRedundancy ....................................395Underst<strong>and</strong>ing Hot Backups ..........................................396Configuring a Hot Backup Pair ......................................397Creating a Hot Backup Pair ........................................398Setting Alarm Key Fields for a Hot Backup Pair .......400Creating an Alarm Record Mapping File....................402Importing an Alarm Record Mapping File..................406Example of a Hot Backup Pair .......................................408Acknowledgement Synchronization Example.............412Notes Regarding Hot Backup Pairs................................414Chapter 14 Creating an Alarm Audit Trail ..............415Appendix A Working with the DistributedAlarm Display Object.........................417About the Distributed Alarm Display Object ................417Distributed Alarm Display Object <strong>Guide</strong>lines ............418Configuring a Distributed Alarm DisplayObject at Design Time..................................................419Creating a Distributed Alarm Display Object ............419Configuring the Appearance of the Grid .....................420Controlling Which Features Users CanAccess at Run Time..................................................422Configuring Which <strong>Alarms</strong> to Show............................423Configuring a Default Alarm Comment......................425Configuring the Time Format for Alarm Records ......426Configuring the Font for Alarm Records.....................428Configuring the Columns for Alarm Records..............428Configuring Colors for Alarm Records ........................431Configuring the Display Type......................................432Using the Distributed Display to MonitorLocal <strong>Alarms</strong> ............................................................433Using a Distributed Alarm Display Objectat Run Time..................................................................434Sizable Display Columns .............................................434Multiple Selection.........................................................434Alarm Message Colors..................................................435Status Bar.....................................................................435Shortcut Menu..............................................................436Selecting <strong>and</strong> Configuring Alarm Query Favorites ....437<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


14 ContentsControlling the Distributed Alarm Display ObjectUsing Functions <strong>and</strong> Dotfields....................................440Getting or Setting Properties ......................................440Acknowledging <strong>Alarms</strong> ................................................440Selecting <strong>Alarms</strong> ..........................................................450Retrieving Information about a SelectedAlarm Record ...........................................................455Setting the Alarm Query .............................................471Checking the Current Query Properties.....................474Checking for Updates to the DistributedAlarm Display Object ..............................................480Suppressing <strong>Alarms</strong> .....................................................482Scrolling the Alarm Display ........................................494Showing Alarm Statistics <strong>and</strong> Counts ........................497Error Descriptions........................................................503Appendix B Migrating from Legacy Alarm Systems..... 505Migrating from the St<strong>and</strong>ard Alarm System to theDistributed Alarm System...........................................505Migrating an AlarmSuite Database...............................506Index ............................................. 509<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


15WelcomeThis documentation describes how to manage alarms <strong>and</strong>events generated by your <strong>InTouch</strong> applications.You can view this documentation or you can print it, in partor whole, by using the print feature in Adobe Reader.This documentation assumes you know how to use MicrosoftWindows, including navigating menus, moving fromapplication to application, <strong>and</strong> drawing objects on the screen.If you need help with these tasks, see the Microsoftdocumentation.Documentation ConventionsThis documentation uses the following conventions:ConventionInitial CapitalsBoldMonospaceUsed forPaths <strong>and</strong> file names.Menus, comm<strong>and</strong>s, dialog box names,<strong>and</strong> dialog box options.Code samples <strong>and</strong> display text.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


16 WelcomeTechnical SupportWonderware Technical Support offers a variety of supportoptions to answer any questions on Wonderware products<strong>and</strong> their implementation.Before you contact Technical Support, refer to the relevantsection(s) in this documentation for a possible solution to theproblem. If you need to contact technical support for help,have the following information ready:• The type <strong>and</strong> version of the operating system you areusing.• Details of how to recreate the problem.• The exact wording of the error messages you saw.• Any relevant output listing from the Log Viewer or anyother diagnostic applications.• Details of what you did to try to solve the problem(s) <strong>and</strong>your results.• If known, the Wonderware Technical Support casenumber assigned to your problem, if this is an ongoingproblem.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


17Chapter 1Overview of <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>You can create <strong>InTouch</strong> applications that generate alarms<strong>and</strong> events to notify operators about the status of processactivity.• <strong>Alarms</strong> warn run-time operators about process conditionsthat could potentially cause problems. Typically, you setup an alarm to trigger when a process value exceeds adefined limit. An operator must usually acknowledge thealarm.• <strong>Events</strong> represent normal system status messages. Atypical event is when a system condition occurs, such asan operator logging on to an <strong>InTouch</strong> application.Operators do not have to acknowledge events.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


18 Chapter 1 Overview of <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>The following figure shows how the <strong>InTouch</strong> <strong>HMI</strong> h<strong>and</strong>lesalarms <strong>and</strong> events while an application is running. Alarm<strong>and</strong> event data is saved to the alarm database.Running Physical Process<strong>InTouch</strong>ClientAlarmProviderHiHi Alarm90HiHi AlarmAlarmAckRunning <strong>InTouch</strong>ApplicationAlarm RecordsLog On EventEventRecordsAlarm DatabaseYou can configure any tag for event monitoring. An eventmessage is logged to the alarm system each time the tagvalue changes. The event message includes how the valuechanged <strong>and</strong> whether the operator, I/O, scripts, or the systeminitiated the change.About <strong>InTouch</strong> <strong>Alarms</strong><strong>Alarms</strong> represent warnings of process conditions that couldcause problems <strong>and</strong> require an operator response. A typicalalarm is triggered when a process value exceeds auser-defined limit, such as an analog value exceeding anupper threshold. This triggers an alarm to notify the operatorof a problem. After the operator acknowledges the alarm, the<strong>InTouch</strong> <strong>HMI</strong> recognizes the alarm has been acknowledged.You can configure the <strong>InTouch</strong> <strong>HMI</strong> to require an alarm to beacknowledged even if the condition causing the alarm haspassed. This ensures that an operator is aware of events thatcaused a temporary alarm state but have returned to normal.The main alarm states are described in the following table:Alarm StateACKALMRTNConditionAlarm was acknowledged.Alarm has occurred.Tag returned from an alarm state to anormal state.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


About <strong>InTouch</strong> <strong>Alarms</strong> 19Alarm PrioritiesYou assign a level of priority, or severity, to an alarm. Aboiler temperature limit, for example, would require ahigh-priority alarm, requiring immediate attention. An endof a shift alarm is a much less severe. The alarm priorityusually depends upon the circumstances—the factoryapplication, the nature of the equipment, safety, availabilityof backup systems, potential costs of damage, or downtime.You assign an alarm priority when you define a tag. Thepriority can range from 1 to 999, with 1 being the mostsevere.You can designate a range of alarm priorities to represent aclassification of alarms. For example, if a process requiresfour levels of severity, you can create four priority ranges.Alarm SeverityPriority RangeCritical 1 – 249Major 250 – 499Minor 500 – 749Informational 750 – 999Ranges are useful for alarm filtering. For example, you canconfigure an alarm display to filter out all but the criticalalarms. You can create animation links, acknowledgmentscripts, <strong>and</strong> filtered viewing <strong>and</strong> printing, all based on thealarm priority range.Alarm Sub-StatesA multi-state alarm includes a range of alarm sub-conditions.For example, an analog alarm typically has several limits.• A High <strong>and</strong> Low threshold set the boundaries for thenormal operating range.• HiHi <strong>and</strong> LoLo limits mark the extreme deviations fromthe normal range of values.A boiler temperature level can be in the alarmed conditionfor any one of these sub-states. The boiler temperature canalso transition between any two sub-states while continuingto remain in the overall alarmed condition.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


20 Chapter 1 Overview of <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>Alarm AcknowledgementWhen an alarm occurs, the run time operator (or system)must acknowledge the alarm. Acknowledgement merelyindicates that someone is aware of the alarm. This isseparate from taking corrective action, which might nothappen right away. It is also separate from whether thealarm condition returns to normal—which it might do on itsown, even without any external intervention.A high or medium priority alarm usually requires immediateacknowledgment, while a very low-priority alarm might not.Although the condition that generated the alarm may goaway (for example, a temperature rises too high <strong>and</strong> thenbecomes lower again), the alarm itself is not consideredresolved until it is acknowledged.Alarm GroupsYou can group alarms to make tracking <strong>and</strong> managementeasier. Alarm groups are logical representations of differentareas of a factory, pieces of equipment, operatorresponsibility, or a manufacturing process.For example, the following figure shows a three-tier alarmgroup hierarchy for a tank farm application.$SystemTnkFrm1 TnkFrm2 TnkFrm3F1Tk1LvlF2Tk1LvlF2Tk2LvlF3Tk1LvlF3Tk2LvlAlarm groups are useful for filtering in alarm displays, alarmprinters, <strong>and</strong> acknowledgment scripts.Every tag is associated with an alarm group. By default, tagsare assigned to main $System group. You can create ahierarchy of additional alarm groups under the $Systemgroup, up to a maximum of 32 levels.You create alarm groups <strong>and</strong> associate tags with them whileyou are defining your tags in the Tagname Dictionary.Alarm groups <strong>and</strong> group variables are not compatible withSmartSymbols. You can't use references to alarm groups orgroup variables in a SmartSymbol.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


About <strong>InTouch</strong> <strong>Events</strong> 21About <strong>InTouch</strong> <strong>Events</strong>An event is a detectable occurrence of something happeningwithin the system, which may or may not be associated withan alarm. A transition into or out of an alarmed state is onekind of event. An event might also be an operator action, achange to the system configuration, or some kind of systemerror.An event is different than a condition. A condition can persistfor minutes, hours, days, or weeks. An event is momentary; ittakes place <strong>and</strong> is immediately over. An alarm is a condition;an alarm notification is an event.<strong>Events</strong> represent normal system status messages <strong>and</strong> do notrequire an operator response.When you define a tag to do event monitoring, you can chooseto have event messages printed or logged to the alarm systemeach time the tag value changes. The event message includeshow the value changed <strong>and</strong> whether the operator, I/O, scriptsor the system initiated the change.An event can be one of the following types:EventOPRLGCDDESYSUSERConditionThe operator modified the tag value usingthe Value input.A QuickScript modified the tag value.The tag value was poked from a DDE client.A system event occurred.$Operator changed.The SYS <strong>and</strong> USER events are generated by the systemregardless of whether event logging is enabled for any tags.DDE, OPR, <strong>and</strong> LGC events relate to tag values <strong>and</strong> are onlygenerated for tags that have event logging enabled.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


22 Chapter 1 Overview of <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>Types of <strong>InTouch</strong> <strong>Alarms</strong>Within the <strong>InTouch</strong> <strong>HMI</strong>, alarms are classified into generalcategories based on their characteristics. These categoriesare known as Class <strong>and</strong> Type. The Distributed Alarm systemcategorizes all alarms into five general conditions: Discrete,Value, Deviation, Rate-of-Change, <strong>and</strong> SPC.Alarm Condition Distributed Class Distributed TypeDiscrete DSC DSCValue - LoLo VALUE LOLOValue - Low VALUE LOValue - High VALUE HIValue - HiHi VALUE HIHIDeviation - Major DEV MAJDEVDeviation - Minor DEV MINDEVRate-of-Change ROC ROCSPC SPC SPCYou associate each <strong>InTouch</strong> tag with an alarm conditionwhen you define the tag. Depending upon a tag’s type, youcan define one or more of the alarm classes or types for it.Discrete <strong>Alarms</strong>A discrete alarm corresponds to a discrete tag with twopossible states. When you create a discrete tag, you configurewhether the alarmed state corresponds to the true or falsestate of the tag.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Types of <strong>InTouch</strong> <strong>Alarms</strong> 23Analog <strong>Alarms</strong>An analog alarm corresponds to an analog tag, which isassociated with an integer or real number. Within the analogalarm type, there are several sub-types: value, deviation, <strong>and</strong>rate-of-change.Value <strong>Alarms</strong>The current tag value is compared to one or morepredetermined limits. If the value exceeds the limit, thealarmed state is declared. You can individually configurevalues <strong>and</strong> priorities for the “LoLo” limit, “Lo” limit, “Hi”limit, <strong>and</strong> “HiHi” limit, <strong>and</strong> indicate whether or not eachlimit is to be used.LoLo Alarm LevelLo Alarm LevelHi Alarm LevelHiHi Alarm Level80901020Deviation <strong>Alarms</strong>The current tag value is compared to a target value, <strong>and</strong> thenthe absolute value of the difference is compared to one ormore limits, expressed as a percent of the range of the tagvalue.Target 50%No Alarm10% MinorDeviation20% MajorDeviation506070<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


24 Chapter 1 Overview of <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>You can individually configure values <strong>and</strong> priorities for theminor deviation limit <strong>and</strong> the major deviation limit, <strong>and</strong>indicate whether or not each limit is to be used. You can alsoconfigure a value for a deviation deadb<strong>and</strong>, also expressed asa percent of the tag's range. This controls the percentage (ofthe total range) that the tag value must change before it isevaluated to be in alarm.For example, you configure limits as follows:• Range of 0 to 100• Target of 50• Minor deviation of 10 percent, which sets the minordeviation thresholds at 40 <strong>and</strong> 60.• Major deviation of 20 percent, which sets the majordeviation thresholds at 30 <strong>and</strong> 70.• Deadb<strong>and</strong> of 10 percentIf the tag value is 39, a minor deviation alarm occurs.However, the value must change at least to 50 (40 plus thedeadb<strong>and</strong> of 10) before the alarm is evaluated <strong>and</strong> cleared.If the tag value is 72, a major deviation alarm occurs. Thevalue drop to at least 61 before the alarm is cleared.Rate of Change <strong>Alarms</strong>The tag’s current <strong>and</strong> previous values are compared over ameasured period. If the absolute value of the rate of changeexceeds the limit, the alarmed state is declared.15:05:2515:05:5515:06:25605040You can configure the value <strong>and</strong> priority for the ROC limit,<strong>and</strong> whether or not the limit is to be used. The limit isexpressed as a percentage of the tag’s value range over a timeinterval - which can be per second, per minute, or per hour.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


<strong>InTouch</strong> Distributed Alarm System 25<strong>InTouch</strong> Distributed Alarm SystemThe Distributed Alarm system is made up of:• An Alarm Manager, which manages currently activealarms (summary alarms) <strong>and</strong> historical alarms <strong>and</strong>events. The summary <strong>and</strong> historical alarms are held inthe <strong>InTouch</strong> internal alarm memory.• An Alarm DB Logger, which stores historical alarms <strong>and</strong>events to the alarm database. The alarm database is aSQL Server database.• An Alarm Printer, which prints historical alarms <strong>and</strong>events.• A set of ActiveX controls, which retrieve alarms <strong>and</strong>events from either the internal alarm memory or thealarm database at run time.The following figure shows an overview of the system.WindowViewer<strong>InTouch</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>Report Alarm Groups,<strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>Alarm DB ViewcontrolAlarm ParetocontrolAlarm Tree ViewercontrolAlarm ViewercontrolDistributed Alarm Object(legacy)Alarm ManagerCurrent <strong>Alarms</strong>(Summary)alarm databaseAlarm DB LoggerSmart Cache(buffer)historicalalarms<strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>(Historical)alarm memoryAlarm Printer.txt.txt.txt<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


26 Chapter 1 Overview of <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>Run time operators can use the Distributed Alarm system to:• Show, log, <strong>and</strong> print alarms <strong>and</strong> events generated by alocal <strong>InTouch</strong> application <strong>and</strong> by alarm systems of othernetworked applications.• Acknowledge alarms locally or from a remote networknode.• Use the alarm ActiveX controls in your <strong>InTouch</strong>applications to show alarm displays that youpre-configure.• Provide more feedback about the alarm using a separatealarm comment field.As an application developer, you can:• Control the alarms through dotfields.• Configure your alarms so that they are enabled ordisabled directly or indirectly under full control of theapplication. You can apply alarm suppression to singlealarm classes, tags, or groups to prohibit the showing ofalarm information on a specific view node. System-widedisablement can block alarm activity at the source.• Configure alarm information to be logged to history. TheAlarm DB Logger can run as a Windows service or bemanually started on dem<strong>and</strong>. Alarm logging uses UTC(GMT) time stamping <strong>and</strong> provides compatibility withDST <strong>and</strong> across time zones.• Set up failover alarm providers. If a primary alarmprovider fails, the Distributed Alarm system seamlesslyacquires alarm information from the backup system. Onreconnection of the primary node, the Distributed <strong>Alarms</strong>ystem ensures that alarm acknowledgements arere-synchronized prior to the returning primary systembecoming live.The Distributed Alarm system:• Sends data through the Wonderware SuiteLink protocol<strong>and</strong> uses a minimal amount of CPU <strong>and</strong> networkresources.• Time stamps the alarm at the time the alarm occurs, notwhen the consumer receives the alarm. The time stampincludes milliseconds.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


<strong>InTouch</strong> Distributed Alarm System 27Alarm Providers <strong>and</strong> ConsumersOn any given node there can be a collection of AlarmProviders (Publishers) <strong>and</strong> Alarm Consumers (Subscribers).The <strong>InTouch</strong> Distributed Alarm system provides thecommunication link to pass alarm information betweennodes <strong>and</strong> software components.Alarm ProviderAn alarm provider:• Keeps track of alarmable items—that is, items that cantransition into an alarmed condition—<strong>and</strong> provides theDistributed Alarm system with the list of these items,including information on any hierarchical grouping of theitems.• Notifies the Distributed Alarm system when the status ofan alarm item changes. Status changes include whetherthe item is in or out of the alarmed state <strong>and</strong> whether themost recent alarm has been acknowledged.• Keeps track of whether an alarm item is disabled.The <strong>InTouch</strong> <strong>HMI</strong> supports external alarm providers, such asSPCPro, QI Analyst, an ArchestrA Galaxy, <strong>and</strong> othersoftware built with the Wonderware Alarm API toolkit. Thedate/time stamp for these alarm records is provided by thealarm provider, <strong>and</strong> is not generated by the DistributedAlarm system.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


28 Chapter 1 Overview of <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>Alarm ConsumerAn alarm consumer:• Provides the Distributed Alarm system with a set ofqueries identifying alarmable items about which itwishes to receive notifications. A query remains activeuntil changed or removed by the alarm consumer, <strong>and</strong>specifies an alarm provider or group of alarms - much likea SQL query with “wildcards.” Whenever an alarmprovider issues notification of a change, the DistributedAlarm system checks the alarm for matches with allregistered queries <strong>and</strong> passes updates to thecorresponding alarm consumers.• Upon receiving updates, shows or logs informationrelating to the status of the items or their transitions.• Acknowledges alarms. The alarm consumer sends anacknowledgement notification to the Distributed <strong>Alarms</strong>ystem, identifying the alarm <strong>and</strong> the alarm provider.The notification is passed to the alarm provider, whichthen updates the status of the item to acknowledged (ifappropriate) <strong>and</strong> in turn notifies the Distributed <strong>Alarms</strong>ystem, thereby ensuring that the update getsdistributed to all interested alarm consumers.Note The majority of communication in the Distributed <strong>Alarms</strong>ystem consists of sending alarm queries <strong>and</strong> alarm records fromone node to another. Within a node, alarm queries <strong>and</strong> alarmrecords are tracked <strong>and</strong> buffered by the internal alarm memory tominimize network traffic.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


<strong>InTouch</strong> Distributed Alarm System 29Distributed Alarm Group ListsThe Distributed Alarm system uses alarm groups to organizealarms into a local tree view. The distributed alarm displayuses the tree view to filter alarms. You can view these alarmgroups from multiple nodes on a network.The Distributed Alarm system uses an alarm group list tocombine alarm groups from local <strong>and</strong> remote nodes. An alarmgroup list is a named list consisting of <strong>InTouch</strong> nodes <strong>and</strong> thealarm groups defined on each of those nodes. It can alsocontain other alarm group list names <strong>and</strong> local alarm groups.An alarm consumer, such as the Alarm Viewer control, usesthis list to query for alarms.Under a query alias, the Alarm Viewer control can show thecombined alarms from the groups that belong to the list.<strong>Alarms</strong> can be acknowledged on the local <strong>InTouch</strong> node orfrom a remote node on the network.The following figure shows an alarm group list that combinesalarm groups from three nodes. The alarm group list isdefined locally on NodeC. The remaining alarm groups arefrom remote nodes.Alarm Group ListRemote\\NodeA\<strong>InTouch</strong>!TnkFrm1Remote\\NodeB\<strong>InTouch</strong>!TnkFrm2\<strong>InTouch</strong>!TnkFrm3LocalNodeA NodeB NodeCTnkFrm1TnkFrm2TnkFrm3-F1Tk1LvlF2Tk1LvlF2Tk2LvlF3Tk1LvlF3Tk2LvlAlarmStorageAlarmStorageAlarmStorageThe Distributed Alarm Display shows the alarms resultingfrom a query across all of the alarm groups that belong to thelist. For example, if you were interested in showing all tankfarm alarms across several <strong>InTouch</strong> nodes, you can create alist called TankFarm<strong>Alarms</strong>. To this list, you add alarmgroups from all nodes that run tank farm <strong>InTouch</strong>applications.For more information on creating alarm groups, see Creatingan Alarm Group on page 34.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


30 Chapter 1 Overview of <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>Summary <strong>Alarms</strong> versus Historical <strong>Alarms</strong>Summary alarms are alarms that are currently active.Historical alarms are alarms that are not currently active<strong>and</strong> are typically stored to the alarm database.For example, you might want to see a summary of all currentalarms that are awaiting acknowledgment, whereas all otheralarm information is of historical interest <strong>and</strong> of lessurgency.Alarm Disablement, Inhibition, <strong>and</strong> SuppressionYou can turn alarms “off” or ignore them without actuallyremoving the alarm configuration. You can either disable analarm, inhibit it, or suppress it.Alarm disablement <strong>and</strong> inhibition is controlled at the alarmprovider. Suppression is controlled at the alarm consumer.For more information on providers <strong>and</strong> consumers, see AlarmProviders <strong>and</strong> Consumers on page 27.• Disablement. You disable an alarm at the alarmprovider by setting a flag that marks it as disabled. Nomatter what alarm conditions occur, the item is never putinto an alarmed state. For information on dotfields youcan use to disable an alarm, see Enabling <strong>and</strong> Disabling<strong>Alarms</strong> for a Tag or Alarm Group on page 158.You can disable or enable all of a tag’s alarms at onetime. Also, for an alarm that has sub-states, you c<strong>and</strong>isable each sub-state individually.• Inhibition. You inhibit an alarm by:aAdding an “inhibitor” tag to the alarm configurationin WindowMaker. The inhibitor tag is used at runtime to mark the alarm as inhibited.b Setting the inhibitor tag to True or False at run time.When the inhibitor tag is False, the alarm is h<strong>and</strong>lednormally. When the inhibitor tag is True, the itemcannot alarm.Each alarm sub-state can be inhibited by a different tag,<strong>and</strong> you can leave some sub-states with no inhibitor tagassigned.Assigning a tag as an inhibitor tag for an alarm increasesits cross-reference use count.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


<strong>InTouch</strong> Distributed Alarm System 31• Suppression. Suppression causes an alarm consumer toignore certain alarms. If an alarm matches the exclusioncriteria, it is not visible. That is, it is not shown on adisplay, printed, or logged at that particular alarmconsumer.The actual alarm generation is completely unaffected bysuppression. Alarm records can still be logged into alarmhistory.If an alarm becomes disabled or actively inhibited while theitem is in an alarmed state, the item is forced to a different(valid) state. What that state should be depends upon whichstates are available <strong>and</strong> whether they have also beendisabled. This activity is h<strong>and</strong>led by the alarm provideraccording to the type of alarm, limit values, <strong>and</strong> so on.An alarm that is disabled or actively inhibited is not waitingfor an acknowledgment. If the alarm has sub-states, it canonly be waiting for an acknowledgment on sub-states thatare still available.Terminal Services Alarm SupportBy using the Distributed Alarm system with TerminalServices for <strong>InTouch</strong>, alarm clients running on differentterminal sessions can select what alarm data to show <strong>and</strong>how to present it.Alarm Providers identify themselves by a name thatuniquely identifies their application, <strong>and</strong> the instance oftheir application. This information is made available to theDistributed Alarm system when the Alarm Provider or theAlarm Consumer registers with the Distributed <strong>Alarms</strong>ystem.The node on which an Alarm Provider is running is identifiedby a name that uniquely identifies the computer node in thesystem. This information is made available to theDistributed Alarm system when an instance of it starts up onthe computer node.When an alarm event is logged, the node <strong>and</strong> complete AlarmProvider name identify the source of the alarm.When an alarm is acknowledged in a Terminal Servicesenvironment, the Operator Node that gets recorded will bethe name of the client machine that the respective operatorestablished the Terminal Services session from. If the nodename can't be retrieved, the node's IP address will be usedinstead.A terminal server client session cannot be an <strong>InTouch</strong> alarmprovider.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


32 Chapter 1 Overview of <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong>Distributed Alarm System Data StorageThere are several forms of data storage used in theDistributed Alarm system:• Internal alarm memory (buffer)Most information about current <strong>and</strong> recent alarms is heldin memory on various computer nodes. <strong>InTouch</strong> uses twomemory locations: one for summary alarms (current) <strong>and</strong>one for historical alarms <strong>and</strong> events. This model is alsoused in the Distributed Alarm system.The memory for summary alarms grows as needed toaccommodate all current alarms up to the limit ofavailable memory. The memory for historical alarms cangrow only to a pre-determined limit. After the historicalmemory reaches this limit, the oldest alarm records arediscarded as new ones are added. In a multi-nodeenvironment, the alarm memory on the various nodesconstitute a single collective of alarm memory.For information about setting the limit, see Configuringthe Alarm Buffer Size on page 47.• Alarm databaseThe Alarm DB Logger creates a database, keeping trackof when an alarm occurs, makes a sub-state transition, isacknowledged, <strong>and</strong> when it returns to normal.Essentially, these records constitute a history of alarmsin the system.Because it is based on the use of queries, the DistributedAlarm system supports using one computer node to logalarms for several other nodes.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


33Chapter 2Configuring <strong>Alarms</strong>To configure alarms, you simply configure tags with alarmconditions.If required, you can also:• Define alarm hierarchies.• Disable <strong>and</strong> inhibit alarms.• Configure alarm comments.• Configure miscellaneous alarm <strong>and</strong> event properties.Defining Alarm HierarchiesEach <strong>InTouch</strong> alarm belongs to an alarm group. Organizingrelated alarms into groups makes it easier for an operator tofilter, show, <strong>and</strong> acknowledge alarms. For more information,see Alarm Groups on page 20.The Distributed Alarm system uses alarm groups as thebasis for its alarm group lists. For more information aboutcreating Distributed Alarm system group lists, see Creatingan Alarm Group List File on page 50.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


34 Chapter 2 Configuring <strong>Alarms</strong>Creating an Alarm GroupBefore you start creating alarm groups, have a plan for howyour alarm groups should be organized <strong>and</strong> what you wantthe alarm group names to be. Using a consistent groupnaming convention enforces a logical ordering of groupswithin the hierarchy.In the following figure, notice the similarity of namesassigned to groups at the same level within the hierarchy.$SystemTnkFrm1 TnkFrm2 TnkFrm3F1Tk1LvlF2Tk1LvlF2Tk2LvlF3Tk1LvlF3Tk2LvlAlso, notice that subordinate group names reference theirparent groups by including a portion of the parent name. Forexample, the third-level alarm group name F1Tk1Lvlreferences its alarm group parent TnkFrm1 by including theF1 prefix in its group name. Develop a naming conventionthat suggests the parent-child relationship between alarmgroups at different levels within the hierarchy.Note While alarm groups do not count as tags for <strong>InTouch</strong>licensing, they do count as tags in the database. Therefore, thetotal number of alarm groups plus actual tags cannot exceed themaximum limit set by your <strong>InTouch</strong> license.An alarm group name must meet the following requirements:• A name must be 32 characters or fewer.• A name must begin with an alphanumeric character (A-Z,a-z, or 0-9).• A name can contain the following keyboard characters (@,#, $, %, &, -, _, ?, !, \) beginning at the second characterposition within the name.• If a name contains a hyphen (-), the name must beginwith an alphabetic character.• A name cannot contain a blank space.• A name must have at least one alphabetic character.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Defining Alarm Hierarchies 35To create an alarm group1 On the Special menu, click Alarm Groups. The AlarmGroups dialog box appears.2 Click Add. The Add Alarm Group dialog box appears.3 In the Group Name box, type a name for the new alarmgroup.4 To reassign the alarm group to another parent group:a Click Parent Group to show the Alarm Groups dialogbox. If this is the first alarm group defined for the<strong>InTouch</strong> application, the group is automaticallyassigned to the parent $System group.bSelect a new parent group from the list <strong>and</strong> clickClose.5 In the Comment box, type an optional comment up to 49characters for the new alarm group <strong>and</strong> click OK.The Alarm Groups dialog box appears <strong>and</strong> shows the newalarm group added to the list.6 Click Close.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


36 Chapter 2 Configuring <strong>Alarms</strong>Modifying an Alarm GroupYou can modify an alarm group to:• Rename it.• Change the associated comment.• Reassign it to another group.To modify an alarm group1 On the Special menu, click Alarm Groups. The AlarmGroups dialog box appears.2 Select the alarm group to modify <strong>and</strong> click Modify. TheModify Alarm Group dialog box appears.3 Make any changes to the alarm group’s name orcomment.4 To reassign the alarm group to another parent group:abClick Parent Group to show the Alarm Groups dialogbox.Select a new parent group from the list <strong>and</strong> clickClose.5 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Tags with Alarm Conditions 37Deleting an Alarm GroupYou can delete an alarm group <strong>and</strong> remove the group fromthe hierarchy. <strong>Alarms</strong> <strong>and</strong> tags that belong to deleted alarmgroups are automatically reassigned to the immediate parentgroup above the deleted group in the hierarchy. Also, childgroups of the deleted group are reassigned to the immediateparent group above the deleted group.To delete an alarm group1 On the Special menu, click Alarm Groups. The AlarmGroups dialog box appears.2 Select the alarm group <strong>and</strong> click Delete. When a messageappears, click Yes.3 Click Close.Configuring Tags with Alarm ConditionsYou can configure any tag for an alarm by specifying the typeof alarm <strong>and</strong> one or more alarm thresholds. Whenever thevalue of a tag reaches a defined threshold, an alarm occurs.Any transitions of a tag’s value in <strong>and</strong> out of an alarm stateare reported to the Distributed Alarm system.Configuring Discrete <strong>Alarms</strong>A discrete alarm corresponds to a discrete tag. You canconfigure whether the alarmed state corresponds to thediscrete tag’s true (On, Yes, 1) state or false (Off, No, 0) state.To define alarm conditions for a discrete tag1 Open the Tagname Dictionary.2 Select an existing discrete tag or create a new discretetag.3 Click either <strong>Alarms</strong> or Details & <strong>Alarms</strong> at the top of theTagname Dictionary dialog box to show the discrete alarmdetails dialog box.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


38 Chapter 2 Configuring <strong>Alarms</strong>4 In the ACK Model area, select the alarm acknowledgementmodel for the tag.• Click Condition for acknowledgment to count againstall transitions into the alarmed state or a sub-stateup to the time of the acknowledgement. This is thedefault acknowledgement model.• Click Event Oriented for an acknowledgment to onlybe for a particular transition to the alarmed state or asub-state; an acknowledgment is accepted only if itrefers to the most recent transaction.• Click Exp<strong>and</strong>ed Summary for an acknowledgment toonly be for a particular transition, whether to analarmed state, to a sub-state, or a return to normal.Each transition from the normal state marks thebeginning of a new “return to normal” (RTN) group.All transitions in an RTN group must beacknowledged individually before the overall RTNgroup is considered acknowledged.5 In the Alarm Comment box, type an alarm comment up to131 characters.6 In the Alarm State area, select the active alarm state to bethe discrete tag’s On or Off value.7 In the Priority box, assign an alarm priority numberbetween 1 to 999. The default priority number is 1, whichis the highest alarm priority.8 Optionally assign an alarm inhibitor tag for the discretealarm.aIn the Alarm Inhibitor box, click the button to show theSelect Tag dialog box containing a list of defined tags.b Select a tag from the list <strong>and</strong> click OK. The name ofthe tag you selected as the inhibitor tag appears inthe Alarm Inhibitor box.For more information on inhibiting alarms, see Inhibiting<strong>Alarms</strong> on page 44.9 Click Save.10 Click Close to close the Tagname Dictionary dialog box.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Tags with Alarm Conditions 39Configuring Value <strong>Alarms</strong>A value alarm is associated with integer or real tags. You canset alarms when the tag value transitions from a set ofpredetermined thresholds that range from LoLo to HiHi. Youcan configure whether the alarmed state corresponds to anyvalue of the tag <strong>and</strong> the associated priority of that alarm.To configure a value alarm1 Open the Tagname Dictionary.2 Select an existing real or integer tag or create a new tag.3 Click either <strong>Alarms</strong> or Details & <strong>Alarms</strong> at the top of theTagname Dictionary dialog box to show the alarm detailsdialog box.4 In the ACK Model area, select the alarm acknowledgementmodel for the tag.• Click Condition for acknowledgment to count againstall transitions into the alarmed state or a sub-stateup to the time of the acknowledgement. This is thedefault acknowledgement model.• Click Event Oriented for an acknowledgment to onlybe for a particular transition to the alarmed state or asub-state. An acknowledgment is accepted only if itrefers to the most recent transaction.• Click Exp<strong>and</strong>ed Summary for acknowledgment to onlybe for a particular transition, whether to an alarmedstate, to a sub-state, or a return to normal. Eachtransition from the normal state marks the beginningof a new “return to normal” (RTN) group. Alltransitions in an RTN group must be acknowledgedindividually before the overall RTN group isconsidered acknowledged.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


40 Chapter 2 Configuring <strong>Alarms</strong>5 In the Alarm Comment box, type a default comment up to131 characters. The comment is assigned to the tag’s.AlarmComment dotfield.6 Select the alarm types (LoLo, Low, High, HiHi) to detectwhen the value of the tag is beyond an absolute limit.7 In the Alarm Value boxes, type the limit values for thealarm types.For example, in the case of LoLo <strong>and</strong> Low alarms, analarm condition exists whenever the value of the tag isless than the Alarm Value. In the case of High <strong>and</strong> HiHialarms, an alarm occurs whenever the value of the tagexceeds the Alarm Value. You can use real numbers for thelimits.8 In the Value Deadb<strong>and</strong> box, type the number ofengineering units the tag value must drop below or abovethe alarm value before it transitions out of an alarmstate.For example, to return-to-normal from an alarmcondition, a tag value must not only return inside itsalarm limit, but also return through your specified ValueDeadb<strong>and</strong>. The Value Deadb<strong>and</strong> prevents nuisancealarms caused by repetitive re-annunciation of an alarmwhere the tag value hovers around the limit, continuallyfluctuating in <strong>and</strong> out of an alarm state.9 Optionally assign an alarm inhibitor tag for the tag’salarm types (LoLo, Low, High, HiHi).aIn the Alarm Inhibitor area, click the button to showthe Select Tag dialog box containing a list of definedtags.b Select a tag from the list <strong>and</strong> click OK. The name ofthe tag you selected as the inhibitor tag appears inthe Alarm Inhibitor box.For more information on inhibitor tags, see Inhibiting<strong>Alarms</strong> on page 44.10 Click Save.11 Click Close to exit the Tagname Dictionary dialog box.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Tags with Alarm Conditions 41Configuring Deviation <strong>Alarms</strong>A deviation alarm is associated with integer or real tags. Youcan set an alarm by comparing the current tag value to atarget value, <strong>and</strong> then the absolute value of the difference iscompared to one or more limits, expressed as a percentage ofthe range of the tag value.For example, the following values set the conditions for atag’s minor <strong>and</strong> major deviation alarms:Minimum Value = -1000Maximum Value = 1000Minor Deviation % = 10Major Deviation % = 15Target Value = 500Using these values as an example, the minor <strong>and</strong> majordeviation alarms points are calculated by the following steps:1 Calculate the total value range of the tag.1000 - (-1000) = 20002 Multiply the total value range of the tag by minor <strong>and</strong>major deviation percentages.2000 x 0.10 = 200 = minor deviation limit2000 x 0.15 = 300 = major deviation limit3 Add <strong>and</strong> subtract the minor <strong>and</strong> major deviation limitsfrom the target value.500 - 200 = 300 = minor deviation lower limit500 + 200 = 700 = minor deviation upper limit500 - 300 = 200 = Major deviation lower limit500 + 300 = 800 = Major deviation upper limit<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


42 Chapter 2 Configuring <strong>Alarms</strong>To configure a deviation alarm1 Open the Tagname Dictionary.2 Select an existing real or integer tag or create a new tag.3 Click either <strong>Alarms</strong> or Details & <strong>Alarms</strong> at the top of theTagname Dictionary dialog box to show the alarm detailsdialog box.4 Select the deviation (Minor <strong>and</strong> Major Deviation) alarmtypes you want to use to detect when the value of ananalog type tag is in a major or minor deviation from thespecified target value.5 In the %Deviation box, type the percentage that theanalog tag can deviate from the target value to trigger aminor or major deviation alarm condition. It is expressedas a percentage of the range of the tag. For an I/O tag, theMin EU <strong>and</strong> Max EU values entered in the tag's detailsdialog box define the range. For memory tags, the rangeis defined by the minimum value <strong>and</strong> maximum value.6 In the Target box, type the tag reference value that minor<strong>and</strong> major deviation percentages are based.7 In the Deviation Deadb<strong>and</strong> % box, type the deviationpercentage the tag value must drop below the limit beforethe tag is taken out of its alarm condition.8 Click Save.9 Click Close to close the Tagname Dictionary dialog box.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Tags with Alarm Conditions 43Configuring Rate of Change <strong>Alarms</strong>A rate of change alarm detects when the value of an alarmchanges beyond an specified range over a specified interval.The tag is tested for a rate-of-change alarm whenever itsvalue changes. The change rate is calculated using theprevious value, the time of the last update, the current value,<strong>and</strong> the current time.The calculated value is compared to the rate-of-changepercentage allowance specified for the tag. If therate-of-change is greater than the percentage allowance, thealarm condition is set for the tag. A rate-of-change alarmremains in effect until the rate at which the tag is changingdrops below the alarm limit.To configure a rate of change alarm1 Open the Tagname Dictionary.2 Select an existing real or integer tag or create a new tag.3 Click either <strong>Alarms</strong> or Details & <strong>Alarms</strong> at the top of theTagname Dictionary dialog box to show the alarm detailsdialog box. The following figure shows only those optionsthat apply to rate-of-change alarms.4 Select the Rate of Change box.5 In the % per box, enter the maximum allowablepercentage change limit.6 Select Sec, Min, or Hr as the time interval unit.7 In the Priority box, type a number between 1 <strong>and</strong> 999 toset the alarm priority.8 Optionally assign an alarm inhibitor tag for the rate ofchange alarm.aIn the Alarm Inhibitor area, click the button to showthe Select Tag dialog box containing a list of definedtags.b Select a tag from the list <strong>and</strong> click OK. The name ofthe tag you selected as the inhibitor tag appears inthe Alarm Inhibitor box.For more information on inhibiting alarms, see Inhibiting<strong>Alarms</strong> on page 44.9 Click Save.10 Click Close to close the Tagname Dictionary dialog box.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


44 Chapter 2 Configuring <strong>Alarms</strong>Disabling <strong>Alarms</strong>You can disable or enable all alarms of a tag at once usingthe .AlarmEnabled or AlarmDisabled dotfields. For an alarmthat has sub-states, each sub-state can be individuallydisabled. For example, an analog value alarm can have Hienabled <strong>and</strong> HiHi disabled.During run time, the Alarm Provider does not generatealarms for an alarm or sub-state that is disabled. Changes towhether an alarm is disabled or enabled can be made at runtime.Whenever an alarm transitions from disabled to enabled, thechecking logic determines whether the item should be put inthe alarmed state by the Alarm Provider.If an alarm becomes disabled or actively inhibited while theitem is in an alarmed state, the item will be forced to adifferent (valid) state. What that state should be dependsupon which states are available <strong>and</strong> whether they have alsobeen disabled. This activity is h<strong>and</strong>led by the Alarm Provideraccording to the type of alarm <strong>and</strong> limit values.Inhibiting <strong>Alarms</strong>You can optionally assign to each alarm or alarm sub-statean inhibitor alarm tag that prevents the alarm fromtransitioning into an active state.• When the inhibitor tag value becomes <strong>and</strong> remainsTRUE (non-zero or non-NULL), the alarm is inhibited.• Likewise, when the inhibitor alarm tag becomes <strong>and</strong>remains FALSE (zero or NULL), the alarm is notinhibited.You can only change the inhibitor tag in WindowMaker. Youcan change the value of an inhibitor tag at run time.You can assign inhibitor tags to individual alarm sub-states.Each sub-state can be inhibited by a different tag, <strong>and</strong> youcan leave some sub-states with no inhibitor tag assigned.An alarm that is inhibited (<strong>and</strong> for which the tag is TRUE) isnot waiting for an acknowledgment. If the alarm hassub-states, it can only be waiting for an acknowledgment onsub-states that are still available.An alarm or sub-state can be independently disabled,inhibited, or both. Only if the alarm is both enabled <strong>and</strong> notactively inhibited is the alarm capable of becoming active.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Tags with Alarm Conditions 45If an alarm or sub-state has no inhibitor tag assigned to it,the effect is the same as if it had an inhibitor tag that isalways FALSE.Whenever the transition causes an alarm to change frombeing actively inhibited, the checking logic determineswhether <strong>InTouch</strong> should put the item in the alarmed state.If an alarm becomes actively inhibited while the item is in analarmed state, the item must be forced to a different (valid)state. What that state should be depends upon which statesare available <strong>and</strong> whether they have also been disabled oractively inhibited. This activity is h<strong>and</strong>led by <strong>InTouch</strong>according to the type of alarm, limit values, <strong>and</strong> so on.If an alarm (or an alarm sub-state) becomes activelyinhibited while waiting for an acknowledgment, the itemmust be forced to a different (valid) state. As with whetherthe item is alarmed, <strong>InTouch</strong> must determine what this stateshould be.Alarm inhibitor tags are included in use counts <strong>and</strong> licenselimitations.Use the following read-only tag dotfields to get the name ofthe alarm inhibitor tag:• AlarmDscInhibitor• AlarmLoLoInhibitor• AlarmLoInhibitor• AlarmHiHiInhibitor• AlarmHiInhibitor• AlarmMajDevInhibitor• AlarmMinDevInhibitor• AlarmRocInhibitorThese fields return the name of a tag. Therefore, you can usethe name in an indirect tag reference in an <strong>InTouch</strong>QuickScript to find out the current value of the alarminhibitor tag, or to change the value of the alarm inhibitortag. By doing this, you can force groups of alarms to beenabled or actively inhibited during run time.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


46 Chapter 2 Configuring <strong>Alarms</strong>Setting Event Properties for Individual TagsWhen you define a tag to do event monitoring, an eventmessage is logged to the alarm system each time the tag'svalue changes. The event message logs how the valuechanged. For example, whether the operator, I/O,QuickScripts, or the system initiated the change.1 Open the Tagname Dictionary.2 Select an existing tag or create a new tag associated withdata that will be recorded as an event.3 Select Log <strong>Events</strong>. The Priority box becomes available. Thevalue you enter for the Priority determines the eventpriority level for the tag.4 In the Priority box, assign a number from 1 to 999 as theevent priority. 1 is the highest event priority <strong>and</strong> 999 thelowest.5 Click Save.6 Click Close to close the Tagname Dictionary dialog box.Configuring Global Settings for <strong>Alarms</strong> <strong>and</strong><strong>Events</strong>You can configure the following global settings that apply toall alarms <strong>and</strong> events generated by an application:• Internal alarm memory (buffer) size.• Whether an alarm’s return to normal impliesacknowledgement. For more information, see UsingAutomatic Acknowledgement When the Tag ValueReturns to Normal on page 124.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Global Settings for <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> 47• Event logging.• Whether alarm enabling is retentive whenWindowViewer is restarted.• Whether to use alarm acknowledgement comments as thegeneral alarm comment. For more information, see UsingAlarm <strong>and</strong> Acknowledgement Comments on page 126.Configuring the Alarm Buffer SizeCommunication in the Distributed Alarm system consistslargely of alarm queries <strong>and</strong> alarm records sent betweennodes. Within a node, alarm queries <strong>and</strong> records are held inthe <strong>InTouch</strong> internal alarm memory, also called the alarmbuffer, to minimize network traffic. The alarm buffer size ismaximum number of alarms the node can store for summaryor historical alarm queries. The alarm buffer deletes theoldest records to make room for new records.Only alarm events stored in memory can be shown in anapplication window. If your <strong>InTouch</strong> application does notshow any alarm status, you can set the buffer size to 1 toconserve node memory.Assigning a large value to the alarm buffer can potentiallyaffect node performance. For a Distributed Alarm system, werecommend the default value of 500.To configure the alarm buffer size1 Open the <strong>InTouch</strong> application in WindowMaker.2 On the Special menu, point to Configure, <strong>and</strong> then click<strong>Alarms</strong>. The Alarm Properties dialog box appears.3 In the Alarm Buffer Size box, type the maximum numberof alarm entries that can be stored in the memory alarmbuffer for summary or historical queries.4 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


48 Chapter 2 Configuring <strong>Alarms</strong>Enabling <strong>Events</strong>You can enable events to be logged within the application. Anevent represents a recognized change in application dataresulting from an operator action, QuickScript, or I/O.A tag’s Log <strong>Events</strong> property must be set from the TagnameDictionary before the tag’s associated events are stored in theinternal alarm memory or logged to the alarm database. Formore information about specifying event logging for a tag, seeSetting Event Properties for Individual Tags on page 46.To enable events1 Open the <strong>InTouch</strong> application in WindowMaker.2 On the Special menu, point to Configure, <strong>and</strong> then click<strong>Alarms</strong>. The Alarm Properties dialog box appears.3 Select the <strong>Events</strong> Enabled check box to log all events thatoccur while an <strong>InTouch</strong> application is running.4 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Global Settings for <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> 49Making Alarm Enabling RetentiveYou can select to retain the current value assigned to a tag’s.AlarmEnabled dotfield when the <strong>InTouch</strong> application isstopped <strong>and</strong> then restarted.The value assigned to the .AlarmEnabled dotfield togglesalarm <strong>and</strong> event logging on or off. The .AlarmEnableddotfield can be assigned to tags or alarm groups. When the.AlarmEnabled dotfield is assigned to an alarm group, itdetermines whether all alarms associated with the tagswithin the specified alarm group are logged or not.To make alarm enabling retentive1 Open the <strong>InTouch</strong> application in WindowMaker.2 On the Special menu, point to Configure, <strong>and</strong> then click<strong>Alarms</strong>. The Alarm Properties dialog box appears.3 Select the Alarm Enable Retentive check box to retain thecurrent state of the .AlarmEnabled dotfield as the initialvalue when the <strong>InTouch</strong> application re-started.4 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


50 Chapter 2 Configuring <strong>Alarms</strong>Creating an Alarm Group List FileYou use the Distributed Name Manager to create an alarmgroup list. Then, you add existing alarm groups from thelocal <strong>and</strong> remote nodes to the list.The following table shows the syntax to specify alarm groupsfrom the Distributed Name Manager.NodeLocalRemoteAlarm Group Syntax\<strong>InTouch</strong>!Group_Nameor.Group_Name\\Node_Name\<strong>InTouch</strong>!Group_NameorNode_Name.Group_NameFor these examples, Node_Name is the name of the <strong>InTouch</strong>remote node. Group_Name is the name of the alarm group. Ifthe alarm group is defined on the local node where the alarmgroup list is being defined, you can simply enter the alarmgroup name with a preceding period. For example,.Group_Name.To create an alarm group list1 On the Special menu, point to Configure, <strong>and</strong> then clickDistributed Name Manager. The Distributed Name Managerdialog box appears.2 In the Group Properties area, type the name of the alarmquery in the Name box.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Creating an Alarm Group List File 513 In the Members box, type the list of <strong>InTouch</strong> nodes <strong>and</strong>alarm groups to be included in the query.You can enter the node names <strong>and</strong> alarm group namesusing St<strong>and</strong>ard Group Entry syntax or as short cutentries using periods. Short cut entries are converted toSt<strong>and</strong>ard Group Entries when you save the alarm grouplist.Note The Node.Group <strong>and</strong> .Group syntax can be used only in thisconfiguration dialog box. It is not valid in the alarm displayconfiguration or any alarm QuickScript function.4 Click Add to add the list to your alarm group file.The syntax of the members is automatically converted.5 Click OK.6 Add the name of the alarm group list to a query in anAlarm Viewer control. The Alarm Viewer control nowshows alarms for all groups specified in the list.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


52 Chapter 2 Configuring <strong>Alarms</strong><strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


53Chapter 3Alarm QueriesAn alarm query retrieves either:• <strong>Alarms</strong> <strong>and</strong> events (historical alarms) from the <strong>InTouch</strong>internal alarm memory or the alarm database.• Current alarms (summary alarms) from the <strong>InTouch</strong>internal alarm memory.When you configure an <strong>InTouch</strong> alarm ActiveX control, youspecify the query source. You can also select query options tofilter the query results.The following figure shows the Query tab for the AlarmViewer ActiveX control.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


54 Chapter 3 Alarm QueriesIn this example, you create an alarm display that showsalarm data selected by the following criteria:• Alarm priority (1-999)• Alarm state (All, Acknowledged, or Unacknowledged)• Query type (Summary or Historical)• Alarm group (Local or remote data sources)You can save your queries to an .xml file, called a “queryfavorites” file. During run time, you can update the alarmdisplay with new alarm data by running another query usingselection criteria saved to the file.Other <strong>InTouch</strong> alarm ActiveX controls provide moreextensive query criteria. The following figure shows theQuery Filter tab of the Alarm DB Viewer control.You build your queries by selecting alarm or event attributesfrom the list shown in the left pane of the dialog box. Then,you assign a value to the selected attributes. Finally, you cancombine attributes using Boolean operators to set your queryfilter conditions.You can write QuickScripts that include query functions ordotfields to select alarm <strong>and</strong> event records from alarmmemory. The following Alarm Viewer control statement usesthe ApplyQuery() method to query the alarm memory.#AlarmViewerCtrl1.ApplyQuery("\<strong>InTouch</strong>!$System",500,600,"All", "Historical");This statement retrieves all historical alarms specified by the“\<strong>InTouch</strong>!$System” query with a priority between 500 <strong>and</strong>600. The selected alarm records appear in the Alarm Viewercontrol display.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Example Alarm Queries 55Example Alarm QueriesAlarm queries follow this syntax for the local node:\Provider!AlarmGroupFor example:\<strong>InTouch</strong>!$SystemUse the following query syntax for remote nodes:\\NodeName\Provider!AlarmGroupFor example:\\ProdSvr\<strong>InTouch</strong>!$SystemUse the following syntax for querying alarms from a Galaxy.This syntax gets alarms from a specific attribute of an objectin a specific area on a specific computer.\\NodeName\Galaxy!Area.Object.AttributeThe following syntax gets all alarms from a specific area:\\Galaxy!AreaThe following syntax gets alarms from two areas:\\Galaxy!Area1\\Galaxy!Area2The following syntax gets all alarms from the Platform oncomputer node (by default):\\NodeName\GalaxyYou can also use a wildcard. The following syntax gets allalarms from Area1, Area2, Area3, <strong>and</strong> so on:\\Galaxy!Area*The following syntax gets all alarms from all objects startingwith the characters “Tank” in the area “Area”:\\Galaxy!Area.Tank*<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


56 Chapter 3 Alarm QueriesGetting More <strong>InTouch</strong> Query InformationThe following table lists the references for more informationabout queries for each <strong>InTouch</strong> query source.Query SourceAlarm DB LoggerManagerAlarm Printer UtilityAlarm Viewer ControlAlarm Tree ViewerControlAlarm Pareto ControlDistributed AlarmDisplay ObjectHot Backup ManagerSeeConfiguring Which <strong>Alarms</strong> to Logon page 276Configuring Which <strong>Alarms</strong> toPrint on page 238Configuring Which <strong>Alarms</strong> toShow on page 68Configuring Which Providers <strong>and</strong>Groups to Show on page 217Configuring Which <strong>Alarms</strong> toAnalyze on page 362Configuring Which <strong>Alarms</strong> toShow on page 423Creating an Alarm RecordMapping File on page 402<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


57Chapter 4Viewing Current <strong>Alarms</strong>Use the <strong>InTouch</strong> Alarm Viewer ActiveX control to viewalarms. The Alarm Viewer control has scroll bars, sizablecolumns, multiple alarm selections, an update status bar,dynamic display types, <strong>and</strong> show colors based on the type ofalarm.We recommend that you use the Alarm Viewer control toview <strong>InTouch</strong> alarms. However, you can continue to use theDistributed Alarm object to view alarms from applicationscreated with versions of <strong>InTouch</strong> earlier than 7.1.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


58 Chapter 4 Viewing Current <strong>Alarms</strong>Configuring an Alarm Viewer ControlYou can set Alarm Viewer control options fromWindowMaker <strong>and</strong> options that users can modify while theAlarm Viewer control is running. You set these option in theAlarmViewerCtrl Properties dialog box.Configuring the Appearance of the GridWhen you configure the visual appearance of the AlarmViewer control, you can:• <strong>Inc</strong>lude a status bar.• <strong>Inc</strong>lude a column header.• <strong>Inc</strong>lude horizontal <strong>and</strong> vertical grid lines that show therows <strong>and</strong> columns.• <strong>Inc</strong>lude a run-time option that allows the user to adjustthe width of columns.• Set the colors of visual elements.The following figure shows how the Alarm Viewer controlappears when all visual properties are active.HeadingColumn Resize ControlGrid LinesStatus Bar<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Viewer Control 59To configure the visual appearance1 Right-click the Alarm Viewer control, <strong>and</strong> then clickProperties. The AlarmViewerCtrl Properties dialog boxappears.2 Click the General tab.3 Set the visual appearance. Configure any of the following.OptionPerform Query onStartupShow ContextSensitive MenuUse Default AckCommentDescriptionAutomatically begins updatingthe control using default queryproperties. If a query is not runwhen the application starts, youneed to run a script using theRequery() function to update thegrid. The Requery option is alsoavailable on the grid’s shortcutmenu during run time.Enables a right-click shortcutmenu during run time.Controls whether a defaultcomment appears when anoperator acknowledges an alarm.If this box is checked <strong>and</strong> a stringis entered, the string is usedduring run time as the defaultcomment.If this box is not selected, whenthe operator acknowledges analarm, a dialog box appears toenter an optional comment. Thedialog box can be filled in or leftblank.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


60 Chapter 4 Viewing Current <strong>Alarms</strong>OptionRetain SuppressionShow Status BarRow SelectionSilent ModeShow MessageShow HeadingUse ExtendedSelectionFlash Unack <strong>Alarms</strong>DescriptionRetain alarm suppressionbetween alarm queries when thealarm query is changedToggles whether the status barappears at the bottom of theAlarm Viewer control.Allow users to select individualrows during run time. Each rowrepresents an alarm record.Users can select multiple alarms.If Silent Mode is selected, theAlarm Viewer control does notshow error messages during runtime. If it is not selected, thealarm display shows pop up errormessages. In either case, errormessages are always sent to theArchestrA Log Viewer.Shows the message typed in thetext box. This is the messageshown when there are no alarms.Toggles whether the heading barappears at the top of the AlarmViewer control.Allows the user to select multiplealarms simultaneously byholding down CTRL or SHIFTkeys in conjunction with themouse button. Available only ifRow Selection check box isselected.Enables unacknowledged alarmsto flash once per second untilthey are acknowledged.Freezing the alarm display inWindowViewer does not stopunacknowledged alarms fromflashing.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Viewer Control 61OptionResize ColumnsShow Grid4 Click Apply.5 Click the Color tab.DescriptionIf Resize Columns is selected, theuser can resize the width of thecolumns during run time.Otherwise, column width is static<strong>and</strong> can be set only fromWindowMaker.If Show Grid is selected, theAlarm Viewer control showshorizontal <strong>and</strong> vertical lines thatseparate the rows <strong>and</strong> columns ofthe alarm display. If it is notselected, no grid is visible.6 Click the palette button to assign colors to the visualelements of the Alarm Viewer control.7 Click Apply to save your color selections.8 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


62 Chapter 4 Viewing Current <strong>Alarms</strong>Configuring the Display FontYou can configure how the text appears for the Alarm Viewercontrol.To configure the font properties1 Right-click the Alarm Viewer control, <strong>and</strong> then clickProperties. The AlarmViewerCtrl Properties dialog boxappears.2 Click the General tab.3 Click Font. The st<strong>and</strong>ard Windows Font dialog boxappears. Configure the font <strong>and</strong> then click OK.4 Click OK.Selecting <strong>and</strong> Configuring Display ColumnsFor the Alarm Viewer control, you can:• Select <strong>and</strong> order the columns.• Set the width of a column in pixels.• Rename a column.To configure the display column details1 Right-click the Alarm Viewer control <strong>and</strong> then clickProperties. The AlarmViewerCtrl Properties dialog boxappears.2 Click the General tab.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Viewer Control 633 Click Column Details. The Column Details dialog boxappears.4 In the Name column, select the check boxes next to thenames of the columns that you want to appear. You mustselect at least one column from the list.ColumnTimeStateClassTypePriorityNameGroupProviderValueLimitOperatorOperator FullNameShowsThe time as specified in the TimeFormat tab.The state of the alarm.The alarm category.The alarm type.The alarm priority.The tagname.The alarm group name.The name of the alarm provider.The value of the tag when the alarmoccurred. The width of the columnshould be large enough to provide thedesired level of precision.The alarm limit value of the tag. Thewidth of the column should be largeenough to provide the desired level ofprecision.The logged-on operator’s IDassociated with the alarm condition.The logged-on operator’s full name.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


64 Chapter 4 Viewing Current <strong>Alarms</strong>ColumnOperator NodeOperatorDomainTag CommentAlarmCommentUser1User2ShowsThe logged on operator’s nodeassociated with the alarm condition.In a Terminal Services environment,this is the name of the clientcomputer that the operatorestablished the Terminal Servicessession from. If the node name can'tbe retrieved, the node's IP address isused instead.The logged on operator’s domainassociated with the alarm condition.The comment for the tag.The comment associated with thetag's alarm. This comment was typedin the Alarm Comment box when thetag’s alarm was defined. When anacknowledgement comment isintroduced for alarms, the newcomment is updated in this commentcolumn.The numerical value of theAlarmUserDefNum1 property of thealarm.The numerical value of theAlarmUserDefNum2 property of thealarm.User3The string value of theAlarmUserDefStr property of thealarm.5 Rearrange columns by selecting the column name <strong>and</strong>using the up <strong>and</strong> down arrows. The column nameappearing at the top of the Column Details dialog box isthe left-most column of the alarm control.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Viewer Control 656 To change the name of a column or its width, select thecolumn <strong>and</strong> click Edit. The Edit dialog box appears.aabIn the New Name box, type the new column name.In the New Width box, type the column width. Thecolumn width can range from 1 to 999 pixels.Click OK.7 Click OK in the Column Details dialog box.8 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


66 Chapter 4 Viewing Current <strong>Alarms</strong>Controlling Which Features Users Can Access atRun TimeIf you right-click on the Alarm Viewer control during runtime, a context-sensitive (shortcut) menu appears.You can control which menu comm<strong>and</strong>s are shown in theshortcut menu.To configure the shortcut menu1 Right-click the Alarm Viewer control, <strong>and</strong> then clickProperties. The AlarmViewerCtrl Properties dialog boxappears.2 Click the General tab.3 Select the Show Context Sensitive Menu check box.4 Click Configure Context Menus. The Context SensitiveMenus dialog box appears.This dialog box shows a hierarchical list of comm<strong>and</strong>sthat can appear in an Alarm Viewer control shortcutmenu.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Viewer Control 675 Configure the shortcut menu options. You must select atleast one shortcut menu comm<strong>and</strong>.This comm<strong>and</strong>Ack SelectedAck OthersAck AllAck VisibleAck SelectedGroupsAck SelectedTagsAck SelectedPrioritiesSuppressSelectedSuppress OthersSuppress AllSuppress VisibleSuppressSelected GroupsSuppressSelected TagsAllows the run-time user toAcknowledge selected alarms. IfAck Selected <strong>and</strong> Ack Others menuitems are both unchecked, the UseDefault Ack Comment check box <strong>and</strong>the text box are disabled.Acknowledge alarms by othermethods. The user can select whichalarms to acknowledge. If AckOthers is selected, you must selectat least one of the submenu items.Acknowledge all active alarms.Acknowledge visible alarms.Acknowledge all alarms with thesame group name as the selectedgroup(s) <strong>and</strong> with the sameprovider name.Acknowledge all alarms with thesame tagname as the selectedtag(s) <strong>and</strong> with the same provider,group, <strong>and</strong> priority.Acknowledge all alarms with thesame priority as the selectedpriority or priorities <strong>and</strong> with thesame provider <strong>and</strong> group.Suppress selected alarms.Suppress alarms by other methodsshown in the shortcut menu.Suppress all alarms.Suppress visible alarms.Suppress all alarms with the samegroup name as the selectedgroup(s).Suppress all alarms with the sametagname as the selected tag(s).<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


68 Chapter 4 Viewing Current <strong>Alarms</strong>This comm<strong>and</strong>SuppressSelectedPrioritiesUnsuppress AllQuery FavoritesStatsSuppressionFreezeRequerySortAllows the run-time user toSuppress all alarms with the samepriority as the selected priority orpriorities.Unsuppress all suppressed alarms.Open the Alarm Query dialog box.Open the Alarm Statistics dialogbox.Open the Alarm Suppression dialogbox.Toggle the freeze/unfreeze mode ofthe Alarm Viewer control.Re-run the alarm query.Open the Sort dialog box.6 Click OK.7 Click Row Selection to allow users to select a row from theAlarm Viewer control during run time.8 Click Use Extended Selection to allow users to selectmultiple alarm records simultaneously from the AlarmViewer control using the SHIFT or CTRL keys.9 Click Apply.Configuring Which <strong>Alarms</strong> to ShowThe Alarm Viewer control can show summaries of activealarms or listings of historical alarms.To set general alarm query properties1 Right-click the Alarm Viewer control <strong>and</strong> then clickProperties. The AlarmViewerCtrl Properties dialog boxappears.2 Click the General tab.3 Select the Perform Query on Startup check box toautomatically update the Alarm Viewer control usingdefault query properties when the application starts.4 Select the Show Message check box to show a defaultmessage when there are no alarms. In the text box, typethe message to show.5 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Viewer Control 69To configure the query default1 Right-click the Alarm Viewer control <strong>and</strong> then clickProperties. The AlarmViewerCtrl Properties dialog boxappears.2 Click the Query tab.3 In the From Priority box, type the minimum alarmpriority value (1 to 999).4 In the To Priority box, type the maximum alarm priorityvalue (1 to 999).5 Click the Query Type arrow <strong>and</strong> select either Historical orSummary as the default run-time alarm display.The default type of display can be changed during runtime by running a QuickScript containing a queryfunction. For example, if the script includes theApplyQuery() method with its Type parameter set to“Summary,” then the grid shows a summary of currentalarms. Conversely, if the same grid has an ApplyQuery()method run against it with the Type parameter set to"Historical", it shows historical alarms. The QueryTypeproperty reflects the current state of the alarm display.For more information on the ApplyQuery() method, seeApplyQuery() Method on page 100.6 In the Alarm Query box, type a valid alarm query. Forexample, type \<strong>InTouch</strong>!$System to query for all alarmsthat belong to the default $System alarm group.7 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


70 Chapter 4 Viewing Current <strong>Alarms</strong>Creating Custom Saved Queries Using QueryFavoritesYou can configure a list of query favorites for operators toselect from a shortcut menu.To configure the query favorites file1 Right-click the Alarm Viewer control <strong>and</strong> then clickProperties. The AlarmViewerCtrl Properties dialog boxappears.2 Click the Query tab.3 Configure the query favorites file.abIn the Query Favorites File box, type the network path<strong>and</strong> file name or click the ellipse button to browse forthe file.To edit the Filter Favorites file, click the Edit QueryFavorites button. The Alarm Query window opens,allowing you to add, modify, or delete filters fromyour favorites file. When you are done, click OK tosave your changes <strong>and</strong> close the window.4 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Viewer Control 71Configuring Colors for Various Types of AlarmRecordsYou can set color options for different alarm states thatappear in the Alarm Viewer control.To configure the alarm display colors1 Right-click the Alarm Viewer control <strong>and</strong> then clickProperties. The AlarmViewerCtrl Properties dialog boxappears.2 Click the Color tab.3 Click each color box to open the color palette. Click thecolor that you want to use in the palette for each of thefollowing:PropertyWindowTitle Bar TextAlarm ReturnGridDescriptionSets display background color.Sets title bar text color(available only if ShowHeading option is selected).Sets color of returned alarms(alarms that have returned tonormal without beingacknowledged).Sets color of the grid. Bydefault the grid is not shown.The default grid color is lightgray. The color of the grid inthe alarm object isautomatically set to acontrasting color of theselected Window color.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


72 Chapter 4 Viewing Current <strong>Alarms</strong>PropertyTitle Bar BackgroundDescriptionSets title bar background color(available only if the ShowHeading option is selected).Event4 In the Alarm Priority boxes, type alarm priority numbersthat serve as breakpoints for the different colors used toidentify unacknowledged alarms, acknowledged alarms,<strong>and</strong> flashing unacknowledged alarms.5 Click the UnAck Alarm <strong>and</strong> Ack Alarm color boxes to openthe color palette. Click the color in the palette that youwant to use.6 To configure the alarm query to flash unacknowledgedalarms, click the General tab, select the Flash Unack<strong>Alarms</strong> check box, then click the Color tab <strong>and</strong> select theFlash Unack <strong>Alarms</strong> color boxes. Select the color that youwant to use for each alarm priority range.Note The Alarm Viewer control cannot show changes that occurin less than a second. If an alarm changes state twice within asecond, the Alarm Viewer control does not recognize the change.7 Click Apply.Sets color of events.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Viewer Control 73Configuring the Shown Time Format of AlarmRecordsYou can configure the time format for shown alarm records.For the Alarm Viewer control, the original alarm time is thedate/time stamp of the onset of the alarm. If tag is an I/O tag,then it is the time stamp from the I/O Server if that server iscapable of passing time stamps.To configure the time format1 Right-click the Alarm Viewer control <strong>and</strong> then clickProperties. The AlarmViewerCtrl Properties dialog boxappears.2 Click the Time Format tab.3 In the Time Format list, click the desired time format. TheTime Format box shows a set of strings consisting ofcharacters separated by the % symbol for the format youselected.String characterdbYmyDescriptionTwo-digit day of the month.Three-letter month abbreviation.Four-digit year.Two-digit month.Two-digit year.#x Full day <strong>and</strong> date. For example:Friday, August 10, 2007BHComplete month name.Hours in 24 hour time format.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


74 Chapter 4 Viewing Current <strong>Alarms</strong>String characterMpSsDescriptionMinute.AM or PM (for 12 hour time format).Seconds.Fractions of a second.I4 In the Displayed Time list, select the shown time:OATHours in 12 hour time format.The original alarm time, which isthe date/time stamp of the onsetof the alarm.LCTLCT But OAT onACKThe last changed time, which isthe date/time stamp of the mostrecent change of state for theinstance of the alarm: onset ofthe alarm, change of sub-state,return to normal, oracknowledgment.The last changed time, but theoriginal alarm time onacknowledge. The last changedtime is used while the alarm isunacknowledged, then theoriginal alarm time is used afterthe alarm has beenacknowledged.5 In the Displayed Time Zone list, select the time zone:GMTLocal TimeOrigin TimeGreenwich Mean Time, also known asCoordinated Universal Time, UTC, orZulu.Alarm time adjusted for the local timezone.Alarm time adjusted for the time zoneof the alarm source.6 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Viewer Control 75Configuring the Sort Order of Alarm RecordsYou can sort the alarm records in the list. By default, theAlarm Viewer control lists alarm records by time inascending order.You can sort alarm records in ascending or descending orderbased on a primary column <strong>and</strong> an optional secondary sortcolumn.To configure the sort order of alarm records1 Right-click the Alarm Viewer control, <strong>and</strong> then clickProperties. The AlarmViewerCtrl Properties dialog boxappears.2 Click the Query tab.3 Select sorting options by completing the following:abcdSelect the primary sort column from the Sort Columnlist. Only visible columns appear in the Sort Columnlist. If you do not see the column you want, go to theGeneral tab <strong>and</strong> select the column from ColumnDetails.Select the secondary sort column from the SecondarySort Column list.If you selected Time as the primary sort column, theAuto Scroll to New <strong>Alarms</strong> check box becomesavailable. Select this option if you want toautomatically scroll <strong>and</strong> show new alarms as theyoccur.Select Ascending or Descending as the sort direction.4 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


76 Chapter 4 Viewing Current <strong>Alarms</strong>Using an Alarm Viewer Control at Run TimeThe Alarm Viewer control includes a shortcut menu thatprovides operators quick access to comm<strong>and</strong>s that can beapplied to the display object of one or more selected alarms,alarm groups, tags, <strong>and</strong> priorities.The following lists shows the comm<strong>and</strong>s available from theAlarm Viewer control shortcut menu:• Ack Selected - Acknowledges the selected alarm(s).• Ack Others - A sub-menu appears that lists otheracknowledgement comm<strong>and</strong>s.• Ack All - Acknowledges all the alarms in the currentalarm query. Because the alarm grid has only alimited display area, the Ack All comm<strong>and</strong> mayacknowledge alarms that are not visible in the grid.• Ack Visible - Acknowledges only those alarms that arecurrently visible in the alarm grid.• Ack Selected Groups - Acknowledges all alarms thathave the same group name from the same provider asone or more of the selected alarms.• Ack Selected Tags - Acknowledges all alarms that havethe same tag from the same provider <strong>and</strong> group name<strong>and</strong> having the same priority as one or more of theselected alarms.• Ack Selected Priorities - Acknowledges all alarms thathave the same priority from the same provider <strong>and</strong>group name as one or more of the selected alarms.• Suppress Selected - The selected alarm(s) is/aresuppressed.• Suppress Others - A sub-menu opens that containssuppression comm<strong>and</strong>s.• Suppress All - Suppress showing current <strong>and</strong> futureoccurrences of all alarms.• Suppress Visible - Suppress showing current <strong>and</strong>future occurrences of any visible alarm.• Suppress Selected Groups - Suppress showing current<strong>and</strong> future occurrences of any alarm that belongs tothe same groups of one or more selected alarmshaving the same Provider name.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using an Alarm Viewer Control at Run Time 77• Suppress Selected Tags - Suppress showing current<strong>and</strong> future occurrences of any alarm that belongs tothe same tag name of one or more selected alarmshaving the same Provider name, Group name <strong>and</strong>Priority range.• Suppress Selected Priorities - Suppress showingcurrent <strong>and</strong> future occurrences of any alarm thatbelongs to the same priorities of one or more selectedalarms having the same Provider name <strong>and</strong> Groupname.• Unsuppress All - Clears the suppression settings.• Query Favorites - Shows the Alarm Query dialog box toselect a previously saved alarm query. You can also add,modify <strong>and</strong> delete alarm queries.• Stats - Shows the Alarm Statistics dialog box.• Suppression - Shows the Alarm Suppression dialog box.• Freeze - Freezes the current display.• Requery - Queries the alarm provider again.• Sort - Shows the Secondary Sort dialog box.Underst<strong>and</strong>ing Status Bar InformationIf you select the Show Status Bar option from the Generalproperties page, a status bar appears at the bottom of anAlarm Viewer control during run time.The status bar contains three indicators: A status message,current alarm query, <strong>and</strong> a progress bar. These indicatorsprovide an overview of the current state of the display query<strong>and</strong> provide details about the suppression available in theAlarm Viewer control. The right pane of the status bar is redwhen the control is frozen <strong>and</strong> the left pane of the status baris red when one or more alarms are suppressed. The word"suppression" is shown in the left pane when suppression isin effect.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


78 Chapter 4 Viewing Current <strong>Alarms</strong>Using Query Favorites at Run TimeUse the Query Favorites comm<strong>and</strong> on the Alarm Viewercontrol’s shortcut menu to quickly select an alarm query froma list of previously defined alarm queries. You can also createnew named queries, edit an existing query, or delete anexisting query.Changes to an alarm query are not automatically applied toother Alarm Viewer controls using the same query. Deletingan alarm query does not automatically remove the queryfrom other Alarm Viewer controls using the same query.Note For multi-line alarm queries appearing in the Alarm Viewercontrol, line separations appear as "garbage" characters. Thisdoes not affect the function.To select an alarm query at run time1 Right-click the Alarm Viewer control <strong>and</strong> then clickQuery Favorites. The Alarm Query dialog box appears.2 Select the named query that you want to show in the listof currently defined queries.3 Click OK. The Alarm Viewer control now shows alarminformation retrieved by the query.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using an Alarm Viewer Control at Run Time 79To add a new named query at run time1 Right-click the Alarm Viewer control <strong>and</strong> then clickQuery Favorites. The Alarm Query dialog box appears.2 Click Add. The Add Query dialog box appears.3 Configure the query. Do the following:a In the Name box, type the name that you want to useto identify the query.b In the Query box, type the sets of <strong>InTouch</strong> alarmqueries that you want to perform. You can specify oneor more Alarm Providers <strong>and</strong> groups.c In the From Priority box, type the minimum alarmpriority value (1 to 999).d In the To Priority box, type the maximum alarmpriority value (1 to 999).e Click the Alarm State arrow <strong>and</strong> select the alarm statethat (All, Ack, Unack) you want to use in the alarmquery.f In the Display Type area, select Summary or Historicalfor the type of records you want to query.4 Click OK to close the Add Query dialog box.5 Click OK in the Alarm Query dialog box to add the query toyour favorites.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


80 Chapter 4 Viewing Current <strong>Alarms</strong>To modify an existing named query at run time1 Right-click the Alarm Viewer control <strong>and</strong> then clickQuery Favorites. The Alarm Query dialog box appears.2 Select the named query that you want to modify in thelist of currently defined queries.3 Click Modify. The Modify Query dialog box appears.4 Make the necessary modifications <strong>and</strong> then click OK.5 Click OK in the Alarm Query dialog box.To delete an existing named query at run time1 Right-click the Alarm Viewer control <strong>and</strong> then clickQuery Favorites. The Alarm Query dialog box appears.2 Select the named query that you want to delete in the listof currently defined queries.3 Click Delete. When a message appears, click Yes.4 Click OK in the Alarm Query dialog box.Using Alarm Viewer Control ActiveXPropertiesYou can set the value an Alarm Viewer control propertydirectly using a script or you can assign it to an <strong>InTouch</strong> tagor I/O reference. For more information about settingproperties, see Chapter 8, Scripting ActiveX Controls, in the<strong>InTouch</strong>® <strong>HMI</strong> Scripting <strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.The following table lists the Alarm Viewer control properties.Property Type PurposeAckAllMenu Discrete Enables/disables Ack All menu item.AckAlmColorRange1 Integer Sets color to be used to showacknowledged alarms with prioritiesin the range 1 to ColorPriorityRange1.The default priority range is 1 to 250.AckAlmColorRange2 Integer Sets color to be used to acknowledgedalarms with priorities in the rangeColorPriorityRange1 toColorPriorityRange2. The defaultpriority range is 250 to 500.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Properties 81Property Type PurposeAckAlmColorRange3 Integer Sets color to be used to acknowledgedalarms with priorities in the rangeColorPriorityRange2 toColorPriorityRange3. The defaultpriority range is 500 to 750.AckAlmColorRange4 Integer Sets color to be used to acknowledgedalarms with priorities inColorPriorityRange3 to 999. Thedefault priority range is 750 to 999.AckOthersMenu Discrete Enables/disables Ack Others menuitem.AckSelectedGroupsMenu Discrete Enables/disables Ack Selected Groupsmenu item.AckSelectedMenu Discrete Enables/disables Ack Selected menuitem.AckSelectedPrioritiesMenu Discrete Enables/disables Ack SelectedPriorities menu item.AckSelectedTagsMenu Discrete Enables/disables Ack Selected Tagsmenu item.AckVisibleMenu Discrete Enables/disables Ack Visible menuitem.AlarmQuery Message Sets the initial alarm query. This fieldaccepts text only; it does not accepttags. The following example uses thefull path to the alarm group:\\Node\<strong>InTouch</strong>!GroupThis example uses the full path to thelocal alarm group:\<strong>InTouch</strong>!GroupThis example uses another Group List:GroupListAlarmState Message Default alarm state to query (All,UnAck, Ack).<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


82 Chapter 4 Viewing Current <strong>Alarms</strong>Property Type PurposeAlmRtnColor Integer Sets the color for alarms that havereturned to normal <strong>and</strong> wereunacknowledged. This color is alsoused for alarms that returned tonormal from the acknowledged statebut the acknowledgement statetransition was not observed.AutoScroll Discrete If the user scrolls the list from thebeginning, this automatically jumps tothe new alarm. (New alarms aredefined as those that are not currentlyshown within the display object.)ColorPriorityRange1 Integer Sets the boundary of the priority rangein which alarms are to be shown. Thevalue of this property must be greaterthan one <strong>and</strong> less than the value forColorPriorityRange2.ColorPriorityRange2 Integer Sets the boundary of the priority rangein which alarms are to be shown. Thevalue of this property must be greaterthan the value forColorPriorityRange1 <strong>and</strong> less than thevalue for ColorPriorityRange3ColorPriorityRange3 Integer Sets the boundary of the priority rangein which alarms are to be shown. Thevalue of this property must be greaterthan the value of ColorPriorityRange2<strong>and</strong> less than 999.ColumnResize Discrete Returns or sets a value thatdetermines whether the columns canbe resized at run time.CustomMessage Message The default message to show whenthere are no alarms.DefaultAckComment Message Used as a comment when the alarm isacknowledged <strong>and</strong> when the"UseDefaultAckComment" is TRUE.Otherwise, the user is prompted toenter a comment.DisplayedTime Message Shows the alarm message time. Thevalues can only be "OAT" or "LCT" or"LCT But OAT on ACK."<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Properties 83Property Type PurposeDisplayedTimeZone Message Gets or sets the current time zonestring. The values can only be "GMT"or "Origin Time" or "Local Time."EventColor Integer Sets color of events.ExtendedSelection Discrete Allows you to select multiple alarmsby holding down the Ctrl or Shift keyin conjunction with the mouse button.The default is to toggle selection ofalarms by simply clicking on them(available only if the Row Selectioncheck box is selected).FlashUnAck<strong>Alarms</strong> Discrete Enables or disables the flashing ofunacknowledged alarms. It takes adiscrete input value of 1 or 0. If thisproperty is set to 1, unacknowledgedalarms flash once per second. If thisproperty is set to 0, unacknowledgedalarms do not flash. This propertycorresponds to the Flash Unack <strong>Alarms</strong>check box on the Alarm Viewer controlGeneral tab.FlashUnackAlmColorRange1 Integer Sets the flashing color forunacknowledged alarms belonging toAlarm Priority Range 1.FlashUnackAlmColorRange2 Integer Sets the flashing color forunacknowledged alarms belonging toAlarm Priority Range 2.FlashUnackAlmColorRange3 Integer Sets the flashing color forunacknowledged alarms belonging toAlarm Priority Range 3.FlashUnackAlmColorRange4 Integer Sets the flashing color forunacknowledged alarms belonging toAlarm Priority Range 4.Font None Sets the font for the records <strong>and</strong> theheader in the control.FreezeMenu Discrete Enables/disables the Freeze menuitem.FromPriority Integer Sets the low priority value of thedefault query.GridColor Integer Sets the color of the background grid.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


84 Chapter 4 Viewing Current <strong>Alarms</strong>Property Type PurposeNewAlarmEventMode Integer Controls the triggering of theNewAlarm event.0 = The NewAlarm event can not betriggered. (Default).1 = The NewAlarm event is active.2 = The NewAlarm event is active <strong>and</strong>continually triggers when at least onenew unacknowledged alarm arrives.QueryFavoritesFile Message Returns or sets the query favorites filename.QueryFavoritesMenu Discrete Enables/disables the Query Favoritesmenu item.QueryName String Returns the current query name.QueryStartup Discrete Automatically begins updating thegrid using default query properties, ifset. Otherwise, you must run theApplyDefaultQuery or ApplyQuerymethod in a script to update the grid.QueryType Message Sets the display type as eitherSummary or Historical.RequeryMenu Discrete Enables/disables Requery shortcutmenu item.RetainSuppression Discrete Retains alarm suppression betweenalarm queries when the alarm query ischanged.RowSelection Discrete Allows user to select alarms duringrun time.SecondarySortColumn Message Returns or sets the current secondarysort column.SelectedCount Integer Returns the total number of selectedalarms.ShowContextMenu Discrete Enables the activation of the shortcutmenu.ShowGrid Discrete Returns or sets a value thatdetermines whether the grid lines areshown in the control.ShowHeading Discrete Shows the title bar of the control.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Properties 85Property Type PurposeShowMessage Discrete Returns or sets a value thatdetermines whether error messagesare shown for the control.ShowStatusBar Discrete Gets or sets a value that determineswhether the status bar is shown.SilentMode Discrete Gets or sets a value that determineswhether the control is in silent mode.SortColumn Message Gets or sets the current sort column.SortMenu Discrete Enables/disables the Sort menu item.SortOrder Discrete Gets or sets the sort direction. Possiblevalues are "Ascending" <strong>and</strong>"Descending," represented as 0 <strong>and</strong> 1respectively.StatsMenu Discrete Enables/disables the Stats menu item.SuppressAllMenu Discrete Enables/disables the Suppress Allmenu item.Suppressed<strong>Alarms</strong> Integer Gets the total number of suppressedalarms.SuppressionMenu Discrete Enables/disables the Suppression menuitem.SuppressOthersMenu Discrete Enables/disables the Suppress Othersmenu item.SuppressSelectedGroupsMenu Discrete Enables/disables the Suppress SelectedGroups menu item.SuppressSelectedMenu Discrete Enables/disables the Suppress Selectedmenu item.SuppressSelectedPrioritiesMenu Discrete Enables/disables the Suppress SelectedPriorities menu item.SuppressSelectedTagsMenu Discrete Enables/disables Suppress SelectedTags menu item.SuppressVisibleMenu Discrete Enables/disables the Suppress Visiblemenu item.TimeFormat Message Sets the format of the alarm timestamps.TitleBackColor Integer Sets title bar background color.TitleForeColor Integer Sets title bar foreground color.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


86 Chapter 4 Viewing Current <strong>Alarms</strong>Property Type PurposeToPriority Integer Sets the maximum priority for thealarm query.Total<strong>Alarms</strong> Integer Gets the number of alarms.Unack<strong>Alarms</strong> Integer Gets the total number ofunacknowledged alarms.UnAckAlmColorRange1 Integer Sets the color to be used to showunacknowledged alarms withpriorities in the range of 1 toColorPriorityRange1.UnAckAlmColorRange2 Integer Sets the color to be used to showunacknowledged alarms withpriorities in the range ofColorPriorityRange1 toColorPriorityRange2.UnAckAlmColorRange3 Integer Sets the color to be used to showunacknowledged alarms withpriorities in the range ofColorPriorityRange2 toColorPriorityRange3.UnAckAlmColorRange4 Integer Sets the color to be used to showunacknowledged alarms withpriorities in the range ofColorPriorityRange3 to 999.UnsuppressAllMenu Discrete Enables/disables Unsuppress Allmenu item.UseDefaultAckComment Discrete If set to True, the defaultacknowledgement comment is usedwhen the alarm is acknowledged.Otherwise, the operator is prompted toenter a comment.WindowColor Integer Sets the grid background color.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Properties 87Configuring Colors for ActiveX ControlsYou specify a color as an integer value. The alarm ActiveXcontrols use the ABGR model for specifying color as a 32-bitinteger, where:A = TransparencyB = BlueG = GreenR = RedTransparency is not supported by the alarm ActiveX controls.Any values for the upper 8 bits are ignored.For example, to set the color to Blue, use the following ABGRvalues:A = 0B = 255G = 0R = 0The hexadecimal value for this color is 0x00FF0000. Thedecimal value is 16711680.The following table shows examples of colors you can useColor Hexidecimal Value Decimal ValueWhite 0x00FFFFFF 16777215Black 0x00000000 0Blue 0x00FF0000 16711680Red 0x000000FF 225Green 0x0000FF00 652880<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


88 Chapter 4 Viewing Current <strong>Alarms</strong>Using Alarm Viewer Control ActiveX MethodsYou use the Alarm Viewer control ActiveX methods in scriptsto:• Acknowledge alarms.• Suppress alarms.• Get information about an alarm.• Run alarm queries.• Move <strong>and</strong> freeze the display.• Sort alarm records.• Select specific alarms.• Show the shortcut menu, About dialog box, <strong>and</strong> AlarmStatistics dialog box.For more information about calling methods, see Chapter 8,Scripting ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong> Scripting<strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.Acknowledging <strong>Alarms</strong>Use the following methods to acknowledge alarms during runtime.• AckSelected() Method• AckAll() Method• AckVisible() Method• AckSelectedGroup() Method• AckSelectedTag() Method• AckSelectedPriority() Method• AckGroup() Method• AckPriority() Method• AckTag() Method<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Methods 89AckSelected() MethodAcknowledges alarms that are selected in the Alarm Viewercontrol at run time.SyntaxObject.AckSelected (Comment)ParameterCommentAlarm acknowledgment comment.ExampleTag1 is defined as a message tag <strong>and</strong> the name of the controlis AlarmViewerCtrl1.Tag1 = "Alarm Comment";#AlarmViewerCtrl1.AckSelected (Tag1);AckAll() MethodAcknowledges all the alarms in the current alarm query.Because the Alarm Viewer control has a limited display area,the AckAll() method can also acknowledge alarms not shownin the display.SyntaxObject.AckAll (Comment)ParameterCommentAlarm acknowledgment comment.ExampleTag1 is defined as a message tag <strong>and</strong> the name of the controlis AlarmViewerCtrl1.Tag1 = "Alarm Comment";#AlarmViewerCtrl1.AckAll (Tag1);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


90 Chapter 4 Viewing Current <strong>Alarms</strong>AckVisible() MethodAcknowledges only those alarms that are currently visible inthe Alarm Viewer control.SyntaxObject.AckVisible (Comment)ParameterCommentAlarm acknowledgment comment.ExampleTag1 is defined as a message tag <strong>and</strong> the name of the controlis AlarmViewerCtrl1.Tag1 = "Alarm Comment";#AlarmViewerCtrl1.AckVisible (Tag1);AckSelectedGroup() MethodAcknowledges all alarms that have the same group name asone or more selected alarms.SyntaxObject.AckSelectedGroup (Comment)ParameterCommentAlarm acknowledgment comment.ExampleTag1 is defined as a message tag <strong>and</strong> the name of the controlis AlarmViewerCtrl1.Tag1 = "Alarm Comment";#AlarmViewerCtrl1.AckSelectedGroup (Tag1);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Methods 91AckSelectedTag() MethodAcknowledges all alarms that have the same tag, group name<strong>and</strong> priority as one or more of the selected alarms.SyntaxObject.AckSelectedTag (Comment)ParameterCommentAlarm acknowledgment comment.ExampleTag1 is defined as a message tag <strong>and</strong> the name of the controlis AlarmViewerCtrl1.Tag1 = "Alarm Comment";#AlarmViewerCtrl1.AckSelectedTag (Tag1);AckSelectedPriority() MethodAcknowledges all alarms that have the same priority rangeas one or more of the selected alarms.SyntaxObject.AckSelectedPriority (Comment)ParameterCommentAlarm acknowledgment comment.ExampleTag1 is defined as a message tag <strong>and</strong> the name of the controlis AlarmViewerCtrl1.Tag1 = "Alarm Comment";#AlarmViewerCtrl1.AckSelectedPriority (Tag1);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


92 Chapter 4 Viewing Current <strong>Alarms</strong>AckGroup() MethodAcknowledges all alarms for a given group name <strong>and</strong>provider.SyntaxObject.AckGroup(ApplicationName, GroupName, Comment)ParameterApplicationNameThe name of the Application for example, \\node1\IntouchGroupNameThe name of the group. For example, Turbine.CommentAlarm acknowledgment comment.ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.AckGroup ("\Intouch", "Turbine","Turbine acknowledgement Comment");AckPriority() MethodAcknowledges all of the alarms specified priority rangehaving same provider name <strong>and</strong> group name.SyntaxObject.AckPriority(ApplicationName, GroupName,FromPriority, ToPriority, Comment)ParameterApplicationNameThe name of the application. For example,\\node1\IntouchGroupNameThe name of the group. For example, Turbine.FromPriorityStarting priority of alarms. For example, 100.ToPriorityEnding priority of alarms. For example, 900.CommentAlarm acknowledgment comment.ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.AckPriority ("\Intouch", "Turbine",100, 900, "Turbine acknowledgement Comment");<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Methods 93AckTag() MethodAcknowledges the alarms of the given tag name having thesame provider name <strong>and</strong> group name within the givenpriority range.SyntaxObject.AckTag(ApplicationName, GroupName, tag,FromPriority, ToPriority, Comment)ParameterApplicationNameThe name of the Application for example, \\node1\IntouchGroupNameThe name of the group. For example, Turbine.tagThe name of the alarm tag. For example, Valve1.FromPriorityStarting priority of alarms. For example, 100.ToPriorityEnding priority of alarms. For example, 900.CommentAlarm acknowledgment comment.ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.AckTag ("\Intouch", "Turbine","Valve1", 100, 900, "Turbine acknowledgementComment");<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


94 Chapter 4 Viewing Current <strong>Alarms</strong>Suppressing <strong>Alarms</strong>Use the following methods to suppress alarms during runtime:• ShowSuppression() Method• SuppressSelected() Method• SuppressAll() Method• SuppressVisible() Method• SuppressSelectedGroup() Method• SuppressSelectedTag() Method• SuppressSelectedPriority() Method• UnSuppressAll() Method• SuppressGroup() Method• SuppressPriority() Method• SuppressTag() MethodShowSuppression() MethodShows the suppression dialog box, which contains allsuppressed alarms.SyntaxObject.ShowSuppression()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.ShowSuppression();SuppressSelected() MethodSuppresses showing current <strong>and</strong> future occurrences of theselected alarm(s).SyntaxObject.SuppressSelected()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SuppressSelected();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Methods 95SuppressAll() MethodSuppresses showing current <strong>and</strong> future occurrences of allactive alarms.SyntaxObject.SuppressAll()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SuppressAll();SuppressVisible() MethodSuppress showing current <strong>and</strong> future occurrences of anyvisible alarm.SyntaxObject.SuppressVisible()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SuppressVisible();SuppressSelectedGroup() MethodSuppresses showing current <strong>and</strong> future occurrences of anyalarm that belongs to the same Group <strong>and</strong> Provider of one ormore selected alarms.SyntaxObject.SuppressSelectedGroup()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SuppressSelectedGroup();SuppressSelectedTag() MethodSuppresses showing current <strong>and</strong> future occurrences of anyalarm that belongs to the same tag name of one or moreselected alarms having the same Group name, Providername, <strong>and</strong> Priority range.SyntaxObject.SuppressSelectedTag()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SuppressSelectedTag();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


96 Chapter 4 Viewing Current <strong>Alarms</strong>SuppressSelectedPriority() MethodSuppresses showing current <strong>and</strong> future occurrences of anyalarm that belongs to the same priority range of one or moreselected alarms.SyntaxObject.SuppressSelectedPriority()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SuppressSelectedPriority();UnSuppressAll() MethodClears alarm suppression.SyntaxObject.UnSuppressAll()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.UnSuppressAll();SuppressGroup() MethodSuppresses showing current <strong>and</strong> future occurrences of anyalarm that belongs to a given Group name.SyntaxObject.SuppressGroup(ApplicationName, GroupName)ParameterApplicationNameThe name of the Application for example, \\node1\IntouchGroupNameThe name of the group. For example, Turbine.ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SuppressGroup ("\Intouch","Turbine");<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Methods 97SuppressPriority() MethodSuppresses showing current <strong>and</strong> future occurrences of anyalarm of the specified priority range, having the sameProvider name <strong>and</strong> Group name.SyntaxObject.SuppressPriority(ApplicationName, GroupName,FromPriority, ToPriority)ParameterApplicationNameThe name of the Application for example, \\node1\IntouchGroupNameThe name of the group. For example, Turbine.FromPriorityStarting priority of alarms. For example, 100.ToPriorityEnding priority of alarms. For example, 900.ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SuppressPriority ("\Intouch","Turbine", 100, 900);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


98 Chapter 4 Viewing Current <strong>Alarms</strong>SuppressTag() MethodSuppresses showing current <strong>and</strong> future occurrences of anyalarm emitted by a given tag name or group name <strong>and</strong> in thespecified priority range.SyntaxObject.SuppressTag(ApplicationName, GroupName, tag,FromPriority, ToPriority)ParameterApplicationNameThe name of the Application for example,\\node1\Intouch.GroupNameThe name of the group. For example, Turbine.tagThe name of the alarm tag. For example, valve 1.FromPriorityStarting priority of alarms. For example, 100.ToPriorityEnding priority of alarms. For example, 900.ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SuppressTag ("\Intouch", "Turbine","Valve1", 100, 900);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Methods 99Retrieving Information About an AlarmUse the GetItem() function to retrieve information about analarm.GetItem() MethodReturns a string corresponding to the alarm at the specifiedrow <strong>and</strong> column.SyntaxObject.GetItem(Row Number, Column Name)ParameterRowNumberAn integer expression that evaluates to a specific row in thecontrol.ColumnNameA string expression that evaluates to the column name inthe control.ExampleThe name of the control is AlarmViewerCtrl1 <strong>and</strong> Tag1 isdefined as Memory Message.Tag1 = #AlarmViewerCtrl1.GetItem(1, "Group");Running QueriesUse the following methods to run queries.• ShowQueryFavorites() Method• Requery() Method• ApplyQuery() Method• ApplyDefaultQuery() Method• SetQueryByName() MethodShowQueryFavorites() MethodShows the Query Favorites dialog box if theQueryFavoritesFile property contains a valid query favoritefile name in .xml format.SyntaxObject.ShowQueryFavorites()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.ShowQueryFavorites();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


100 Chapter 4 Viewing Current <strong>Alarms</strong>Requery() MethodQueries the alarm provider again.SyntaxObject.Requery()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.Requery();ApplyQuery() MethodPerforms the query as specified by its parameters AlarmQuery, From <strong>and</strong> To Priorities, State of alarms to query for.<strong>and</strong> the type of alarms to retrieve.SyntaxObject.ApplyQuery(AlarmQuery, FromPriority, ToPriority,State, Type)ParameterAlarmQueryThe alarm query. For example: \<strong>InTouch</strong>!$SystemFromPriorityStarting priority of alarms. For example, 100.ToPriorityEnding priority of alarms. For example, 900.StateSpecifies type of alarms to show. For example, "UnAck" ormessage tag. Valid states are All, UnAck, or Ack.TypeSpecifies type of query for example, Historical (Historicalalarms) or Summary (Summary alarms).ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.ApplyQuery("\<strong>InTouch</strong>!$System",100,900,"All", "Historical");<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Methods 101ApplyDefaultQuery() MethodPerforms a query using the FromPriority, ToPriority,AlarmState, QueryType, <strong>and</strong> AlarmQuery properties asspecified at design time. The default properties can only bechanged at development time <strong>and</strong> are not overwritten byother alarm queries.SyntaxObject.ApplyDefaultQuery()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.ApplyDefaultQuery();SetQueryByName() MethodSets the current query specified by a query name. The queryname is defined in the query favorites file.SyntaxObject.SetQueryByName(QueryName)ParameterQueryNameThe name of the query as created by using "QueryFavorites," for example, Turbine Queries.ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SetQueryByName("Turbine Queries");<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


102 Chapter 4 Viewing Current <strong>Alarms</strong>Moving <strong>and</strong> Freezing the DisplayUse the following functions to move or freeze the display:• MoveWindow() Method• FreezeDisplay() MethodMoveWindow() MethodScrolls the alarms in the control in a specified way.SyntaxObject.MoveWindow(Option, Repeat)ParameterOptionThe type of action to perform.TypeLineDnLineUpPageDnPageUpTopBottomPageRtPageLfRightLeftHomeDescriptionLine down. The Repeat parameter controlsthe number of lines to be scrolled.Line up. The Repeat parameter controls thenumber of lines to be scrolled.Page down. The Repeat parameter controlsthe number of pages to be scrolled.Page up. The Repeat parameter controls thenumber of pages to be scrolled.To the top of the controlTo the bottom of the control.Page to the right. The Repeat parametercontrols the number of pages to be scrolled.Page to the left. The Repeat parametercontrols the number of pages to be scrolled.Scrolls right. The Repeat parameter controlsthe number of columns to be scrolled.Scrolls left. The Repeat parameter controlsthe number of columns to be scrolled.Scrolls to the top row <strong>and</strong> left most column ofthe control.RepeatThe number of times this operation should be repeated.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Methods 103ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.MoveWindow ("Bottom", 0);#AlarmViewerCtrl1.MoveWindow ("LineUp", 3);#AlarmViewerCtrl1.MoveWindow ("PageLf", 7);FreezeDisplay() MethodFreezes the display.SyntaxObject.FreezeDisplay(Freeze)ParameterFreezeTrue = Freezes the display.False = Unfreezes the display.ExampleTag1 is defined as Memory discrete tag <strong>and</strong> the name of thecontrol is AlarmViewerCtrl1.Tag1 = 1;#AlarmViewerCtrl1.FreezeDisplay(Tag1);Sorting Alarm RecordsUse the following functions to sort alarm records:• ShowSort() Method• SetSort() MethodShowSort() MethodShows the Secondary Sort dialog box if the SortMenuproperty is enabled.SyntaxObject.ShowSort()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.ShowSort();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


104 Chapter 4 Viewing Current <strong>Alarms</strong>SetSort() MethodSets the sort criteria as specified by the SortColumn <strong>and</strong>SortOrder properties.SyntaxObject.SetSort()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SetSort();Showing Other InformationUse the following functions to show the About dialog box <strong>and</strong>the Alarm Statistics dialog box:• AboutBox() Method• ShowStatistics() MethodAboutBox() MethodShows the About dialog box.SyntaxObject.AboutBoxExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.AboutBox();ShowStatistics() MethodShows the Alarm Statistics dialog box.SyntaxObject.ShowStatistics()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.ShowStatistics();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Methods 105Selecting Specific <strong>Alarms</strong>Use the following functions to select specific alarms:• SelectGroup() Method• SelectPriority() Method• SelectTag() Method• SelectAll() Method• SelectItem() Method• UnSelectAll() MethodSelectGroup() MethodSelects all of the alarms that contain the same alarm groupname <strong>and</strong> provider name.SyntaxObject.SelectGroup(ApplicationName, GroupName)ParameterApplicationNameThe name of the Application for example, \\node1\IntouchGroupNameThe name of the group. For example, Turbine.ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SelectGroup ("\Intouch", "Turbine");<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


106 Chapter 4 Viewing Current <strong>Alarms</strong>SelectPriority() MethodSelects all of the alarms that are of the specified priorityrange, having the same provider name <strong>and</strong> group name.SyntaxObject.SelectPriority(ApplicationName, GroupName,FromPriority, ToPriority)ParameterApplicationNameThe name of the Application for example, \\node1\IntouchGroupNameThe name of the group. For example, Turbine.FromPriorityStarting priority of alarms. For example, 100.ToPriorityEnding priority of alarms. For example, 900.ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SelectPriority ("\Intouch","Turbine", 100, 900);SelectTag() MethodSelects all of the alarms from a specific Provider/Group/Tag.You can also specify a Priority range, or use 1-999.SyntaxObject.SelectTag(ApplicationName, GroupName, tag,FromPriority, ToPriority)ParameterApplicationNameThe name of the Application for example, \\node1\IntouchGroupNameThe name of the group. For example, Turbine.tagThe name of the alarm tag. For example, valve 1.FromPriorityStarting priority of alarms. For example, 100.ToPriorityEnding priority of alarms. For example, 900.ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.SelectTag ("\Intouch", "Turbine","Valve1",100, 900);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Viewer Control ActiveX Methods 107SelectAll() MethodToggles the selection of all the alarms in a display. Becausethe alarm display has only a limited display area, theSelectAll() function may select alarms that are not visible inthe display.SyntaxObject.SelectAll()Example#AlarmViewerCtrl1.SelectAll();SelectItem() MethodToggles the selection of an alarm record at a given row.SyntaxObject.SelectItem(RowNumber)ParameterRowNumberAn integer value that is the row number for the alarmrecord to select. The first row in the control is 0.ExampleThe name of the control is AlarmViewerCtrl1 <strong>and</strong> Tag1 isdefined as a memory integer. This toggles the selection of thetenth alarm record in the Alarm Viewer control.Tag1 = 9;#AlarmViewerCtrl1.SelectItem (Tag1);UnSelectAll() MethodUnselects all the selected records.SyntaxObject.UnSelectAll()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.UnSelectAll();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


108 Chapter 4 Viewing Current <strong>Alarms</strong>Showing the Context MenuUse the ShowContext() method to show the shortcut menu atrun time.ShowContext() MethodShows the shortcut menu if any one of the shortcut menusare enabled.SyntaxObject.ShowContext()ExampleThe name of the control is AlarmViewerCtrl1.#AlarmViewerCtrl1.ShowContext();Error H<strong>and</strong>ling When Using Methods <strong>and</strong>PropertiesYou can use the SilentMode property to hide errors duringrun time. If the SilentMode property is set to 1, the AlarmViewer control does not show error messages in during runtime. If it is set to 0, the Alarm Viewer control shows errormessages. Error messages are always sent to the ArchestrALog Viewer.Using ActiveX <strong>Events</strong> to Trigger ScriptsYou can assign QuickScripts to Alarm Viewer control events,such as a mouse click or double-click. When the event occurs,the QuickScript runs.The Alarm Viewer control supports the following events:• Click• DoubleClick• NewAlarm• ShutDown• StartUpThe Click event has one parameter called ClicknRow, whichidentifies the row that is clicked at run time.The DoubleClick event has one parameter calledDoubleClicknRow, which identifies the row that isdouble-clicked at run time.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using ActiveX <strong>Events</strong> to Trigger Scripts 109Click <strong>and</strong> DoubleClick events are zero-based. When Click<strong>and</strong>/or DoubleClick events are published for the user, the rowcount in the display starts with 0.Note The Alarm Viewer control ignores the user interfacemethods when they are called from StartUp event, because thecontrol is not visible yet. These include: ShowSort(),ShowContext(), GetSelectedItem(), GetNext(), GetPrevious() <strong>and</strong>AboutBox().For more information about scripting ActiveX events, seeChapter 8, Scripting ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong>Scripting <strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.Running a Script When a New Alarm is DetectedYou can configure the Alarm Viewer control to run anActiveX event script when the Alarm Viewer control detects anew unacknowledged alarm (that is, any alarm thattransitions from a normal state to an unacknowledged state<strong>and</strong> meets the control's query <strong>and</strong> priority filtering criteria).The NewAlarmEventMode property controls triggering theNewAlarm event.• If you set NewAlarmEventMode property to 0, theNewAlarm event does not trigger. This is the default.• If you set the NewAlarmEventMode property to 1, <strong>and</strong> anew alarm occurs:• An event is triggered.• The ActiveX event script associated with theNewAlarm event runs.• The NewAlarmEventMode property is set to 0.You must change the NewAlarmEventMode propertyback to 1 to process subsequent events.Use this setting if the application performs an action thatshould not be performed again until the condition hasbeen corrected or acknowledged. For example, when theevent triggers, the ActiveX script can play an alarmsound until the alarm is acknowledged. Then the alarmsound can play again the next time a new alarm isreceived.• If you set the NewAlarmEventMode property to 2, theNewAlarm event is active <strong>and</strong> continually triggers whenat least one new unacknowledged alarm arrives. You donot need to change the value to process subsequentevents. The new event triggers at most one time persecond, regardless of how many additional new alarmsarrive in the same second.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


110 Chapter 4 Viewing Current <strong>Alarms</strong><strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


111Chapter 5Acknowledging <strong>Alarms</strong> in RealTimeWhen tag data transitions from a normal to an alarm state, anew instance of its alarm is generated. The <strong>InTouch</strong>Distributed Alarm system tracks each alarm instancethrough the following states:• When the tag first enters the alarmed state• When the alarm makes a sub-state transition, if thealarm is a multi-state alarm• When the alarm returns to normal• Whether the alarm is waiting for an acknowledgment• When the alarm is acknowledgedThe life cycle of an alarm instance ends when the tag valueassociated with the alarm returns to a normal, unalarmedstate. A subsequent transition to the alarmed state generatesa new alarm instance.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


112 Chapter 5 Acknowledging <strong>Alarms</strong> in Real TimeUnderst<strong>and</strong>ing Alarm AcknowledgementModelsThe <strong>InTouch</strong> <strong>HMI</strong> supports three models of alarmacknowledgement:• For condition-oriented alarms, an acknowledgmentcounts against all entries into the alarmed state up to thetime of the acknowledgment.• For exp<strong>and</strong>ed summary alarms, an acknowledgment isonly for a particular transition, whether to an alarmedstate, to a sub-state, or a return to normal. All transitionsinto different alarm sub-states must be acknowledgedbefore the overall alarm is considered acknowledged.• For event-oriented alarms (as in OPC), anacknowledgment is accepted only if it refers to the mostrecent activation event.Condition Acknowledgement Alarm ModelFor condition-oriented alarms, an acknowledgment countsagainst all entries into the alarmed state up to the time ofthe acknowledgment.Acknowledgment is for the instance of the alarm. An alarminstance waits for an acknowledgement when it first entersthe alarmed state. If the alarm is acknowledged <strong>and</strong>subsequently transitions to a new alarmed sub-state (forexample from "Hi" to HiHi"), it begins waiting for anotheracknowledgement. Whenever the acknowledgement isreceived, it is accepted <strong>and</strong> applies to all transitions of thealarm that have occurred so far.The alarm is considered acknowledged when the most recentinstance is acknowledged.Exp<strong>and</strong>ed Summary Alarm ModelFor exp<strong>and</strong>ed summary alarms, an acknowledgment is onlyfor a particular transition, whether to an alarmed state, to asub-state, or a return to normal. All transitions into differentalarm sub-states must be acknowledged before the overallalarm is considered acknowledged.The initial entry to the alarmed state must be acknowledged,<strong>and</strong> the return to normal must also be separatelyacknowledged.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Underst<strong>and</strong>ing Alarm Acknowledgement Models 113Any transition to a new alarm sub-state is treated as a newoccurrence that must be acknowledged, <strong>and</strong> whose return tonormal must also be acknowledged. Sub-state transitions aretreated as belonging to a "return to normal group," startingwith the first entry into an alarmed state when the item waspreviously normal.If the item returns to normal <strong>and</strong> subsequently enters thealarmed state again, a new return to normal group iscreated.Each transition must be acknowledged individually <strong>and</strong>explicitly; <strong>and</strong> the alarm is considered acknowledged onlywhen the item has returned to normal <strong>and</strong> all transitions inall pending return to normal groups have beenacknowledged.Note The term "summary" means "awaiting acknowledgment."<strong>Alarms</strong> in this model are also known as “ring-back” alarms.Exp<strong>and</strong>ed Summary Alarm RecordsFor exp<strong>and</strong>ed summary alarms, when an alarm occurs, arecord is generated in the alarm display object showing thatan alarm condition has occurred. The record shows the date<strong>and</strong> time stamp of the alarm. This record remains visibleuntil an operator acknowledges the alarm <strong>and</strong> areturn-to-normal state has occurred. If the return-to-normalstate occurs before the alarm is acknowledged, then tworecords are shown in the alarm object.For example, a boiler’s temperature exceeds the high limitstate <strong>and</strong> triggers an alarm. Later, the boiler returns to itsnormal temperature range before an operator canacknowledge the alarm. The alarm system generates a recordthat a high limit alarm occurred <strong>and</strong> an another recordindicating the alarm was not acknowledged.Using Exp<strong>and</strong>ed Summary <strong>Alarms</strong>When you define a tag <strong>and</strong> select Exp<strong>and</strong>ed Summary as itsacknowledgement model, an operator must acknowledge thatan alarm occurred even if the state triggering the alarm hasreturned to normal. Acknowledging an alarm changes thecolor of the alarm entry but does not change the time stamp.<strong>Alarms</strong> only clear from the display when they areacknowledged <strong>and</strong> the alarm has returned to a normal state.Note When you define a tag with the exp<strong>and</strong>ed summaryacknowledgement mode, the RTN Implies ACK option in theAlarm Properties dialog box does not apply to the tag.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


114 Chapter 5 Acknowledging <strong>Alarms</strong> in Real TimeEvent-Based Alarm ModelFor event-oriented alarms (as in OPC), an acknowledgmentis accepted only if it refers to the most recent activationevent.An alarm instance begins waiting for an acknowledgementwhen it first enters the alarmed state. If the instance isacknowledged <strong>and</strong> subsequently transitions to a newalarmed sub-state, it begins waiting for anotheracknowledgement. Each subsequent transition is assigned asequence number, <strong>and</strong> the acknowledgement must haveattached to it the sequence number of the transition to whichit is responding.The acknowledgement is accepted only if it is for the mostrecent transition. If it is accepted, it applies to alltransactions of the alarm that have occurred so far. Thealarm is considered acknowledged when the most recentinstance is acknowledged.A rejected acknowledgement may be logged for diagnosticpurposes, but is not otherwise tracked in the system.The event-oriented model ensures that if an alarm ischanging between different states, the acknowledgementcorresponds to current information. In systems with smalllatency times, this may look just like condition-orientedalarms. In other environments, such as the Internet, thefeatures of this model may become important.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Underst<strong>and</strong>ing Alarm Acknowledgement Models 115Checking the Acknowledgement Model of a Tagat Run TimeUse the .AlarmAckModel dotfield to monitor theacknowledgement model associated with a tag..AlarmAckModel DotfieldMonitors the acknowledgment model associated with a tag asfollows:0 = condition (default)1 = event oriented2 = exp<strong>and</strong>ed summaryCategory<strong>Alarms</strong>UsageTagname.AlarmAckModelParameterTagnameAny discrete, integer, real, indirect discrete <strong>and</strong> analog tag.RemarksThis dotfield defaults to 0 (condition acknowledgmentmodel).Data TypeAnalog (read-only)Valid Values0, 1 or 2ExampleThe body of this IF-THEN statement is processed if thePumpStation tag is associated with an event alarm:IF (PumpStation.AlarmAckModel == 1) THENMyAlarmMessage="PumpStation is an Eventalarm";ENDIF;See Also.Alarm, .Ack, .UnAck, .AckDev, .AckDSC, .AckROC<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


116 Chapter 5 Acknowledging <strong>Alarms</strong> in Real TimeUsing Dotfields to Acknowledge <strong>Alarms</strong>You can create scripts that use dotfields to acknowledge allcurrent alarms, selected alarms, or only alarms of a specifictype.Acknowledging <strong>Alarms</strong> or Alarm GroupsYou can create scripts that use the following dotfields toacknowledge alarms of specified local tags or alarms withinspecified alarm groups.• .Ack Dotfield• .UnAck DotfieldYou cannot acknowledge alarms that originate from theWonderware Application Server using these dotfields.To acknowledge all local alarms of the running <strong>InTouch</strong>application, use the $System alarm group in combinationwith the appropriate .Ack dotfield..Ack DotfieldMonitors or controls the alarm acknowledgment status of alltypes of local alarms.Category<strong>Alarms</strong>UsageTagName.Ack=1;ParameterTagNameAny discrete, integer, real, indirect discrete <strong>and</strong> analog tag,or alarm group.RemarksSet this dotfield to a value of 1 to acknowledge anyoutst<strong>and</strong>ing alarms associated with a specified tag or alarmgroup. When the specified tag is an alarm group, allunacknowledged alarms associated with the tags within thespecified group are acknowledged. When the specified tag isof any type other than alarm group, only theunacknowledged alarm associated with that tag isacknowledged. Setting the .Ack dotfield to a value other than1 has no meaning.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Dotfields to Acknowledge <strong>Alarms</strong> 117Data TypeDiscrete (read/write)Valid Values1ExampleThe following statement acknowledges an alarm associatedwith the Tag1 tag:Tag1.Ack=1;This next example would be used to acknowledge allunacknowledged alarms within the PumpStation alarmgroup:PumpStation.Ack=1;Note The .ACK dotfield has an inverse dotfield called .UnAck.When an unacknowledged alarm occurs, .UnAck is set to 1. .UnAckcan then be used with animation links or in condition scripts totrigger annunciators for any unacknowledged alarms.See AlsoAlarm, UnAck, AckDev, AckROC, AckDSC, AckValue,AlarmAckModel.UnAck DotfieldMonitors or controls the alarm acknowledgment status oflocal alarms.Category<strong>Alarms</strong>UsageTagName.UnAck=0;ParameterTagNameAny discrete, integer, real, indirect discrete <strong>and</strong> analog tag,or alarm group.RemarksSet this dotfield to a value of 0 to acknowledge anyoutst<strong>and</strong>ing alarms associated with the specified tag oralarm group. When the specified tag is an alarm group, allunacknowledged alarms associated with the tags within thespecified group are acknowledged. When the specified tag isany other type, only the unacknowledged alarm associatedwith that tag is acknowledged. Setting this dotfield to a valueother than 0 has no meaning.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


118 Chapter 5 Acknowledging <strong>Alarms</strong> in Real TimeData TypeDiscrete (read/reset) onlyValid Values0ExampleThe following statement acknowledges any alarm associatedwith the Tag1 tag.Tag1.UnAck=0;This statement acknowledges all unacknowledged alarmswithin the alarm group named PumpStation.PumpStation.UnAck=0;.UnAck has an inverse dotfield called .Ack. When an alarmhas been acknowledged, the value of the .Ack dotfield is set to1.See Also.Ack, Ack(), .Alarm, .AlarmAckModelAcknowledging Value <strong>Alarms</strong>You can create scripts that use the .AckValue dotfield toacknowledge all value alarms of a specified local tag or allvalue alarms in a specified alarm group..AckValue DotfieldMonitors <strong>and</strong> controls the acknowledgment of local valuealarms.UsageTagName.AckValue=1;ParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksSet the .AckValue dotfield to 1 to acknowledge anyoutst<strong>and</strong>ing value alarms associated the specified tag/group.When the specified tag is an alarm group, allunacknowledged value alarms associated with the tagswithin the specified group are acknowledged. When thespecified tag is of any type, only the unacknowledged valuealarm associated with that tag is acknowledged.Setting this dotfield to a value other than 1 has no meaning.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Dotfields to Acknowledge <strong>Alarms</strong> 119Data TypeDiscrete (read/write)Valid Values1ExamplesThe following statement acknowledges a value alarmassociated with the Tag1 tag:Tag1.AckValue=1;This example acknowledges all unacknowledged valuealarms within the alarm group named PumpStation:PumpStation.AckValue=1;An indirect alarm group (using GroupVar) can be used toacknowledge value alarms. For example, using anassignment such as:Station<strong>Alarms</strong>.Name = "PumpStation";Where Station<strong>Alarms</strong> is defined as an alarm group type tag<strong>and</strong> is then associated with PumpStation. Thus, thestatement below is similar to the above examples, except it isused to acknowledge any unacknowledged value alarmswithin the alarm group PumpStation, which is currentlyassociated with the Station<strong>Alarms</strong> alarm group tag.Station<strong>Alarms</strong>.AckValue=1;See Also.Alarm, .AlarmValue, .Ack, .UnAck, .AckDev, .AckDSC,.AckROC, .AlarmAckModel<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


120 Chapter 5 Acknowledging <strong>Alarms</strong> in Real TimeAcknowledging Discrete <strong>Alarms</strong>You can create scripts that use the .AckDsc dotfield toacknowledge the discrete alarm of a specified tag or alldiscrete alarms of a specified alarm group..AckDsc DotfieldAcknowledges the discrete alarm of a specified tag or alldiscrete alarms of a specified alarm group.UsageTagName.AckDsc=1;ParameterTagNameName assigned to the discrete tag or the name of an alarmgroup.RemarksSet to 1 to acknowledge an active discrete alarm associatedwith the specified tag or alarm group. When the specified tagis an alarm group, all unacknowledged discrete alarmsassociated with the tags within the specified group areacknowledged. When the specified tag is of any type otherthan alarm group, only the unacknowledged discrete alarmassociated with that tag is acknowledged. Setting thisdotfield to a value other than 1 has no meaning.Data TypeDiscrete (read/write)Valid Values0 or 1ExamplesThe following statement verifies if Tag1 has an activediscrete alarm associated with it:IF (Tag1.AlarmDsc == 1) THENMyAlarmMessage="The pumping station currentlyhas an ALARM!";ENDIF;This dotfield is not linked to the .Ack or .UnAck dotfield.Therefore, even when an active alarm has beenacknowledged, this dotfield remains equal to 1.See Also.Alarm, .AlarmDSC, .Ack, .UnAck, .AckDev, .AckDSC,.AckROC, .AckValue, .AlarmAckModel<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Dotfields to Acknowledge <strong>Alarms</strong> 121Acknowledging Deviation <strong>Alarms</strong>You can create scripts that use the .AckDev dotfield toacknowledge the minor or major deviation alarm of aspecified local tag or the deviation alarms of a specifiedalarm group..AckDev DotfieldAcknowledges the minor or major deviation alarms of aspecified local tag or all deviation alarms of a specified alarmgroup.CategoryAlarmUsageTagName.AckDev=1;ParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksSet this dotfield to a value of 1 to acknowledge anyoutst<strong>and</strong>ing deviation alarms associated with the specifiedtag or alarm group. When the specified tag is an alarm group,all unacknowledged deviation alarms associated with thetags within the specified group are acknowledged. Settingthis dotfield to a value other than 1 has no meaning.Data TypeDiscrete (read/write)Valid Values1ExampleThe following statement acknowledges a deviation alarmassociated with the Tag1 tag:Tag1.AckDev=1;This next example would be used to acknowledge allunacknowledged deviation alarms within the alarm groupnamed PumpStation:PumpStation.AckDev=1;See Also.Alarm, .AlarmDev, .Ack, .UnAck, .AckDSC, .AckROC,.AckValue, .AlarmAckModel<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


122 Chapter 5 Acknowledging <strong>Alarms</strong> in Real TimeAcknowledging Rate-of-Change <strong>Alarms</strong>You can create scripts that use the .AckROC dotfield toacknowledge the rate-of-change alarm of a specified local tagor the rate-of-change alarms of a specified alarm group..AckROC DotfieldAcknowledges the rate-of-change alarm of a specified localtag or all rate-of-change alarms of a specified alarm group.UsageTagName.AckROC=1;ParameterTagNameName assigned to the integer, real, or indirect analog tag orthe name of an alarm group.RemarksSet this dotfield to a value of 1 to acknowledge anyoutst<strong>and</strong>ing rate-of-change alarms associated with aspecified tag or alarm group. When the specified tag is analarm group, all unacknowledged rate-of-change alarmsassociated with the tags within the specified group areacknowledged. When the specified tag is of any type otherthan alarm group, only the unacknowledged rate-of-changealarm associated with that tag is acknowledged. Setting thisdotfield to a value other than 1 has no meaning.Data TypeDiscrete (read/write)Valid Values1ExamplesThe following statement acknowledges a rate-of-changealarm associated with a tag named Tag1.Tag1.AckROC=1;This next example acknowledges all unacknowledgedrate-of-change alarms within the alarm group namedPumpStation:PumpStation.AckROC=1;See Also.Alarm, .AlarmROC, .Ack, .UnAck, .AckDev, .AckDSC,.AckValue, .AlarmAckModel<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Script Functions to Acknowledge <strong>Alarms</strong> 123Using Script Functions to Acknowledge<strong>Alarms</strong>You can use the Ack() script function to acknowledge allalarms for a tag or group.If you are using the Alarm Viewer control, you canacknowledge alarms using methods. For more information,see Acknowledging <strong>Alarms</strong> on page 88.If you are using the Distributed Alarm Display object, usescript functions to acknowledge alarms. For moreinformation, see Acknowledging <strong>Alarms</strong> on page 440.Ack() FunctionAcknowledges any unacknowledged <strong>InTouch</strong> alarm.CategoryAlarmSyntaxAck TagName;ArgumentsTagNameAny <strong>InTouch</strong> tag, alarm group, or group variable.RemarksThis function can be applied to a tag or an alarm group.ExamplesThe following statements can be used on a push button toacknowledge any unacknowledged alarm:Ack $System; {All alarms}Ack Tagname;Ack GroupName;See AlsoalmAckAll(), almAckGroup() almAckTag(), almAckDisplay(),almAckRecent(), almAckPriority(). almAckSelect(),almAckSelectedGroup(), almAckSelectedPriority(),almAckSelectedTag()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


124 Chapter 5 Acknowledging <strong>Alarms</strong> in Real TimeUsing Automatic Acknowledgement When theTag Value Returns to NormalThe <strong>InTouch</strong> <strong>HMI</strong> can automatically acknowledge an alarmwhen an alarmed tag’s value returns to its normal state. Thisoption does not apply to exp<strong>and</strong>ed summary alarms.To configure alarm acknowledgement on return1 On the Special menu, point to Configure, <strong>and</strong> then click<strong>Alarms</strong>. The Alarm Properties dialog box appears.2 Select the RTN implies ACK check box to have the <strong>InTouch</strong><strong>HMI</strong> automatically acknowledge alarms whose valuesreturn to the normal state (RTN).3 Click OK.Using Alarm Clients to Acknowledge <strong>Alarms</strong>Operators acknowledge alarms that appear in the AlarmViewer control from WindowViewer.In the display, the State column shows the currentacknowledgement status of the alarm record you select. Also,the text of a record is color coded to indicate itsacknowledgement status.The alarms you acknowledge are removed from the display.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Clients to Acknowledge <strong>Alarms</strong> 125To acknowledge all alarms1 Right-click in the display, point to Ack Others, <strong>and</strong> thenclick the appropriate comm<strong>and</strong>:• Click Ack All to acknowledge all current alarms.• Click Ack Visible to acknowledge all alarms visible inthe display.The Ack Comment dialog box appears.2 Type an optional acknowledgement comment <strong>and</strong> clickOK.To acknowledge selected alarms1 Select one or more alarms.2 Right-click <strong>and</strong> then click Ack Selected. The Ack Commentdialog box appears.3 Type an optional acknowledgement comment <strong>and</strong> clickOK.To acknowledge alarms by group, tag, or priority1 Select the alarm(s).2 Right-click in the display, point to Ack Others, <strong>and</strong> thenclick the appropriate comm<strong>and</strong>:• Click Ack Selected Groups to acknowledge all alarmsthat belong to the selected alarm group(s).• Click Ack Selected Tags to acknowledge alarms for alltags that have the same name(s) as the selectedalarm(s).• Click Ack Selected Priorities to acknowledge allalarms with the same priority or priorities as theselected alarm(s).The Ack Comment dialog box appears.3 Type an optional acknowledgement comment <strong>and</strong> clickOK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


126 Chapter 5 Acknowledging <strong>Alarms</strong> in Real TimeUsing Alarm <strong>and</strong> Acknowledgement CommentsThere are two kinds of comments: alarm comments <strong>and</strong>acknowledgement comments.• The alarm comment is set when the new alarm instanceoccurs. The .AlarmComment dotfield is used for alarmcomments <strong>and</strong> can be set or read in an <strong>InTouch</strong> script.You specify the default value for this comment in thetag's definition in the Tagname Dictionary. Alarmcomments can be up to 131 characters.• The acknowledgement comment is provided by theoperator when he or she acknowledges the alarm.You can use the acknowledgement comment to update thealarm comment in the tag database.To allow alarm acknowledgement comments to update the.AlarmComment dotfield1 On the Special menu, point to Configure, <strong>and</strong> then click<strong>Alarms</strong>. The Alarm Properties dialog box appears.2 Select the Retain ACK Comment As Alarm Comment checkbox to update the tag’s .AlarmComment dotfield <strong>and</strong> theTagname Dictionary with the comments entered withalarm acknowledgments.If you do not select this check box, the acknowledgmentcomment is shown with the acknowledged alarm (in thedatabase, printouts, <strong>and</strong> displays), but .AlarmCommentdoes not change.3 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


127Chapter 6Controlling Alarm Properties ofTags <strong>and</strong> Groups at Run TimeYou can use alarm dotfields to dynamically manage alarmconditions. Many of these dotfields are accessible using I/O,expressions, <strong>and</strong> scripts. Through I/O access, you canmonitor <strong>and</strong> control a specific tag’s alarm information usingother Windows applications, such as Excel, or WindowViewerrunning on a remote node.To access dotfields associated with a tag, use this syntax:tag.dotfieldFor example, if you want to allow run-time changes to theHiHi alarm limit on a tag named Analog_tag, you can createan Analog - User Input touch link to a button <strong>and</strong> enterAnalog_tag.HiHiLimit as the expression in the link’s dialogbox. During run time, the operator simply clicks the button<strong>and</strong> types in a new value for the HiHi alarm limit assigned tothe Analog_tag.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


128 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeThe following table briefly describes each alarm dotfield.Dotfield.Ack.AckDev.AckDsc.AckROC.AckValue.AlarmDescriptionMonitors/controls the alarmacknowledgment status oftags <strong>and</strong> alarm groups..Ack has an inverse tagdotfield called .UnAck.When an unacknowledgedalarm occurs, .UnAck is setto 1. The .UnAck dotfieldcan be used in animationlinks or condition scripts totrigger annunciators forany unacknowledgedalarms.Monitors/controls the alarmacknowledgment status ofdeviation type alarmsactive on an analog tag oralarm group.Monitors/controls thecurrent acknowledgementstatus of a discrete tag.Monitors/controls the alarmacknowledgment status ofrate-of-change type alarmsactive on the tag.Monitors the alarmacknowledgment status ofvalue type alarms active onthe tag.Signals that an alarmcondition exists.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


129Dotfield.AlarmAckModel.AlarmDev.AlarmDevCount.AlarmDevDeadb<strong>and</strong>.AlarmDevUnAckCount.AlarmDisabled.AlarmDsc.AlarmDscCountDescriptionMonitors theacknowledgement modelassociated with the tag asfollows:0=condition (default)1=event2=exp<strong>and</strong>edApplies to discrete oranalog tags with alarms.Read only, but can beconfigured inWindowMaker.Signals that a deviationalarm exists.Tracks the total number ofactive deviation alarms fora given tag or alarm group.Monitors/controls thedeviation percentagedeadb<strong>and</strong> for both minor<strong>and</strong> major deviation alarms.Tracks the number ofunacknowledged deviationalarms active on a given tagor alarm group.Disables/enables events <strong>and</strong>alarms. Applies to discrete<strong>and</strong> analog tags withalarms, or to alarm groups.Indicates that a discretealarm condition is currentlyactive.Tracks the total number ofdiscrete alarms active on agiven tag or alarm group.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


130 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeDotfield.AlarmDscDisabledDescriptionIndicates whether or notthe tag can generatediscrete alarms.Note This dotfield is thesame as .AlarmDisableddotfield for a discrete tag..AlarmDscEnabledIndicates whether or notthe tag can generatediscrete alarms.Note This dotfield is thesame as .AlarmEnableddotfield for a discrete tag..AlarmDscInhibitor.AlarmDscUnAckCount.AlarmEnabled.AlarmHiDisabled.AlarmHiEnabled.AlarmHiHiDisabled.AlarmHiHiEnabledReturns the name of theinhibitor tag assigned to thediscrete alarm (if any) forthis tag.Tracks the total number ofunacknowledged discretealarms active for a giventag or alarm group.Disables/enables events <strong>and</strong>alarms.Disables/enables the Highlimit for analog tags withalarms.Disables/enables the Highlimit for analog tags withalarms.Disables/enables the HiHilimit for analog tags withalarms.Disables/enables the HiHilimit for analog tags withalarms.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


131Dotfield.AlarmHiHiInhibitor.AlarmHiInhibitor.AlarmLoDisabled.AlarmLoEnabled.AlarmLoInhibitor.AlarmLoLoDisabled.AlarmLoLoEnabled.AlarmLoLoInhibitorDescriptionReturns the inhibitor tagreference for the HiHi limit.Applies to analog tags withalarms. Read only but canbe configured inWindowMaker.Returns the inhibitor tagreference for the High limit.Applies to analog tags withalarms.Read only but can beconfigured inWindowMaker.Disables/enables the Lowlimit for analog tags withalarms.Disables/enables the Lowlimit for analog tags withalarms.Returns the inhibitor tagreference for the Low limit.Applies to analog tags withalarms.Read only but can beconfigured inWindowMaker.Disables/enables the LoLolimit for analog tags withalarms.Disables/enables the LoLolimit for analog tags withalarms.Returns the inhibitor tagreference for the LoLo limit.Applies to analog tags withalarms.Read only but can beconfigured inWindowMaker.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


132 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeDotfield.AlarmMajDevDisabled.AlarmMajDevEnabled.AlarmMajDevInhibitor.AlarmMinDevDisabled.AlarmMinDevEnabled.AlarmMinDevInhibitor.AlarmROC.AlarmROCCount.AlarmROCDisabled.AlarmROCEnabledDescriptionDisables/enables the MajorDeviation limit for analogtags with alarms.Disables/enables the MajorDeviation limit for analogtags with alarms.Returns the inhibitor tagreference for the MajorDeviation limit. Applies toanalog tags with alarms.Read only but can beconfigured inWindowMaker.Disables/enables the MinorDeviation limit for analogtags with alarms.Disables/enables the MinorDeviation limit for analogtags with alarms.Returns the inhibitor tagreference for the MinorDeviation limit. Applies toanalog tags with alarms.Read only but can beconfigured inWindowMaker.Signals that arate-of-change type alarmexists.Tracks the total number ofrate of change alarms activeon a given tag or alarmgroup.Disables/enables the rate ofchange limit for analog tagswith alarms.Disables/enables the rate ofchange limit for analog tagswith alarms.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


133Dotfield.AlarmROCInhibitor.AlarmROCUnAckCount.AlarmTotalCount.AlarmUnAckCount.AlarmUserDefNum1DescriptionReturns the inhibitor tagreference for the rate ofchange limit. Applies toanalog tags with alarms.Read only but can beconfigured inWindowMaker.Tracks the total number ofunacknowledged rate ofchange alarms on a giventag or alarm group.Tracks the total number ofalarms active for a giventag or alarm group.Tracks the total number ofunacknowledged alarmsactive for a tag or alarmgroup.Read/write real (floatingpoint), default 0 <strong>and</strong> valuenot set. Applies to discretetags with alarms, to analogtags with alarms, or toalarm groups.Note The value of thisdotfield is attached to thealarm, but ONLY if a value hasbeen set, for example, by ascript or a POKE..AlarmUserDefNum1SetRead/write discrete. TRUEif a script has defined the.AlarmUserDefNum1 forthe corresponding tag. Todisassociate the value of.AlarmUserDefNum1 forthe tag, set this dotfield toFALSE. The default isFALSE.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


134 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeDotfield.AlarmUserDefNum2DescriptionRead/write real (floatingpoint), default 0 <strong>and</strong> valuenot set. Applies to discretetags with alarms, to analogtags with alarms, or toalarm groups.Note The value of thisdotfield is attached to thealarm, but ONLY if a value hasbeen set, for example, by ascript or a POKE..AlarmUserDefNum2Set.AlarmUserDefStrRead/write discrete. TRUEif a script has defined the.AlarmUserDefNum2 forthe corresponding tag. Todisassociate the value of.AlarmUserDefNum2 forthe tag, set this dotfield toFALSE. The default isFALSE.Read/write text string,default "" <strong>and</strong> value not set.Applies to discrete tagswith alarms, to analog tagswith alarms, or to alarmgroups.Note The value of thisdotfield is attached to thealarm, but ONLY if a value hasbeen set, for example, by ascript or a POKE..AlarmUserDefStrSetRead/write discrete. TRUEif a script has defined the.AlarmUserDefStr for thecorresponding tag. Todisassociate the value of.AlarmUserDefStr for thetag, set this dotfield toFALSE. The default isFALSE.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


135Dotfield.AlarmValDeadb<strong>and</strong>.AlarmValueCount.AlarmValueUnAckCount.DevTarget.HiLimit, .HiHiLimit,.LoLimit, .LoLoLimit.HiStatus, .HiHiStatus,.LoStatus, .LoLoStatus.MajorDevPct.MajorDevStatus.MinorDevPctDescriptionMonitors/controls the valueof an alarm’s valuedeadb<strong>and</strong>.Tracks the total number ofvalue alarms active on agiven tagname or alarmgroup.Tracks the total number ofunacknowledged valuealarms active on a giventagname or alarm group.Monitors/controls the targetfor minor <strong>and</strong> majordeviation alarms.Read/write analog tagnamedotfields that monitors/controls the limits for valuealarm checks. Thesedotfields are only valid forinteger <strong>and</strong> real tags.Read only discrete dotfieldsthat determines whether analarm of a specified typeexists. These fields are onlyvalid for integer <strong>and</strong> realtags.Read/write integer dotfieldthat monitors or controlsthe major percentage ofdeviation for alarmchecking.Read-only discrete dotfieldthat determines whether amajor deviation alarmexists for the specifiedtagname.Read/write integer dotfieldmonitors <strong>and</strong>/or controlsthe minor percentage ofdeviation for alarmchecking.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


136 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeDotfield.MinorDevStatus.Name.Normal.ROCPct.ROCStatusDescriptionRead only discrete dotfieldused to determine whethera minor deviation alarmexists for the specifiedtagname.Read/write message dotfieldused to display the actualname of the tagname. Forexample, it can be used todetermine the name of anAlarm Group that a GroupVariable is pointing to, orthe name of a TagID tags. Itcan also be written tochange the Alarm Groupthat a Group Variable ispointing to.Read only discrete dotfieldthat is equal to 1 whenthere are no alarms for thespecified tagname. Thisdotfield is valid for AlarmGroups <strong>and</strong> GroupVariables as well asordinary tags.Read/write dotfield used tomonitor <strong>and</strong>/or control therate of change for alarmchecking.Read only discrete dotfieldused to determine whethera rate-of-change alarmexists for the specified tag.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Tags or Alarm Groups are in an Alarm Condition 137Determining if Tags or Alarm Groups are in anAlarm ConditionUse the following dotfields <strong>and</strong> a system tag to determine thestatus of alarms in a running application. You can find out ifa new alarm occurred or whether a tag or alarm group is inalarm or is the normal state. You can also find out the statusof discrete, deviation, <strong>and</strong> rate-of-change alarms.• $NewAlarm System Tag• $System System Tag• .Alarm Dotfield• .Normal Dotfield• .AlarmDsc Dotfield• .AlarmDev Dotfield• .AlarmROC Dotfield• .LoStatus Dotfield• .LoLoStatus Dotfield• .HiStatus Dotfield• .HiHiStatus Dotfield• .MinorDevStatus Dotfield• .MajorDevStatus Dotfield• .ROCStatus Dotfield<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


138 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time$NewAlarm System TagSet to 1 if a new alarm occurs in a running application. The$NewAlarm system tag is not set for remote alarms.Syntax$NewAlarm=value;Data TypeDiscrete (read/write)Valid Values0 or 1RemarksAssociate the $NewAlarm system tag with an animationobject in an application window. For example, associate thetag with an acknowledgment button that an operator clicksto reset the value of the tag to 0 <strong>and</strong> acknowledge the alarm.You can also link the $NewAlarm system tag to thePlaySound logic function to sound an audible warning whenan alarm occurs.ExampleAdd a button to an alarm acknowledgement window <strong>and</strong>attach the following action script that runs when theoperator clicks the button.Ack $System;$NewAlarm=0;HideSelf;When the operator clicks on the button, all alarms areacknowledged, the $NewAlarm system tag is reset to 0, <strong>and</strong>the alarm acknowledgement window is hidden from view.$System System TagThe default alarm group.CategoryalarmsUsage$SystemRemarksBy default, tags are assigned to this root alarm group. Alldefined alarm groups are descendants of $System.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Tags or Alarm Groups are in an Alarm Condition 139Data TypeSystem alarm groupExample(s)$System.Ack = 1; {Acknowledges All <strong>Alarms</strong>}.Alarm DotfieldReturns 0 when a specified tag or alarm group is notcurrently in an alarm state. When an alarm occurs, the.Alarm dotfield returns 1. It remains at 1 until the alarmcondition no longer exists. The .Alarm dotfield has an inversedotfield called .Normal.If the specified tag is the name of an alarm group, the .Alarmdotfield returns 1 if any of the tags that belong to the groupare in an alarm state.Category<strong>Alarms</strong>UsageTagName.AlarmParameterTagNameAny discrete, integer, real tag, indirect discrete <strong>and</strong> analogtag, or alarm group tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following statement verifies if Tag1 has an active alarmassociated with it:IF (Tag1.Alarm == 1) THENThe body of this IF-THEN statement is processed if activealarms exist within the PumpStation alarm group.IF (PumpStation.Alarm == 1) THENMyAlarmMessage="The pumping station currently has anALARM!";ENDIF;This dotfield is not linked to the .Ack or .UnAck dotfields.Therefore, even when an active alarm has beenacknowledged, .Alarm remains equal to 1.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


140 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.Normal DotfieldReturns 1 when a specified tag is not in an alarm condition.When an alarm occurs, the .Normal dotfield returns 0. The.Normal dotfield has an inverse dotfield called .Alarm.Category<strong>Alarms</strong>SyntaxTagName.NormalParameterTagNameAny discrete, integer, real tag, indirect discrete <strong>and</strong> analogtag, or alarm group tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following IF-THEN statement runs when there are noalarms associated with the Tag1 tag. When there is one ormore alarms active for Tag1, the "ELSE" body runs:IF (Tag1.Normal==1) THENMyOperatorMessage="Tag1 is OK - No alarms associatedwith it";ELSEMyOperatorMessage="Tag1 has one or more alarmsactive!";ENDIF;<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Tags or Alarm Groups are in an Alarm Condition 141.AlarmDsc DotfieldIndicates whether an alarm condition exists for a specifieddiscrete tag or alarm group. The default value is 0. When adiscrete alarm condition exists for the specified tag, it is setto a value of 1. The value remains 1 until the alarm conditionno longer exists.If the specified tag is the name of an alarm group, the.AlarmDsc dotfield is set to 1 if any of the tags within thegroup are in an active discrete alarm.Category<strong>Alarms</strong>UsageTagName.AlarmDscParameterTagNameAny discrete tag, indirect discrete tag, or alarm group.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following statement verifies if Tag1 has an activediscrete alarm associated with it:IF (Tag1.AlarmDsc == 1) THENMyAlarmMessage="The pumping station currentlyhas an ALARM!";ENDIF;This dotfield is not linked to the .Ack or .UnAck dotfields.Therefore, even when an active alarm has beenacknowledged, the .AlarmDsc dotfield remains equal to 1.See Also.Ack, .UnAck, .Alarm, .AlarmDsc, .AckDsc<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


142 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.AlarmDev DotfieldIndicates when a deviation alarm becomes active for thespecified tag or alarm group. The default value is 0. When adeviation alarm condition exists for the specified tag, it is setto a value of 1. The value remains 1 until the alarm conditionno longer exists.If the specified tag is the name of an alarm group, the.AlarmDev dotfield is set to 1 if any of the tags within thegroup are in an active alarm state.Category<strong>Alarms</strong>UsageTagName.AlarmDevParameterTagNameAny integer, real, indirect analog tag, or alarm group.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following statement verifies if Tag1 has an activedeviation alarm associated with it:IF (Tag1.AlarmDev == 1) THENThe body of this IF-THEN statement is processed if there areactive deviation alarms within the PumpStation alarmgroup.IF (PumpStation.AlarmDev == 1) THENMyAlarmMessage="The pumping station currentlyhas an ALARM!";ENDIF;This dotfield is not linked to the .Ack or .UnAck dotfields.Therefore, even when an active alarm has beenacknowledged, this dotfield remains equal to 1.See Also.Ack, .UnAck, .Alarm, .AckDev<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Tags or Alarm Groups are in an Alarm Condition 143.AlarmROC DotfieldIndicates when a rate-of-change alarm condition becomesactive for the specified tag or alarm group. The default valueis 0. When a rate-of-change alarm condition exists for thespecified tag, it is set to a value of 1. The value remains 1until the rate-of-change alarm condition no longer exists.If the specified tag is the name of an alarm group, the.AlarmROC dotfield is set to 1 if any of the tags within thegroup are in a rate-of-change alarm state.Category<strong>Alarms</strong>UsageTagName.AlarmROCParameterTagNameAny integer, real, indirect analog tag, or alarm group.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following statement verifies if Tag1 has an activerate-of-change alarm associated with it:IF (Tag1.AlarmROC == 1) THENThe body of this IF-THEN statement would be processed ifthere were active rate-of-change alarms within the alarmgroup named PumpStation.IF (PumpStation.AlarmROC == 1) THENMyAlarmMessage="The pumping station currentlyhas an ALARM!";ENDIF;This dotfield is not linked to the .Ack or .UnAck dotfield.Therefore, even when an active rate-of-change alarm hasbeen acknowledged, this dotfield remains equal to 1.See Also.Ack, .AckROC, .Alarm, .AlarmROCEnabled,.AlarmROCDisabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


144 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.LoStatus DotfieldIndicates when a Low alarm condition becomes active for thespecified tag or alarm group. The default value is 0. When aLow alarm condition exists for the specified tag, it is set to avalue of 1. The value remains 1 until the Low alarmcondition no longer exists.This dotfield is often used in conjunction with the .Alarm <strong>and</strong>.Ack dotfields to determine the specific alarm state of aparticular tag.Category<strong>Alarms</strong>UsageTagName.LoStatusParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following IF-THEN runs when the .LoStatus (low alarmcondition) for the MyTag tag is equal to 1.IF (MyTag.LoStatus == 1) THENOperatorMessage="MyTag has gone into LowAlarm";ENDIF;See Also.Alarm, .AlarmValue, .Ack, .LoLimit, .LoSet,.AlarmDisabled, .AlarmEnabled, .AlarmLoDisabled,.AlarmLoEnabled, .AlarmLoInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Tags or Alarm Groups are in an Alarm Condition 145.LoLoStatus DotfieldIndicates when a LoLo alarm condition becomes active forthe specified tag or alarm group. The default value is 0.When a LoLo alarm condition exists for the specified tag, it isset to a value of 1. The value remains 1 until the LoLo alarmcondition no longer exists.This dotfield is often used in conjunction with the .Alarm <strong>and</strong>.Ack dotfields to determine the exact nature of the alarmstatus of a particular tag within the system.Category<strong>Alarms</strong>UsageTagName.LoLoStatusParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following IF-THEN statement runs when the.LoLoStatus (LoLo alarm limit) for the MyTag tag is equal to1.IF (MyTag.LoLoStatus == 1) THENOperatorMessage="MyTag has gone into LoLoAlarm";ENDIF;See Also.Alarm, .AlarmValue, .Ack, .LoLoLimit, .LoLoSet,.AlarmDisabled, .AlarmEnabled, .AlarmLoLoDisabled,.AlarmLoLoEnabled, .AlarmLoLoInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


146 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.HiStatus DotfieldIndicates when a High alarm condition becomes active forthe specified tag or alarm group. The default value is 0.When a High alarm condition exists for the specified tag, it isset to a value of 1. The value remains 1 until the High alarmcondition no longer exists.This dotfield is often used in conjunction with the .Alarm <strong>and</strong>.Ack dotfields to determine the specific alarm state of a tag.Category<strong>Alarms</strong>UsageTagName.HiStatusParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThis script calls another script to stop a pump motor output ifthe MotorAmps tag goes into high limit alarm status.IF (MotorAmps.HiStatus == 1) THENCALL PumpShutdown( );ENDIF;See Also.Alarm, .AlarmValue, .Ack, .HiLimit, .HiSet,.AlarmDisabled, .AlarmEnabled, .AlarmHiDisabled,.AlarmHiEnabled, .AlarmHiInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Tags or Alarm Groups are in an Alarm Condition 147.HiHiStatus DotfieldIndicates when a HiHi alarm condition becomes active forthe specified tag or alarm group. The default value is 0.When a HiHi alarm condition exists for the specified tag, it isset to a value of 1. The value remains 1 until the HiHi alarmcondition no longer exists.This dotfield is often used in conjunction with the .Alarm <strong>and</strong>.Ack dotfields to determine the specific alarm state of a tag.Category<strong>Alarms</strong>UsageTagName.HiHiStatusParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following IF-THEN statement runs when the.HiHiStatus (HiHi alarm) for the MyTag tag is 1.IF (MyTag.HiHiStatus == 1) THENOperatorMessage="MyTag has gone into HiHiAlarm";ENDIF;See Also.Alarm, .AlarmValue, .Ack, .HiHiLimit, .HiHiSet,.AlarmDisabled, .AlarmEnabled, .AlarmHiHiDisabled,.AlarmHiHiEnabled, .AlarmHiHiInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


148 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.MinorDevStatus DotfieldIndicates when a minor deviation alarm becomes active forthe specified tag or alarm group. The default value is 0.When a minor deviation alarm condition exists for thespecified tag, it is set to a value of 1. The value remains 1until the minor deviation alarm condition no longer exists.This dotfield is often used in conjunction with the .Alarm <strong>and</strong>.Ack dotfields to determine the specific alarm state of a tag.Category<strong>Alarms</strong>UsageTagName.MinorDevStatusParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following IF-THEN statement runs when the.MinorDevStatus (minor deviation alarm) for the tag MyTagis equal to 1.IF (MyTag.MinorDevStatus == 1) THENOperatorMessage="MyTag has gone into a MinorDeviation Alarm";ENDIF;See Also.AckDev, .AlarmDev, .AlarmMinDevDisabled,.AlarmMinDevEnabled, .AlarmMinDevInhibitor,.MinorDevPct, .MajorDevStatus<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Tags or Alarm Groups are in an Alarm Condition 149.MajorDevStatus DotfieldIndicates when a major deviation alarm becomes active forthe specified tag or alarm group. The default value is 0.When a major deviation alarm condition exists, the specifieddotfield is set to 1. The value remains 1 until the majordeviation alarm condition no longer exists.This dotfield is often used in conjunction with the .Alarm <strong>and</strong>.Ack dotfields to determine the specific alarm state of a tag.Category<strong>Alarms</strong>UsageTagName.MajorDevStatusParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following IF-THEN statement runs when the.MajorDevStatus (Major deviation alarm) for the MyTag tagis equal to 1.IF (MyTag.MajorDevStatus == 1) THENOperatorMessage="MyTag has gone into a MajorDeviation Alarm";ENDIF;See Also.AckDev, .AlarmDev, .AlarmMajDevDisabled,.AlarmMajDevEnabled, .AlarmMajDevInhibitor,.MajorDevPct, .MajorDevSet, .MinorDevStatus<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


150 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.ROCStatus DotfieldIndicates when a rate-of-change alarm becomes active for thespecified tag or alarm group. The default value is 0. When arate-of-change alarm condition exists for the specified tag, itis set to a value of 1. The value remains 1 until therate-of-change alarm condition no longer exists.This dotfield is often used in conjunction with the .Alarm <strong>and</strong>.Ack dotfields to determine the specific alarm state of a tag.Category<strong>Alarms</strong>UsageTagName.ROCStatusParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe following IF-THEN statement runs when the.ROCStatus (rate-of-change alarm) for the MyTag tag isequal to 1.IF (MyTag.ROCStatus == 1) THENOperatorMessage="MyTag has gone into aRate-Of-Change alarm";ENDIF;See Also.ROCPct, .ROCSet<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Alarm Limits Are Set for Tags 151Determining if Alarm Limits Are Set for TagsThe following dotfields indicate whether alarm limits are setfor a tag while an application is running.• .LoLoSet Dotfield• .LoSet Dotfield• .HiSet Dotfield• .HiHiSet Dotfield• .MinorDevSet Dotfield• .MajorDevSet Dotfield• .ROCSet Dotfield.LoLoSet DotfieldIndicates whether a LoLo alarm limit has been set for aninteger or real tag.Category<strong>Alarms</strong>UsageTagName.LoLoSetParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe THEN block executes if the LoLo alarm limit is set forthe MyTag tag:IF (MyTag.LoLoSet== 1) THENMsgTag="LoLo alarm limit has been set forMyTag";ENDIF;See Also.Alarm, .AlarmValue, .Ack, .LoLoStatus, .LoLoLimit,.AlarmDisabled, .AlarmEnabled, .AlarmLoLoDisabled,.AlarmLoLoEnabled, .AlarmLoLoInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


152 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.LoSet DotfieldIndicates whether a Low alarm limit has been set for aninteger or real tag.Category<strong>Alarms</strong>UsageTagName.LoSetParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe THEN block executes if the Low alarm limit is set for theMyTag tag:IF (MyTag.LoSet== 1) THENMsgTag="Low alarm limit has been set forMyTag";ENDIF;See Also.Alarm, .AlarmValue, .Ack, .LoStatus, .LoLimit,.AlarmDisabled, .AlarmEnabled, .AlarmLoDisabled,.AlarmLoEnabled, .AlarmLoInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Alarm Limits Are Set for Tags 153.HiSet DotfieldIndicates whether a High alarm limit has been set for aninteger or real tag.Category<strong>Alarms</strong>UsageTagName.HiSetParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe THEN block executes if the High alarm limit is set forthe MyTag tag:IF (MyTag.HiSet== 1) THENMsgTag="High alarm limit has been set forMyTag";ENDIF;See Also.Alarm, .AlarmValue, .Ack, .HiHiStatus, .HiHiLimit,.AlarmDisabled, .AlarmEnabled, .AlarmHiHiDisabled,.AlarmHiHiEnabled, .AlarmHiHiInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


154 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.HiHiSet DotfieldIndicates whether a HiHi alarm limit has been set for aninteger or real tag.Category<strong>Alarms</strong>UsageTagName.HiHiSetParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe THEN block executes if the HiHi alarm limit is set forthe MyTag tag:IF (MyTag.HiHiSet== 1) THENMsgTag="HiHi alarm limit has been set forMyTag";ENDIF;See Also.Alarm, .AlarmValue, .Ack, .HiHiStatus, .HiHiLimit,.AlarmDisabled, .AlarmEnabled, .AlarmHiHiDisabled,.AlarmHiHiEnabled, .AlarmHiHiInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Alarm Limits Are Set for Tags 155.MinorDevSet DotfieldIndicates whether a minor deviation alarm limit has been setfor an integer or real tag.Category<strong>Alarms</strong>UsageTagName.MinorDevSetParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe THEN block executes if the minor deviation percentagealarm limit is set for the MyTag tag:IF (MyTag.MinorDevSet== 1) THENMsgTag="Minor deviation alarm limit has beenset for MyTag";ENDIF;See Also.AckDev, .AlarmDev, .AlarmMinDevDisabled,.AlarmMinDevEnabled, .AlarmMinDevInhibitor,.MinorDevPct, .MinorDevStatus<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


156 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.MajorDevSet DotfieldIndicates whether a major deviation alarm limit has been setfor an integer or real tag.Category<strong>Alarms</strong>UsageTagName.MajorDevSetParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe THEN block executes if the major deviation percentagealarm limit is set for the MyTag tag:IF (MyTag.MajorDevSet== 1) THENMsgTag="Major deviation alarm limit has beenset for MyTag";ENDIF;See Also.AckDev, .AlarmDev, .AlarmMajDevDisabled,.AlarmMajDevEnabled, .AlarmMajDevInhibitor,.MajorDevPct, .MajorDevStatus<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining if Alarm Limits Are Set for Tags 157.ROCSet DotfieldIndicates whether a rate-of-change alarm limit has been setfor an integer or real tag.Category<strong>Alarms</strong>UsageTagName.ROCSetParameterTagNameAny integer, real, or indirect analog tag.Data TypeDiscrete (read-only)Valid Values0 or 1ExampleThe THEN block executes if the rate-of-change alarm limit isset for the MyTag tag:IF (MyTag.ROCSet == 1) THENMsgTag="Rate-of-change alarm limit has beenset for MyTag";ENDIF;See Also.Alarm, .Ack, .LoLimit, .LoLoLimit, .HiHiLimit, .HiLimit,.HiSet, .LoSet, .LoLoSet, .HiStatus, .HiHiStatus, .ROCPct,.ROCStatus<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


158 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeEnabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tag orAlarm GroupThe <strong>InTouch</strong> <strong>HMI</strong> provides a set of dotfields that can enableor disable alarms that are set for a tag while an application isrunning.Enabling/Disabling All <strong>Alarms</strong>The .AlarmEnabled <strong>and</strong> .AlarmDisabled dotfields enable ordisable alarms for a tag or alarm group based upon theirrespective values. The alarm states associated with bothdotfields are the inverse of each other. In the case of.AlarmEnabled, a value of 1 enables alarms for a tag oralarm group. An .AlarmDisabled value of 1 disables alarmsfor a tag or alarm group.When either dotfield enables alarms for an alarm group, alltags that belong to the group have alarming enabled. Wheneither dotfield disables alarms, all events <strong>and</strong> alarms areignored. The alarms are not stored in alarm memory, nor arethey written to disk..AlarmEnabled DotfieldEnables or disables alarms for a tag or an alarm group.Category<strong>Alarms</strong>UsageTagName.AlarmEnabledParameterTagNameAny discrete, integer, real, indirect discrete, indirect analogtag, or alarm group.RemarksWhen .AlarmEnabled is set to 0, all events <strong>and</strong> alarms areignored. They are not stored in alarm memory, nor are theywritten to disk. It is very important to re-enableevents/alarms, whenever possible, to avoid data loss.When the specified tag is an alarm group, all alarmsassociated with the tags within the specified alarm group areenabled.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Enabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tag or Alarm Group 159Data TypeDiscrete (read/write)Valid Values0 = Disable alarms1 = Enable alarms (default)ExampleThe following example disables the alarms of the Tag1 tag:Tag1.AlarmEnabled=0;See Also.AlarmDisabled.AlarmDisabled DotfieldEnables or disables alarms for a tag or an alarm group.Category<strong>Alarms</strong>UsageTagName.AlarmDisabledParameterTagNameAny discrete, integer, real, indirect discrete, indirect analogtag, or alarm group.RemarksWhen .AlarmDisabled is set to 1, all events <strong>and</strong> alarms areignored. They are not stored in alarm memory, nor are theywritten to disk. It is very important to re-enableevents/alarms, whenever possible, to avoid data loss.When the specified tag is an alarm group, all alarmsassociated with the tags within the specified alarm group aredisabled.This is the opposite of the .AlarmEnabled dotfield.ExampleThe following example enables the alarms of the Tag1 tag.Tag1.AlarmDisabled=0;See Also.AlarmEnabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


160 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeEnabling/Disabling LoLo <strong>Alarms</strong>The .AlarmLoLoEnabled <strong>and</strong> .AlarmLoLoDisabled dotfieldsenable or disable LoLo alarms for a tag or alarm group basedupon their respective values. The LoLo alarm statesassociated with both dotfields are the inverse of each other.In the case of .AlarmLoLoEnabled, a value of 1 enables LoLoalarms for a tag or alarm group. An .AlarmLoLoDisabledvalue of 1 disables LoLo alarms for a tag or alarm group.When either dotfield enables LoLo alarms for an alarmgroup, all tags that belong to the group have LoLo alarmsenabled. When either dotfield disables LoLo alarms, all LoLoalarms are ignored. The alarms are not stored in alarmmemory, nor are they written to disk..AlarmLoLoEnabled DotfieldEnables or disables LoLo condition events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmLoLoEnabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmLoLoEnabled is set to 0, all LoLo conditionevents <strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.Data TypeDiscrete (read/write)Valid Values0 = Disable alarms1 = Enable alarms (default)ExampleThe following example disables the LoLo alarms of the Tag1tag:Tag1.AlarmLoLoEnabled=0;See Also.AlarmDisabled, .AlarmEnabled, .AlarmLoLoDisabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Enabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tag or Alarm Group 161.AlarmLoLoDisabled DotfieldEnables or disables LoLo condition events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmLoLoDisabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmLoLoDisabled is set to 1, all LoLo conditionevents <strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.Data TypeDiscrete (read/write)Valid Values1 = Disable alarms0 = Enable alarms (default)ExampleThe following example enables LoLo alarms of the Tag2 tag:Tag2.AlarmLoLoDisabled=0;See Also.AlarmDisabled, .AlarmEnabled, .AlarmLoLoEnabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


162 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeEnabling/Disabling Low <strong>Alarms</strong>The .AlarmLoEnabled <strong>and</strong> .AlarmLoDisabled dotfieldsenable or disable Low alarms for a tag or alarm group basedupon their respective values. The Low alarm statesassociated with both dotfields are the inverse of each other.In the case of .AlarmLoEnabled, a value of 1 enables Lowalarms for a tag or alarm group. An .AlarmLoDisabled valueof 1 disables Low alarms for a tag or alarm group.When either dotfield enables Low alarms for an alarm group,all tags that belong to the group have Low alarms enabled.When either dotfield disables Low alarms, all Low alarmsare ignored. The alarms are not stored in alarm memory, norare they written to disk..AlarmLoEnabled DotfieldEnables or disables Low condition events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmLoEnabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmLoEnabled is set to 0, all Low condition events<strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.Data TypeDiscrete (read/write)Valid Values0 = Disable alarms1 = Enable alarms (default)ExampleThe following example disables the Low alarms of the Tag1tag:Tag1.AlarmLoEnabled=0;See Also.AlarmDisabled, .AlarmEnabled, .AlarmLoDisabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Enabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tag or Alarm Group 163.AlarmLoDisabled DotfieldEnables or disables Low condition events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmLoDisabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmLoDisabled is set to 1, all Low condition events<strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.Data TypeDiscrete (read/write)Valid Values1 = Disable alarms0 = Enable alarms (default)ExampleThe following example enables Low alarms of the Tag2 tag:Tag2.AlarmLoDisabled=0;See Also.AlarmDisabled, .AlarmEnabled, .AlarmLoEnabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


164 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeEnabling/Disabling High <strong>Alarms</strong>The .AlarmHiEnabled <strong>and</strong> .AlarmHiDisabled dotfieldsenable or disable High alarms for a tag or alarm group basedupon their respective values. The High alarm statesassociated with both dotfields are the inverse of each other.In the case of .AlarmHiEnabled, a value of 1 enables Highalarms for a tag or alarm group. An .AlarmHiDisabled valueof 1 disables High alarms for a tag or alarm group.When either dotfield enables High alarms for an alarmgroup, all tags that belong to the group have High alarmsenabled. When either dotfield disables High alarms, all Highalarms are ignored. The High alarms are not stored in alarmmemory, nor are they written to disk..AlarmHiEnabled DotfieldEnables or disables High condition events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmHiEnabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmHiEnabled is set to 0, all High condition events<strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.This is the opposite of the .AlarmHiDisabled dotfield.Data TypeDiscrete (read/write)Valid Values0 = Disable alarms1 = Enable alarms (default)ExampleThe following example disables the High alarms of the tagTag1:Tag1.AlarmHiEnabled=0;See Also.AlarmHiDisabled, .AlarmEnabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Enabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tag or Alarm Group 165.AlarmHiDisabled DotfieldEnables or disables High condition events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmHiDisabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmHiDisabled is set to 1, all High condition events<strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.This is the opposite of the .AlarmHiEnabled dotfield.Data TypeDiscrete (read/write)Valid Values1 = Disable alarms0 = Enable alarms (default)ExampleThe following example enables High alarms of the Tag2 tag:Tag2.AlarmHiDisabled=0;See Also.AlarmHiEnabled, .AlarmDisabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


166 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeEnabling/Disabling HiHi <strong>Alarms</strong>The .AlarmHiHiEnabled <strong>and</strong> .AlarmHiHiDisabled dotfieldsenable or disable HiHi alarms for a tag or alarm group basedupon their respective values. The HiHi alarm statesassociated with both dotfields are the inverse of each other.In the case of .AlarmHiHiEnabled, a value of 1 enables HiHialarms for a tag or alarm group. An .AlarmHiHiDisabledvalue of 1 disables HiHi alarms for a tag or alarm group.When either dotfield enables HiHi alarms for an alarmgroup, all tags that belong to the group have HiHi alarmsenabled. When either dotfield disables HiHi alarms, all HiHialarms are ignored. The HiHi alarms are not stored in alarmmemory, nor are they written to disk..AlarmHiHiEnabled DotfieldEnables <strong>and</strong>/or disables HiHi condition events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmHiHiEnabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmHiHiEnabled is set to 0, all HiHi conditionevents <strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.Data TypeDiscrete (read/write)Valid Values0 = Disable alarms1= Enable alarms (default)ExampleThe following example disables the HiHi alarms of the Tag1tag:Tag1.AlarmHiHiEnabled=0;See Also.AlarmHiHiDisabled, .AlarmEnabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Enabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tag or Alarm Group 167.AlarmHiHiDisabled DotfieldEnables or disables HiHi condition events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmHiHiDisabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmHiHiDisabled is set to 1, all HiHi conditionevents <strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.This is the opposite of the .AlarmHiHiEnabled dotfield.Data TypeDiscrete (read/write)Valid Values1 = Disable alarms0 = Enable alarms (default)ExampleThe following example enables HiHi alarms of the Tag2 tag:Tag2.AlarmHiHiDisabled=0;See Also.AlarmHiHiEnabled, .AlarmDisabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


168 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeEnabling/Disabling Discrete <strong>Alarms</strong>The .AlarmDscEnabled <strong>and</strong> .AlarmDscDisabled dotfieldsenable or disable discrete alarms for a tag or alarm groupbased upon their respective values. The discrete alarm statesassociated with both dotfields are the inverse of each other.In the case of .AlarmDscEnabled, a value of 1 enablesdiscrete alarms for a tag or alarm group. An.AlarmDscDisabled value of 1 disables discrete alarms for atag or alarm group.When either dotfield enables discrete alarms for an alarmgroup, all tags that belong to the group have discrete alarmsenabled. When either dotfield disables discrete alarms, alldiscrete alarms are ignored. The discrete alarms are notstored in alarm memory, nor are they written to disk..AlarmDscEnabled DotfieldIndicates indicates whether or not the tag can generatediscrete alarms.Category<strong>Alarms</strong>UsageTagName.AlarmDscEnabledParameterTagNameAny discrete or indirect discrete tag or alarm group.RemarksWhen .AlarmDscEnabled is set to 0, all discrete conditionalarms <strong>and</strong> events are ignored. They are not stored in alarmmemory, nor are they written to a disk. It is very importantto re-enable events/alarms, whenever possible, to avoid dataloss.This is the opposite of the .AlarmDscDisabled dotfield.Data TypeDiscrete (read/write)Valid Values0 = Disable alarms1= Enable alarms (default)ExampleThe following example disables the discrete alarms of theTag1 tag:Tag1.AlarmDscEnabled=0;See Also.AlarmDscDisabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Enabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tag or Alarm Group 169.AlarmDscDisabled DotfieldIndicates whether or not the tag can generate discretealarms.Category<strong>Alarms</strong>UsageTagName.AlarmDscDisabledParameterTagNameAny discrete or indirect discrete tag or alarm group.RemarksWhen .AlarmDscDisabled is set to 1, all discrete conditionalarms <strong>and</strong> events are ignored. They are not stored in alarmmemory, nor are they written to a disk. It is very importantto re-enable events/alarms, whenever possible, to avoid dataloss.This is the opposite of the .AlarmDscEnabled dotfield.Data TypeDiscrete (read/write)Valid Values1 = Disable alarms0 = Enable alarms (default)ExampleThe following example enables discrete alarms of the Tag2tag:Tag2.AlarmDscDisabled=0;<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


170 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeEnabling/Disabling Minor Deviation <strong>Alarms</strong>The .AlarmMinDevEnabled <strong>and</strong> .AlarmMinDevDisableddotfields enable or disable minor deviation alarms for a tagor alarm group based upon their respective values. Theminor deviation alarm states associated with both dotfieldsare the inverse of each other. In the case of.AlarmMinDevEnabled, a value of 1 enables minor deviationalarms for a tag or alarm group. An .AlarmMinDevDisabledvalue of 1 disables minor deviation alarms for a tag or alarmgroup.When either dotfield enables minor deviation alarms for analarm group, all tags that belong to the group have minordeviation alarms enabled. When either dotfield disablesminor deviation alarms, all minor deviation alarms areignored. The minor deviation alarms are not stored in alarmmemory, nor are they written to disk..AlarmMinDevEnabled DotfieldEnables or disables minor deviation events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmMinDevEnabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmMinDevEnabled is set to 0, all minor deviationevents <strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.Data TypeDiscrete (read/write)Valid Values0 = Disable alarms1= Enable alarms (default)ExampleThe following example disables the minor deviation alarms ofthe Tag1 tag:Tag1.AlarmMinDevEnabled=0;See Also.AlarmDisabled, .AlarmEnabled, .AlarmMinDevDisabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Enabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tag or Alarm Group 171.AlarmMinDevDisabled DotfieldEnables or disables minor deviation events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmMinDevDisabledParameterTagNameAny integer, real, or indirect analog tag, or alarm group.RemarksWhen .AlarmMinDevDisabled is set to 1, all minor deviationevents <strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.This is the opposite of the .AlarmMinDevEnabled dotfield.Data TypeDiscrete (read/write)Valid Values1 = Disable alarms0 = Enable alarms (default)ExampleThe following example enables minor deviation alarms of theTag2 tag:Tag2.AlarmMinDevDisabled=0;See Also.AlarmDisabled, .AlarmEnabled, .AlarmMinDevEnabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


172 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeEnabling/Disabling Major Deviation <strong>Alarms</strong>The .AlarmMajDevEnabled <strong>and</strong> .AlarmMajDevDisableddotfields enable or disable major deviation alarms for a tag oralarm group based upon their respective values. The majordeviation alarm states associated with both dotfields are theinverse of each other. In the case of .AlarmMajDevEnabled, avalue of 1 enables major deviation alarms for a tag or alarmgroup. An .AlarmMajDevDisabled value of 1 disables majordeviation alarms for a tag or alarm group.When either dotfield enables major deviation alarms for analarm group, all tags that belong to the group have majordeviation alarms enabled. When either dotfield disablesmajor deviation alarms, all major deviation alarms areignored. The major deviation alarms are not stored in alarmmemory, nor are they written to disk..AlarmMajDevEnabled DotfieldEnables or disables major deviation events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmMajDevEnabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmMajDevEnabled is set to 0, all major deviationevents <strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.This is the opposite of the .AlarmMajDevDisabled dotfield.Data TypeDiscrete (read/write)Valid Values0 = Disable alarms1= Enable alarms (default)ExampleThe following example disables major deviation alarms of theTag1 tag:Tag1.AlarmMajDevEnabled=0;See Also.AlarmDisabled, .AlarmEnabled, .AlarmMajDevDisabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Enabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tag or Alarm Group 173.AlarmMajDevDisabled DotfieldEnables or disables major deviation events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmMajDevDisabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmMajDevDisabled is set to 1, all major deviationevents <strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.This is the opposite of the .AlarmMajDevEnabled dotfield.Data TypeDiscrete (read/write)Valid Values1 = Disable alarms0 = Enable alarms (default)ExampleThe following example enables major deviation alarms of theTag2 tag:Tag2.AlarmMajDevDisabled=0;See Also.AlarmDisabled, .AlarmEnabled, .AlarmMajDevEnabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


174 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeEnabling/Disabling Rate-Of-Change <strong>Alarms</strong>The .AlarmROCEnabled <strong>and</strong> .AlarmROCDisabled dotfieldsenable or disable rate-of-change alarms for a tag or alarmgroup based upon their respective values. The rate-of-changealarm states associated with both dotfields are the inverse ofeach other. In the case of .AlarmROCEnabled, a value of 1enables rate-of-change alarms for a tag or alarm group. An.AlarmROCDisabled value of 1 disables rate-of-changealarms for a tag or alarm group.When either dotfield enables rate-of-change alarms for analarm group, all tags that belong to the group haverate-of-change alarms enabled. When either dotfield disablesrate-of-change alarms, all rate-of-change alarms are ignored.The rate-of-change alarms are not stored in alarm memory,nor are they written to disk..AlarmROCEnabled DotfieldEnables or disables rate-of-change events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmROCEnabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmROCEnabled is set to 0, all rate-of-changecondition events <strong>and</strong> alarms are ignored. They are not storedin alarm memory, nor are they written to disk. It is veryimportant to re-enable events/alarms, whenever possible, toavoid data loss.This is the opposite of the .AlarmROCDisabled dotfield.Data TypeDiscrete (read/write)Valid Values0 = Disable alarms1 = Enable alarms (default)ExampleThe following example disables the rate-of-change alarms ofthe Tag1 tag:Tag1.AlarmROCEnabled=0;See Also.AlarmDisabled, .AlarmEnabled, .AlarmROCDisabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Enabling <strong>and</strong> Disabling <strong>Alarms</strong> for a Tag or Alarm Group 175.AlarmROCDisabled DotfieldDisables or enables rate-of-change events <strong>and</strong> alarms.Category<strong>Alarms</strong>UsageTagName.AlarmROCDisabledParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksWhen .AlarmROCDisabled is set to 1, all rate-of-changeevents <strong>and</strong> alarms are ignored. They are not stored in alarmmemory, nor are they written to disk. It is very important tore-enable events/alarms, whenever possible, to avoid dataloss.This is the opposite of the .AlarmROCEnabled property.Data TypeDiscrete (read/write)Valid Values1= Disable alarms0= Enable alarms (default)ExampleThe following example enables rate-of-change alarms of theTag2 tag:Tag2.AlarmROCDisabled=0;See Also.AlarmDisabled, .AlarmEnabled, .AlarmROCEnabled<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


176 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeChanging a Tag's Alarm LimitsUse the following dotfields to change a tag’s alarm limitswhile an application is running. You can change the limit forLoLo, Low, High, <strong>and</strong> HiHi alarms, the major <strong>and</strong> minordeviation percentage <strong>and</strong> target, <strong>and</strong> the rate-of-changedeviation.• .LoLoLimit Dotfield• .LoLimit Dotfield• .HiLimit Dotfield• .HiHiLimit Dotfield• .MinorDevPct Dotfield• .MajorDevPct Dotfield• .DevTarget Dotfield• .ROCPct Dotfield.LoLoLimit DotfieldChanges a tag’s LoLo alarm limit.Category<strong>Alarms</strong>UsageTagName.LoLoLimitParameterTagNameAny integer, real, or indirect analog tag.RemarksIf you want to continue to use the run-time value of thisdotfield after an intentional or accidental shutdown ofWindowViewer, select the Retentive Parameters option in theTagname Dictionary.Data TypeAnalog (read/write)Valid ValuesMust be in value range configured for the specified tag.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Changing a Tag's Alarm Limits 177ExampleThis statement decreases the LoLo alarm limit for theMyTag1 tag by a value of 10:MyTag1.LoLoLimit=MyTag1.LoLoLimit - 10;See Also.Alarm, .AlarmValue, .Ack, .LoLoStatus, .LoLoSet,.AlarmDisabled, .AlarmEnabled, .AlarmLoLoDisabled,.AlarmLoLoEnabled, .AlarmLoLoInhibitor.LoLimit DotfieldChanges a tag’s Low alarm limit.Category<strong>Alarms</strong>UsageTagname.LoLimitParameterTagnameAny integer, real, or indirect analog tag.RemarksIf you want to continue to use the run-time value of thisdotfield after an intentional or accidental shutdown ofWindowViewer, select the Retentive Parameters option in theTagname Dictionary.Data TypeAnalog (read/write)Valid ValuesMust be in value range configured for the specified tag.ExampleThis statement decreases the Low alarm limit for the MyTagtag by a value of 10:MyTag.LoLimit=MyTag.LoLimit - 10;See Also.Alarm, .AlarmValue, .Ack, .LoStatus, .LoSet,.AlarmDisabled, .AlarmEnabled, .AlarmLoDisabled,.AlarmLoEnabled, .AlarmLoInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


178 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.HiLimit DotfieldChanges a tag’s High alarm limit.Category<strong>Alarms</strong>UsageTagName.HiLimitParameterTagNameAny integer, real, or indirect analog tag.RemarksIf you want to continue to use the run-time value of thisdotfield after an intentional or accidental shutdown ofWindowViewer, select the Retentive Parameters option in theTagname Dictionary.Data TypeAnalog (read/write)Valid ValuesMust be in value range configured for the specified tag.ExampleThis statement sets the High limit alarm for the PumpTemptag to 212:PumpTemp.HiLimit = 212;See Also.Alarm, .AlarmValue, .Ack, .HiHiStatus, .HiHiSet,.AlarmDisabled, .AlarmEnabled, .AlarmHiHiDisabled,.AlarmHiHiEnabled, .AlarmHiHiInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Changing a Tag's Alarm Limits 179.HiHiLimit DotfieldChanges a tag’s HiHi alarm limit.Category<strong>Alarms</strong>UsageTagName.HiHiLimitParameterTagNameAny integer, real, or indirect analog tag.RemarksIf you want to continue to use the run-time value of thisdotfield after an intentional or accidental shutdown ofWindowViewer, select the Retentive Parameters option in theTagname Dictionary.Data TypeAnalog (read/write)Valid ValuesMust be in value range configured for the specified tag.ExampleThe following statement increases the HiHi alarm limit forthe MyTag tag by a value of 5:MyTag.HiHiLimit=MyTag.HiHiLimit + 5;See Also.Alarm, .AlarmValue, .Ack, .HiHiStatus, .HiHiSet,.AlarmDisabled, .AlarmEnabled, .AlarmHiHiDisabled,.AlarmHiHiEnabled, .AlarmHiHiInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


180 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.MinorDevPct DotfieldChanges a tag’s minor deviation alarm limit.Category<strong>Alarms</strong>UsageTagName.MinorDevPctParameterTagNameAny integer, real, or indirect analog tag.RemarksIf you want to continue to use the run-time value of thisdotfield after an intentional or accidental shutdown ofWindowViewer, select the Retentive Parameters option in theTagname Dictionary.Data TypeReal (read/write)Valid Values0 to 100ExampleThe following statement sets the minor deviation limitproperty for the MyTag tag to 25 percent:MyTag.MinorDevPct=25;See Also.AckDev, .AlarmDev, .AlarmMinDevDisabled,.AlarmMinDevEnabled, .AlarmMinDevInhibitor,.MinorDevSet, .MinorDevStatus<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Changing a Tag's Alarm Limits 181.MajorDevPct DotfieldChanges a tag’s major alarm deviation limit.Category<strong>Alarms</strong>UsageTagName.MajorDevPctParameterTagNameAny integer, real, or indirect analog tag.RemarksIf you want to continue to use the run-time value of thisdotfield after an intentional or accidental shutdown ofWindowViewer, select the Retentive Parameters option in theTagname Dictionary.Data TypeReal (read/write)Valid Values0 to 100ExampleThe following statement sets the major deviation limitproperty for the MyTag tag to 25 percent:MyTag.MajorDevPct=25;See Also.AckDev, .AlarmDev, .AlarmMajDevDisabled,.AlarmMajDevEnabled, .AlarmMajDevInhibitor,.MajorDevSet, .MajorDevStatus<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


182 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.DevTarget DotfieldChanges the target for a tag’s minor <strong>and</strong> major deviationalarms.Category<strong>Alarms</strong>UsageTagName.DevTargetParameterTagNameAny integer, real, or indirect analog tag.RemarksIf you want to continue to use the run-time value of thisdotfield after an intentional or accidental shutdown ofWindowViewer, select the Retentive Parameters option in theTagname Dictionary.Data TypeReal (read/write)Valid ValuesMust be in value range specified for the tagExampleThe following statement sets the deviation target for theMyTag tag to 500;MyTag.DevTarget=500;See Also.AckDev, .AlarmDev, .AlarmMajDevDisabled,.AlarmMajDevEnabled, .AlarmMajDevInhibitor,.MajorDevSet, .MajorDevStatus<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Changing a Tag's Alarm Limits 183.ROCPct DotfieldChanges a tag’s rate-of-change alarm limit.Category<strong>Alarms</strong>UsageTagName.ROCPctParameterTagNameAny integer, real, or indirect analog tag.RemarksThe dotfield corresponds directly to the same field configuredwithin the alarm section of the Tagname Dictionary.Data TypeInteger (read/write)Valid Values0 to 100ExampleThe following statement sets the rate-of-change alarm limitof the MyTag tag to 25 percent:MyTag.ROCPct=25;See Also.ROCStatus, .ROCSet<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


184 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeChanging a Tag's Alarm Deadb<strong>and</strong>sUse the following dotfields to change a tag’s alarm deadb<strong>and</strong>range while an application is running:• .AlarmValDeadb<strong>and</strong> Dotfield• .AlarmDevDeadb<strong>and</strong> Dotfield.AlarmValDeadb<strong>and</strong> DotfieldChanges a tag’s deadb<strong>and</strong> value while an <strong>InTouch</strong>application is running.Category<strong>Alarms</strong>UsageTagName.AlarmValDeadb<strong>and</strong>ParameterTagNameAny integer, real, or indirect analog tag.RemarksIf you want to continue to use the run-time value of thisdotfield after an intentional or accidental shutdown ofWindowViewer, select the Retentive Parameters option in theTagname Dictionary.Data TypeAnalog (read/write)Valid ValuesMust be in value range specified for the tagExampleThe following statement changes the deadb<strong>and</strong> for Tag1 tagto a value of 25:Tag1.AlarmValDeadb<strong>and</strong>=25;See Also.AlarmDevDeadb<strong>and</strong><strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Changing a Tag's Alarm Deadb<strong>and</strong>s 185.AlarmDevDeadb<strong>and</strong> DotfieldChanges a tag’s deviation percentage deadb<strong>and</strong> for bothminor <strong>and</strong> major deviation alarms.Category<strong>Alarms</strong>UsageTagName.AlarmDevDeadb<strong>and</strong>ParameterTagNameAny integer, real, or indirect analog tag.RemarksIf you want to continue to use the run-time value of thisdotfield after an intentional or accidental shutdown ofWindowViewer, select the Retentive Parameters option in theTagname Dictionary.Data TypeInteger (read/write)Valid Values0 to 100ExampleThe following statement changes the deviation deadb<strong>and</strong>percentage to 25 percent:tag.AlarmDevDeadb<strong>and</strong>=25;See Also.AlarmValDeadb<strong>and</strong>, .AlarmDev<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


186 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeChanging the Alarm Comment Associated witha TagThe .AlarmComment dotfield returns a comment text stringthat is associated with the alarm of a tag or alarm group..AlarmComment DotfieldReturns a comment text string that is associated with thealarm of a tag or alarm group. By default, it is empty in anew application.Category<strong>Alarms</strong>UsageTagName.AlarmCommentParameterTagNameAny tag or alarm group.Data TypeMessage (read/write)Valid ValuesTextExampleThe following example returns the alarm comment for a tag<strong>and</strong> places it in another memory Message tag:mTag1=Tag1.AlarmComment;The following example returns the alarm comment for a tagselected in an distributed alarm object AlmObj_1 <strong>and</strong> placesit in the almComment memory message tag :GetPropertyM(“AlmObj_1.AlarmComment”, almComment);See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmDate,.AlarmLimit, .AlarmName, .AlarmOprName,.AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState,.AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Associating User-Defined Information with an Alarm Instance 187Associating User-Defined Information with anAlarm InstanceYou can attach three items to an alarm record: two numbers<strong>and</strong> a string. Use the following dotfields to add information toan alarm record.• .AlarmUserDefNumX Dotfields• .AlarmUserDefStr Dotfield.AlarmUserDefNumX DotfieldsTo simplify setting user values, you can set these dotfields onan alarm group as well as on a specific tag. For example,InBatch could set the batch number in .AlarmUserDefNum1all the way up at the $System alarm group, causing allalarms to have the batch number attached.The .AlarmUserDefNum1 <strong>and</strong> .AlarmUserDefNum2dotfields correspond to the User1 <strong>and</strong> User2 columns in theAlarm Viewer control, respectively.If you set .AlarmUserDefNum1 on an alarm group, it appliesto all alarms in that group <strong>and</strong> any of its sub-groups. You canalso specifically set the value of .AlarmUserDefNum1 on atag. In this case, it applies only to that tag <strong>and</strong> overwritesany setting of .AlarmUserDefNum1 in the tag's alarm group.Category<strong>Alarms</strong>UsageTagName.AlarmUserDefNum1TagName.AlarmUserDefNum2ParameterTagNameAny discrete, integer, real, indirect discrete, indirect analogtag, or alarm group.RemarksThis user-defined dotfield is enabled for a wide range of tags,particularly discrete tags, analog tags, <strong>and</strong> alarm groups(whether or not they have alarms defined). You can leavethese items unset, set all of them, or set only some of themfor any individual tag, group, or parent group.The value of this dotfield is attached to the alarm, but ONLYif a value has been set, for example, by a script or a POKE.Data TypesAnalog (read/write)<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


188 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeValid ValuesAny real value <strong>and</strong> not set (default)ExamplesThe following examples use constant values. However, youcan use <strong>InTouch</strong> QuickScripts to copy the value of anothertag to any of these user-defined fields. You can also use PtAccto set or inspect them, or use <strong>InTouch</strong> as an I/O Server to getor set the values.$System.AlarmUserDefNum1 = 4;GroupA.AlarmUserDefNum1 = 27649;In concept, the lowest-level setting prevails, when an alarmnotification is sent to the Distributed Alarm system. That is,if the tag has .AlarmUserDefNum1 set to some value, thealarm record should be populated using that setting.However, if the tag doesn't have one, WindowViewer checksif the tag's alarm group has one, <strong>and</strong> so on up the line untilthe root group $System is reached. If no setting is found atany level, the entry in the alarm record will be left empty(zero for numbers, an empty string for strings).Note This hierarchical search is h<strong>and</strong>led independently for eachitem. Therefore, if a tag has a setting for .AlarmUserDefNum2 butnot for .AlarmUserDefNum1, but its parent group has a setting for.AlarmUserDefNum1, the tag will inherit the setting for.AlarmUserDefNum1 from its parent group.See Also.AlarmUserDefStr.AlarmUserDefStr DotfieldThe .AlarmUserDefStr dotfield is attached to the informationrecorded for each alarm by Alarm DB Logger in the alarmdatabase. The .AlarmUserDefStr dotfield corresponds todatabase field User3. You can use the "user-defined" columnsin a SELECT statement to select particular collections ofalarms for database operations. For example, if$System.AlarmUserDefStr is set to a Batch String <strong>and</strong> ischanged each time the Batch changes, a selection involvingthe database field User3 can be used to select alarms forparticular batches.Category<strong>Alarms</strong>UsageTagname.AlarmUserDefStr<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Associating User-Defined Information with an Alarm Instance 189ParameterTagnameAny discrete, integer, real, indirect discrete, or indirectanalog tag, or alarm group.RemarksThis user-defined dotfield is enabled for a wide range of tags,particularly discrete tags, analog tags, <strong>and</strong> alarm groups(whether or not they have alarms defined). You can leavethese items unset, set all of them, or set only some of themfor any individual tag, group, or parent group.The value of this dotfield is attached to the alarm, but ONLYif a value has been set, for example, using a script or aPOKE.Data TypeMessage (read/write)Valid ValuesNULL <strong>and</strong> any valid stringExamplesThis example uses a constant value. However, you can use<strong>InTouch</strong> QuickScripts to copy the value of another tag to anyof these user-defined fields. You can also use PtAcc to set orinspect them, or use <strong>InTouch</strong> as an I/O Server to get or setthe values.Tag04.AlarmUserDefStr = "Joe";In concept, the lowest-level setting prevails, when an alarmnotification is sent to the Distributed Alarm system. That is,if the tag has .AlarmUserDefStr set to some value, the alarmrecord should be populated using that setting. However, ifthe tag doesn't have one, WindowViewer will check if thetag's alarm group has one, <strong>and</strong> so on up the line until the rootgroup $System is reached. If no setting is found at any level,the entry in the alarm record will be left empty (zero fornumbers, an empty string for strings).Also note that this hierarchical search is h<strong>and</strong>ledindependently for each item. Therefore, if a tag has a settingfor .AlarmUserDefNum1 but not for .AlarmUserDefStr, butits parent group has a setting for .AlarmUserDefStr, thatsetting is used in the alarm record.See Also.AlarmUserDefNumX<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


190 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run TimeDetermining the Inhibitor Tag of a Tag orAlarm GroupUse the following dotfields to determine the inhibitor tag ofvarious types of alarms.• .AlarmDscInhibitor Dotfield• .AlarmLoLoInhibitor Dotfield• .AlarmLoInhibitor Dotfield• .AlarmHiInhibitor Dotfield• .AlarmHiHiInhibitor Dotfield• .AlarmMinDevInhibitor Dotfield• .AlarmMajDevInhibitor Dotfield• .AlarmROCInhibitor Dotfield.AlarmDscInhibitor DotfieldReturns the name of the inhibitor tag assigned to a discretealarm.Category<strong>Alarms</strong>UsageTagName.AlarmDscInhibitorParameterTagNameAny discrete tag or alarm group.RemarksConfigured in WindowMaker. Cannot be changed during runtime.Data TypesMessage (read-only)<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining the Inhibitor Tag of a Tag or Alarm Group 191ExamplesThe .AlarmDSCInhibitor dotfield is used by setting .Name toan Indirect tag that is equal to the value of the.AlarmDscInhibitor tag then manipulating the value of theIndirect tag.The following statement returns the name of the alarminhibitor tag for a discrete alarm (assumingSomeIndirectTag is an analog indirect tag):SomeIndirectTag.Name =AlarmedTag.AlarmDscInhibitor;The inhibition state of the alarmed tag can be controlled bysetting the value of the indirect tag as follows:SomeIndirectTag = 1;Turns on inhibition. Discrete alarms are disabled forAlarmedTagSomeIndirectTag = 0;Turns off inhibitionDiscrete alarms can be generated for AlarmedTag<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


192 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.AlarmLoLoInhibitor DotfieldReturns the name of the inhibitor tag assigned to a LoLoalarm.Category<strong>Alarms</strong>UsageTagName.AlarmLoLoInhibitorParameterTagNameAny integer, real, indirect analog tag, or alarm group tag.RemarksConfigured in WindowMaker. Cannot be changed during runtime.Data TypesMessage (read-only)ExamplesThe .AlarmLoLoInhibitor dotfield is used by setting .Name toan Indirect tag that is equal to the value of the.AlarmLoLoInhibitor tag then manipulating the value of theIndirect tag.The following statement returns the name of the alarminhibitor tag for a LoLo alarm limit (assumingSomeIndirectTag is an analog indirect tag):SomeIndirectTag.Name =AlarmedTag.AlarmLoLoInhibitor;The inhibition state of the alarmed tag can be controlled bysetting the value of the Indirect tag as follows:SomeIndirectTag = 1;Turns on inhibitionLoLo alarms are disabled for AlarmedTagSomeIndirectTag = 0;Turns off inhibitionLoLo alarms can be generated for AlarmedTagSee Also.AlarmHiInhibitor, .AlarmHiHiInhibitor, .AlarmLoInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining the Inhibitor Tag of a Tag or Alarm Group 193.AlarmLoInhibitor DotfieldReturns the name of the inhibitor tag assigned to a Lowalarm.Category<strong>Alarms</strong>UsageTagName.AlarmLoInhibitorParameterTagNameAny integer, real, indirect analog tag, or alarm group tag.RemarksConfigured in WindowMaker. Cannot be changed during runtime.Data TypesMessage (read-only)ExamplesThe .AlarmLoInhibitor dotfield is used by setting .Name toan Indirect tag that is equal to the value of the.AlarmLoInhibitor tag then manipulating the value of theIndirect tag.The following statement returns the name of the alarminhibitor tag for a Low alarm limit (assumingSomeIndirectTag is an analog indirect tag):SomeIndirectTag.Name =AlarmedTag.AlarmLoInhibitor;The inhibition state of the alarmed tag can be controlled bysetting the value of the Indirect tag as follows:SomeIndirectTag = 1;Turns on inhibitionLow alarms are disabled for AlarmedTagSomeIndirectTag = 0;Turns off inhibitionLow alarms can be generated for AlarmedTagSee Also.AlarmHiInhibitor, .AlarmHiHiInhibitor,.AlarmLoLoInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


194 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.AlarmHiInhibitor DotfieldReturns the name of the inhibitor tag assigned to a Highalarm.Category<strong>Alarms</strong>UsageTagName.AlarmHiInhibitorParameterTagNameAny integer, real, indirect analog tag, or alarm group tag.RemarksConfigured in WindowMaker. Cannot be changed during runtime.Data TypesMessage (read-only)ExampleThe .AlarmHiInhibitor dotfield is used by setting .Name toan Indirect tag that is equal to the value of the.AlarmHiInhibitor tag then manipulating the value of theIndirect tag.The following statement returns the name of the alarminhibitor tag for a High alarm limit (assumingSomeIndirectTag is an analog indirect tag):SomeIndirectTag.Name =AlarmedTag.AlarmHiInhibitor;The inhibition state of the alarmed tag can be controlled bysetting the value of the Indirect tag as follows:SomeIndirectTag = 1;Turns on inhibitionHigh alarms are disabled for AlarmedTagSomeIndirectTag = 0;Turns off inhibitionHigh alarms can be generated for AlarmedTagSee Also.AlarmHiHiInhibitor, .AlarmLoInhibitor,.AlarmLoLoInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining the Inhibitor Tag of a Tag or Alarm Group 195.AlarmHiHiInhibitor DotfieldReturns the name of the inhibitor tag assigned to a HiHialarm condition.Category<strong>Alarms</strong>UsageTagName.AlarmHiHiInhibitorParameterTagNameAny integer, real, indirect analog tag, or alarm group tag.RemarksConfigured in WindowMaker. Cannot be changed during runtime.Data TypesMessage (read-only)ExampleThe .AlarmHiHiInhibitor dotfield is used by setting .Name toan Indirect tag that is equal to the value of the.AlarmHiHiInhibitor tag then manipulating the value of theIndirect tag. The following statement returns the name of thealarm inhibitor tag for a HiHi alarm limit (assumingSomeIndirectTag is an analog indirect tag):SomeIndirectTag.Name =AlarmedTag.AlarmHiHiInhibitor;The inhibition state of the alarmed tag can be controlled bysetting the value of the indirect tag as follows:SomeIndirectTag = 1;Turns on inhibitionHiHi alarms are disabled for AlarmedTagSomeIndirectTag = 0;Turns off inhibitionHiHi alarms can be generated for AlarmedTagSee Also.AlarmHiInhibitor, .AlarmLoInhibitor, .AlarmLoLoInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


196 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.AlarmMinDevInhibitor DotfieldReturns the name of the alarm inhibitor tag associated witha minor deviation alarm condition.Category<strong>Alarms</strong>UsageTagName.AlarmMinDevInhibitorParameterTagNameAny integer, real, indirect analog tag, or alarm group tag.RemarksConfigured in WindowMaker. Cannot be changed during runtime.Data TypesMessage (read-only)ExampleThe .AlarmMinDevInhibitor dotfield is used by setting.Name to an Indirect tag that is equal to the value of the.AlarmMinDevInhibitor tag then manipulating the value ofthe Indirect tag. The following statement returns the name ofthe alarm inhibitor tag for a minor deviation alarm limit(assuming SomeIndirectTag is an analog indirect tag):SomeIndirectTag.Name =AlarmedTag.AlarmMinDevInhibitor;The inhibition state of the alarmed tag can be controlled bysetting the value of the Indirect tag as follows:SomeIndirectTag = 1;Turns on inhibitionMinor deviation alarms are disabled for AlarmedTagSomeIndirectTag = 0;Turns off inhibitionMinor deviation alarms can be generated for AlarmedTagSee Also.AlarmMajDevInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Determining the Inhibitor Tag of a Tag or Alarm Group 197.AlarmMajDevInhibitor DotfieldReturns the name of the alarm inhibitor tag associated witha major deviation alarm condition.Category<strong>Alarms</strong>UsageTagName.AlarmMajDevInhibitorParameterTagNameAny integer, real, indirect analog tag, or alarm group tag.Data TypesMessage (read-only)ExampleThe .AlarmMajDevInhibitor dotfield is used by setting.Name to an Indirect tag that is equal to the value of the.AlarmMajDevInhibitor tag then manipulating the value ofthe Indirect tag. The following statement returns the name ofthe alarm inhibitor tag for a major deviation alarm limit(assuming SomeIndirectTag is an analog indirect tag):SomeIndirectTag.Name =AlarmedTag.AlarmMajDevInhibitor;The inhibition state of the alarmed tag can be controlled bysetting the value of the Indirect tag as follows:SomeIndirectTag = 1;Turns on inhibitionMajor deviation alarms are disabled for AlarmedTagSomeIndirectTag = 0;Turns off inhibitionMajor deviation alarms can be generated for AlarmedTagSee Also.AlarmMinDevInhibitor<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


198 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.AlarmROCInhibitor DotfieldReturns the name of the alarm inhibitor tag associated witha rate-of-change alarm condition.Category<strong>Alarms</strong>UsageTagName.AlarmROCInhibitorParameterTagNameAny integer, real, indirect analog tag, or alarm group tag.Data TypesMessage (read-only)ExampleThe .AlarmROCInhibitor dotfield is used by setting .Name toan Indirect tag that is equal to the value of the.AlarmROCInhibitor tag then manipulating the value of theIndirect tag. The following statement returns the name of thealarm inhibitor tag for a rate-of-change alarm limit(assuming SomeIndirectTag is an analog indirect tag):SomeIndirectTag.Name =AlarmedTag.AlarmROCInhibitor;The inhibition state of the alarmed tag can be controlled bysetting the value of the Indirect tag as follows:SomeIndirectTag = 1;Turns on inhibitionRate-of-change alarms are disabled for AlarmedTagSomeIndirectTag = 0;Turns off inhibitionRate-of-change alarms can be generated for AlarmedTag<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Counting the Number of Active or Unacknowledged <strong>Alarms</strong> 199Counting the Number of Active orUnacknowledged <strong>Alarms</strong>Use the following dotfields to find out the number of active orunacknowledged alarms while the application is running.Dotfield.AlarmTotalCount Dotfield.AlarmUnAckCount Dotfield.AlarmValueCount Dotfield.AlarmValueUnAckCountDotfield.AlarmDscCount Dotfield.AlarmDscUnAckCountDotfield.AlarmDevCount Dotfield.AlarmDevUnAckCountDotfield.AlarmROCCount Dotfield.AlarmROCUnAckCountDotfieldDescriptionCounts the number of alarms associatedwith a tag or alarm group.Counts the number of unacknowledgedalarms associated with a tag or alarmgroup.Counts the number of value alarmsassociated with a tag.Counts the number of unacknowledgedvalue alarms associated with a tag.Counts the number of discrete alarms.Counts the number of unacknowledgeddiscrete alarms.Counts the number of deviation alarms.Counts the number of unacknowledgeddeviation alarms.Counts the number of rate-of-changealarms.Counts the number of unacknowledgedrate-of-change alarms.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


200 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.AlarmTotalCount DotfieldTracks the total number of active alarms for a specified tagor alarm group.Category<strong>Alarms</strong>UsageTagName.AlarmTotalCountParameterTagNameAny type of tag or alarm group.RemarksThe count includes value, deviation, rate-of-change, <strong>and</strong>discrete alarms. It includes both acknowledged <strong>and</strong>unacknowledged alarms.Data TypesInteger (read-only)Valid Values0 or any positive integerExampleTag1 is an analog tag configured for alarms. ATC is also ananalog tag, which gets the total number of all active alarms(both UnAck <strong>and</strong> Ack) present in Tag1.ATC = Tag1.AlarmTotalCount;See Also.AlarmDevCount, .AlarmDevUnAckCount,.AlarmDSCCount, .AlarmDSCUnAckCount,.AlarmValueCount, .AlarmUnAckCount,.AlarmValueUnAckCount, .AlarmROCCount,.AlarmROCUnACkCount<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Counting the Number of Active or Unacknowledged <strong>Alarms</strong> 201.AlarmUnAckCount DotfieldTracks the total number of unacknowledged alarms for aspecified tag or alarm group.Category<strong>Alarms</strong>UsageTagName.AlarmUnAckCountParameterTagNameAny type of tag or alarm group.RemarksThe count includes unacknowledged value, deviation,rate-of-change, <strong>and</strong> discrete alarms.Data TypesInteger (read-only)Valid Values0 or any positive integerExampleTag1 is an analog or discrete tag configured for alarms. AUCis an analog tag, which gets the total number ofunacknowledged alarms present in Tag1.AUC = Tag1.AlarmUnAckCount;See Also.AlarmDevCount, .AlarmDevUnAckCount, .AlarmDscCount,.AlarmDscUnAckCount, .AlarmValueCount,.AlarmTotalCount, .AlarmValueUnAckCount,.AlarmROCCount, .AlarmROCUnACkCount<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


202 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.AlarmValueCount DotfieldTracks the total number of active value alarms for a specifiedtag or alarm group.Category<strong>Alarms</strong>UsageTagName.AlarmValueCountParameterTagNameAny integer, real, indirect analog tag, or alarm group.RemarksThis includes the count of HiHi, High, Low, <strong>and</strong> LoLo alarms.It includes both acknowledged <strong>and</strong> unacknowledged alarms.For non-exp<strong>and</strong>ed summary alarm tags, this count will notexceed 1. However, the count may vary with alarm groups.Data TypesInteger (read-only)Valid Values0 or any positive integerExampleTag1 is an analog tag configured for value alarms. AVC isalso an analog tag, which gets the total number of all alarmvalues present in Tag1.AVC = Tag1.AlarmValueCount;See Also.AlarmDevCount, .AlarmDevUnAckCount, .AlarmDscCount,.AlarmDscUnAckCount, .AlarmROCCount,.AlarmTotalCount, .AlarmValueUnAckCount,.AlarmROCUnAckCount, .AlarmUnAckCount<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Counting the Number of Active or Unacknowledged <strong>Alarms</strong> 203.AlarmValueUnAckCount DotfieldTracks the total number of unacknowledged value alarms fora specified tag or alarm group. This includes the count ofHiHi, High, Low, <strong>and</strong> LoLo alarms.Category<strong>Alarms</strong>UsageTagName.AlarmValueUnAckCountParameterTagNameAny integer, real, indirect analog tag, or alarm group.Data TypesInteger (read-only)Valid Values0 or any positive integerExampleTag1 is an analog tag configured for value alarms. AVUC isalso an analog tag, which gets the total number of allunacknowledged value alarms present in Tag1.AVUC = Tag1.AlarmValueUnAckCount;See Also.AlarmDevCount, .AlarmDevUnAckCount, .AlarmDscCount,.AlarmDscUnAckCount, .AlarmROCCount,.AlarmTotalCount, .AlarmValueCount,.AlarmROCUnAckCount, .AlarmUnAckCount<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


204 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.AlarmDscCount DotfieldTracks the total number of active discrete alarms for aspecified tag or alarm group.Category<strong>Alarms</strong>UsageTagName.AlarmDscCount;ParameterTagNameAny discrete tag, indirect discrete tag, or alarm group.RemarksThe count assigned to The AlarmDscCount dotfield includesboth acknowledged <strong>and</strong> unacknowledged alarms. Fornon-exp<strong>and</strong>ed summary alarm tags, this count is always 1.However, the count can vary for alarm groups.Data TypesInteger (read-only)Valid Values0 or any positive integerExampleTag1 is a discrete tag configured for discrete alarms. ADC isan analog tag, which gets the total number of active discretealarms (both unacknowledged <strong>and</strong> acknowledged) present inTag1.ADC = Tag1.AlarmDSCCount;See Also.AlarmDevCount, .AlarmDevUnAckCount,.AlarmValueCount, .AlarmROCUnAckCount,.AlarmTotalCount, .AlarmDscUnAckCount,.AlarmValueUnAckCount, .AlarmROCUnAckCount,.AlarmUnAckCount<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Counting the Number of Active or Unacknowledged <strong>Alarms</strong> 205.AlarmDscUnAckCount DotfieldTracks the total number of unacknowledged discrete alarmsfor a specified tag or alarm group.Category<strong>Alarms</strong>UsageTagName.AlarmDscUnAckCountParameterTagNameAny discrete tag, indirect discrete tag, or alarm group.Data TypesInteger (read-only)Valid Values0 or any positive integerExampleTag1 is a discrete tag configured for discrete alarms. ADUCis an analog tag, which gets the total number ofunacknowledged discrete alarms present in Tag1.ADUC = Tag1.AlarmDscUnAckCount;See Also.AlarmDevCount, .AlarmDevUnAckCount, .AlarmDscCount,.AlarmValueCount, .AlarmROCCount, .AlarmTotalCount,.AlarmValueUnAckCount, .AlarmROCUnAckCount,.AlarmUnAckCount<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


206 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.AlarmDevCount DotfieldTracks the total number of active deviation alarms for aspecified tag or alarm group.Category<strong>Alarms</strong>UsageTagName.AlarmDevCountParameterTagNameAny real tag, integer tag, indirect analog tag, or alarmgroup.RemarksThis includes the count of minor <strong>and</strong> major deviation alarms.It includes both acknowledged <strong>and</strong> unacknowledged alarms.For non-exp<strong>and</strong>ed summary alarm tags, this count is always1. However, the count can vary with alarm groups.Data TypesAnalog (read-only)Valid Values0 or any positive integerExampleTag1 is an analog tag configured for Deviation alarms. ADCis also an analog tag, which gets the total number of activedeviation (both unacknowledged <strong>and</strong> acknowledged) alarmspresent in Tag1.ADC=Tag1.AlarmDevCount;See Also.AlarmDSCCount, .AlarmValueCount,.AlarmROCUnAckCount, .AlarmTotalCount,.AlarmDSCUnAckCount, .AlarmValueUnAckCount,.AlarmDevUnAckCount, .AlarmROCUnAckCount,.AlarmUnAckCount<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Counting the Number of Active or Unacknowledged <strong>Alarms</strong> 207.AlarmDevUnAckCount DotfieldTracks the total number of unacknowledged deviation alarmsfor a specified tag or alarm group. This includes the count ofminor <strong>and</strong> major deviation alarms.Category<strong>Alarms</strong>UsageTagName.AlarmDevUnAckCountParameterTagNameAny real tag, integer tag, indirect analog tag, or alarmgroup.Data TypesAnalog (read-only)Valid Values0 or any positive integerExampleTag1 is an analog tag configured for Deviation alarms.ADUC is also an analog tag, which gets the total number ofunacknowledged deviation alarms present in Tag1.ADUC = Tag1.AlarmDevUnAckCount;See Also.AlarmDevCount, .AlarmDSCCount, .AlarmValueCount,.AlarmROCUnAckCount, .AlarmTotalCount,.AlarmDSCUnAckCount, .AlarmValueUnAckCount,.AlarmROCUnAckCount, .AlarmUnAckCount<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


208 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time.AlarmROCCount DotfieldTracks the total number of active rate-of-change alarms for aspecified tag or alarm group. It includes both acknowledged<strong>and</strong> unacknowledged alarms. For non-exp<strong>and</strong>ed summaryalarm tags, this count will always be 1. However, the countmay vary with alarm groups.Category<strong>Alarms</strong>UsageTagName.AlarmROCCountParameterTagNameAny real tag, integer tag, indirect analog tag, or alarmgroup.Data TypesInteger (read-only)Valid Values0 or any positive integerExampleTag1 is an analog tag configured for rate-of-change alarms.ARC is also an analog tag, which gets the total number ofactive rate-of-change alarms (both unacknowledged <strong>and</strong>acknowledged) present in Tag1.ARC = Tag1.AlarmROCCount;See Also.AlarmDevCount, .AlarmDevUnAckCount, .AlarmDscCount,.AlarmDscUnAckCount, .AlarmValueCount,.AlarmTotalCount, .AlarmValueUnAckCount,.AlarmROCUnAckCount, .AlarmUnAckCount<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Counting the Number of Active or Unacknowledged <strong>Alarms</strong> 209.AlarmROCUnAckCount DotfieldTracks the total number of unacknowledged rate-of-changealarms for a specified analog tag or alarm group.Category<strong>Alarms</strong>UsageTagName.AlarmROCUnAckCountParameterTagNameAny real tag, integer tag, indirect analog tag, or alarmgroup.Data TypesInteger (read-only)Valid Values0 or any positive integerExampleTag1 is an analog tag configured for rate-of-change alarms.ARUC is also an analog tag, which gets the total number ofunacknowledged rate-of-change alarms present in Tag1.ARUC = Tag1.AlarmROCUnAckCount;See Also.AlarmDevCount, .AlarmDevUnAckCount, .AlarmDscCount,.AlarmDscUnAckCount, .AlarmValueCount,.AlarmTotalCount, .AlarmValueUnAckCount,.AlarmROCCount, .AlarmUnAckCount<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


210 Chapter 6 Controlling Alarm Properties of Tags <strong>and</strong> Groups at Run Time<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


211Chapter 7Viewing Alarm HierarchiesThe Alarm Tree Viewer ActiveX control shows the alarmgroup hierarchy of alarm providers selected by an alarmquery. Items that appear in the Alarm Tree Viewer controlinclude alarm providers, nodes, <strong>and</strong> groups.You can enhance the usability of the Alarm Viewer control byusing an Alarm Tree Viewer control. You can create a scriptso that when the operator selects an alarm provider in theAlarm Tree Viewer control, the Alarm Viewer control queriesthe new alarm provider.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


212 Chapter 7 Viewing Alarm HierarchiesYou can configure how the Alarm Tree Viewer controlappears <strong>and</strong> what data is shown. For more information, seeConfiguring an Alarm Tree Viewer Control on page 212.When you finish configuring the Alarm Tree Viewer control,you can modify the data you are viewing by:• Sorting the data by name.• Updating the tree.• Performing another query.For more information about ActiveX controls, see Chapter 6,ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong> Visualization <strong>Guide</strong>.Configuring an Alarm Tree Viewer ControlYou can configure the following for the Alarm Tree Viewercontrol:• General control appearance, including colors• Text font• Automatic refresh• Which features users can access at run time• Which providers <strong>and</strong> groups to show• Custom saved queries• Sort order for alarm groupsYou can configure these options from within WindowMaker<strong>and</strong> while the Alarm Tree Viewer control is running.Configuring the Appearance <strong>and</strong> ColorsWhen you configure the visual appearance of the Alarm TreeViewer control, you can:• <strong>Inc</strong>lude a status bar.• <strong>Inc</strong>lude a column header.• Set the colors of visual elements.To configure the appearance1 Right-click the Alarm Tree Viewer control, <strong>and</strong> then clickProperties. The AlarmTreeViewerCtrl Properties dialog boxappears.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Tree Viewer Control 2132 Click the General tab.3 Configure how the Alarm Tree Viewer control appears torun-time users. Do any of the following:• Select the Perform Query on Startup check box for thetree to automatically update using default queryproperties. Otherwise, users must run the Refreshcomm<strong>and</strong> to update the tree.• Select the Show Context Sensitive Menu check box toactivate the shortcut menu. Click Configure ContextMenus to configure what comm<strong>and</strong>s appear on themenu. For more information, see Controlling WhichFeatures Users can Access at Run Time on page 216.• In the Display Mode list, click how you want the tree torefresh. For an automatic refresh, type the refreshinterval the Auto Refresh Interval box. The range is 5to 32767 seconds.• In the Expansion Level box, type the number ofexpansion levels for the tree. This determines towhich alarm group branch level the alarm tree isopened when you manually refresh the control. Avalue of 1 shows only the provider, a value of 2 showsthe direct alarm groups of the provider, <strong>and</strong> so on.• Select the Sort Elements in Alphabetical Order checkbox to sort the tree elements in alphabetical order.Click either Ascending or Descending for the sortdirection.• Select the Show Heading check box to show a headerabove the hierarchy. In the box, type the header bartext.• Select the Show Status Bar check box to show a statusbar at the bottom of the Alarm Tree Viewer control.• Click Font to configure the font properties for the tree.The st<strong>and</strong>ard Windows Font dialog box appears.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


214 Chapter 7 Viewing Alarm Hierarchies• Select the Element Selection check box to allow usersto select an element in the tree.• Select the Allow Multiple Selections check box to allowusers to select one or more elements using the CTRL<strong>and</strong> SHIFT keys.• Select the Silent Mode check box prevent the AlarmTree Viewer control from showing run-time errormessages. Error messages are always sent to theLogger.4 Click Apply.5 Click the Color tab.6 Click the palette button to assign colors to the visualelements of the Alarm Tree Viewer control.You can set the colors of the title bar text, windowbackground, selected element text, <strong>and</strong> selected elementbackground.7 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Tree Viewer Control 215Configuring FontsYou can configure how the text appears for the Alarm TreeViewer control.To configure the font1 Right-click the Alarm Tree Viewer control, <strong>and</strong> then clickProperties. The AlarmTreeViewerCtrl Properties dialog boxappears.2 Click the General tab.3 Click Font. The st<strong>and</strong>ard Windows Font dialog boxappears. Configure the font <strong>and</strong> then click OK.4 Click OK.Configuring Automatic RefreshYou can configure the Alarm Tree Viewer control to refreshautomatically at run time. Otherwise, the operator mustrefresh the Alarm Tree Viewer control manually.To configure automatic refresh1 Right-click the Alarm Tree Viewer control, <strong>and</strong> then clickProperties. The AlarmTreeViewerCtrl Properties dialog boxappears.2 Click the General tab.3 In the Display Mode list, click how you want the tree torefresh, either Manual Refresh or Auto Refresh. For anautomatic refresh, type the tree refresh interval the AutoRefresh Interval box. The range is 5 to 32767 seconds.4 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


216 Chapter 7 Viewing Alarm HierarchiesControlling Which Features Users can Access atRun TimeThe Alarm Tree Viewer control includes a shortcut menuthat operators can open by right-clicking on the controlduring run time. You can configure what comm<strong>and</strong>s appearon the menu.To configure the run-time shortcut menu1 Right-click the Alarm Tree Viewer control, <strong>and</strong> then clickProperties. The AlarmTreeViewerCtrl Properties dialog boxappears.2 Click the General tab.3 Select the Show Context Sensitive Menu check box toactivate the shortcut menu.4 Click Configure Context Menus. The Context SensitiveMenus dialog box appears.5 Select the check box for each comm<strong>and</strong> that you want toappear in the shortcut menu. You must select least oneshortcut comm<strong>and</strong>.Comm<strong>and</strong>RefreshFreezeQuery FavoritesAdd to FavoritesDescriptionRefreshes the data shown in theAlarm Tree Viewer control.Allows you to toggle thefreeze/unfreeze mode of the tree.Shows the Alarm Query dialog boxto select a query favorite from anavailable list.Allows you to add new queries fromthe Add Query dialog box.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Tree Viewer Control 217Comm<strong>and</strong>SortStatisticsDescriptionShows the Sort dialog box to sortAlarm Tree Viewer control data inascending or descending orderShows the Alarm Statistics dialogbox with the percentage of currentretrieved alarm providers shown inthe Alarm Tree Viewer control.6 Click OK to close the Context Sensitive Menus dialog box.7 Click Apply.Configuring Which Providers <strong>and</strong> Groups to ShowYou configure alarm queries for alarm providers <strong>and</strong> groupsthat belong to the Alarm Tree Viewer control. The alarmquery is a list of one or more alarm providers separated byspaces. The valid syntax for the alarm provider is as follows.Full path to alarm provider:\\Node\ProviderNamePath to local alarm provider:\ProviderNameFor multiple queries, separate each query with a space. Forexample:\<strong>InTouch</strong> \\Node17\<strong>InTouch</strong> \\MyNode\<strong>InTouch</strong>The default alarm query is \<strong>InTouch</strong>. You cannot use a tagfor the alarm query.If you query multiple alarm groups <strong>and</strong> later you undeployone or more groups, the Alarm Tree Viewer control does notautomatically update to remove these groups from the view.You must stop <strong>and</strong> re-start the alarm provider to un-registerit.If you query an ArchestrA Galaxy by specifying \Galaxy inyour alarm query, then all <strong>InTouch</strong> alarm providers deployedwithin the Galaxy are shown. For example:\\Node\Galaxy!Area[name]If you query information from a node with multiple alarmproviders that contain groups with the same names, recordsare shown for the last alarm provider in the tree.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


218 Chapter 7 Viewing Alarm HierarchiesTo configure the alarm query1 Right-click the Alarm Tree Viewer control <strong>and</strong> then clickProperties. The AlarmTreeViewerCtrl Properties dialog boxappears.2 Click the Query tab.3 In the Alarm Query box, type the path to the initial alarmquery.4 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Tree Viewer Control 219Creating Custom Saved Queries Using QueryFavoritesYou can configure a list of query favorites for operators toselect from a shortcut menu.The query file can be saved to any folder <strong>and</strong> does not need tobe in the <strong>InTouch</strong> application folder. The alarm query file isan .xml file.To configure the query favorites file1 Right-click the Alarm Tree Viewer control <strong>and</strong> then clickProperties. The AlarmTreeViewerCtrl Properties dialog boxappears.2 Click the Query tab.3 Configure the query favorites file.abIn the Query Favorites File box, type the network path<strong>and</strong> file name or click the ellipse button to browse forthe file.To edit the Filter Favorites file, click the Edit FavoritesFile button. The Alarm Query window opens, allowingyou to add, modify, or delete filters from yourfavorites file. When you are done, click OK to saveyour changes <strong>and</strong> close the window.4 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


220 Chapter 7 Viewing Alarm HierarchiesConfiguring the Sort Order for Alarm GroupsIn the Alarm Tree Viewer control, nodes <strong>and</strong> alarm groupscan be shown in alphabetical order, either ascending ordescending.To configure the sort order of alarm groups1 Right-click the Alarm Tree Viewer control <strong>and</strong> then clickProperties. The AlarmTreeViewerCtrl Properties dialog boxappears.2 Click the General tab.3 Select the Sort Elements in Alphabetical Order check box tolist alarm groups in alphabetical order.4 Click Ascending or Descending to specify the sortdirection.5 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using an Alarm Tree Viewer Control at Run Time 221Using an Alarm Tree Viewer Control at RunTimeUse the Alarm Tree Viewer control to navigate the hierarchyof alarm providers <strong>and</strong> alarm groups.The Alarm Tree Viewer control can show multiple nodes <strong>and</strong>alarm providers.• Nodes are represented by a computer icon.• Alarm providers are represented by a speaker icon.• Alarm groups are represented by a bell icon.With one or more alarm groups selected, you can generatequeries for alarms that can be used in the Alarm Tree Viewercontrol <strong>and</strong> the Alarm DB View controls. To select multiplealarm groups, hold down the shift key while clicking on agroup. To un-select all groups, click on an empty area.One or more of the following comm<strong>and</strong>s appears on therun-time shortcut menu, depending on how the control isconfigured:• Refresh – Forces a manual update of the alarms.• Freeze – Stops the alarms from updating.• Query Favorites – Opens the Alarm Query dialog boxwhere you can select an alarm query from a list ofpreviously defined alarm queries.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


222 Chapter 7 Viewing Alarm Hierarchies• Add to Favorites – Opens the Add Query dialog box with aquery string entered based on the selected Groups (ifany).• Sort – Opens the Sort dialog box with options toalphabetically sort alarm groups in ascending ordescending order.• Statistics – Opens the Alarm Statistics dialog box to showthe percentage of retrieved alarm providers.Underst<strong>and</strong>ing Status Bar InformationThe Alarm Tree Viewer control status bar appears at thebottom of the window <strong>and</strong> shows the following information:• Name of the current query• Percentage complete status of the current queryUsing Query FavoritesUse the Query Favorites comm<strong>and</strong> on the Alarm Tree Viewercontrol’s shortcut menu to quickly select <strong>and</strong> run <strong>and</strong> alarmquery from a list of previously defined alarm queries. You canalso create new named queries, edit an existing query, ordelete an existing query.To select <strong>and</strong> run an alarm query1 Right-click the Alarm Tree Viewer control at run time.2 Click Query Favorites. The Alarm Query dialog boxappears.3 Select the named query that you want to show in the listof currently defined queries.4 Click OK. The Alarm Tree Viewer control shows alarmgroup information from the selected query.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Tree Viewer Control ActiveX Properties 223Using Alarm Tree Viewer Control ActiveXPropertiesYou can set the value an Alarm Tree Viewer control propertydirectly using a script or you can assign it to an <strong>InTouch</strong> tagor I/O reference. For more information about settingproperties, see Chapter 8, Scripting ActiveX Controls, in the<strong>InTouch</strong>® <strong>HMI</strong> Scripting <strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.The following table lists all Alarm Tree Viewer controlproperties. For more information on setting color values, seeConfiguring Colors for ActiveX Controls on page 87.Property NameAddtoFavoritesMenuAlarmQueryElementSelectionExpansionLevelFontFreezeMenuHeaderTextMultiSelectionQueryFavoritesFileQueryFavoritesMenuQueryStartupRefreshIntervalRefreshMenuSelTextBackColorPurposeEnables or disables the Add to Favorites shortcut menucomm<strong>and</strong>.Shows the initial alarm query <strong>and</strong> allows you to change thequery. The valid syntax is \\\ or\.Controls whether an element in the tree can be selected ornot by the operator during run time.Sets the branch level to which the alarm tree is opened whenyou manually refresh the control. A value of 1 shows only theprovider, a value of 2 shows the direct alarm groups of theprovider, <strong>and</strong> so on.Gets or sets the font of records <strong>and</strong> headings shown in thecontrol.Enables or disables the Freeze menu comm<strong>and</strong>.Gets or sets the text that appears in the header of the AlarmTree Viewer control.Allows you to select multiple elements in the Alarm TreeViewer control.Gets or sets the query favorites file name.Enables or disables the Query Favorites menu comm<strong>and</strong>.Automatically updates the Alarm Tree Viewer control usingdefault query properties if selected. If not selected, you mustrequery to update the Alarm Tree Viewer control.Gets the auto refresh interval of the control in seconds.Gets or sets a value that determines whether the Refreshcomm<strong>and</strong> appears in the shortcut menu.Gets or sets the background color for the selected element.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


224 Chapter 7 Viewing Alarm HierarchiesProperty NameSelTextColorShowContextMenuShowHeadingShowStatusBarSilentModeSortElementsSortMenuSortOrderStatsMenuTextColorTitleBackColorTitleForeColorWindowColorPurposeGets or sets the text color for the selected element.Enables or disables the shortcut menu.Shows or hides the title bar of the Alarm Tree Viewercontrol.Gets or sets a value that determines whether the status baris shown.Gets or sets a value that determines whether the control isin Silent mode.Enables or disables sorting in the Alarm Tree Viewercontrol.Enables or disables the Sort menu comm<strong>and</strong>.Gets or sets the sort direction. Possible values are"Ascending" <strong>and</strong> "Descending," represented as 0 <strong>and</strong> 1respectively.Enables or disables the Statistics menu comm<strong>and</strong>.Gets or sets the text color the Alarm Tree Viewer control.Gets or sets the title bar background color. Available only ifthe ShowHeading property is set.Gets or sets the title bar foreground color. Available only ifthe ShowHeading property is set.Gets or sets the window background color of the Alarm TreeViewer control.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Tree Viewer Control ActiveX Methods 225Using Alarm Tree Viewer Control ActiveXMethodsYou can use the Alarm Tree Viewer control methods inscripts to:• Retrieve information about the control.• Retrieve information about specific entries in the alarmhierarchy.• Freeze the control.• Create query strings.• Run queries.For more information about calling methods, see Chapter 8,Scripting ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong> Scripting<strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.Retrieving Information About the ControlYou can use these methods to retrieve information about theAlarm Tree Viewer control.• AboutBox() Method• GetElementCount() MethodAboutBox() MethodShows the Alarm Tree Viewer About dialog box.SyntaxObject.AboutBox()ExampleThe name of the control is AlarmTreeViewerCtrl1.#AlarmTreeViewerCtrl1.AboutBox();GetElementCount() MethodGets the total number of elements in the tree.SyntaxObject.GetElementCount()ExampleThe name of the control is AlarmTreeViewerCtrl1 <strong>and</strong> nTag1is an integer or real tag.nTag1 = #AlarmTreeViewerCtrl1.GetElementCount();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


226 Chapter 7 Viewing Alarm HierarchiesRetrieving Information About Specific EntriesYou can use a set of methods to retrieve information aboutelements shown in the Alarm Tree Viewer control window.• CheckElementMembership() Method• GetElementCount() Method• GetElementName() Method• GetElementPath() Method• GetSelectedElementCount() Method• GetSelectedElementName() Method• GetSelectedElementPath() Method• GetSubElementCount() Method• GetSubElementName() Method• GetSubElementPath() MethodCheckElementMembership() MethodChecks if the descendant tree element is part of the ancestortree element.SyntaxObject.CheckElementMembership(PathName,DescendantElementName, AncestorElementName)ParameterPathNameThe name of the path. For example, \<strong>InTouch</strong> or\\NodeName.DescendantElementNameThe name of the descendant element name. For example,GroupA.AncestorElementNameThe name of the ancestor element name. For example,GroupB.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Tree Viewer Control ActiveX Methods 227GetElementCount() MethodGets the total number of elements in the tree.SyntaxObject.GetElementCount()ExampleThe name of the control is AlarmTreeViewerCtrl1 <strong>and</strong> nTag1is an integer or real tag.nTag1 = #AlarmTreeViewerCtrl1.GetElementCount();GetElementName() MethodGets the element name corresponding to the index.SyntaxObject.GetElementName(ElementIndex)ParameterElementIndexThe index of the element.ExampleThe name of the control is AlarmTreeViewerCtrl1 <strong>and</strong>StrTag is a message tag.StrTag = #AlarmTreeViewerCtrl1.GetElementName(3);GetElementPath() MethodGets the element path corresponding to the index, down tothe indicated expansion level.SyntaxObject.GetElementPath(ElementIndex, ExpansionLevel)ParameterElementIndexThe index of the element.ExpansionLevelThe level of expansion.ExampleThe name of the control is AlarmTreeViewerCtrl1, StrTag isa message tag, <strong>and</strong> returns the path of the element at index17 up to 4 levels.StrTag = #AlarmTreeViewerCtrl1.GetElementPath(17,4);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


228 Chapter 7 Viewing Alarm HierarchiesGetSelectedElementCount() MethodGets the number of selected elements in the tree.SyntaxObject.GetSelectedElementCount()ExampleThe name of the control is AlarmTreeViewerCtrl1 <strong>and</strong> nTag1is an integer or real tag.nTag1 =#AlarmTreeViewerCtrl1.GetSelectedElementCount();GetSelectedElementName() MethodGets the name of the selected element on the Alarm TreeViewer control.SyntaxObject.GetSelectedElementName()ExampleThe name of the control is AlarmTreeViewerCtrl1 <strong>and</strong>StrTag is a message tag.StrTag =#AlarmTreeViewerCtrl1.GetSelectedElementName();GetSelectedElementPath() MethodGets the path of the selected element to the indicatedexpansion level.SyntaxObject.GetSelectedElementPath(ExpansionLevel)ParameterExpansionLevelThe level of expansion.ExampleThe name of the control is AlarmTreeViewerCtrl1 <strong>and</strong>StrTag is a message tag.StrTag =#AlarmTreeViewerCtrl1.GetSelectedElementPath(3);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Tree Viewer Control ActiveX Methods 229GetSubElementCount() MethodGets the total number of sub-elements from the indicatedelement.SyntaxObject.GetSubElementCount(Path, ElementName)ParameterPathThe name of the path. For example:\\NodeName\<strong>InTouch</strong>If the path parameter is empty, the Alarm Tree Viewercontrol finds the first element of the tree that matches theindicated element name.ElementNameThe name of the element. For example, Group1.ExamplesThe name of the control is AlarmTreeViewerCtrl1 <strong>and</strong> nTag1is an integer or real tag.nTag1 =#AlarmTreeViewerCtrl1.GetSubElementCount("","Group1" );nTag1 = #AlarmTreeViewerCtrl1.GetSubElementCount("\\NodeName", "Group1" );nTag1 = #AlarmTreeViewerCtrl1.GetSubElementCount("\<strong>InTouch</strong>", "Group1" );nTag1 = #AlarmTreeViewerCtrl1.GetSubElementCount("\\NodeName\<strong>InTouch</strong>", "Group1" );<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


230 Chapter 7 Viewing Alarm HierarchiesGetSubElementName() MethodFor the indicated element, gets the name of the sub-elementat the corresponding index.SyntaxObject.GetSubElementName(Path, ElementName,ElementIndex)ParameterPathThe name of the path. For example:\\NodeName\<strong>InTouch</strong>If the path parameter is empty, the Alarm Tree Viewercontrol finds the first element of the tree that matches theindicated element name.ElementNameThe name of the element. For example, Group1.ElementIndexThe index of the element.ExamplesThe name of the control is AlarmTreeViewerCtrl1 <strong>and</strong>StrTag is a message tag.StrTag =#AlarmTreeViewerCtrl1.GetSubElementName("","Group1", 1);StrTag =#AlarmTreeViewerCtrl1.GetSubElementName("\\NodeName", "Group1", 1);StrTag =#AlarmTreeViewerCtrl1.GetSubElementName("\<strong>InTouch</strong>", "Group1", 1);StrTag =#AlarmTreeViewerCtrl1.GetSubElementName("\\NodeName\<strong>InTouch</strong>", "Group1", 1);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Tree Viewer Control ActiveX Methods 231GetSubElementPath() MethodGets the path of the sub-element from the index of theelement name to the indicated expansion level.SyntaxObject.GetSubElementPath(Path, ElementName,ElementIndex, ExpansionLevel)ParameterPathThe name of the path. For example:\\NodeName\<strong>InTouch</strong>If the path parameter is empty, the Alarm Tree Viewercontrol finds the first element of the tree that matches theindicated element name.ElementNameThe name of the element. For example, Group1.ElementIndexThe index of the element.ExpansionLevelThe level of expansion.ExamplesThe name of the control is AlarmTreeViewerCtrl1 <strong>and</strong>StrTag is a message tag.StrTag =#AlarmTreeViewerCtrl1.GetSubElementPath("","Group1", 1, 3);StrTag =#AlarmTreeViewerCtrl1.GetSubElementPath("\\NodeName", "Group1", 1, 3);StrTag =#AlarmTreeViewerCtrl1.GetSubElementPath("\<strong>InTouch</strong>", "Group1", 1, 3);StrTag =#AlarmTreeViewerCtrl1.GetSubElementPath("\\NodeName\<strong>InTouch</strong>", "Group1", 1, 3);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


232 Chapter 7 Viewing Alarm HierarchiesFreezing the TreeYou can use the Freeze() method to prevent the Alarm TreeViewer control tree from being updated with any furtherchanges.Freeze() MethodFreezes the Alarm Tree Viewer control tree.SyntaxObject.Freeze(Frozen)ParametersFrozenContols whether the tree can be updated.1 = Freezes the tree.0 = Unfreezes the tree.ExampleTag1 is defined as memory discrete tag <strong>and</strong> the name of thecontrol is AlarmTreeViewerCtrl1.Tag1 = 1;#AlarmTreeViewerCtrl1.Freeze(Tag1);Creating a Query String from a SelectionYou can use the GetAlarmQueryFromSelection() method toretrieve a query string from a selected element in the AlarmTree Viewer control. The query string can then be useddynamically in an Alarm Viewer control.GetAlarmQueryFromSelection() MethodReturns an alarm query string from the selected element inthe Alarm Tree Viewer control.SyntaxObject.GetAlarmQueryFromSelection()ExampleThe name of the control is AlarmTreeViewerCtrl1 <strong>and</strong>StrTag is a message tag. For example: StrTag is set to\\NodeName\<strong>InTouch</strong>\GroupA.StrTag =#AlarmTreeViewerCtrl1.GetAlarmQueryFromSelection();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Tree Viewer Control ActiveX Methods 233Running QueriesYou can run queries for the Alarm Tree Viewer control usingmethods that either retrieve an existing query saved in aquery favorites file or set a string that specifies a newcollection of alarm providers.• SetQueryByName() Method• SetQueryByString() MethodSetQueryByName() MethodSets the current query as specified by the query namepassed. The query must be in the query favorites file.SyntaxObject.SetQueryByName(QueryName)ParameterQueryNameThe name of the query as created by using query favorites.For example, Turbine Queries.ExampleThe name of the control is AlarmTreeViewerCtrl1.#AlarmTreeViewerCtrl1.SetQueryByName("TurbineQueries");SetQueryByString() MethodSets the current query as a new string specifying a newcollection of Alarm Providers.SyntaxObject.SetQueryByString(NewQuery)ParametersNewQueryString containing an alarm query. For example:\\MasterNode\<strong>InTouch</strong>ExampleThe name of the control is AlarmTreeViewerCtrl1.#AlarmTreeViewerCtrl1.SetQueryByString("\\MasterNode\<strong>InTouch</strong>");<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


234 Chapter 7 Viewing Alarm HierarchiesError H<strong>and</strong>ling when Using Methods <strong>and</strong>PropertiesAll Alarm Tree Viewer control error messages are sent to theLogger. If you configure the Alarm Tree Viewer control to runin silent mode, no run-time errors are shown.Using Alarm Tree Viewer Control ActiveX<strong>Events</strong> to Trigger ScriptsYou can assign QuickScripts to Alarm Tree Viewer controlevents, such as a mouse click or double-click. When the eventoccurs, the QuickScript runs.The Alarm Tree Viewer control supports the followingevents:• Click• DoubleClick• ShutDown• StartUpThe Click event has one parameter called ClicknElementID,which identifies the element in the tree that is clicked at runtime.The DoubleClick event has one parameter calledDoubleClicknElementID, which identifies the element in thetree that is double-clicked at run time.For the Click <strong>and</strong> DoubleClick events, an ElementID of -1 isreturned for the "All Providers" node.Note The Alarm Tree Viewer control ignores the user interfacemethods when they are called from the StartUp event, becausethe control is not visible yet. These methods include: AboutBox(),CheckElementMembership(), Freeze(),GetAlarmQueryFromSelection(), GetElementCount(),GetElementName(), GetElementPath(),GetSelectedElementCount(), GetSelectedElementName(),GetSelectedElementPath(), GetSubElementCount(),GetSubElementName(), GetSubElementPath(), <strong>and</strong> Refresh().For more information about scripting ActiveX events, seeChapter 8, Scripting ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong>Scripting <strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


235Chapter 8Printing <strong>Alarms</strong>You use the <strong>InTouch</strong> Alarm Printer utility to print alarmsfrom multiple nodes. You can print alarm records stored inthe alarm memory on an event-by-event basis using adedicated line or network printer. Also, you can use theAlarm Printer to save alarm records to a file.AlarmProviderAlarmProviderWindowViewer SessionAlarm MemoryAlarmRecordPrinterUtilityRecordAlarmRecordQueryRecordRunning <strong>InTouch</strong>ApplicationLANAlarm Printer FileNetwork PrinterAlarmProviderRecord<strong>InTouch</strong> NodePrinterCableLPT1 Line PrinterYou can configure the Distributed Alarm system to printcertain events on a line printer as they occur. Typically, youprint alarms immediately to record information in the eventof a catastrophic failure. Generally, you use a dot matrixprinter connected through a serial or parallel port directly tothe computer running the <strong>InTouch</strong> application. Windowsnetwork printers <strong>and</strong> laser printers are usuallyinappropriate for gathering data for catastrophic eventsbecause they hold entire pages in memory before actuallyprinting a page.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


236 Chapter 8 Printing <strong>Alarms</strong>Configuring Alarm Printing <strong>and</strong> LoggingYou can run multiple instances of the Alarm Printer. Eachinstance of the Alarm Printer must be configured to print to adifferent printer <strong>and</strong> must be configured with a separatealarm query.You can configure separate instances of Alarm Printer toprint alarms in specific priority ranges. For example, oneAlarm Printer instance can print only high priority alarms,while another instance prints only low priority alarms.Likewise, you can use one instance of the Alarm Printer toprint alarms from one area of the factory while anotherinstance prints alarms from a different area.You can save an Alarm Printer configuration to a file, whichhas the .alc extension. You can create as many configurationfiles as you want. The Alarm Printer uses an individualconfiguration file for each instance of Alarm Printer that isrunning.Configuring Printer SettingsYou must designate a printer to use with the Alarm Printer.Also, you must select if alarms are printed as they occur.Use a dedicated printer for printing alarms.The printer can be connected locally or to a network. AnyWindows printer can be used as the output for the AlarmPrinter.To configure the printer settings1 Open the Alarm Printer utility. Do the following:abIn the WindowMaker Tools view, exp<strong>and</strong> Applications.Double-click Alarm Printer.2 On the menu bar, click Configure. The ConfigurationSettings dialog box appears.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Alarm Printing <strong>and</strong> Logging 2373 Click the Printing tab.4 In the Print To area, select the connection to the alarmprinter.• Click None to not use a printer.• Click LPT1-3 to use a printer connected by a parallelport to the computer running the <strong>InTouch</strong>application.• Click COM1-4 to use a printer connected by a serialport to the computer running the <strong>InTouch</strong>application. Click Port Configuration to show the COMProperties dialog box <strong>and</strong> change the default valuesassigned to the selected COM port.• Click Printer to use a printer connected through thenetwork to the computer running the <strong>InTouch</strong>application. In the box, type the name of the printeror click Browse to select an available printer.Note If the printer you want does not appear, add the printerusing the Windows Add Printer wizard.5 Select the Remove Trailing Spaces in Printout check box toprevent the printer from printing blank lines or emptypages.6 Select the Enable Printing check box to print alarms.7 Select the Disable Realtime Alarm Printing check box toprevent the Alarm Printer from printing alarms as theyoccur.8 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


238 Chapter 8 Printing <strong>Alarms</strong>Configuring Which <strong>Alarms</strong> to PrintThe Alarm Printer queries the alarm memory to selectrecords to print or save to a log file. The query selects recordsfrom the internal alarm memory based upon:• Alarm priority• Current alarm state (unacknowledged/acknowledged)• Alarm group membershipEach alarm has an assigned priority number that representsthe severity of the alarm. An alarm priority ranges from 1 to999. The most severe alarm is assigned a priority of 1. Theleast severe alarm is assigned a priority of 999.If a network or printer connection fails, the Alarm Printerdoes not reprint all alarms. The Alarm Printer only printsthe alarms that have not been printed before the connectionfailure.To configure which alarms to print1 Open the Alarm Printer utility. Do the following:abIn the WindowMaker Tools view, exp<strong>and</strong> Applications.Double-click Alarm Printer.2 On the menu bar, click Configure. The ConfigurationSettings dialog box appears.3 Click the Query tab.4 In the From Priority box, enter the highest priority alarmvalue (1 to 999).5 In the To Priority box, enter the lowest priority alarmvalue (1 to 999).<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Alarm Printing <strong>and</strong> Logging 2396 In the Alarm State list, click the alarm state.ClickAllAckUnackTo showAll alarms.Only acknowledged alarms.Only unacknowledged alarms.7 In the Alarm Query box, type one or more alarm queries.You can specify one or more alarm providers <strong>and</strong> groups.Use blank spaces to separate the queries.8 Select the Record alarms generated after query startscheck box to only include alarms that occur after thequery starts. The Alarm Printer ignores alarms recordsthat are in the alarm memory <strong>and</strong> were triggered beforethe Alarm Printer started querying.9 Click OK.Configuring the Format of Print <strong>and</strong> File OutputEach option you select appears as a separate field in theprinted output. Fields containing data exceeding thespecified maximum field length are truncated to those limits.To configure the format of alarm print <strong>and</strong> file output1 Open the Alarm Printer utility. Do the following:abIn the WindowMaker Tools view, exp<strong>and</strong> Applications.Double-click Alarm Printer.2 On the menu bar, click Configure. The ConfigurationSettings dialog box appears.3 Click the Message tab.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


240 Chapter 8 Printing <strong>Alarms</strong>4 In the Date/Time area, select the Date check box, <strong>and</strong> thenselect a date format from the list. The listed date formatsinclude the following components:OptionDescriptionDD Two-digit day of the month (01-31)MM Two-digit month of the year (01-12)YYYYYYMMMLast two digits of the yearFour-digit yearThree-character abbreviation of the month5 Select the Time check box <strong>and</strong> select a time format fromthe list. The listed formats included the following timecomponents:OptionAPDescriptionSelects the AM/PM time format. Forexample, 3:00 PM is shown as 3:00 PM. Atime without this designation defaults to24 hour military time format. For example,3:00 PM is shown as 15:00.HH Two-digit hour of the day (00-23 or 01-12)when the alarm/event occurred.MMTwo-digit minute of the hour (00-59) whenthe alarm/event occurred.SS Two-digit second of the minute (00-59)when the alarm/event occurred.SSSThree-digit millisecond of the second whenthe alarm/event occurred.6 Select the order that alarms appear in the alarm recordaccording to the onset time of the alarm:OptionOATLCTDescription(Original Alarm Time) The date/timestamp of the onset of the alarm.(Last Changed Time) The date/timestamp of the most recent change ofstatus for the instance of the alarm:onset of the alarm, change of sub-state,return to normal, or acknowledgment.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Alarm Printing <strong>and</strong> Logging 241OptionDescriptionLCT ButOAT onACK(Last Changed Time, but Original AlarmTime on acknowledgement ) The lastchanged time is used while the alarm isunacknowledged, then original alarmtime is used after the alarm has beenacknowledged.7 Select the alarm information to be printed.OptionAlarm StateAlarm ClassAlarm TypeDescriptionPrints the alarm state. For example,UnAck, Ack.Prints the alarm class. For example,VALUE, DEV, ROC.Prints the alarm type. For example,HIHI, LO, MAJDEV.Priority Prints the alarm priority (1-999).7.1 Default(button)7.11 Default(button)Remove TrailingSpacesMinimumColumn SpacingAlarm NameGroup NameSelects the default settings for theAlarm Printer utility for <strong>InTouch</strong>version 7.1.Selects the default settings for theAlarm Printer utility for <strong>InTouch</strong>version 7.11.Removes the extra trailing spacesfrom a printed field when the lengthof the actual field value is less thanthe value configured for that field.Reduces the spacing betweencolumns so that more fields can fiton the printed page.Prints the alarm name (tag). In theLength box, type the number ofcharacters (64 characters maximum)for the alarm name.Prints the alarm group name. In theLength box, type the number ofcharacters (64 characters maximum)for the alarm group name.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


242 Chapter 8 Printing <strong>Alarms</strong>OptionAlarm ProviderValue at AlarmLimitOperator NodeOperator NameCommentUser1User2DescriptionPrints the name of the alarmprovider. In the Length box, type thenumber of characters (64 charactersmaximum) for the alarm providername.Prints the value of the tag. In theLength box, type the number ofcharacters (32 characters maximum)for the alarm value.Prints the tag’s alarm limit. In theLength box, type the number ofcharacters (32 characters maximum)allowed for alarm limit. The numbershould be large enough to providethe desired level of precision.Prints the operator node associatedwith the alarm condition. In theLength box, type the number ofcharacters (64 characters maximum)allowed for the operator’s node.In a Terminal Services environment,this is the name of the clientcomputer that the respectiveoperator established the TerminalServices session from. If the nodename can't be retrieved, the node'sIP address is used instead.Prints the operator name associatedwith the alarm condition. In theLength box, type the number ofcharacters (16 characters maximum)allowed for the operator’s name.Prints the alarm commentassociated with the tag. In theLength box, type the number ofcharacters (131 charactersmaximum) allowed for the comment.Prints the numerical values of UserDefined Number 1 corresponding tothe alarm.Prints the numerical values of UserDefined Number 2 corresponding tothe alarm.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Alarm Printing <strong>and</strong> Logging 243OptionUser3DescriptionPrints the string value of theuser-defined string propertyassociated with the alarm. Themaximum number of characters is131.8 Click Apply.Configuring Log Files for <strong>Alarms</strong>You can log alarm records to a file. By default, the AlarmPrinter assigns names to log files based upon the followingnaming convention:YYMMDDHH.ALGNotationYYMMDDHHDescriptionLast two digits of the year when the log file iscreated.Two-digit number of the month (01-12) whenthe log file is created.Two-digit day of the month (01-31) when thelog file is created.Two-digit hour of the day (00-23) when the logfile is created.To configure alarm record logging1 Open the Alarm Printer utility. Do the following:abIn the WindowMaker Tools view, exp<strong>and</strong> Applications.Double-click Alarm Printer.2 On the menu bar, click Configure. The ConfigurationSettings dialog box appears.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


244 Chapter 8 Printing <strong>Alarms</strong>3 Click the File Logging tab.4 Select the Enable Alarm File Logging check box to savealarm records to log files.5 In the Directory box, type the path or browse to a folderlocation to save the alarm log files.6 In the Number of Hours to Cycle Filename box, enter thenumber of hours worth of alarm records to save to anindividual log file.Valid entries are 1 to 24. If your <strong>InTouch</strong> application runscontinuously, select a file logging interval that creates aset of equal length daily log files. For example, settingNumber of Hours to Cycle Filename to 6 creates 4 equallength daily log files.7 In the Starting at Hour box, enter the starting hour tobegin logging alarm records to a file each day.Valid entries are 0 to 23.For example, an oil refinery operates three daily workshifts. The first shift begins at 06:00. Management wantsalarm records logged for each shift. To do this, enter 8 forthe Number of Hours to Cycle Filename option. Enter 6 forthe Starting at Hour (0-23) option. The Alarm Printercreates a log file from 06:00 to 14:00, another from 14:00to 22:00, <strong>and</strong> a third from 22:00 to 06:00.8 In the Keep Log Files for box, enter the number of days toretain log files.The Alarm Printer saves log files for the number ofspecified days plus the current day. The Alarm Printerdeletes log files older than the retention period. To savelog files indefinitely, enter 0.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Alarm Printing <strong>and</strong> Logging 2459 In the Log File Name Extension box, accept the defaultALG file name extension or assign anotherthree-character extension to log files.If you use a .csv extension, you can import the log filedirectly into Excel or Notepad.10 To remove spaces at the end of entries within a log file,select the Remove Trailing Spaces in Log Entries check box.You can also specify a field separator character placed atthe end of each record in the log file.11 Select the Original Column Ordering check box to maintainthe same order from the alarm display to log file records.12 Click Apply.Saving <strong>and</strong> Loading Configuration FilesWhen you start the Alarm Printer from WindowMaker, theAlarm Printer dialog box shows the default configurationsettings. These configuration settings are saved in an alarmconfiguration file (.alc).You can save your printer configuration settings to a file thatcan be loaded before printing alarms.A specific alarm configuration file can be shown if it isopened in run time from the comm<strong>and</strong> prompt or bydouble-clicking its *.alc file name.To create a new Alarm Printer configuration file1 Open the Alarm Printer utility. Do the following:abIn the WindowMaker Tools view, exp<strong>and</strong> Applications.Double-click Alarm Printer.2 On the File menu, click New to show the Alarm Printerwith its default values.3 On the menu bar, click Configure. The ConfigurationSettings dialog box appears.4 Configure the alarm settings.5 On the File menu, select Save.To edit an existing Alarm Printer configuration file1 On the File menu, select Open.2 Select the Alarm Printer Configuration file that you wantto edit.3 Edit the file.4 On the File menu, select Save. Select Save as to save thechanges to a new file without changing the existing file.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


246 Chapter 8 Printing <strong>Alarms</strong>Printing <strong>Alarms</strong>Each query logs all of the alarms specified in the AlarmPrinter configuration file (.alc) that is currently open. If nofile has been specified, the settings currently selected duringAlarm Printer configuration are used.You can run multiple queries with Alarm Printer. Eachquery uses different parameters <strong>and</strong> is associated with aseparate instance of the Alarm Printer. If two instances ofAlarm Printer are running the same query, the entries areduplicated.While Alarm Printer is running, you can manually start orstop queries. Be sure that you have printing enabled.To start an alarm query On the Query menu, click Start/Stop.To stop an alarm query On the Query menu, click Start/Stop.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Logging <strong>Alarms</strong> to a File 247Logging <strong>Alarms</strong> to a FileYou can use the Alarm Printer to log alarm records to a file.You should have already configured logging from theConfiguration Settings dialog box.To log alarms to a file1 Open the Alarm Printer utility.a In the WindowMaker Tools view, exp<strong>and</strong> Applications.b Double-click Alarm Printer.2 If necessary, configure the query to collect alarm recordsfor logging.3 Click the File Logging button.4 Run an alarm query.Alarm records collected by the query are written to theconfigured log file.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


248 Chapter 8 Printing <strong>Alarms</strong>Starting Alarm Printer with a SpecificConfigurationYou can automatically start the Alarm Printer <strong>and</strong> open aspecific file when your system starts up by using thefollowing comm<strong>and</strong> in a batch file:ALMPRT.EXE MYQUERY.ALCWhere, MYQUERY.ALC is the name of the Alarm Printerconfiguration file that opens. Specifying the .exe file nameextension is optional.Make sure that the batch file switches to the folder where the<strong>InTouch</strong> <strong>HMI</strong> is installed.To prevent the loss of any query data due to a systeminadvertently being shut down <strong>and</strong> restarted, you canautomatically start the Alarm Printer <strong>and</strong> automatically runa specific query by running the following comm<strong>and</strong> from abatch file:ALMPRT.EXE -q MYQUERY.ALCBy using the -q in the comm<strong>and</strong>, your query runsautomatically when the system starts up.Controlling the Alarm Printer Using ScriptingYou can use Alarm Printer functions in scripts to controlalarm printing.Alarm printer functions return an integer error code thatindicates whether the function completed successfully or not.The following table shows the error codes.ErrorCodeError Message0 Success1 Instance not found or not running2 Interface not initialized3 Failure to access virtual memory4 Invalid error code5 Too many instances already running6 Result string would be too long7 Invalid instance index passed to the function<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 249ErrorCodeError Message8 Failed to post the message to the alarm printerapplication9 Failed to wait for a response from the alarmprinter application20 To priority must be equal to or greater thanFrom priority21 Invalid priority value22 Invalid alarm state23 Failed to execute the comm<strong>and</strong> because thequery is running24 Query string is not valid25 Invalid query processing state26 Invalid print state selector27 Comm<strong>and</strong> received by the alarm printer windowis not recognized28 Query could not be startedStopping <strong>and</strong> Starting <strong>and</strong> Alarm Printer Instanceor QueryUse the following functions to start <strong>and</strong> stop the AlarmPrinter instance <strong>and</strong> the alarm query.• APUStartInstance() Function• APUStartQuery() Function• APUStopInstance() Function• APUStopQuery() FunctionAPUStartInstance() FunctionStarts an instance of the Alarm Printer in a minimized statewith values specified from a configuration file.CategoryViewSyntax[Result=] APUStartInstance(sFilePath,iTagInstance);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


250 Chapter 8 Printing <strong>Alarms</strong>ArgumentssFilePathFull path to a configuration file (input string).iTagInstanceInteger tag. The function returns an instance number to itif the function executes successfully.RemarksYou can start up to sixteen instances of the Alarm Printer.This function writes the instance number (0 - 15) to theiTagInstance parameter. The instance number incrementswhen a new Alarm Printer instance starts.This instance number can be used by other Alarm Printerfunctions to identify the Alarm Printer instance.This function returns 0 or, in the case of error, an error code.The Alarm Printer program does not automatically beginprocessing alarms from the alarm memory. Use theAPUStartQuery() function to begin processing data from thealarm memory for the instance.ExampleStatus =APUStartInstance("c:\MyAlarmCfg\Area1<strong>Alarms</strong>.alc",Inst);See AlsoAPUStartQuery(), APUStopInstance(), APUStopQuery()APUStartQuery() FunctionSets the date <strong>and</strong> time limits for records to be processed fromthe alarm memory <strong>and</strong> then starts the query.CategoryViewSyntax[Result=]APUStartQuery(iInstance,iYear,iMonth,iDay,iHour,iMinute);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).iYearThe number of the year.iMonthThe number of the month.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 251iDayThe day of the month.iHourThe hour number.iMinuteThe minute number.RemarksAn error occurs if you try to start a query when a query isalready running.If you set all date <strong>and</strong> time values to 0, all alarms areprinted. This is because 0 is interpreted as January 01, 1900at midnight. The time <strong>and</strong> dates specified are in local time. Avalue of -1 for the year sets the date to the current time thatthe comm<strong>and</strong> is processed.Returns an integer error code.ExampleStatus = APUStartQuery(Inst,2007,4,16,22,12);See AlsoAPUStartInstance(), APUStopInstance(), APUStopQuery()APUStopInstance() FunctionStops a specified instance of the Alarm Printer. Any furtheraddition of records to be printed stops, any currentlyexecuting print query stops, <strong>and</strong> the instance of the programcloses.CategoryViewSyntax[Result=] APUStopInstance(iInstance);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).RemarksReturns an integer error code.ExampleStatus = APUStopInstance(5);See AlsoAPUStartInstance(), APUStartQuery(), APUStopQuery()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


252 Chapter 8 Printing <strong>Alarms</strong>APUStopQuery() FunctionRequests the specified instance to stop running its query.The application remains running, but it does not process anyqueries. A call to APUStartQuery() can cause the instance tostart querying.CategoryViewSyntax[Result=] APUStopQuery(iInstance);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).RemarksReturns an integer error code.ExampleStatus = APUStopQuery(5);See AlsoAPUStartInstance(), APUStartQuery(), APUStopInstance()Querying Alarm Query InformationUse the following functions to retrieve query parametersbased on tag priorities <strong>and</strong> values set within the AlarmPrinter configuration file.• APUGetAlarmGroupText() Function• APUGetQueryFromPriority() Function• APUGetQueryToPriority() Function• APUGetConfigurationFilePath() Function• APUGetPrinterJobCount() Function• APUGetQueryAlarmState() Function• APUGetQueryProcessingState() Function<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 253APUGetAlarmGroupText() FunctionGets the Alarm Query alarm group text.CategoryViewSyntax[Result=]APUGetAlarmGroupText(iInstance,sTagGroup);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).sTagGroupText - alarm groupRemarksThe initial alarm group text is read from the .alcconfiguration file that the Alarm Printer with the specifiedinstance is using. The alarm group text is passed to thesTagGroup parameter into an <strong>InTouch</strong> message tag.Returns an integer error code.ExampleThe TagGroup message tag can contain the following valueafter the function is run: \intouch!$systemStatus = APUGetAlarmGroupText(Inst,TagGroup);See AlsoAPUGetConfigurationFilePath(), APUGetPrinterJobCount(),APUGetQueryAlarmState(), APUGetQueryFromPriority(),APUGetQueryProcessingState(), APUGetQueryToPriority()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


254 Chapter 8 Printing <strong>Alarms</strong>APUGetQueryFromPriority() FunctionGets the From Priority value for a query.CategoryViewSyntax[Result=] APUGetQueryFromPriority(iInstance,iTagPriority );ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).iTagPriorityAn integer tag that receives the From Priority value.RemarksThe initial priority is read from the .alc file that the AlarmPrinter with the specified instance is using. The FromPriority value is passed to the iTagPriority parameter into an<strong>InTouch</strong> integer tag.Returns an integer error code.ExampleIn this example, FromPri is an integer tag that contains theFrom Priority value, such as 1.Status = APUGetQueryFromPriority(Inst, FromPri);See AlsoAPUGetAlarmGroupText(),APUGetConfigurationFilePath(), APUGetPrinterJobCount(),APUGetQueryAlarmState(),APUGetQueryProcessingState(), APUGetQueryToPriority()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 255APUGetQueryToPriority() FunctionGets the To Priority from the query.CategoryViewSyntax[Result=]APUGetQueryToPriority(iInstance,iPriority );ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).iPriorityAn integer tag that receives the To Priority value.RemarksAnother query cannot be running at the same time as thescript that includes the APUGetQueryToPriority() function.The To Priority value is written to the iPriority parameter ofthe function, which is an integer tag.Returns an integer error code.ExampleThe integer tag ToPri receives the To Priority value, such as999.Status = APUGetQueryToPriority(Inst,ToPri);See AlsoAPUGetAlarmGroupText(),APUGetConfigurationFilePath(), APUGetPrinterJobCount(),APUGetQueryAlarmState(), APUGetQueryFromPriority(),APUGetQueryProcessingState()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


256 Chapter 8 Printing <strong>Alarms</strong>APUGetConfigurationFilePath() FunctionReturns the full file path of the .alc configuration file used fora query.CategoryViewSyntax[Result=] APUGetConfigurationFilePath(iInstance,sTagFilePath);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).sTagFilePathA message tag to retrieve the name of the file path to theconfiguration file the Alarm Printer instance is using.RemarksThe file path text is returned to an message tag that you canspecify as sTagFilePath parameter of this function.Returns an integer error code.ExampleThe CfgFilePath message tag receives the file path of theconfiguration file associated with the Alarm Printer instancecontained in the Inst integer tag. For example:c:\MyAlarmCfg\Area1<strong>Alarms</strong>.alcStatus = APUGetConfigurationFilePath(Inst,CfgFilePath);See AlsoAPUGetAlarmGroupText(), APUGetPrinterJobCount(),APUGetQueryAlarmState(), APUGetQueryFromPriority(),APUGetQueryProcessingState(), APUGetQueryToPriority()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 257APUGetPrinterJobCount() FunctionReturns the most recent Windows printer status job count forthe printer used by this instance.CategoryViewSyntax[Result=] APUGetPrinterJobCount(iInstance, iTagCount);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).iTagCountAn integer tag that receives the count value.RemarksThis function returns the count value in the iTagCountparameter, which is an integer tag.The results are not current unless a query is running. Theresults are not current unless an alarm has been printed -the job count is typically updated when the printer is initiallyopened, <strong>and</strong> then each time an alarm line is printed.The returned job count value is only valid for Windowsprinters <strong>and</strong> does not have much meaning for printersassociated with a parallel or serial port.Returns an integer error code.ExamplePJCount is an integer tag that receives the count value fromthe specified instance.Status = APUGetPrinterJobCount(Inst, PJCount);See AlsoAPUGetAlarmGroupText(),APUGetConfigurationFilePath(),APUGetQueryAlarmState(), APUGetQueryFromPriority(),APUGetQueryProcessingState(), APUGetQueryToPriority()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


258 Chapter 8 Printing <strong>Alarms</strong>APUGetQueryAlarmState() FunctionReturns the alarm state for the query.CategoryViewSyntax[Result=] APUGetQueryAlarmState(iInstance,iTagState );ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).iTagStateAn integer tag that receives the alarm state of the queryassociated with the specified instance. The value hasfollowing meanings:0 = All1 = Acknowledged2 = UnacknowledgedRemarksThe initial alarm state is read from the .alc file. This functionreturns it in the iTagState parameter of the function which isan integer tag.Returns an integer error code.ExampleAlmState is an integer tag that contains 0, 1 or 2.Status = APUGetQueryAlarmState(Inst,AlmState);See AlsoAPUGetAlarmGroupText(),APUGetConfigurationFilePath(), APUGetPrinterJobCount(),APUGetQueryFromPriority(),APUGetQueryProcessingState(), APUGetQueryToPriority()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 259APUGetQueryProcessingState() FunctionReturns the status of the alarm query processing.CategoryViewSyntax[Result=] APUGetQueryProcessingState(iInstance,iTagState);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).iTagStateAn integer tag that receives the processing state from thefunction. It has following meaning:0 = Stop1 = StartRemarksThis function returns an integer value to the iTagStateparameter, which is an integer tag.Returns an integer error code.ExampleProcState is an integer tag that is set to 0 if the query is notrunning, or 1 if the query is running.Status = APUGetQueryProcessingState(Inst,ProcState);See AlsoAPUGetAlarmGroupText(),APUGetConfigurationFilePath(), APUGetPrinterJobCount(),APUGetQueryAlarmState(), APUGetQueryFromPriority(),APUGetQueryToPriority()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


260 Chapter 8 Printing <strong>Alarms</strong>Querying Instance InformationUse the following functions to return the current status of aninstance of the Alarm Printer.• APUFindAlarmGroupInstance() Function• APUFindFileInstance() Function• APUFindPrinterInstance() Function• APUGetInstanceCount() Function• APUIsInstanceUsed() FunctionAPUFindAlarmGroupInstance() FunctionReturns the first instance of the Alarm Printer using thespecified alarm group string.CategoryViewSyntax[Result=] APUFindAlarmGroupInstance(sGroup,iInstance);ArgumentssGroupThe name of the alarm group to be found among theinstances.iInstanceAn integer tag that receives the value of a found instancethat uses the specified group name.RemarksThis function returns the instance number to an integer tagas the iInstance parameter. The initial alarm group string isread from the .alc file. If no instance is found, the functionreturns 1 as the error code (no instance available) <strong>and</strong> writes0 to the integer tag parameter.Returns an integer error code.ExampleFoundInstance is an integer tag that receives the number ofthe first instance found that uses the $System as its query.Status = APUFindAlarmGroupInstance("$System",FoundInstance);See AlsoAPUFindFileInstance(), APUFindPrinterInstance(),APUGetInstanceCount(), APUIsInstanceUsed()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 261APUFindFileInstance() FunctionFinds the first instance of the Alarm Printer using thespecified .alc configuration file.CategoryViewSyntax[Result=]APUFindFileInstance(sFilePath,iInstance);ArgumentssFilePathThe path of the .alc configuration file for which the instanceis to be found.iInstanceAn integer tag that receives the number of the instance.RemarksThis function returns the instance number to an integer tagas the iInstance parameter. Use this function to initiallyobtain the desired instance of the Alarm Printer. The filepath string match is not case-sensitive.If no instance is found, the function returns 1 as the errorcode (no instance available) <strong>and</strong> writes 0 to the integer tagparameter.Returns an integer error code.ExampleInstFound is an integer tag that receives the number of thefirst instance that uses the configuration filec:\MyAlarmCfg\Area1<strong>Alarms</strong>.alc.Status =APUFindFileInstance("c:\MyAlarmCfg\Area1<strong>Alarms</strong>.alc",InstFound);See AlsoAPUFindAlarmGroupInstance(), APUFindPrinterInstance(),APUGetInstanceCount(), APUIsInstanceUsed()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


262 Chapter 8 Printing <strong>Alarms</strong>APUFindPrinterInstance() FunctionFinds the first instance of the Alarm Printer using thespecified printer name or port.CategoryViewSyntax[Result=]APUFindPrinterInstance(sPrinter,iInstance);ArgumentssPrinterThe name of the printer for which the instance is to befound.iInstanceAn integer tag that receives the number of the instance.RemarksThis function returns the instance number to an integer tagas the iInstance parameter. Use this function to initiallyobtain the desired instance of an Alarm Printer. The printername is stored <strong>and</strong> read from the .alc file. The printer namestring match is not case-sensitive. If no instance is found, thefunction returns 1 as the error code (no instance available)<strong>and</strong> writes 0 to the integer tag parameter.Returns an integer error code.ExampleFoundInst is an integer tag that receives the number of thefirst instance that uses LPT1 as printer name in itsassociated .alc file.Status = APUFindPrinterInstance("LPT1",FoundInst);See AlsoAPUFindAlarmGroupInstance(), APUFindFileInstance(),APUGetInstanceCount(), APUIsInstanceUsed()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 263APUGetInstanceCount() FunctionReturns the number of running instances of the AlarmPrinter, up to a maximum of 16 instances.CategoryViewSyntax[Result=] APUGetInstanceCount(iCount);ArgumentsiCountAn integer tag that receives the number of instances.RemarksThis function returns the number of instances to an integertag as parameter. Any instances beyond the first sixteenrunning simultaneously are not dynamically controlled norcan their status be obtained.Returns an integer error code.ExampleICount is an integer tag. A run-time value of 7 means thatthere are currently seven instances of Alarm Printerrunning.Status = APUGetInstanceCount( iCount );See AlsoAPUFindAlarmGroupInstance(), APUFindFileInstance(),APUFindPrinterInstance(), APUIsInstanceUsed()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


264 Chapter 8 Printing <strong>Alarms</strong>APUIsInstanceUsed() FunctionReturns a discrete value that indicates the instance iscurrently in use.CategoryViewSyntax[Result=] APUIsInstanceUsed(iInstance);ArgumentsiInstanceThe number of an instance of Alarm Printer (0 to 15).RemarksThe result is either 0 or 1:0 = instance is not used.1 = instance is used.ExampleInUse is a discrete tag that is set to true (1), if instance 5 is inuse, or set to false (0), if instance 5 is not in use.InUse = APUIsInstanceUsed(5);See AlsoAPUFindAlarmGroupInstance(), APUFindFileInstance(),APUFindPrinterInstance(), APUGetInstanceCount()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 265Querying Printer InformationUse the following functions to return the status of the AlarmPrinter.• APUGetPrinterName() Function• APUGetPrinterStatus() FunctionAPUGetPrinterName() FunctionReturns the Windows printer name or port name of theprinter used by this instance.CategoryViewSyntax[Result=] APUGetPrinterName(iInstance,sTagPrinter);ArgumentsiInstanceThe number of the Alarm Printer instance (0 to 15).sTagPrinterA message tag that receives the printer name or port nameof the configuration associated with the specified instance.RemarksThis function returns the value NONE if no printer isconfigured for an instance. The printer name is stored <strong>and</strong>read from the .alc file. This function returns the printer nameor port name to a message tag as the sTagPrinter parameter.Returns an integer error code.ExamplePrtName is a message tag that receives the printer name orport name of the configuration associated with instance 3 ofAlarm Printer.Status = APUGetPrinterName(3,PrtName);See AlsoAPUGetPrinterStatus()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


266 Chapter 8 Printing <strong>Alarms</strong>APUGetPrinterStatus() FunctionReturns the most recent status of the Windows printer usedby this instance.CategoryViewSyntax[Result=]APUGetPrinterStatus(iInstance,iSelector,iTagStatus);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).iSelectorAn integer value specifying the following:0 = Get status for Alarm Printer Error1 = Get status for Alarm Printer No Paper2 = Get status for Alarm Printer Offline3 = Get status for Alarm Printer OverflowiTagStatusAn integer or real tag that receives the status of the printerassociated with specified instance number <strong>and</strong> the type ofselection made by the iSelector parameter.RemarksThis function returns the printer status to an integer or realtag as the iTagStatus parameter. The results are not currentunless a query is running <strong>and</strong> an alarm has been printed.The status typically updates when the printer initially opens,<strong>and</strong> then each time an alarm line prints.This status information is being queried to the printer basedon Microsoft or Windows driver st<strong>and</strong>ards. Not all printermanufacturers follow these st<strong>and</strong>ards. Therefore, not allprinters return status information.Returns an integer error code.ExamplePrtStat is an integer tag that receives the "Printer Offline"status from the printer associated with instance 5.Status = APUGetPrinterStatus(5, 2, PrtStat);See AlsoAPUGetPrinterName()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 267Setting Alarm Query InformationUse the following functions to set parameters used in theAlarm Printer query.• APUSetAlarmGroupText() Function• APUSetQueryAlarmState() Function• APUSetQueryFromPriority() Function• APUSetQueryToPriority() Function• APUSetTimeoutValues() FunctionAPUSetAlarmGroupText() FunctionSets the Alarm Query alarm group text.CategoryViewSyntax[Result=] APUSetAlarmGroupText(iInstance,sGroup);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).sGroupAlarm group text.RemarksA query cannot be running for this function to succeed.Returns an integer error code.ExampleThis example sets the query of the Alarm Printer instance 1to \<strong>InTouch</strong>!GroupA.Status = APUSetAlarmGroupText(1,"\intouch!GroupA");See AlsoAPUSetQueryAlarmState(), APUSetQueryFromPriority(),APUSetQueryToPriority(), APUSetTimeoutValues()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


268 Chapter 8 Printing <strong>Alarms</strong>APUSetQueryAlarmState() FunctionSets the alarm state for the query.CategoryViewSyntax[Result=] APUSetQueryAlarmState(iInstance,iState);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).iStateAn integer with following possible values:0 = All1 = Acknowledged2 = UnacknowledgedRemarksA query cannot be running simultaneously while running ascript using the APUSetQueryAlarmState() function.Returns an integer error code.ExampleThis example sets the query of the Alarm Printer instance 3to query for acknowledged alarms only.Status = APUSetQueryAlarmState(3, 1);See AlsoAPUSetAlarmGroupText(), APUSetQueryFromPriority(),APUSetQueryToPriority(), APUSetTimeoutValues()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 269APUSetQueryFromPriority() FunctionSets the lower boundary or from priority of an alarm query.CategoryViewSyntax[Result=]APUSetQueryFromPriority(iInstance,iPriority);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).iPriorityAn integer value for the From Priority (1 to 999).RemarksA query cannot be running for this function to succeed.Returns an integer error code.ExampleThis example sets the From Priority value of the queryassociated with the instance value of the Inst integer tag tothe value of the FromPri integer tag.Status = APUSetQueryFromPriority(Inst, FromPri);See AlsoAPUSetAlarmGroupText(), APUSetQueryAlarmState(),APUSetQueryToPriority(), APUSetTimeoutValues()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


270 Chapter 8 Printing <strong>Alarms</strong>APUSetQueryToPriority() FunctionSets the To Priority for the query.CategoryViewSyntax[Result=]APUSetQueryToPriority(iInstance,iPriority);ArgumentsiInstanceThe instance of Alarm Printer (0 to 15).iPriorityAn integer value for the To Priority in the range of 1 to 999.It should also be set higher than or equal to the FromPriority value of the same query of the specified instance.RemarksThe To priority must be equal to or greater than the Frompriority to set a valid alarm priority range. A scriptcontaining the APUSetQueryToPriority() function cannotrun at the same time as a query.Returns an integer error code.ExampleThis example sets the To Priority value of the queryassociated with the instance 0 to 240.Status = APUSetQueryToPriority(0,240);See AlsoAPUSetAlarmGroupText(), APUSetQueryAlarmState(),APUSetQueryFromPriority(), APUSetTimeoutValues()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Alarm Printer Using Scripting 271APUSetTimeoutValues() FunctionThe APUSetTimeoutValues() function sets time-out intervalsin seconds. A time-out interval controls how many errorscaused by memory access or failing to obtain valid responsesare observed while program is running.The default memory access time-out is two seconds. Thedefault short response wait time is 10 second <strong>and</strong> the defaultlong response wait time is 20 seconds.CategoryViewSyntax[Result=] APUSetTimeoutValues(iMemory,iShort,iLong);ArgumentsiMemoryInteger - access time outiShortShort response wait time (integer)iLongLong response wait time (integer)ExampleStatus =APUSetTimeoutValues(iMemory,iShort,iLong);See AlsoAPUSetAlarmGroupText(), APUSetQueryAlarmState(),APUSetQueryFromPriority(), APUSetQueryToPriority()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


272 Chapter 8 Printing <strong>Alarms</strong>H<strong>and</strong>ling Alarm Printer ErrorsUse the APUTranslateErrorCode() function to convert anAlarm Printer error code to an error message.APUTranslateErrorCode() FunctionConverts an error code returned by one of the APU functionsinto an English string that briefly describes the error code.CategoryViewSyntax[Result=]APUTranslateErrorCode(iErrorCode,sTagMessage);ArgumentsiErrorCodeAn integer error code, normally returned by most otherAPU functions.sTagMessageA message tag that receives the error message.RemarksThis function returns the error message to a message tag assTagMessage parameter. This function can fail if anunknown error code is passed.Returns an integer error code.ExampleThis example sets the message tag errmsg to "No instanceavailable." if there is no instance 15 of Alarm Printercurrently running.Status =APUTranslateErrorCode(APUSetAlarmGroupText(15,"$system"), ErrMsg);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


273Chapter 9Recording <strong>Alarms</strong> into an AlarmDatabaseThe <strong>InTouch</strong> Distributed Alarm system includes the AlarmDB Logger utility that logs alarms <strong>and</strong> events to the alarmdatabase.Alarm DB Logger is an alarm consumer. You configure itwith one or more queries to select alarms from <strong>InTouch</strong>alarm providers. The alarms selected by the queries arestored in a transient memory cache, called the Smart Cache.The Alarm DB Logger writes the contents of the SmartCache to the alarm database as alarm <strong>and</strong> event records at aperiodic interval.<strong>Alarms</strong>Alarm QueryAAlarm DB Logger<strong>InTouch</strong> AlarmDatabaseBSmart CacheAB CBACCThe Alarm DB Logger can auto-reconnect. When theconnection to the database is lost, the logger checks for thedatabase connection at regular intervals. Logging resumeswhen the connection to the alarm database is re-established.The Alarm DB Logger reports all errors whether running asa service or a normal application to the ArchestrA Logger.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


274 Chapter 9 Recording <strong>Alarms</strong> into an Alarm DatabaseSQL Server Accounts for Alarm DB LoggerManagerThe Alarm DB Logger Manager creates <strong>and</strong> uses thefollowing accounts in the SQL Server database:AccountwwAdminwwPowerwwUserPasswordwwAdminwwPowerwwUserUsing the Alarm DB Logger ManagerUse the Alarm DB Logger Manager to start <strong>and</strong> stop loggingoperations. The Alarm DB Logger Manager can start as aservice or a normal application.You configure alarm logging using the Alarm DB Loggerconfiguration wizard, which you start from within the AlarmDB Logger Manager.The Alarm DB Logger Manager shows the percentage fill ofthe Smart Cache with alarm records. The alarms are cachedwhen the SQL Server connection is down or when alarmsoccur faster than Alarm DB Logger can log them to the alarmdatabase.To open the Alarm DB Logger Manager1 In the Tools view, exp<strong>and</strong> Applications.2 Double-click Alarm DB Logger Manager. The Alarm DBLogger Manager appears.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Alarm Database Logging 275Configuring Alarm Database LoggingTo log <strong>InTouch</strong> alarm <strong>and</strong> event data to the alarm database,do the following from within the Alarm DB Logger Manager:• Configure the connection to the alarm database• Select which alarms to log to the alarm database• Set the interval to log records to the alarm database• Select which method to run the Alarm DB LoggerConfiguring the Database ConnectionYou must establish a connection between the Alarm DBLogger <strong>and</strong> the alarm database.The Alarm DB Logger only works with SQL Serverauthentication <strong>and</strong> the SQL Server authentication must beset to mixed mode.To configure the database connection1 Open the Alarm DB Logger Manager. Do the following:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Logger Manager.2 Click Settings. The Alarm DB Logger Manager -Configuration wizard appears.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


276 Chapter 9 Recording <strong>Alarms</strong> into an Alarm Database3 Configure the database connection. Do the following:abcdIn the Server Name box, enter the node name of thecomputer where the alarm database is installed.In the Database box, type the name of the <strong>InTouch</strong>alarm database.In User Name box, type the user account name createdfor the alarm database.In the Password box, type the password associatedwith the alarm database user account.4 In the Logging Mode area, configure how records arestored. Do either of the following:• Click Detailed to store a separate record for eachalarm condition (in alarm, acknowledged, <strong>and</strong>returned to normal).• Click Consolidated to store all states of an alarm (inalarm, acknowledged, <strong>and</strong> returned to normal) in asingle record with time stamps for each transition.5 Click Create to create the database, if required.6 Click Test Connection to verify connectivity to the alarmdatabase. A message indicates a successful connection tothe database.7 Click Next to configure which alarms to log. SeeConfiguring Which <strong>Alarms</strong> to Log on page 276.Configuring Which <strong>Alarms</strong> to LogIn the second page of the Alarm DB Logger Managerconfiguration wizard, you define one or more queries to selectalarms from <strong>InTouch</strong> or Galaxy alarm providers. You alsoselect a range of alarm priority values that are part of thedatabase query.Use the following query syntax for remote nodes:\\NodeName\Provider!AlarmGroupUse the following query syntax for the local node:\Provider!AlarmGroupExample:\\ProdSvr\<strong>InTouch</strong>!$SystemThe following is an example of using a Galaxy alarmprovider. This query gives you all alarms from a specific area.\\Galaxy!Area<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Alarm Database Logging 277To configure which alarms to log1 Open the Alarm DB Logger Manager <strong>and</strong> start theconfiguration wizard. Do the following:a In the Tools view, exp<strong>and</strong> Applications.b Double-click Alarm DB Logger Manager.c Click Settings. The Alarm DB Logger Manager -Configuration wizard appears.2 Click Next. The Alarm DB Logger Manager - Query Selectionpage appears.The read-only Alarm State box shows the alarm state forlogging. The read-only Query Type box shows the type ofquery.3 In the From Priority box, enter the starting value of thealarm priority range.4 In the To Priority box, enter the ending value of the alarmpriority range.5 In the Alarm Query box, type the alarm queries that youwant to use to store or retrieve data from the alarmdatabase.6 Click Next to configure the logging interval. SeeConfiguring the Logging Interval on page 278.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


278 Chapter 9 Recording <strong>Alarms</strong> into an Alarm DatabaseConfiguring the Logging IntervalIn the third page of the Alarm DB Logger Managerconfiguration wizard, you configure advanced query settings.You can log events to the alarm database. You can also tunethe performance of alarm logging by setting the frequency atwhich the alarm records are written from internal alarmmemory to the database.The logging interval is not the same as the reconnect rate forthe SQL Server. The logging interval is the interval at whichalarms should be read. The reconnect rate depends on thetime out for a connection attempt associated with the SQLServer.Setting the logging interval too low impacts systemperformance.To configure the logging interval1 Open the Alarm DB Logger Manager <strong>and</strong> start theconfiguration wizard. Do the following:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Logger Manager.c Click Settings. The Alarm DB Logger Manager -Configuration wizard appears.2 Click Next. The Alarm DB Logger Manager - Query Selectionpage appears.3 Click Next. The Alarm DB Logger Manager - AdvancedSetting page appears.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Alarm Database Logging 2794 Select the Log <strong>Events</strong> check box if you want to store<strong>InTouch</strong> event records to the alarm database. You canalso store events coming from an ArchestrA Galaxy.5 In the Performance Tuning area, type the interval inmilliseconds at which alarm records are written to thealarm database.6 Click Finish.Configuring Alarm DB Logger as a ServiceYou can configure the Alarm DB Logger to run as a service.1 Log in to the computer as an administrator.2 Open the Alarm DB Logger Manager <strong>and</strong> start theconfiguration wizard. Do the following:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Logger Manager.c Click Settings. The Alarm DB Logger Manager -Configuration wizard appears.3 Click Next. The Alarm DB Logger Manager - Query Selectionpage appears.4 Click Next. The Alarm DB Logger Manager - AdvancedSetting page appears.5 In the Running Logger As area, click either WindowsService or Normal Application.6 Click Finish.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


280 Chapter 9 Recording <strong>Alarms</strong> into an Alarm DatabaseStarting <strong>and</strong> Stopping Alarm Database LoggingThe Alarm DB Logger writes records to the alarm database.It starts <strong>and</strong> runs either as a service or a normal application(depending upon the running mode you select when youconfigure the Alarm DB Logger).To start or stop alarm logging1 In the Tools view, exp<strong>and</strong> Applications.2 Double-click Alarm DB Logger Manager. The Alarm DBLogger Manager appears.The Smart Cache Status shows the percentage of thein-memory cache holding alarm records.3 Click Start to begin the alarm logging process.4 Click Stop to end the alarm logging process.Alarm Database ViewsYou can use a set of SQL Server database views to easilyquery past <strong>and</strong> current alarm <strong>and</strong> event occurrences.A database view is a single logical table that combinesinformation from multiple, underlying database tables.Database views are often called as virtual database tablesbecause they can be queried using st<strong>and</strong>ard SQL statements,just as if they were real tables. When a view is queried, itreturns a set of records (or rows). Each row has severalcolumns of information that contain the data for the record.You can use the alarm database views to perform complexqueries. For example, you can retrieve alarm records for allHiHi alarms that occurred during a particular time span in aparticular area of the plant. Or, you can retrieve all datachange events logged by a certain alarm provider node.All strings are Unicode in the views.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Alarm Database Views 281Alarm History ViewThe v_AlarmHistory view contains all historical alarms <strong>and</strong>alarm transition events that occurred over a selected timerange. The query specifies start <strong>and</strong> end date <strong>and</strong> time (theEventStamp or EventStampUTC column). The returnedrecords include alarm origination, alarm acknowledge, alarmenable, alarm disable, <strong>and</strong> alarm return-to-normal events.The following table describes the view columns:Column Name Datatype DescriptionEventStamp Datetime Date <strong>and</strong> time of alarm event (in local time ofdatabase).AlarmState nChar State of alarm: one of UNACK, UNACK_RTN,ACK, ACK_RTN.TagName nChar Name of the object that generated the alarm,such as TIC101.Description nVarchar Description string of the alarm. Can default toobject description (or comment in the <strong>InTouch</strong><strong>HMI</strong>). Or acknowledge comment foracknowledged records.Area nChar Name of the Area or Group for the alarm.Type nChar Type of alarm, such as Hi, HiHi, ROC,PV.HiAlarm.Value nChar Value of alarm variable at time of alarm.CheckValue nChar Value of alarm limit at time of alarm.Priority Integer Alarm priority.Category nChar Alarm class or alarm category. Such as Value,Dev, ROC, Process, Batch, System, <strong>and</strong> so on.Provider nChar Provider of alarm: node/<strong>InTouch</strong>, orGalaxyName.Operator nChar Name of the operator.DomainName nChar Name of the domain.UserFullName nChar Full name of user in operator (for example,Joseph P. Smith).UNACKDuration Float The time between the most recent alarmtransition (alarm or sub-state) <strong>and</strong> theacknowledgement, if any.User1 Float User-defined field number 1.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


282 Chapter 9 Recording <strong>Alarms</strong> into an Alarm DatabaseColumn Name Datatype DescriptionUser2 Float User-defined field number 2.User 3 nChar User-defined field, string.EventStampUTC DateTime UTC date/ time of alarm event.Millisec Small Int Fractional seconds for event stamp inincrements of 0.1 msec.OperatorNode nvarchar(32) Name of the node where the operatoracknowledged the alarm.The v_AlarmHistory2 view is a variation of thev_AlarmHistory view.Column Name Datatype DescriptionEventStamp Datetime Date <strong>and</strong> time of alarm event (in local time ofdatabase).AlarmState nChar State of alarm: one of UNACK, UNACK_RTN,ACK, ACK_RTN, ACK_ALM, UNACK_ALMTagName nChar Name of the object that generated the alarm,such as TIC101.Description nVarchar Description string of the alarm. Can default t.oobject description (or comment in <strong>InTouch</strong>). Oracknowledge comment for acknowledgementrecords.Area nChar Name of the Area or Group for the alarm.Type nChar Type of alarm, such as Hi, HiHi, ROC,PV.HiAlarm.Value nChar Value of alarm variable at time of alarm.CheckValue nChar Value of alarm limit at time of alarm.Priority Integer Alarm priority.Category nChar Alarm class or alarm category. Such as Value,Dev, ROC, Process, Batch, System, <strong>and</strong> so on.Provider nChar Provider of alarm: node/<strong>InTouch</strong>, orGalaxyName.Operator nChar Name of operator: JoeR (if any).DomainName nChar Name of domain.UserFullName nChar Full name of user in operator (for example,Joseph P. Smith).<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Alarm Database Views 283Column Name Datatype DescriptionAlarmDuration Float The time between onset of the alarm <strong>and</strong>return to normal.User1 Float User-defined field number 1.User2 Float User-defined field number 2.User 3 nChar User-defined field, string.EventStampUTC DateTime UTC date/ time of alarm event.Millisec Small Int Fractional seconds for event stamp inincrements of 0.1 msec.Example Query - Alarm History ViewThis example selects all records from the Alarm Historyview:SELECT * FROM v_AlarmHistoryThis example selects all records from the Alarm History viewwith a priority greater than 100:SELECT * FROM v_AlarmHistory WHERE Priority >100Event History ViewThe v_EventHistory database view lists all historical eventsthat occurred over a selected time range. The query clientspecifies the starting <strong>and</strong> ending date <strong>and</strong> time range. Thereturned records include all non-alarm events.Column Name Datatype DescriptionEventStamp Datetime Date <strong>and</strong> time of event.TagName nChar Name of the object that generated the event,such as Pump1.Description nVarChar Description string of the event. Can default toobject description, or comment in <strong>InTouch</strong>.Area nChar Name of the Area or Group for the event.Type nChar Type of event, such as "Operator data change","Startup", <strong>and</strong> so on.Value nChar New Value (if any).CheckValue nChar Old Value (if any).<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


284 Chapter 9 Recording <strong>Alarms</strong> into an Alarm DatabaseColumn Name Datatype DescriptionCategory nChar Event category or class, such as Value, Process,Batch, System, <strong>and</strong> so on.Provider nChar Generator of event, such as node/<strong>InTouch</strong>, orView Engine name for user change.Operator nChar Name of operator1: JoeR (if any).DomainName nChar Name of domain.UserFullName nChar Full name of user in operator (for example,Joseph P. Smith).User1 Float User-defined field number 1.User2 Float User-defined field number 2.User 3 nChar User-defined field, string.EventStampUTC DateTime UTC date/ time of event.Millisec Small Int Fractional seconds for event stamp in incrementsof 0.1 msec.Alarm Event History ViewThe v_AlarmEventHistory database view provides ahistorical list of all events <strong>and</strong> alarms that occurred over aselected time range. The query client specifies start <strong>and</strong> enddate <strong>and</strong> time. The returned records include all alarms <strong>and</strong>events. This view combines the alarm view <strong>and</strong> event viewinto one <strong>and</strong> represents the union of the records from thoseviews.Column Name Datatype DescriptionEventStamp Datetime Date <strong>and</strong> time of event.AlarmState nChar State of alarm: one of UNACK, UNACK_RTN,ACK, ACK_RTN. Does not apply for events.TagName nChar Name of the object that generated the alarm,such as TIC101.Description nVarchar Description string of the alarm/event. C<strong>and</strong>efault to object description (or comment in<strong>InTouch</strong>). Or acknowledge comment foracknowledged records.Area nChar Name of the Area or Group for the alarm.Type nChar Type of alarm or event, such as Hi, HiHi, ROC,PV.HiAlarm, Operator data change, <strong>and</strong> so on.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Alarm Database Views 285Column Name Datatype DescriptionValue nChar Value of alarm variable at time of alarm.CheckValue nChar Value of alarm limit at time of alarm, or oldvalue for event.Priority Integer Alarm priority.Category nChar Alarm or event class, or alarm category, such asValue, Process, Batch, System, <strong>and</strong> so on.Provider nChar Provider of alarm, such as node/<strong>InTouch</strong>, orGalaxyName.Operator nChar Name of acknowledgement operator or datachange operator.DomainName nChar Name of domain.UserFullName nChar Full name of user in operator (for example,Joseph P. Smith).UNACKDuration Float Number of milliseconds from the most recentalarm transition to ACK.User1 Float User-defined field number 1.User2 Float User-defined field number 2.User 3 nChar User-defined field, string.EventStampUTC DateTime UTC date/ time of event.Millisec Small Int Fractional seconds for event stamp inincrements of 0.1 msec.The v_AlarmEventHistory2 view is a variation of thev_AlarmEventHistory view.Column Name Datatype DescriptionEventStamp Datetime Date <strong>and</strong> time of event.AlarmState nChar State of alarm: one of UNACK, UNACK_RTN,ACK, ACK_RTN. Does not apply for events.TagName nChar Name of the object that generated the alarm,such as TIC101.Description nVarchar Description string of the alarm/event. C<strong>and</strong>efault to object description (or comment in<strong>InTouch</strong>). Or acknowledge comment foracknowledged records.Area nChar Name of the Area or Group for the alarm.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


286 Chapter 9 Recording <strong>Alarms</strong> into an Alarm DatabaseColumn Name Datatype DescriptionType nChar Type of alarm or event, such as Hi, HiHi, ROC,PV.HiAlarm, Operator data change, <strong>and</strong> so on.Value nChar Value of alarm variable at time of alarm.CheckValue nChar Value of alarm limit at time of alarm, or oldvalue for event.Priority Integer Alarm priority.Category nChar Alarm or event class, or alarm category, such asValue, Process, Batch, System, <strong>and</strong> so on.Provider nChar Provider of alarm, such as node/<strong>InTouch</strong>, orGalaxyName.Operator nChar Name of acknowledgement operator or datachange operator.DomainName nChar Name of domain.UserFullName nChar Full name of user in operator (for example,Joseph P. Smith).AlarmDuration Float Number of milliseconds from the onset of alarmto the return to normal (RTN).User1 Float User-defined field number 1.User2 Float User-defined field number 2.User 3 nChar User-defined field, string.EventStampUTC DateTime UTC date/ time of event.Millisec Small Int Fractional seconds for event stamp in incrementsof 0.1 msec.Example Query - Alarm Event History ViewThe following example selects the data in the TagName, Area<strong>and</strong> Type columns for all records that have a tagname ofMyTag1, an alarm state of ACK_RTN or ACK. The resultsare ordered by the alarm provider.SELECT TagName, Area, Type FROM v_AlarmEventHistoryWHERE TagName=’MyTag1’AND (AlarmState=’ACK_RTN’ OR AlarmState=’ACK’)ORDER BY Provider<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Alarm Database Views 287AlarmSuite Alarm Log ViewThe v_AlarmSuiteAlarmLog database view provides a viewof historical alarms <strong>and</strong> events that returns a table that hasthe same columns as the actual AlarmSuite table calledAlarmLog. Queries that work against the AlarmSuiteAlarmLog table also work against this view, except that thetable name in those queries must be changed to the viewname.Column Name Datatype DescriptionEventStamp Datetime Date <strong>and</strong> time of the event.EventType NChar Type of the event, as defined by AlarmSuite.AlarmType NChar Type of the alarm.AlarmState NChar Acknowledgement state of the alarm.NodeName NChar Node of alarm.TagName NChar Name of the object reporting alarm.GroupName NChar Name of alarm group or area.Comment NChar Acknowledge comment (if any).Value Float Value of alarm variable.Limit Float Value of alarm limit at time of alarm.ValueString NChar See the AlarmSuite table.Operator NChar Operator name.Priority Integer Priority.Units NChar Return as "" in 7.11.Example Query - AlarmSuite Alarm Log ViewThe following example selects all distinct tagnames from theview:SELECT Distinct TagName FROM v_AlarmSuiteAlarmLog<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


288 Chapter 9 Recording <strong>Alarms</strong> into an Alarm DatabaseAlarm Database Stored ProceduresYou can use a set of SQL Server stored procedures to easilyretrieve information for analysis <strong>and</strong> reporting of alarms <strong>and</strong>events.A stored procedure is a collection of SQL statements thatperform a specific function <strong>and</strong> return data from thedatabase. Stored procedures can accept input parametersthat govern how they are to operate, <strong>and</strong> they return data inthe form of a result set.The returned results are a set of records <strong>and</strong> appear as a SQLrecord set very similar to a SQL Server database view. Storedprocedures can improve performance because they exist inthe database with their embedded SQL statements <strong>and</strong>reduce round-trips back to the client.For more information about stored procedures, including howto view the definitions for them, see your Microsoft SQLServer documentation.Calling a Stored ProcedureCall a stored procedure using the EXECUTE statement.EXECUTE sp_AlarmCounter @StartDate=’2007-01-01’,@EndDate=’2007-03-31’, @Tagname = ’tag1’, @Type =’LO’, @Provider = ’WW21353\<strong>InTouch</strong>’, @Comment =’SSAADD’In this example, the StartDate <strong>and</strong> EndDate parameters arerequired. The remaining parameters are optional. If you donot provide a value for a parameter, it is not used to filter theresult set.If a stored procedure includes a date/time variable, you canuse any valid format specified in the SQL Serverdocumentation.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Alarm Database Stored Procedures 289AlarmCounter Database Stored ProcedureThis stored procedure returns the number of times a uniquealarm occurred in a time interval. A unique alarm isidentified by its TagName, Provider, Alarm Type, <strong>and</strong>Category.The counter only applies to the number of alarm originations(not transitions such as acknowledges or returns-to-normal).So, for example, if an alarm occurred <strong>and</strong> then wasacknowledged <strong>and</strong> then returned to normal, the count forthat alarm is only 1 (not 3).The query must specify the starting <strong>and</strong> ending date <strong>and</strong>time. It has five optional parameters: TagName, Class, Type,Provider <strong>and</strong> Comment.An example question answered by this view: How manytimes did object TIC101 (TagName) on providerNode1|<strong>InTouch</strong> (Provider) go into a Value alarm (Category)that was HiHi (Type) during a time span?Note The AlarmCounter stored procedure applies only to theDetailed logging mode <strong>and</strong> is not supported by Consolidatedlogging.sp_AlarmCounter;Column Name Datatype DescriptionTagName Nchar Name of the object that generated the alarm, suchas TIC101.GroupName Nchar Name of the area or group for the alarmAlarmType Nchar Type of alarm such as Hi, HiHi, ROC, PV,HiAlarm.AlarmClass Nchar Alarm class or alarm category such, as Value,Process, Batch, etc.AlarmCount Integer Number of onsets of the alarm during the timerange. If an alarm occurs prior to the starting date<strong>and</strong> time, it is not included in the count.Priority Integer Alarm priority.Provider Nchar Provider of alarm, such as node/<strong>InTouch</strong>, orGalaxyName.Comment Nchar The alarm comment.An example query is:EXECUTE sp_AlarmCounter @StartDate=’2007-01-0123:23:23’, @EndDate=’2007-03-31 23:23:23’, @Tagname =’$NewAlarm’<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


291Chapter 10Viewing Recorded <strong>Alarms</strong>You use the Alarm DB View ActiveX control to visualize datafrom the alarm database. Use this control to show all alarm<strong>and</strong> event information generated from an <strong>InTouch</strong>application during run time.For this control, you can configure:• Context sensitive menu features• Display mode• List control options• Colors for different properties• Font type, style <strong>and</strong> size• Database specifications (server name, user ID <strong>and</strong>password)• Query filters• Column management• Sorting<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


292 Chapter 10 Viewing Recorded <strong>Alarms</strong>Run-time users can change options while the application isrunning to select the data they are viewing. They can:• Sort the information within a column• Update the display• Perform a query• Resize the width of a columnFor more information about ActiveX controls, see Chapter 6,ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong> Visualization <strong>Guide</strong>.Configuring the Alarm DB View ControlWhen you configure the Alarm DB View control, you:• Configure the connection to the alarm database.• Configure the appearance of the grid.• Select a display font.• Configure the visual appearance.• Set which features the user can access while theapplication is running.• Configure which alarms to show.• Create custom filters.• Set the colors for the types of alarm records.• Configure the time format shown.• Configure the sort order of alarm records shown.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 293Configuring the Database ConnectionYou must configure the connection between the Alarm DBView control <strong>and</strong> the alarm database.Use an account with appropriate read-only access to thealarm database <strong>and</strong> not a system administrator account.To configure the connection to the alarm database1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDbViewCtrl Properties dialog boxappears.2 Click the Database tab.3 Configure the connection to the alarm database. Do thefollowing:abcdIn the Server Name box, enter the node name of thecomputer where the alarm database is installed.In the Database Name box, type the database name.In the User box, type the name of a valid user account.In the Password box, type the password associatedwith the user account.4 Select the Auto Connect check box to have the Alarm DBView control automatically connect to the alarm databasewhen the <strong>InTouch</strong> application starts running.If you do not select the Auto Connect check box, you mustconfigure the Alarm DB View control to connect to thealarm database by explicitly calling the Connect()method. For more information about the Connect method,see Connect() Method on page 347.5 Click Test Connection to verify connectivity to the alarmdatabase. A message indicates a successful connection.6 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


294 Chapter 10 Viewing Recorded <strong>Alarms</strong>Configuring the Appearance of the GridYou can configure properties that determine the visualappearance of the Alarm DB View control.To configure the appearance of the grid1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDbViewCtrl Properties dialog boxappears.2 Click the General tab.3 Configure the general appearance. Do the following:• Click the Show Grid check box to show the grid.• Click the Silent Mode check box to prevent the controlfrom showing any error messages at run time.• Click the Show Message check box to show a messageif the alarm query does not return any records. Typethe message to show in the box.• Click the Show Heading check box to show the controlheading.• Click the Show Status Bar check box to show the statusbar.4 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 295Configuring the Display FontYou can select the font of all text that appears in the AlarmDB View control.To configure the font properties1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDbViewCtrl Properties dialog boxappears.2 Click the General tab.3 Click Font. The st<strong>and</strong>ard Windows Font dialog boxappears. Configure the font <strong>and</strong> then click OK.4 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


296 Chapter 10 Viewing Recorded <strong>Alarms</strong>Selecting Alarm or Event DataYou can configure if alarm records, event records, or bothappear in an Alarm DB View control.To select the type of data1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDbViewCtrl Properties dialog boxappears.2 Click the General tab.3 In the Display Mode list, click the type of historical recordsfrom the list:• Click Alarm & Event History to show both alarm <strong>and</strong>event historical database records.• Click Alarm History to show only historical alarmrecords.• Click Event History to show only historical eventrecords.4 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 297Selecting <strong>and</strong> Configuring Display ColumnsFor the Alarm DB View control, you can:• Select <strong>and</strong> order the columns.• Set the width of a column in pixels.• Rename a column.At least one column must be selected.Important The column names are reset to default column namesif the display mode is changed. It is better to select the displaymode first before changing the column names.To configure the display column details1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDbViewCtrl Properties dialog boxappears.2 Click the General tab.3 Click Column Details. The Column Details dialog boxappears.4 In the Name column, select the check boxes next to thenames of the columns that you want to appear in theAlarm DB View control. You must select at least onecolumn from the list.Column NameTimeStateClassTypePriorityDescriptionShows the time at which the alarmoccurred.Shows the state of the alarm.Shows the alarm category.Shows the alarm type.Shows the alarm priority.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


298 Chapter 10 Viewing Recorded <strong>Alarms</strong>Column NameNameGroupProviderValueLimitOperatorOperator FullNameOperator NodeOperatorDomainAlarmCommentUser1User2DescriptionShows the tag or source that causedthe alarm or event.Shows the alarm group name.Shows the name of the alarmprovider.Shows the value of the tag when thealarm occurred.Shows the alarm limit value of thetag.Shows the logged-on operator’s IDassociated with the alarm condition.Shows the logged-on operator’s fullname.Shows the logged on operator’s nodeassociated with the alarm condition.In a Terminal Services environment,this is the name of the clientcomputer that the operatorestablished the Terminal Servicessession from. If the node name can'tbe retrieved, the node's IP address isused instead.Shows the logged on operator’sdomain associated with the alarmcondition.Shows the tag’s comments. Thiscomment was typed in the AlarmComment box when the tag’s alarmwas defined in the database. Whenan acknowledgement comment isintroduced for alarms, the newcomment is updated in this commentcolumn.Shows the numerical values of UserDefined Number 1 corresponding tothe alarm.Shows the numerical values of UserDefined Number 2 corresponding tothe alarm.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 299Column NameUser3DurationDescriptionShows the string value of the userdefined string property associatedwith the alarm.Shows the unacknowledgementduration or the alarm duration,depending on what has been selectedby the operator.UTC TimeShows the time of the alarm in UTC.5 Rearrange columns by selecting the column name <strong>and</strong>using the up <strong>and</strong> down arrows. The column nameappearing at the top of the Column Details dialog box isthe left-most column of the alarm control.6 To change the name of a column or its width, select thecolumn <strong>and</strong> click Edit. The Edit dialog box appears.aabIn the New Name box, type the new column name.In the New Width box, type the column width. Thecolumn width can range from 1 to 999 pixels.Click OK.7 Click Reset to Default to return to the default columndetail settings.8 Click OK in the Column Details dialog box.9 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


300 Chapter 10 Viewing Recorded <strong>Alarms</strong>Controlling Which Features You Can Access atRun TimeYou can enable <strong>and</strong> disable the shortcut menu featuresavailable at this control.To configure run-time features1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDbViewCtrl Properties dialog boxappears.2 Click the General tab.3 In the Context-Sensitive Menu Options area, configurewhich menu comm<strong>and</strong>s are available at run time.• Select the Enable Refresh Menu check box to enablethe Refresh menu option in the shortcut menu of thecontrol at run time. The Refresh menu refreshes thecontrol to the database, <strong>and</strong> if the connection issuccessful, it shows the set of records in the range 1 tonumber defined by the MaxRecords property.• Select the Enable Reset Menu check box to enable theReset menu option in the shortcut menu of the controlat run time. The Reset menu arranges all thecolumns to the settings saved at design time.• Select the Enable Sort Menu check box to enable theSort menu option on the shortcut menu of the controlat run time. This menu shows the Secondary Sortmenu used to set the user-defined sorting of columns.• Select the Enable Filter Menu check box to enable theFilter menu option on the shortcut menu of the controlat run time. This menu shows the filter menu used toset the user-defined filtering criteria.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 3014 Click the Resize Column check box to allow resizing thecolumns.5 Select the Row Selection check box to enable selectingalarm records.6 Select the Retrieve buttons check box to show theretrieval buttons at the right side of the control.7 Click Apply.Configuring the Shown Time Format <strong>and</strong> TimeZone for Alarm RecordsYou can configure the time format <strong>and</strong> time zone for alarmrecords shown in the Alarm DB View control.To configure time format1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDBViewCtrl Properties dialog boxappears.2 Click the Time/Sort tab.3 In the Time Format list, click a time format:Stringcharacter Description Exampled Two-digit day 31bThree-letter monthabbreviationAugY Four-digit year 2007m Two-digit month 11/ Date division function 06/2007<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


302 Chapter 10 Viewing Recorded <strong>Alarms</strong>Stringcharacter Description Exampley Two-digit year 07#x Full day <strong>and</strong> date Friday, August09, 2002B Full month name September- Dash date divisionpunctuation. Period date divisionpunctuation, Comma date divisionpunctuation06-0706.07Aug 09, 2007H 24 hour time 22:15: Time divisionpunctuation as in 4:41M Minute 00:41pAM or PM displayS Seconds 16:41:07s Fractions of a second 16:41:07.390I12 hour time withAM/PM designation04:41 PMYou can also manually enter your own format string inthe list box using custom text <strong>and</strong> the formattingcharacters. Some sample time format character stringsare shown below:Time Format StringDisplay%d %b 09 Aug%m/%d/%Y 08/09/2002%#x Friday, August 09, 2002%Y-%m-%d 2002-08-09%m/%d/%Y %H:%M %p%m/%d/%Y %H:%M:%s%p%I:%M %p08/09/2002 16:56 PM08/09/2002 16:56:38.0704:56 PM<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 3034 In the Displayed Time Zone list, click the desired timezone:Time ZoneGMTLocal TimeOrigin TimeDescriptionAlarm time stamps use GreenwichMean Time.Alarm time stamps are shown with thelocal time of the client hosting theAlarm DB View control.Alarm time stamps are shown with thelocal time of the alarm provider.5 Click Apply.Selecting the Time Period of Data from theAlarm DatabaseYou can set query values to select records based on theselected time. You can also configure the maximum numberof records to view, the start <strong>and</strong> end time of the alarm query,<strong>and</strong> the query time zone.To select the time period of data1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDBViewCtrl Properties dialog boxappears.2 Click the Selection tab.3 To use a pre-defined time interval that always queries fordata using the UTC time zone, click an interval from theDuration list.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


304 Chapter 10 Viewing Recorded <strong>Alarms</strong>4 To use a specific start time <strong>and</strong> end time, click UseSpecific Time <strong>and</strong> then configure the details.abcIn the Start Time box, enter the start time to retrievethe alarm records. The string must be inMM/DD/YYYY HH:MM:SS format. Use any date inany time zone from midnight, January 1, 1970, toJanuary 18, 19:14:07, 2038.In the End Time box, enter the end time to stopretrieving alarm records. The string must be inMM/DD/YYYY HH:MM:SS format. Use any date inany time zone from midnight, January 1, 1970, toJanuary 18, 19:14:07, 2038.In the Query Time Zone area, click either UTC or OriginTime. UTC time is Greenwich Mean Time, also knownas Coordinated Universal Time or Zulu. Origin timeis the current time in the operator’s time zone.5 In the Duration Column area, configure which type ofduration is shown. Duration is measured in milliseconds.• Click UnAck Duration to show the time between themost recent alarm transition (alarm or sub-state) <strong>and</strong>the acknowledgement, if any.• Click Alarm Duration to show the amount of timeelapsed between the initial occurrence of an alarm<strong>and</strong> the time at which it returned to a normal state.6 In the Maximum Records box, type the number of recordsto view from the control at one instance. The valid rangeof maximum records is from 1 to 1000.7 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 305About Query Time ZonesThe Query Time Zone options are Origin Time <strong>and</strong> UTC.• Origin time is the local time in the operator’s time zone.• UTC time is Greenwich Mean Time, also known asCoordinated Universal Time or Zulu.If Use Specific Time is selected, you can select between thetwo query time zone options. If Use Specific Time is notselected, the selected Duration predefined time intervalalways queries for data using the UTC time zone.To avoid problems during the Daylight Saving Time switch,we recommend that you always use UTC in Query TimeZone. If you use Local Time instead, it is possible that alarmrecords will be missing for the transition period fromDaylight Saving Time to Normal Time.If you are running several different computers with differenttime zone settings, <strong>and</strong> they are all logging to the samealarm database, each record will get the time stamps in UTC,plus the time zone offset <strong>and</strong> daylight saving adjustmentneeded to convert that time stamp to the correspondingOrigin Time. As a result, every entry in the database has twotime stamps: the UTC time <strong>and</strong> the Origin Time from thecomputer that did the logging. This makes retrievals faster.In the table entries, the UTC time is identified as the"Transition Time" <strong>and</strong> the Origin Time is identified as the"EventStamp."<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


306 Chapter 10 Viewing Recorded <strong>Alarms</strong>Creating Custom Filters <strong>and</strong> Using FilterFavoritesYou can select which records are included in your queryresults. For example, you can select a filter by the date of arecord or the state of the alarm. You can select multiple fieldsto limit or exp<strong>and</strong> your query results.If you do not define a custom filter, all records are returned.If you translated strings for language switching, you cannotuse those strings as filter criteria. Translated strings arestored outside of the alarm database.To create custom filters1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDBViewCtrl Properties dialog boxappears.2 Click the Query Filter tab.3 In the left pane, select filter fields <strong>and</strong> then click Add toinclude them in the filter, which is shown in the rightpane. The filter fields are described in the following table:Field nameStateClassTypePriorityFilters query by:Alarm state. For moreinformation, see Values for theState Column on page 311.Alarm class.Alarm type.Alarm priority.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 307Field nameNameGroupProviderValueLimitOperatorOperatorFullNameOperatorNodeOperatorDomainCommentUser1User2User3Filters query by:Alarm name.Alarm group name.Alarm provider.Alarm value. Values in the Valuecolumn are shown asalphanumeric values. Thecomparisons of these values in theQuery Filter are done as stringcomparisons.Alarm limit. Values arealphanumeric. The comparisons ofthese values in the Query Filterare done as a string comparisons.Operator.Operator’s full name.Operator’s node name associatedwith the alarm.Operator’s domain nameassociated with the alarm.Alarm comment.Alarm user-defined numeric value1.Alarm user-defined numeric value2.Alarm user-defined string value.DurationUnacknowledgement <strong>and</strong> alarmduration. A Duration column setequal to zero does not producerecords with a null value in thequery.4 To remove a field from the filters pane, click the field youwant to delete <strong>and</strong> click Delete. Deleting a filter cannot beundone. When a message appears, click Yes.5 Configure the criteria for each filter field. For moreinformation, see Defining the Column Filter Criteria onpage 308.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


308 Chapter 10 Viewing Recorded <strong>Alarms</strong>6 Configure the operators <strong>and</strong> grouping for the filter. Formore information, see Grouping Alarm Columns onpage 310.7 Configure the query favorites file. Do the following:abIn the Filter Favorites File box, type the network path<strong>and</strong> file name or click the ellipse button to browse forthe file.To edit the Filter Favorites file, click the Edit FavoritesFile button. The Filter Favorites window opens,allowing you to add, modify, or delete filters fromyour favorites file. When you are done, click OK tosave your changes <strong>and</strong> close the window.8 Click Apply.Defining the Column Filter CriteriaFor each column filter you include in the query, you mustconfigure the filter criteria. For example, you might want toonly see alarms for a specific operator.To define a column filter1 Right-click the field <strong>and</strong> then click Edit Filter. The DefineFilter dialog box appears.2 In the Operator list, select the operator you need.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 3093 In the Value box, type the criteria that must be matched.The Value box does not accept values that cannot beprocessed for the selected query. The Value box acceptsthe following wildcard characters when the Like <strong>and</strong> NotLike filter operators are used for alphanumeric columnnames:CharacterDescription% Any string of zero or more characters._Any single character.[ ] Any single character within the specifiedrange, for example [a-f], or within a set,for example [abcdef].[^]Any single character not within thespecified range, for example [^a-f], orset, for example [^abcdef].The following Value box limits apply to different fields:FieldAll fieldsLimitAll alphanumeric characters exceptUser1, User2 <strong>and</strong> Priority.Priority Accepts integer values from 1 to 999.User1,User2Accepts only negative, positive orfractional numbers.4 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


310 Chapter 10 Viewing Recorded <strong>Alarms</strong>Grouping Alarm ColumnsWhen more than one field is defined, the columns arecombined using Boolean operators.• The AND operator returns records that meet all values ofthe selected fields.• The OR operator returns records that meet the values ofany of the selected fields.To use AND/OR operators to set the filter selection criteria,the respective fields must be grouped together. Only a singlefilter expression can be created on an item in the filters pane.If multiple expressions are needed, then the item must beadded to the filters pane again.By default, the grouped fields have the AND operator.The AND <strong>and</strong> OR operators are parent nodes. The fieldsselected under each parent node are child nodes. You cannotdrag fields parent nodes to child nodes.To group alarm columns1 Right-click the field <strong>and</strong> then click Group.2 Drag a field onto another field.Copying or Moving Query FiltersIf you have more than one instance of Alarm DB View control<strong>and</strong> want to use the same filters for multiple instances, youcan copy or cut the defined filters from one instance <strong>and</strong>paste them to another filter.To copy filters1 Define the filters in the first instance of the Alarm DBView control.2 Right-click the filters <strong>and</strong> click Copy. To move the filters,click Cut.3 Close the first instance of the Alarm DB View control.4 Open the next instance of the Alarm DB View control <strong>and</strong>click the Query Filter tab.5 Position the arrow in the right pane. Right-click aselected filter <strong>and</strong> click Paste.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 311Values for the State ColumnWhen you add the State column to your filter query, you mayassign values from the Value menu in the Define Filter dialogbox. The values available are described in the following table:ValueACKACK_ALMUNACK_ALMACK_RTNUNACK_RTNAll UNACK RecordsAll ACK RecordsAll ALM RecordsAll RTN RecordsDescriptionProduces a query of all systemacknowledgements.Produces a query of allacknowledged alarms.Produces a query of allunacknowledged alarms.Produces a query of allacknowledged alarms that havereturned to normal.Produces a query ofunacknowledged alarms that havereturned to normal.Produces a query of allunacknowledged records.Produces a query of allacknowledgement records.Produces a query of all alarmrecords.Produces a query of all alarms thathave returned to normal.Note When a tag in exp<strong>and</strong>ed summary alarm mode is used tocreate an alarm, which returns to normal when the main alarm isacknowledged, two records are created. The first record is the“acknowledged <strong>and</strong> returned to normal” record as the new alarmis already in a returned to normal state. The second record isacknowledged, which corresponds to acknowledging the mainalarm. The previous implementation of ACK_ALM has beenchanged to ACK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


312 Chapter 10 Viewing Recorded <strong>Alarms</strong>Configuring Colors for Various Types of AlarmRecordsYou can set the colors for alarm <strong>and</strong> event records.To configure alarm display colors1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDBViewCtrl Properties dialog boxappears.2 Click the Color tab.3 Configure the color for each of the following by clickingthe color box to open the palette.OptionAlarm ReturnForecolorAlarm ReturnBackcolorEvent ForecolorEvent BackcolorDescriptionSets the foreground color of recordsfor alarms that return to normal.Sets the background color of recordsfor alarms that return to normal.Sets the foreground color of eventsrecordsSets the background color of eventsrecords<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring the Alarm DB View Control 3134 In the Alarm Priority boxes, type the breakpoint values forthe alarm display. You can assign breakpoint values sothat alarms will appear in different colors depending onthe Alarm Priority. The default minimum <strong>and</strong> maximumalarm priority values are 1 <strong>and</strong> 999, respectively.For example, you set the Unack Alm Forecolor to beorange for the priority range of 250 to 499 <strong>and</strong> red for thepriority range of 1 to 249. If an alarm occurs with apriority of 254, it is shown in an orange font. If an alarmoccurs with a priority of 12, it is shown in a red font.5 Configure the color for each of the following by clickingthe color box to open the palette.OptionDescriptionUnack AlmForecolorUnack AlmBackcolorAck AlmForecolorAck AlmBackcolorSets the foreground color for each colorpriority range for unacknowledgedalarms.Sets the background color for each colorpriority range for unacknowledgedalarms.Sets the foreground color for each colorpriority range for acknowledged alarms.Sets the background color for each colorpriority range for acknowledged alarms.6 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


314 Chapter 10 Viewing Recorded <strong>Alarms</strong>Configuring the Sort Order for Alarm RecordsYou can control the way the alarm records are sorted in thecontrol.1 Right-click the Alarm DB View control <strong>and</strong> then clickProperties. The AlmDBViewCtrl Properties dialog boxappears.2 Click the Time/Sort tab.3 In the Primary Sort Column list, click the name of theprimary sort column. Only visible columns appear in theSort Column list. If you do not see the column you want,click the General tab <strong>and</strong> select the column from ColumnDetails.4 In the Secondary Sort Column list, click the name of thesecondary sort column.5 Select Ascending or Descending as the sort direction.6 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using an Alarm DB View Control at Run Time 315Using an Alarm DB View Control at Run TimeDepending on how the control is configured, you can:• Retrieve <strong>and</strong> refresh the data.• Sort the data.• Filter the data.• Select rows.• Change the column order by dragging them.• Reset all the columns to the settings saved at designtime.Sorting RecordsYou can sort records in the display. Click on the heading tosort all the rows.Right-click in the control <strong>and</strong> click Sort to open the SecondarySort dialog box, where you can do single <strong>and</strong> multiple columnsorting, in ascending or descending order.To specify the columns to be sorted, select the check boxbeside the column name. Use the Sort Order arrow keys torearrange the columns.If multiple alarm events have the same time stamp, theymay not appear in the expected order.For example, if the desired sorting is in descending orderbased on the alarm state first, then:1 Select both the Date <strong>and</strong> State check boxes.2 Select the State row.3 Click the up sort order arrow.4 In the Sort Type area, click Descending.5 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


316 Chapter 10 Viewing Recorded <strong>Alarms</strong>Underst<strong>and</strong>ing Status Bar InformationThe status bar shows the current status of the control.• The left frame shows the server name <strong>and</strong> the databaseconnected.• The middle frame shows the number of the records that isshown out of the total number of records that is returnedby the query.• The right side of the frame shows the connection statuswith the server.Using Alarm DB View ActiveX PropertiesYou can set the value an Alarm DB View control propertydirectly using a script or you can assign it to an <strong>InTouch</strong> tagor I/O reference. For more information about settingproperties, see Chapter 8, Scripting ActiveX Controls, in the<strong>InTouch</strong>® <strong>HMI</strong> Scripting <strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.For more information on setting color values, see ConfiguringColors for ActiveX Controls on page 87.AckAlmBackColor PropertyGets or sets the acknowledged alarm background color. Thissetting overrides the individual range color settings foracknowledged alarms (AckAlmBackColorRange1 toAckAlmBackColorRange4).TypeIntegerDefaultWhiteSyntaxObject.AckAlmBackColor [= color]ValuecolorA value or constant that determines the color of thebackground.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 317AckAlmBackColorRange1 PropertyGets or sets the acknowledged alarm background color. Thiscolor applies to the records shown in the control with stateACK_ALM with priorities in the range 1 toColorPriorityRange1.TypeIntegerDefaultWhiteSyntaxObject.AckAlmBackColorRange1 [= color]ValuecolorA value or constant that determines the color of thebackground.AckAlmBackColorRange2 PropertyGets or sets the acknowledged alarm background color. Thiscolor applies to the records shown in the control with stateACK_ALM with priorities in the range ColorPriorityRange1to ColorPriorityRange2.TypeIntegerDefaultWhiteSyntaxObject.AckAlmBackColorRange2 [= color]ValuecolorA value or constant that determines the color of thebackground.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


318 Chapter 10 Viewing Recorded <strong>Alarms</strong>AckAlmBackColorRange3 PropertyGets or sets the acknowledged alarm background color. Thiscolor applies to the records shown in the control with stateACK_ALM with priorities in the range ColorPriorityRange2to ColorPriorityRange3.TypeIntegerDefaultWhiteSyntaxObject.AckAlmBackColorRange3 [= color]ValuecolorA value or constant that determines the color of thebackground.AckAlmBackColorRange4 PropertyGets or sets the acknowledged alarm background color. Thiscolor applies to the records shown in the control with stateACK_ALM with priorities in the range ColorPriorityRange3to 999.TypeIntegerDefaultWhiteSyntaxObject.AckAlmBackColorRange4 [= color]ValuecolorA value or constant that determines the color of thebackground.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 319AckAlmForeColor PropertyGets or sets the acknowledged alarm foreground color. Thissetting overrides the individual range color settings foracknowledged alarms (AckAlmForeColorRange1 toAckAlmForeColorRange4).TypeIntegerDefaultBlackSyntaxObject.AckAlmForeColor [= color]ValuecolorA value or constant that determines the color of the text.AckAlmForeColorRange1 PropertyGets or sets the acknowledged alarm foreground color. Thecolor applies to the records shown in the control with stateACK_ALM with priorities in the range 1 toColorPriorityRange1.TypeIntegerDefaultBlackSyntaxObject.AckAlmForeColorRange1 [= color]ValueColorA value or constant that determines the color of the text.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


320 Chapter 10 Viewing Recorded <strong>Alarms</strong>AckAlmForeColorRange2 PropertyGets or sets the acknowledged alarm foreground color. Thecolor applies to the records shown in the control with stateACK_ALM with priorities in the range ColorPriorityRange1to ColorPriorityRange2.TypeIntegerDefaultBlackSyntaxObject.AckAlmForeColorRange2 [= color]ValueColorA value or constant that determines the color of the text.AckAlmForeColorRange3 PropertyGets or sets the acknowledged alarm foreground color. Thecolor applies to the records shown in the control with stateACK_ALM with priorities in the range ColorPriorityRange2to ColorPriorityRange3.TypeIntegerDefaultBlackSyntaxObject.AckAlmForeColorRange3 [= color]ValueColorA value or constant that determines the color of the text.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 321AckAlmForeColorRange4 PropertyGets or sets the acknowledged alarm foreground color. Thecolor applies to the records shown in the control with stateACK_ALM with priorities in the range ColorPriorityRange3to 999.TypeIntegerDefaultBlackSyntaxObject.AckAlmForeColorRange4 [= color]ValueColorA value or constant that determines the color of the text.AckRtnBackColor PropertyGets or sets the background color of acknowledged alarmsthat return to normal (ACK_RTN).TypeIntegerDefaultWhiteSyntaxObject.AckRtnBackColor [= color]ValuecolorA value or constant that determines the color of thebackground.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


322 Chapter 10 Viewing Recorded <strong>Alarms</strong>AckRtnForeColor PropertyGets or sets the text color of acknowledged alarms thatreturn to normal (ACK_RTN).TypeIntegerDefaultBlueSyntaxObject.AckRtnForeColor [= color]ValuecolorA value or constant that determines the color of the text.AlmRtnBackColor PropertyGets or sets the returned alarm background color. This colorapplies to the records shown with state ALM_RTN.TypeIntegerDefaultWhiteSyntaxObject.AlmRtnBackColor [= color]ValuecolorA value or constant that determines the color of thebackground.AlmRtnForeColor PropertyGets or sets the returned alarm foreground color. This colorapplies to the records shown with state ALM_RTN.TypeIntegerDefaultBlueSyntaxObject.AlmRtnForeColor [= color]ValuecolorA value or constant that determines the color of the text.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 323AutoConnect PropertyGets or sets a value that determines whether the controlautomatically connects to the database at run time.Data TypeIntegerDefaultFalseSyntaxObject.AutoConnect [= Integer]ValueIntegerAn integer expression specifying whether the controlconnects to the database at run time.True = Connects to the database.False = (Default) Does not connect to the database.RemarksYou must explicitly call the Connect() method to connect tothe database.ColorPriorityRange1 PropertySets the boundary of the priority range in which alarms areto be shown. The value of this property must be greater thanone <strong>and</strong> less than the value for ColorPriorityRange2.TypeIntegerDefault250SyntaxObject.ColorPriorityRange1 [= integer or priority]<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


324 Chapter 10 Viewing Recorded <strong>Alarms</strong>ColorPriorityRange2 PropertySets the boundary of the priority range in which alarms areto be shown. The value of this property must be greater thanthe value for ColorPriorityRange1 <strong>and</strong> less than the value forColorPriorityRange3.TypeIntegerDefault500SyntaxObject.ColorPriorityRange2 [= integer or priority]ColorPriorityRange3 PropertySets the boundary of the priority range in which alarms areto be shown. The value of this property must be greater thanthe value of ColorPriorityRange2 <strong>and</strong> less than 999.TypeIntegerDefault750SyntaxObject.ColorPriorityRange3 [= integer or priority]ColumnResize PropertyReturns or sets a value that determines whether the columnscan be resized.TypeDiscreteDefaultTrueSyntaxObject.ColumnResize [= Discrete]ValueDiscreteTrue = (Default) Columns can be resized at runtime.False = Columns cannot be resized.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 325ConnectStatus PropertyReturns the status of the connection. This property isread-only.Data TypeMessageSyntaxObject.ConnectStatusValuesConnected = The control is connected to the database.Not Connected = The control is not connected to thedatabase.In Progress = The control is connecting to the database.ExampleThe name of the control is AlmDbView1 <strong>and</strong> tagname is amessage tag.Tagname = #AlmDbView1.ConnectStatus;CustomMessage PropertyGets or sets the message that the Alarm DB View controlshows when no alarm records can be retrieved from thealarm database.TypeMessageDefaultThere are no items to show in this view.SyntaxObject.CustomMessage [= string]DatabaseName PropertySpecifies the database to connect to.TypeMessageSyntaxObject.DatabaseName [= text]<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


326 Chapter 10 Viewing Recorded <strong>Alarms</strong>DisplayMode PropertyReturns the display mode of the control, which determines ifjust alarms, just events, or both alarms <strong>and</strong> events areshown. This property is read-only.TypeStringDefault<strong>Alarms</strong> & <strong>Events</strong> HistorySyntaxObject.DisplayModeRemarksPossible values are:<strong>Alarms</strong> & <strong>Events</strong> History<strong>Alarms</strong> History<strong>Events</strong> HistoryExampleThe name of the control is AlmDbView1 <strong>and</strong> tag is a messagetag.tag = #AlmDbView1.DisplayMode;DisplayedTimeZone PropertyGets or sets the shown time zone.TypeStringDefaultLocal TimeSyntaxObject.DisplayedTimeZone [= message]RemarksPossible values are:GMT - Alarm time stamps use Greenwich Mean Time.Local Time - Alarm time stamps are shown with the localtime of the client hosting the Alarm DB View control.Origin Time - Alarm time stamps are shown with thelocal time of the alarm provider.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 327Duration PropertyGets or sets the duration used to set the start <strong>and</strong> end time.TypeMessageDefault"Last Hour"SyntaxObject.Duration [= text]ValuetextA string expression that contains the duration. Thisproperty must have one of the following strings:Last MinuteLast 5 MinutesLast 15 MinutesLast Half HourLast HourLast 2 HoursLast 4 HoursLast 8 HoursLast 12 HoursLast DayLast 2 DaysLast 3 DaysLast WeekLast 2 WeeksLast 30 daysLast 90 days<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


328 Chapter 10 Viewing Recorded <strong>Alarms</strong>EndTime PropertyReturns or sets the end time.TypeMessageSyntaxObject.EndTime [= text]ValuetextA string expression that evaluates to the end time. Thestring returned is always in the format (MM/DD/YYYYHH:MM:SS). The same format is also required to set thevalue of the string. This property h<strong>and</strong>les date in any timezone from midnight, January 1, 1970, to January 18,19:14:07, 2038.EventBackColor PropertyGets or sets the event alarm background color. This colorapplies to the records shown in the control with stateEVT_EVT.TypeIntegerDefaultWhiteSyntaxObject.EventBackColor [= color]ValuecolorA value or constant that determines the color of thebackground.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 329EventForeColor PropertyGets or sets the event alarm foreground color. This colorapplies to the records shown in the control with stateEVT_EVT.TypeIntegerDefaultRedSyntaxObject.EventForeColor [= color]ValuecolorA value or constant that determines the color of the text.FilterFavoritesFile PropertyGets or sets the filter favorites file. This file is used by theFilter Favorites dialog box to read or write filter favorites.TypeStringDefaultNullSyntaxObject.FilterFavoritesFile [= String]FilterMenu PropertyGets or sets a value that determines whether the Filter menuitem is shown in the shortcut menu.TypeDiscreteDefaultTrueSyntaxObject.FilterMenu [= Discrete]ValueTrue = Filter menu item is shown (default).False = Filter menu item is not shown.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


330 Chapter 10 Viewing Recorded <strong>Alarms</strong>FilterName PropertyReturns the name of the current filter (if any).TypeString (read-only)DefaultNullSyntaxObject.FilterName [= String]FromPriority PropertyGets or sets the From Priority value of the control.TypeIntegerDefault1SyntaxObject.FromPriority [= integer]RemarksYou can use this property to filter which alarm records areshown. For example, if you set this property to 760, then onlyalarms with priority from 760 to the ToPriority propertyvalue are shown.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 331GroupExactMatch PropertyWhen the GroupExactMatch property is true, only alarmswith alarm group names that exactly match the GroupNameproperty value are shown. When it is false, then the groupname need only specify part of the alarm group names it isfiltering for.TypeDiscreteDefaultFalseSyntaxObject.GroupExactMatch [= discrete]RemarksUse this property together with the GroupName property tofilter the Alarm DB View control.ExampleFor example:#AlarmDBViewCtrl1.GroupName = "Group"#AlarmDBViewCtrl1.GroupExactMatch = 0;#AlarmDBViewCtrl1.Refresh();GroupName PropertyGets or sets a alarm group name filter for the current AlarmDB View control.TypeStringDefault(none)SyntaxObject.GroupName [= GroupName]RemarksSetting this property to "GroupA" <strong>and</strong> re-querying thedisplay shows only tags belonging to the GroupA alarmgroup.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


332 Chapter 10 Viewing Recorded <strong>Alarms</strong>MaxRecords PropertyReturns or sets the maximum records to be retrieved.TypeIntegerDefault100SyntaxObject.MaxRecords [=integer]ValueintegerAn integer expression specifying the number of records tobe retrieved at a given time. The maximum records can bein the range from 1 to 1000. For best performance keep thisvalue as small as needed.Password PropertyReturns or sets the SQL Server password for retrieving data.TypeMessageSyntaxObject.Password [= text]ValuetextA string expression that evaluates to the password.PrimarySort PropertyGets or sets the primary column name used to sort the alarmdisplay.TypeMessageDefault(none)SyntaxObject.PrimarySort [= message]<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 333ProviderExactMatch PropertyWhen the ProviderExactMatch property is true, only alarmswith alarm provider names that exactly match theProviderName property value are shown. When it is false,then the provider name need only specify part of the alarmprovider names it is filtering for.TypeDiscreteDefaultFalseSyntaxObject.ProviderExactMatch [= discrete]RemarksUse this property together with the ProviderName propertyto filter the Alarm DB View control.ExampleFor example:#AlarmDBViewCtrl1.ProviderName = "Provider"#AlarmDBViewCtrl1.ProviderExactMatch = 0;#AlarmDBViewCtrl1.Refresh();ProviderName PropertyGets or sets a alarm provider name filter for the currentAlarm DB View control.TypeStringDefault(none)SyntaxObject.ProviderName [= ProviderName]RemarksIf a tag belongs to the Provider1 alarm provider, then settingthis property to "Provider1" <strong>and</strong> re-querying the displayshows only tags belonging to the Provider1 alarm provider.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


334 Chapter 10 Viewing Recorded <strong>Alarms</strong>QueryTimeZoneName PropertyGets or sets the time zone when a specific time is used for thequery.TypeDiscreteDefaultFalseSyntaxObject.QueryTimeZone [= Discrete]ValueTrue = GMTFalse = Origin time, which is the local time of the alarmprovider.RefreshMenu PropertyGets or sets a value that determines whether the Refreshmenu item is shown in the shortcut menu.TypeDiscreteDefaultTrueSyntaxObject.RefreshMenu [= Discrete]ValueTrue = Refresh menu item is shown (default).False = Refresh menu item is not shown.ResetMenu PropertyGets or sets a value that determines whether the Reset menuitem is shown in the shortcut menu.TypeDiscreteDefaultTrueSyntaxObject.ResetMenu [= Discrete]ValueTrue = Reset menu item is shown (default).False = Reset menu item is not shown.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 335RowCount PropertyReturns the number of records shown in the control. Thisproperty is read-only.TypeIntegerSyntaxObject.RowCountExampleThe name of the control is AlmDbView1 <strong>and</strong> tagname aninteger tag.tagname = #AlmDbView1.RowCount;RowSelection PropertyReturns or sets a value that determines whether the rowselection is allowed at run time.TypeDiscreteDefaultTrueSyntaxObject.RowSelection [= Discrete]ValueDiscreteTrue = (Default) Row selection is allowed.False = Row Selection is not allowed.RemarksIf row selection is not allowed, no Click or DoubleClick eventsare generated.SecondarySort PropertyGets or sets the secondary column name used to sort thealarm display.TypeMessageDefault(none)SyntaxObject.SecondarySort [= text]<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


336 Chapter 10 Viewing Recorded <strong>Alarms</strong>ServerName PropertyReturns or sets the server name to which the controlconnects to retrieve data.TypeMessageSyntaxObject.ServerName [= text]ShowFetch PropertyReturns or sets a value that determines whether theretrieval buttons are shown.TypeDiscreteDefaultTrueSyntaxObject.ShowFetch [= Discrete]ValueDiscreteTrue = (Default) Retrieve buttons are shown.False = Retrieve buttons are not shown.ShowGrid PropertyReturns or sets a value that determines whether the gridlines are shown.TypeDiscreteDefaultFalseSyntaxObject.ShowGrid [= Discrete]ValueDiscreteTrue = Grid lines are shown.False = (Default) Grid lines are not shown.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 337ShowHeading PropertyReturns or sets a value that determines whether the columnheadings are shown.TypeDiscreteDefaultTrueSyntaxObject.ShowHeading [= Discrete]ValueDiscreteTrue = (Default) Column headings are shown.False = Column headings are not shown.ShowMessage PropertyDetermines if the customized message for "There are noitems to show in this view" is shown when there are norecords in the alarm database.TypeDiscreteDefaultFalseSyntaxObject.ShowMessage [= discrete]ShowStatusBar PropertyReturns or sets a value that determines whether the statusbar is shown.TypeDiscreteDefaultTrueSyntaxObject.ShowStatusBar [= Discrete]ValueDiscreteTrue = (Default) Status bar is shown.False = Status bar is not shown.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


338 Chapter 10 Viewing Recorded <strong>Alarms</strong>SilentMode PropertyGets or sets a value that determines whether the control is inSilent mode.TypeDiscreteDefaultFalseSyntaxObject.SilentMode [= Discrete]ValueTrue = Silent mode is on.False = Silent mode is off (default).SortMenu PropertyReturns or sets a value that determines whether the Sortmenu item is shown in the shortcut menu.TypeDiscreteDefaultTrueSyntaxObject.SortMenu [= Discrete]ValueA discrete expression.True = (Default) Sort menu item is shownFalse = Sort menu item is not shown.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 339SortOrder PropertyGets or sets the sort order of the alarms according to thecolumn to be sorted (the primary sort column).TypeDiscreteDefaultTrueSyntaxObject.SortOrder [= discrete]ValueAn discrete expression.True = Ascending order.False = Descending order.SpecificTime PropertyReturns or sets a value that determines whether the controluses the StartTime <strong>and</strong> EndTime properties, or computes thestart time <strong>and</strong> end time based on the value of the Durationproperty.TypeDiscreteDefaultFalseSyntaxObject.SpecificTime [= Discrete]ValueTrue = StartTime <strong>and</strong> EndTime properties are used.False = (Default) StartTime <strong>and</strong> EndTime are computedbased on the "Duration" property.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


340 Chapter 10 Viewing Recorded <strong>Alarms</strong>StartTime PropertyReturns or sets the start time.TypeMessageSyntaxObject.StartTime [= text]ValuetextA string expression that evaluates to the Start Time. Thestring returned is always in the format (MM/DD/YYYYHH:MM:SS). The same format is also required to set thevalue of the string. This property h<strong>and</strong>les date in any timezone from midnight, January 1, 1970, to January 18,19:14:07, 2038Time PropertyGets <strong>and</strong> sets the time format to be used in the display.TypeMessageDefault%m/%d/%Y %I:%M:%S %pSyntaxObject.Time [= message]RemarksFor more information on the time format strings, seeConfiguring the Shown Time Format <strong>and</strong> Time Zone forAlarm Records on page 301.ToPriority PropertyGets or sets the To Priority value of the control.TypeIntegerDefault999SyntaxObject.ToPriority [= integer]RemarksUse this property to filter which alarm records are shown.For example, if you set this property to 900, then only alarmswith priority from the FromPriority property value to 900 areshown.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 341TotalRowCount PropertyReturns the total number of records for the current query.This property is read-only.TypeIntegerSyntaxObject.TotalRowCountRemarksThe row count is the number of rows returned in the currentquery, which usually would be same as MaxRecords propertyexcept for the case when number of records retrieved are lessthan the MaxRecords property. For example, if there are 950records for a specific criterion <strong>and</strong> the MaxRecords propertyis 100, then in the last page there would be 50 records <strong>and</strong>the row count would be 50. In the same example, theTotalRowCount property would always be 950.ExampleThe name of the control is AlmDbView1 <strong>and</strong> tagname is aninteger tag.tagname = #AlmDbView1.TotalRowCount;UnAckAlmBackColor PropertyGets or sets the unacknowledged alarm background color.This color applies to all records shown in the control withstate UNACK_ALM. It overrides any settings made by theUnAckAlmBackColorRange1 to UnAckAlmBackColorRange4property values.TypeIntegerDefaultWhiteSyntaxObject.UnAckAlmBackColor [= color]ValueColorA value or constant that determines the color of thespecified object.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


342 Chapter 10 Viewing Recorded <strong>Alarms</strong>UnAckAlmBackColorRange1 PropertyGets or sets the unacknowledged alarm background color.This color applies to the records shown in the control withstate UNACK_ALM with priorities in the range 1 toColorPriorityRange1.TypeIntegerDefaultWhiteSyntaxObject.UnAckAlmBackColorRange1 [= color]ValueColorA value or constant that determines the color of thespecified object.UnAckAlmBackColorRange2 PropertyGets or sets the unacknowledged alarm background color.This color applies to the records shown in the control withstate UNACK_ALM with priorities in the rangeColorPriorityRange1 to ColorPriorityRange2.TypeIntegerDefaultWhiteSyntaxObject.UnAckAlmBackColorRange2 [= color]ValueColorA value or constant that determines the color of thespecified object.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 343UnAckAlmBackColorRange3 PropertyGets or sets the unacknowledged alarm background color.This color applies to the records shown in the control withstate UNACK_ALM with priorities in the rangeColorPriorityRange2 to ColorPriorityRange3.TypeIntegerDefaultWhiteSyntaxObject.UnAckAlmBackColorRange3 [= color]ValueColorA value or constant that determines the color of thespecified object.UnAckAlmBackColorRange4 PropertyGets or sets the unacknowledged alarm background color.This color applies to the records shown in the control withstate UNACK_ALM with priorities in the rangeColorPriorityRange3 to 999.TypeIntegerDefaultWhiteSyntaxObject.UnAckAlmBackColorRange4 [= color]ValueColorA value or constant that determines the color of thespecified object.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


344 Chapter 10 Viewing Recorded <strong>Alarms</strong>UnAckAlmForeColor PropertyGets or sets the unacknowledged alarm text color. This colorapplies to all records shown in the control with stateUNACK_ALM. It overrides any settings made by theUnAckAlmForeColorRange1 to UnAckAlmForeColorRange4property values.TypeIntegerDefaultRedSyntaxObject.UnAckAlmBackColor [= color]ValueColorA value or constant that determines the color of the text.UnAckAlmForeColorRange1 PropertyGets or sets the unacknowledged alarm foreground color.This color applies to the records shown in the control withstate UNACK_ALM with priorities in the range 1 toColorPriorityRange1.TypeIntegerDefaultRedSyntaxObject.UnAckAlmForeColorRange1 [= color]ValuecolorA value or constant that determines the color of thespecified object.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Properties 345UnAckAlmForeColorRange2 PropertyGets or sets the unacknowledged alarm foreground color.This color applies to the records shown in the control withstate UNACK_ALM with priorities in the rangeColorPriorityRange1 to ColorPriorityRange2.TypeIntegerDefaultRedSyntaxObject.UnAckAlmForeColorRange2 [= color]ValuecolorA value or constant that determines the color of thespecified object.UnAckAlmForeColorRange3 PropertyGets or sets the unacknowledged alarm foreground color.This color applies to the records shown in the control withstate UNACK_ALM with priorities in the rangeColorPriorityRange2 to ColorPriorityRange3.TypeIntegerDefaultRedSyntaxObject.UnAckAlmForeColorRange3 [= color]ValuecolorA value or constant that determines the color of thespecified object.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


346 Chapter 10 Viewing Recorded <strong>Alarms</strong>UnAckAlmForeColorRange4 PropertyGets or sets the unacknowledged alarm foreground color.This color applies to the records shown in the control withstate UNACK_ALM with priorities in the rangeColorPriorityRange3 to 999.TypeIntegerDefaultRedSyntaxObject.UnAckAlmForeColorRange4 [= color]ValuecolorA value or constant that determines the color of thespecified object.UnAckOrAlarmDuration PropertyThe duration column shows either UNACK Duration orAlarm Duration. FALSE (0) is UNACK Duration <strong>and</strong> TRUE(1) is Alarm Duration.TypeIntegerDefaultFalseSyntaxObject.UnAckOrAlarmDuration [= integer]UserID PropertyReturns or sets the user ID used as the control to connect tothe SQL Server to retrieve the data.TypeMessageSyntaxObject.UserID [= text]ValuetextA string expression that evaluates the user ID.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Methods 347Using Alarm DB View ActiveX MethodsUse the Alarm DB View ActiveX methods to:• Control the database connection.• Retrieve records from the alarm database.• Retrieve information about an alarm.• Reset the display appearance.• Sort alarm records.• Show the Context menu.• Access filter favorites.For more information about calling methods, see Chapter 8,Scripting ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong> Scripting<strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.Controlling Database ConnectionsUse the Connect() method to connect to the alarm database<strong>and</strong> the Disconnect() method to disconnect.Connect() MethodConnects the control to the database <strong>and</strong> if the connection issuccessful, shows the set of records in the range 1 toMaxRecords.SyntaxObject.ConnectExampleThe name of the control is AlmDbView1.#AlmDbView1.Connect();Disconnect() MethodDisconnects the control from the database.SyntaxObject.DisconnectExampleThe name of the control is AlmDbView1.#AlmDbView1.Disconnect();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


348 Chapter 10 Viewing Recorded <strong>Alarms</strong>Retrieving Records from the DatabaseUse the following methods to select a query, retrieve recordsfrom the database, <strong>and</strong> refresh the display:• SelectQuery() Method• GetPrevious() Method• GetNext() Method• Refresh() MethodSelectQuery() MethodSets the current display to the query name specified in the.xml file.SyntaxObject.SelectQuery(“QueryName”);ParametersQueryNameName of a query defined in the filter favorites file.ExampleThis example applies the filter criteria defined by the querycalled "HighPriority" in the filter favorites file that iscurrently associated with the AlmDbView1 control.#AlmDbView1.SelectQuery("HighPriority");GetPrevious() MethodRetrieves the previous set of records from the database (ifany).SyntaxObject.GetPrevious();ExampleThe name of the control is AlmDbView1.#AlmDbView1.GetPrevious();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Methods 349GetNext() MethodRetrieves the next set of records from the database (if any).SyntaxObject.GetNextExampleThe name of the control is AlmDbView1.#AlmDbView1.GetNext();Refresh() MethodRefreshes the control from the database, <strong>and</strong> if theconnection is successful, displays the set of records in therange 1 to MaxRecords.SyntaxObject.RefreshRemarksAfter initiating a refresh of the Alarm DB View control'sdisplay by calling its Refresh() method, the value of theRowCount <strong>and</strong> TotalRowCount properties change to -1 untilthe refresh is complete (that is, all relevant records areretrieved from the database). When the refresh is complete,both properties are updated with the correct, current rowcount.The Refresh() method works asynchronously - it returnscontrol to the calling script immediately <strong>and</strong> continuesworking in the background. This means that querying thevalue of RowCount <strong>and</strong> TotalRowCount immediately aftercalling Refresh() most likely returns -1, as their value isqueried at a time when the refresh still hasn't completed.One way to get the correct values would be to use scripting todetermine when the value of either property changes from -1to a different value; this tells you that the correct values arenow available.ExampleThe name of the control is AlmDbView1.#AlmDbView1.Refresh();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


350 Chapter 10 Viewing Recorded <strong>Alarms</strong>Retrieving Information About an AlarmUse the following methods to retrieve records from thedatabase about a particular alarm:• GetItem() Method• GetSelectedItem() MethodGetItem() MethodReturns the data at a specified row & column as string.SyntaxObject.GetItem(Integer, message)ParametersIntegerAn integer expression that evaluates to a specific row in thecontrol.MessageA string expression that evaluates to the column name inthe control.ExampleThe name of the control is AlmDbView1 <strong>and</strong> tag is defined asa Message tag.tag = #AlmDbView1.GetItem(1, "Group");GetSelectedItem() MethodReturns the data for the selected row, given column as stringSyntaxObject.GetSelectedItem(message)ParametersMessageAn string expression that evaluates to the column name inthe controlExampleThe name of the control is AlmDbView1 <strong>and</strong> tag is defined asMessage tag.tag = #AlmDbView1.GetSelectedItem("State");<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm DB View ActiveX Methods 351Sorting the Alarm RecordsUse the following methods to sort alarm records <strong>and</strong> resetcolumn resizing:• SortOnCol() Method• ShowSort() Method• Reset() MethodSortOnCol() MethodPerforms primary sorting on alarm records that are shown.SyntaxObject.SortOnCol(message, Integer)ParametersMessageA string expression that evaluates to the column name inthe controlIntegerSort direction to be used. 0 = ascending, 1 = descending.ExampleThe name of the control is AlmDbView1.tag = #AlmDbView1.SortOnCol("Name",1);ShowSort() MethodShows the Secondary Sort dialog box if the SortMenuproperty is enabled.SyntaxObject.ShowSortExampleThe name of the control is AlmDbView1.#AlmDbView1.ShowSort();Reset() MethodResets all the columns to the settings saved at design time.SyntaxObject.ResetExampleThe name of the control is AlmDbView1.#AlmDbView1.Reset();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


352 Chapter 10 Viewing Recorded <strong>Alarms</strong>Showing the Context MenuUse the ShowContext() method to show the shortcut menu.ShowContext() MethodShows the shortcut menu if any one of RefreshMenu orResetMenu or SortMenu property is enabled.SyntaxObject.ShowContextExampleThe name of the control is AlmDbView1.#AlmDbView1.ShowContext();Accessing Filter FavoritesUse the ShowFilter() method to show the Filter Favoritesdialog box.ShowFilter() MethodShows the Filter Favorites dialog box.SyntaxObject.ShowFilterExampleThe name of the control is AlmDbView1.#AlmDbView1.ShowFilter();Showing Other InformationUse the AboutBox() method to show the About dialog box.AboutBox() MethodShows the About dialog box.SyntaxObject.AboutBoxExampleThe name of the control is AlmDbView1.#AlmDbView1.AboutBox();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Error H<strong>and</strong>ling When Using Methods <strong>and</strong> Properties 353Error H<strong>and</strong>ling When Using Methods <strong>and</strong>PropertiesUse the SilentMode property to determine whether thecontrol is in silent mode or not. When the control is in silentmode, no error messages are shown. To see the error, call theGetLastError() method to return the error message.GetLastError() MethodReturns the last error message if the Alarm DB View controlis in silent mode.SyntaxObject.GetLastError()ExampleThe name of the control is AlmDbView1 <strong>and</strong> tagname isdefined as variant or string.Tagname = #AlmDbView1.GetLastError();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


354 Chapter 10 Viewing Recorded <strong>Alarms</strong>Using Alarm DB View ActiveX <strong>Events</strong> toTrigger ScriptsYou can assign QuickScripts to Alarm DB View controlevents, such as a mouse click or double-click. When the eventoccurs, the QuickScript runs.The Alarm DB View control supports the following events:• Click• DoubleClick• ShutDown• StartUpThe Click event has one parameter called ClicknRow, whichidentifies the row that is clicked at run time.The DoubleClick event has one parameter calledDoubleClicknRow, which identifies the row that isdouble-clicked at run time.Click <strong>and</strong> DoubleClick events are zero-based. When Click<strong>and</strong>/or DoubleClick events are published, the bar count in thedisplay starts with 0.Note The Alarm DB View control ignores the user interfacemethods when they are called from StartUp event, because thecontrol is not visible yet. These methods include: ShowSort(),ShowContext(), GetSelectedItem(), GetNext(), GetPrevious(), <strong>and</strong>AboutBox().For more information about scripting ActiveX events, seeChapter 8, Scripting ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong>Scripting <strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


355Chapter 11Analyzing Alarm DistributionAcross TagsUsing the Alarm Pareto ActiveX control, you can analyzewhich alarms <strong>and</strong> events occur most frequently in a givenproduction system. You can also analyze alarm frequency bythe time periods during which they occur.The analysis capabilities of the Alarm Pareto control identifythe largest issues of your production systems. The AlarmPareto control helps you recognize where you should focusyour efforts to achieve the most significant improvements.The Alarm Pareto control shows a bar chart representingalarm activity.For more information about ActiveX controls, see Chapter 6,ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong> Visualization <strong>Guide</strong>.Configuring an Alarm Pareto ActiveX ControlWhen you configure an Alarm Pareto control, you specify:• The connection to the alarm database.• The appearance of the pareto control, including colors<strong>and</strong> fonts.• Which features users can access at run time.• Which alarms are shown in the chart <strong>and</strong> how they arepresented.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


356 Chapter 11 Analyzing Alarm Distribution Across TagsConfiguring the Connection to the AlarmDatabaseYou must configure the connection between the Alarm Paretocontrol <strong>and</strong> the alarm database.It is good practice to use an account with appropriateread-only access to the alarm database <strong>and</strong> not a systemadministrator account.To configure the connection to the alarm database1 Right-click the Alarm Pareto control <strong>and</strong> then clickProperties. The AlarmPareto Properties dialog boxappears.2 Click the Database tab.3 Configure the connection. Do the following:abcdIn the Server Name box, enter the node name of thecomputer where the alarm database is installed.In the Database Name box, type the name of the alarmdatabase.In the User box, type the name of a valid user accountfor the alarm database.In the Password box, type the password associatedwith the alarm database user account.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Pareto ActiveX Control 3574 Select the Auto Connect check box if you want the AlarmPareto control to automatically connect to the alarmdatabase as soon as WindowViewer starts up.If you don’t select the Auto Connect check box, you mustconfigure the Alarm Pareto control to connect to thealarm database by explicitly calling the Connect()method. For more information about the Connect method,see Connect() Method on page 373.5 Click Test Connection to verify connectivity to the alarmdatabase. A message indicates a successful connection.6 Click Apply.Configuring the Appearance <strong>and</strong> Colors of theAlarm Pareto ControlYou can configure the visual appearance of the Alarm Paretocontrol. You can:• <strong>Inc</strong>lude a status bar.• Set the orientation of the Pareto chart bars.• <strong>Inc</strong>lude descriptions of chart bars.• Select the colors of the Alarm Pareto chart.To set the appearance of the Alarm Pareto control1 Right-click the Alarm Pareto control <strong>and</strong> then clickProperties. The AlarmPareto Properties dialog boxappears.2 Click the General tab.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


358 Chapter 11 Analyzing Alarm Distribution Across Tags3 Configure the general options. Do the following:PropertyBar CountDisplay ModeNo-Match MessageVerticalHorizontalShow Status BarSilent ModeAuto FontShow Node NameShow Selected inStatus BarConsolidated <strong>Alarms</strong>Show Count inPercentagesDescriptionSets the number of bars to viewin the Alarm Pareto control.This list shows the availableview options. The options areAlarm & Event History, AlarmHistory, <strong>and</strong> Event History.Sets the message to show whenno data is processed from theAlarm Pareto control.Shows the bars on a verticalscale.Shows the bars on a horizontalscale.Enables the status bar.The Alarm Pareto control doesnot show run-time errormessages. If it is not selected,the alarm display shows errormessages. Error messages arealways sent to the Logger.When the space available is notenough to show the text on theselected bar correctly, AutoFont hides the text <strong>and</strong> onlyshows the text when the bar isselected.Shows the node name on thebar graph.Shows the description of aselected bar on the status bar.Consolidate the alarm statesinto two states. For example, ifan analog tag has a three- statealarm: Hi, HiHi <strong>and</strong> Normal,the Hi <strong>and</strong> HiHi alarm statesare classified as one state.Shows the bars based on thepercentage of count to the totalcount.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Pareto ActiveX Control 359PropertyShow Time in State4 Click Apply.5 Click the Colors tab.DescriptionShows the Alarm Pareto controlbased on the time each tag is inan alarm state. This option isonly enabled when the displaymode is set to Alarm History.6 Click each color box to open a color palette.7 Click the color that you want to assign for each of thefollowing chart properties:PropertyBackground ColorBar ColorFont ColorSelect ColorDescriptionSets the background color of theAlarm Pareto chartSets the bar color of the chartSets the color of text thatappears in the chartSets the color of a selected bar8 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


360 Chapter 11 Analyzing Alarm Distribution Across TagsConfiguring the Display FontYou can assign font properties to text that appears in yourAlarm Pareto chart.To configure the font properties1 Right-click the Alarm Pareto control <strong>and</strong> then clickProperties. The AlarmPareto Properties dialog boxappears.2 Click the General tab.3 Click Font. The st<strong>and</strong>ard Windows Font dialog boxappears. Configure the font <strong>and</strong> then click OK.4 Click OK.Configuring Which Features Users can Access atRun TimeAn Alarm Pareto chart includes a shortcut menu. When anoperator right-clicks on the trend during run time, a menuappears with options to dynamically update the data shownin the trend.To configure run time features1 Right-click the Alarm Pareto control <strong>and</strong> then clickProperties. The AlarmPareto Properties dialog boxappears.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Pareto ActiveX Control 3612 Click the General tab.3 In the Context Sensitive Menu Options area, configure themenu comm<strong>and</strong>s:abcSelect the Enable Refresh Menu check box to allow therun time user to refresh the data shown in the AlarmPareto trend <strong>and</strong> show the records in the range from1 to the number defined by the MaxRecords property.Select the Enable Filter Menu check box to allow theuser to show the Filter Favorites dialog box to select afile containing database query values for the AlarmPareto trend.Select the Enable Reset Menu check box to allow theuser to restore the run-time Alarm Pareto chart to theoriginal values specified from WindowMaker. Allrun-time changes made by an operator revert to theoriginal design-time values.4 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


362 Chapter 11 Analyzing Alarm Distribution Across TagsConfiguring Which <strong>Alarms</strong> to AnalyzeYou configure which alarms to analyze using the AlarmPareto chart. You specify:• The type of database data (alarm or event data)• A time period to select records from• Criteria for filtering the dataSelecting Alarm or Event DataYou can configure if alarm records, event records, or bothappear in an Alarm Pareto chart.To select the type of data1 Right-click the Alarm Pareto control <strong>and</strong> then clickProperties. The AlarmPareto Properties dialog boxappears.2 Click the General tab.3 In the Display Mode list, configure the type of records. Doany of the following.• Click Alarm & Event History to show both alarm <strong>and</strong>event historical database records.• Click Alarm History to show only historical alarmrecords.• Click Event History to show only historical eventrecords.4 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Pareto ActiveX Control 363Selecting the Time PeriodYou can set query values to select records based on theselected time. You can also configure the maximum numberof records to view, the start <strong>and</strong> end time of the alarm query,<strong>and</strong> the query time zone.To select the time period of data1 Right-click the Alarm Pareto control <strong>and</strong> then clickProperties. The AlarmPareto Properties dialog boxappears.2 Click the Selection tab.3 To use a pre-defined time interval that always queries fordata using UTC, click an interval from the Duration list.4 To use a specific start time <strong>and</strong> end time, click UseSpecific Time <strong>and</strong> then configure the details.abcIn the Start Time box, enter the start time to retrievethe alarm records. The string must be inMM/DD/YYYY HH:MM:SS format. Use any date inany time zone from midnight, January 1, 1970, toJanuary 18, 19:14:07, 2038.In the End Time box, enter the end time to stopretrieving alarm records. The string must be inMM/DD/YYYY HH:MM:SS format. Use any date inany time zone from midnight, January 1, 1970, toJanuary 18, 19:14:07, 2038.In the Query Time Zone area, click either UTC or OriginTime. UTC time is Greenwich Mean Time, also knownas Coordinated Universal Time or Zulu. Origin timeis the current time in the operator’s time zone.5 In the Maximum Records box, type the number of recordsto view from the control at one instance. The valid rangeof maximum records is from 0 to 1000000.6 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


364 Chapter 11 Analyzing Alarm Distribution Across TagsCreating Custom Filters Using Filter FavoritesYou can select which records are included in your queryresults. For example, you can select a filter by the date of arecord or the state of the alarm. You can select multiple fieldsto limit or exp<strong>and</strong> your query results.If you do not define a custom filter, then a default filter thatqueries all records is used.To create custom filters1 Right-click the Alarm Pareto control <strong>and</strong> then clickProperties. The AlarmPareto Properties dialog boxappears.2 Click the Query Filter tab.3 In the left pane, select filter fields <strong>and</strong> then click Add toinclude them in the filter, which is shown in the rightpane. The filter fields are described in the following table:Field nameClassTypePriorityNameGroupNameProviderLimitOperatorFilters query by:Alarm class.Alarm type.Alarm priority.Alarm name.Alarm group name.Alarm provider.Alarm limit. Values arealphanumeric. The comparisons ofthese values in the Query Filterare done as a string comparisons.Operator.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Pareto ActiveX Control 365Field nameOperatorFullNameOperatorNodeOperatorDomainCommentUser1User2User3Filters query by:Operator’s full name.Operator’s node name associatedwith the alarm.Operator’s domain nameassociated with the alarm.Alarm comment.Alarm user-defined numeric value1.Alarm user-defined numeric value2.Alarm user-defined string value.4 To remove a field from the filters pane, click the field youwant to delete <strong>and</strong> click Delete. Deleting a filter cannot beundone. When a message appears, click Yes.5 Configure the criteria for each filter field. For moreinformation, see Defining the Column Filter Criteria onpage 366.6 Configure the operators <strong>and</strong> grouping for the filter. Formore information, see Grouping Alarm Columns onpage 367.7 Configure the filter favorites file.abDurationIn the Filter Favorites File box, type the network path<strong>and</strong> file name or click the ellipse button to browse forthe file.To edit the Filter Favorites file, click the Edit FavoritesFile button. The Filter Favorites window opens,allowing you to add, modify, or delete filters fromyour favorites file. When you are done, click OK tosave your changes <strong>and</strong> close the window.8 Click Apply.Unacknowledgement <strong>and</strong> alarmduration. A Duration column setequal to zero does not producerecords with a null value in thequery.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


366 Chapter 11 Analyzing Alarm Distribution Across TagsDefining the Column Filter CriteriaFor each column filter you include in the query, you mustconfigure the filter criteria. For example, you might want toonly see alarms for a specific operator.To define a column filter1 Right-click the field <strong>and</strong> then click Edit Filter. The Dialogdialog box appears.2 In the Operator list, select the operator you need.3 In the Value box, type the criteria that must be matched.The Value box does not accept values that cannot beprocessed for the selected query. The Value box acceptsthe following wildcard characters when the Like <strong>and</strong> NotLike filter operators are used for alphanumeric columnnames:CharacterFinds% Any string of zero or more characters_Any single character[ ] Any single character within the specifiedrange, for example [a-f], or within a set,for example [abcdef].[^]Any single character not within thespecified range, for example [^a-f], or set,for example [^abcdef].The following Value box limits apply to different fields:FieldAllfieldsLimitAll alphanumeric characters except User1,User2 <strong>and</strong> Priority.Priority Accepts integer values from 1 to 999.User1,User2Accepts only negative, positive or fractionalnumbers.4 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring an Alarm Pareto ActiveX Control 367Grouping Alarm ColumnsWhen more than one field is defined, the columns arecombined using Boolean operators.• The AND operator returns records that meet all values ofthe selected fields.• The OR operator returns records that meet the values ofany of the selected fields.To use AND/OR operators to set the filter selection criteria,the respective fields must be grouped together. Only a singlefilter expression can be created on an item in the filters pane.If multiple expressions are needed, then the item must beadded to the filters pane again.By default, the grouped fields have the AND operator.The AND <strong>and</strong> OR operators are parent nodes. The fieldsselected under each parent node are child nodes. You cannotdrag fields parent nodes to child nodes.To group alarm columns1 Right-click the field <strong>and</strong> then click Group.2 Drag a field onto another field.Copying or Moving Query FiltersIf you have more than one instance of Alarm Pareto control<strong>and</strong> want to use the same filters for multiple instances, youcan copy or cut the defined filters from one instance <strong>and</strong>paste them to another filter.To copy filters1 Define the filters in the first instance of the Alarm Paretocontrol.2 Right-click the filters <strong>and</strong> click Copy. To move the filters,click Cut.3 Close the first instance of the Alarm Pareto control.4 Open the next instance of the Alarm Pareto control <strong>and</strong>click the Query Filter tab.5 Position the arrow in the right pane. Right-click on aselected filter <strong>and</strong> click Paste.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


368 Chapter 11 Analyzing Alarm Distribution Across TagsConfiguring the Presentation of the AnalysisResultsYou can configure the presentation of the alarms in the queryresults.To configure the presentation1 Right-click the Alarm Pareto control <strong>and</strong> then clickProperties. The AlarmPareto Properties dialog boxappears.2 Click the General tab.3 Select the Consolidated <strong>Alarms</strong> check box to combinealarms from a multi-state alarm into a single timestamped record.4 Select the Show Count in Percentages check box to add apercentage of the total for each bar shown in the graph.5 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using an Alarm Pareto Control at Run Time 369Using an Alarm Pareto Control at Run TimeRight-click on the Alarm Pareto control during run time toopen a shortcut menu. The following table lists all possibleoptions that appear in the shortcut menu.Menu OptionRefreshFilterResetDescriptionRefreshes the display.Allows you to edit the filter to changethe data received by the Pareto control.This menu item is only available if afilter favorites file is set up.Resets the graph to the default query.Underst<strong>and</strong>ing Information Shown on the StatusBarThe status bar for the Alarm Pareto control shows:• The status of the database connection between thecontrol <strong>and</strong> the alarm database.• The update status of the graph to refresh the data shownin the graph.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


370 Chapter 11 Analyzing Alarm Distribution Across TagsUsing Alarm Pareto ActiveX PropertiesYou can set the value an Alarm Pareto control propertydirectly using a script or you can assign it to an <strong>InTouch</strong> tagor I/O reference. For more information about settingproperties, see Chapter 8, Scripting ActiveX Controls, in the<strong>InTouch</strong>® <strong>HMI</strong> Scripting <strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.The following table list the Alarm Pareto properties. Forinformation on setting color values, see Configuring Colorsfor ActiveX Controls on page 87.Property NameAutoConnectAutoFontBackGndColorBarColorBarCountBarSelectColorConnectedConsolidated<strong>Alarms</strong>PurposeReturns or sets a value thatdetermines whether the controlconnects to the database as soonas the control is in run-timemode.When the space available is notenough to show the text on theselected bar correctly, AutoFont hides the text <strong>and</strong> onlyshows the text on the selectedbar when the bar is selected.Sets the background color of theAlarm Pareto chartSets the bar color of the AlarmPareto control.Sets the number of bars thatappear on the Alarm Paretocontrol.Sets the color of the selected barin the Alarm Pareto Control.Determines if the Alarm Paretocontrol is connected to adatabase.Consolidates the alarm statesinto two states. For example, ifan analog tag has a three statealarm: Hi, HiHi <strong>and</strong> Normal,the Hi <strong>and</strong> HiHI alarm statesare classified as one state.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Pareto ActiveX Properties 371Property NameDatabaseNameDisplayModeDurationEnableRefreshEnableResetEnableSilentModeEndTimeFilterMenuFilterFavoritesFileFontFontColorPurposeSets the database name towhich the Alarm Pareto controlhas to connect.Sets the display mode. Thedisplay mode options are Alarm& Event History, Alarm Historyor Event History.Returns or sets the durationused by the control to set the"Start Time" <strong>and</strong> "End Time".Enables or disables the contextmenu to refresh the AlarmPareto control.Enables or disables the contextmenu used to reset the AlarmPareto control.Enables or disables the SilentMode. If Silent Mode isdisabled, the Alarm Paretocontrol shows error messageboxes. If Silent Mode is enabled,the error message boxes do notappear. Error information iswritten to the logger.Returns or sets the end date<strong>and</strong> time.Enables or disables the contextmenu where you can edit thefilter to change the datareceived by the Pareto control.This property is only enabled ifFilter Menu Files is set.Specifies the filter favorites file,as a string.Sets the font for the records <strong>and</strong>the heading in the control.Sets the font color for the viewof records in the Alarm Paretocontrol.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


372 Chapter 11 Analyzing Alarm Distribution Across TagsProperty NameHorizontalChartMaxRecordsNoMatchMessageQueryTimeZoneServerNameShowCountPercentageShowNodeNameShowSelectedInStatusBarShowStatusBarShowTimeinStatePurposeShows the chart as horizontalbars. If HorizontalChart isdisabled, the chart showsvertical bars.Returns or sets a value thatspecifies the maximum recordsto be retrieved at a given time.Sets the message that appearswhen there is no data to beprocessed for the Alarm Paretocontrol.Sets the time zone to eitherUTC Time or Origin Time.Returns the current servername.If selected, shows the count foreach bar as a percentage of thetotal count. If not selected,shows the actual count for eachbar.Sets the Alarm Pareto control toshow the node name in additionto the other information on thebar.Enables or disables to show theinformation from the selectedbar on the status bar.Returns or sets a value thatdetermines whether the statusbar is shown.Returns or sets a value thatdetermines whether the AlarmPareto control shows the barsbased on the time in which thetag has remained in alarmstate. If disabled, the controlshows the bars based on thenumber of times an alarm hasoccurred.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Pareto ActiveX Methods 373Property NameSpecificTimeStartTimeUserPurposeReturns or sets a value thatdetermines whether the controluses the "start time" <strong>and</strong> "endtime" properties, or computesthe start time <strong>and</strong> end timebased on the value of theDuration property.Returns or sets the start date<strong>and</strong> time.Returns or sets the User usedas the control to connect to theSQL Server.Using Alarm Pareto ActiveX MethodsUse the Alarm Pareto ActiveX methods to:• Control the database connection.• Retrieve records from the database.• Retrieving information about specific pareto bars.For more information about calling methods, see Chapter 8,Scripting ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong> Scripting<strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.Controlling Database ConnectionsUse the Connect() method to connect to the alarm database.Connect() MethodConnects to the database configured from the Database tab ofthe Alarm Pareto control properties.SyntaxObject.Connect()ExampleThe name of the control is AlarmPareto1.#AlarmPareto1.Connect();<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


374 Chapter 11 Analyzing Alarm Distribution Across TagsRetrieving Records from the DatabaseUse the following functions to retrieve records from thedatabase:• Refresh() Method• SelectQuery() MethodRefresh() MethodRefreshes the control from the database, <strong>and</strong> if theconnection is successful, shows the set of records in the rangefrom 1 to the number defined by the MaxRecords property.SyntaxObject.Refresh()Example#AlarmPareto1.Refresh();SelectQuery() MethodSelects a filter that is configured as a query favorite file.SyntaxObject.SelectQuery(Filter)ParameterFilterThe name of the query filter.ExampleThe name of the control is AlarmPareto1.#AlarmPareto1.SelectQuery("MyFilter");Retrieving Information About Specific ParetoBarsUse the following functions to retrieve information aboutspecific pareto bars:• GetItemAlarmName() Method• GetItemAlarmType() Method• GetItemCount() Method• GetItemTotalTime() Method• GetItemEventType() Method• GetItemProviderName() Method<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using Alarm Pareto ActiveX Methods 375GetItemAlarmName() MethodGets the name of the alarm for a specific bar.SyntaxObject.GetItemAlarmName(BarIndex)ParameterBarIndexThe index of the bar.ExampleThe name of the control is AlarmPareto1.#AlarmPareto1.GetItemAlarmName(1);GetItemAlarmType() MethodGets the type of alarm for a specific bar.SyntaxObject.GetItemAlarmType(BarIndex)ParameterBarIndexThe index of the bar.ExampleThe name of the control is AlarmPareto1.#AlarmPareto1.GetItemAlarmType(1);GetItemCount() MethodGets the number of alarms in a bar.SyntaxObject.GetItemCount(BarIndex)ParameterBarIndexThe index of the bar.ExampleThe name of the control is AlarmPareto1.#AlarmPareto1.GetItemCount(1);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


376 Chapter 11 Analyzing Alarm Distribution Across TagsGetItemTotalTime() MethodGets the total time, in seconds, of a tag in an alarm state.SyntaxObject.GetItemTotalTime(BarIndex)ParameterBarIndexThe index of the bar.ExampleThe name of the control is AlarmPareto1.#AlarmPareto1.GetItemTotalTime(1);GetItemEventType() MethodGets the type of event for a specific bar.SyntaxObject.GetItemEventType(BarIndex)ParameterBarIndexThe index of the bar.ExampleThe name of the control is AlarmPareto1.#AlarmPareto1.GetItemEventType(1);GetItemProviderName() MethodGets the name of the provider from the generated alarms fora specific bar.SyntaxObject.GetItemProviderName(BarIndex)ParameterBarIndexThe index of the bar.ExampleThe name of the control is AlarmPareto1.#AlarmPareto1.GetItemProviderName(1);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Error H<strong>and</strong>ling When Using Methods <strong>and</strong> Properties 377Showing Miscellaneous InformationUse the AboutBox() method to show the About dialog box.AboutBox() MethodShows the About dialog box.SyntaxObject.AboutBox()ExampleThe name of the control is AlarmPareto1.#AlarmPareto1.AboutBox();Error H<strong>and</strong>ling When Using Methods <strong>and</strong>PropertiesThe Alarm Pareto control h<strong>and</strong>les run-time error messagesbased upon the Silent Mode option. For more information, seeConfiguring the Appearance <strong>and</strong> Colors of the Alarm ParetoControl on page 357.If Silent Mode is selected, the Alarm Pareto control does notshow run-time error messages. If it is not selected, the alarmdisplay shows error messages. All Alarm Pareto errormessages are sent to the Logger.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


378 Chapter 11 Analyzing Alarm Distribution Across TagsUsing Alarm Pareto ActiveX <strong>Events</strong> to TriggerScriptsYou can assign QuickScripts to Alarm Pareto control events,such as a mouse click or double-click. When the event occurs,the QuickScript runs.The Alarm Pareto control supports the following events:• Click• DoubleClick• ShutDown• StartUpThe Click event has one parameter called ClicknBarIndex,which identifies the index of the bar that is clicked at runtime.The DoubleClick event has one parameter calledDoubleClicknBarIndex, which identifies the index of the barthat is double-clicked at run time.Click <strong>and</strong> DoubleClick events are zero-based. When Click<strong>and</strong>/or DoubleClick events are published, the bar count in thedisplay starts with 0.Note The Alarm Pareto control ignores the user interfacemethods when they are called from the StartUp event, becausethe control is not visible yet. These methods include: AboutBox()<strong>and</strong> Refresh().For more information about scripting ActiveX events, seeChapter 8, Scripting ActiveX Controls, in the <strong>InTouch</strong>® <strong>HMI</strong>Scripting <strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


379Chapter 12Maintaining the Alarm DatabaseYou manage the alarm database using two <strong>InTouch</strong> utilities.Use the Alarm DB Purge-Archive utility to remove recordsfrom the database permanently or archive them to files. Ifthe database becomes corrupt, use the Alarm DB Restoreutility to restore archived records.The following figure shows how both utilities purge/archiverecords <strong>and</strong> then restore them back to the database.Alarm DatabaseAlarm DBPurge/ArchivePurgeRequestAlarm RecordsAlarm RecordsPurge RecordsArchive RecordsLog FileArchive RecordsArchiveFilesAlarm RecordsAlarm DBRestoreLog FileYou must be logged into the computer as an administrator touse the Alarm DB Purge-Archive utility.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


380 Chapter 12 Maintaining the Alarm DatabaseConfiguring Purge or Archive SettingsUse the Alarm DB Purge-Archive utility to:• Select the type of records to purge from the alarmdatabase.• Purge records automatically on a daily, weekly, ormonthly schedule.• Optionally archive purged database records to files.• Save the status of archive or purge operations to a log fileto troubleshoot problems.• Show the status of purge or archive operations.Configuring the Database ConnectionBefore you can use the Alarm DB Purge-Archive utility, youmust connect to the alarm database.To configure the database connection1 Open the Alarm DB Purge-Archive utility. Do thefollowing:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Purge-Archive.2 Click the Database tab.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Purge or Archive Settings 3813 Configure the database connection. Do the following:abcIn the Server Name list, click the node name of theserver.In the Database box, type the name of the alarmdatabase.In the User Information area, type the user name <strong>and</strong>password of an alarm database user account.4 Click Test Connection to test the connection to thedatabase. A message indicates if the connection to thealarm database is successful. Click OK.5 Click Apply.Configuring How Much Data to Purge from theServerYou can:• Select the type of alarm records to be purged from thealarm database.• Optionally archive purged records from the alarmdatabase to files.• Select the folder location to store the purge log file.You can select the type of table that needs to be purged,either the AlarmDetail or AlarmConsolidated table.All data from the day previous to the number specified ispurged. Valid entries are 0-9999. If you select 0, all recordsare purged from the alarm database except the current day’srecords.To select records to purge1 Open the Alarm DB Purge-Archive utility. Do thefollowing:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Purge-Archive.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


382 Chapter 12 Maintaining the Alarm Database2 Click the General tab.3 In the Purge Properties area, configure the type of recordsto purge. Do either of the following:• Click Detailed Mode to purge alarm records that aresaved in the database in Detailed mode.• Click Consolidated Mode to purge alarm records thatare saved in the database in Consolidated mode.4 In the Days Online box, type the number of days worth ofrecords to retain in the alarm database.5 Click Apply.Configuring the Archive of Purged DataYou archive the records purged from the alarm database <strong>and</strong>then restore them using the Alarm DB Restore utility.When you purge the alarm database, the Alarm DBPurge-Archive utility automatically creates a set of ninearchive files that correspond to the purged alarm databasetables. Each file contains the purged records of a single table.The Alarm DB Purge-Archive utility assigns names to thearchive files based upon the table name, date, <strong>and</strong> time whenthe purge operation occurred. For example, the name of thearchive file for the AlarmMaster table that was purged onJune 22, 2007 at 5:30 p.m. is formatted like the following:AlarmMaster_06222007_1730.txt<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Purge or Archive Settings 383To configure the archive1 Open the Alarm DB Purge-Archive utility. Do thefollowing:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Purge-Archive.2 Click the General tab.3 Select the Archive check box.4 In the Archive Folder Path box, type the folder locationwhere archive files should be saved or click the ellipsisbutton to browse for the location.5 Select the Create Unique Folders check box if you want thearchive files to be placed in an individual sub-folderbeneath the archive file folder.6 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


384 Chapter 12 Maintaining the Alarm DatabaseConfiguring Log File SettingsThe Alarm DB Purge-Archive utility generates statusmessages during a purge operation. You can view thesemessages online from the utility’s Status window. The AlarmDB Purge-Archive utility also writes purge messages to thepurge log file named WWAlmPurge.log.The example below shows the messages stored in the log fileafter a successful purge operation.Purge Started on 12:16:48 PM 6/22/2007Starting transaction....Archiving Table ProviderSession...Archiving Table Query...Archiving Table Cause...Archiving Table Alarm Master...Archiving Table OperatorDetails...Archiving Table Alarm Detail...Archiving Table Comment...Archiving Table <strong>Events</strong>...Archiving Table TagStatus...Purging records in the database...Committing....Purge Completed On 12:16:52 PM 6/22/2007144 records from AlarmMaster were purged alongwith the related records from other tables.By default, the purge log file is stored in this folder:C:\Documents <strong>and</strong> Settings\All Users\ApplicationData\Wonderware\<strong>InTouch</strong>. For computers running theMicrosoft Windows Vista operating system, the defaultapplication folder is C:\Users\UserName\Documents\My<strong>InTouch</strong> Applications.You can change the storage location of the purge log file.The Alarm DB Purge-Archive utility appends new messagesto the log file each time a purge occurs.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Purge or Archive Settings 385To set archive logging1 Open the Alarm DB Purge-Archive utility. Do thefollowing:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Purge-Archive.2 Click the General tab.3 In the Log File Path box, type the folder location where thepurge log file should be placed or click the ellipsis buttonto browse for the location.4 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


386 Chapter 12 Maintaining the Alarm DatabaseManually Purging <strong>and</strong> Archiving the DatabaseYou can purge <strong>and</strong> archive your alarm database manually.This overrides the activation time <strong>and</strong> starts the purging <strong>and</strong>archiving immediately.The purge operation checks for the presence of an archive file<strong>and</strong> appends to the same. If the archive file is not present,the file is created as per the naming convention <strong>and</strong> thenused for archiving.The purge operation does not delete entries in tables such asProviderSession, Query, <strong>and</strong> Cause that are linked to themain tables such as AlarmMaster through foreign keyconstraints. The related records in these tables are written tothe files to maintain the data consistency <strong>and</strong> also retainedin the database.Caution Manually purge all records (the Purge All Now option)only when the Alarm DB Logger service is stopped. If the purgeoperation is committed successfully while the Alarm DB Loggerservice is running, the Alarm DB Logger service stops logging <strong>and</strong>starts caching records.To manually purge <strong>and</strong> archive records from the alarmdatabase1 Open the Alarm DB Purge-Archive utility. Do thefollowing:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Purge-Archive.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring Purge or Archive Settings 3872 Click the Purge/Archive tab.3 Click Test Now to perform a test purge to verify yourconnection to the database <strong>and</strong> archive locations.The test purge creates empty archive files in the specifiedarchive folder. The Status area shows a message that thetest was successful.The Test Now button is available only if you have chosento archive your purged records. The Archive option islocated on the General tab.4 Purge the records from the database. Do either of thefollowing:• Click Purge Now to purge the selected records.• Click Purge All Now to purge all records.5 To stop a purge, click Cancel Purge. If you cancel thepurge, the alarm database is rolled back to its originalstate.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


388 Chapter 12 Maintaining the Alarm DatabaseSetting a Schedule for Automatic PurgingThe Alarm DB Purge-Archive utility can automatically purgeor archive records from the alarm database at scheduledintervals. You can perform a test purge to verify yourconnection to the database <strong>and</strong> target locations <strong>and</strong> to start<strong>and</strong> stop purging.To set a schedule for automatic purging1 Open the Alarm DB Purge-Archive utility. Do thefollowing:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Purge-Archive.2 Click the Purge/Archive tab.3 In the Time Interval area, select a purge interval, eitherdaily, weekly, or monthly.If you click Weekly or Monthly, a Day box appears in theActivation Time area for you to specify the day of the weekor day of the month.If you click Daily, in the Time box, configure the time ofday that you want the purge/archive operation to start.4 In the Run As area, click Application to run thepurge-archive utility as an application or click Service torun it as a service.5 Click Apply to save your purge <strong>and</strong> archive settings.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Restoring the Alarm Database 3896 Click Activate to place the Alarm DB Purge-Archiveutility on an automatic purge schedule.7 Click Close.Restoring the Alarm DatabaseThe Alarm DB Restore utility restores the archived alarmrecords in the archive files back to your alarm database. Thefollowing figure summarizes the steps to restore alarmrecords to the database.Alarm DBRestoreAlarm DatabaseArchiveFilesArchive RecordsAlarm RecordsAlarm RecordsAlarm RecordsLog FileArchiveRequestTo restore a database, you must:• Configure the connection to the alarm database.• Select which records to restore to the alarm database.• Restore archived records to the alarm database.When minimized, the Alarm DB Restore utility appears asan icon in the system tray. When you right-click the icon, amenu shows the following comm<strong>and</strong>s:Comm<strong>and</strong>RestoreCancel RestoreClear StatusHide WindowShow WindowExitDescriptionBegins the restoring process.Cancels the restoring process.Clears the status window.Minimizes the Alarm DB Restoreutility to an icon in the system tray.Opens <strong>and</strong> maximizes the Alarm DBRestore utility.Closes the Alarm DB Restore utility.If you right-click in the Alarm DB Restore utility, the samemenu appears.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


390 Chapter 12 Maintaining the Alarm DatabaseConfiguring the Database ConnectionYou must select a database to restore the archived data to. Ifthe specified database is not present on the server, you areprompted to create a new database with default serverparameters.To configure a database for restoring1 Open the Alarm DB Restore utility. Do the following:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Restore.2 Click the Configure tab.3 Configure the connection to the alarm database. Do thefollowing:aabcIn the SQL Server Name list, click the node name ofthe server that hosts the alarm database.In the Database Name box, type the name of the alarmdatabase.In the User Information area, type an alarm databaseuser name <strong>and</strong> password in the respective boxes.Click Test Connection to test your connection to thedatabase. A message indicates whether theconnection to the alarm database is successful or not.Click OK.4 Click Close.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Restoring the Alarm Database 391Configuring Which Files to RestoreYou can select a time period for the records to restore <strong>and</strong>whether you want the database tables to be recreated.If you cancel the restore, the database is rolled back to itsoriginal state.Caution If you try to restore archived alarms that are alreadypresent in the database, the archived records are not restored.This avoids duplicate alarm/event entries in the database. TheAlarm GUID or Event GUID associated with records determineswhether an alarm or event is already present in the database.To select database records to restore1 Open the Alarm DB Restore utility. Do the following:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Restore.2 Click the Selection tab.3 In the Folder Path for Archived Files box, type the full path(up to 255 alphanumeric characters) to the location of thearchived files or click the button to locate <strong>and</strong> select thefolder where archived files are stored.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


392 Chapter 12 Maintaining the Alarm Database4 In the Restore files later than (Date/Time) area, select thedate <strong>and</strong> time to start restoring records to the database.The starting date <strong>and</strong> time are set by default to thecurrent date <strong>and</strong> time.5 In the Folder path for log file box, type the full path (up to255 alphanumeric characters) where the log files arecreated <strong>and</strong> stored or click the button to locate <strong>and</strong> selecta folder.6 If you select the Recreate Tables check box, the tables ofthe specified alarm database are recreated. Depending onthe type of logging you selected for the alarm recordscontained in the archived files, select:• Detailed - Recreate the alarm database tables indetailed mode.• Consolidated - Recreate the alarm database tables inconsolidated mode.Important Recreating tables overwrites all records currentlystored in the alarm database.7 Click Restore.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Restoring the Alarm Database 393Starting a Database Restore OperationYou restore archived database records after you haveestablished the database connection, specified the archivedfiles folder <strong>and</strong> a time filter.To restore database records from an archive1 Open the Alarm DB Restore utility. Do the following:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm DB Restore.2 Click the Selection tab.3 Click Restore. A message shows whether the restorationis successful <strong>and</strong> the number of records restored to thedatabase.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


394 Chapter 12 Maintaining the Alarm Database<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


395Chapter 13Enhancing Plant SecurityThrough Alarm RedundancyThe <strong>InTouch</strong> Distributed Alarm system issues notifications<strong>and</strong> receives alarm acknowledgments from applicationsrunning on remote nodes within a network. Alarm providerapplications store alarm data within their memory. Alarmconsumer applications run as clients on other nodes toremotely query, show, <strong>and</strong> acknowledge alarms from thealarm providers.You use the Alarm Hot Backup Manager to create a duplicatealarm provider. The following figure shows how the HotBackup Manager uses a secondary current alarm repositoryas a backup provider.Primary AlarmProviderPLCI/OServerAlarmMemory<strong>InTouch</strong>Running HotBackup ManagerRunning<strong>InTouch</strong>ApplicationPump1 InletPressure Too HighBackup AlarmProviderAlarmMemory<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


396 Chapter 13 Enhancing Plant Security Through Alarm RedundancyYou can also run the Hot Backup Manager <strong>and</strong> the backupprovider on the same node, as shown in the following figure:Primary AlarmProviderPLCI/OServerAlarmMemory<strong>InTouch</strong>Running HotBackup ManagerRunning<strong>InTouch</strong>ApplicationPump1 InletPressure Too HighAlarmMemoryBackup AlarmProviderUnderst<strong>and</strong>ing Hot BackupsThe hot backup provides a single name (hot backup pairname) that points to two alarm providers, the primary <strong>and</strong>the backup (the hot backup pair). The <strong>InTouch</strong> <strong>HMI</strong>’s alarmconsumers, such as the Alarm Viewer control, can referencethis single hot backup pair name <strong>and</strong> retrieve alarms fromeither the primary or the backup alarm provider.If both provider nodes are operating normally, the alarmconsumer receives alarm data from the primary provider. Ifthe primary provider fails, however, the alarm consumerreceives alarm data from the backup instead.The following figure shows how the alarm consumer stillreceives alarms after the primary alarm provider fails. Thealarm consumer still references the hot back pair, but thebackup provider provides the alarm data.Primary AlarmProviderPLCI/OServerAlarmMemory<strong>InTouch</strong> RunningHot BackupManagerRunning<strong>InTouch</strong>ApplicationPump1 InletPressure Too HighBackup AlarmProviderAlarmMemory<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Hot Backup Pair 397The Hot Backup Manager synchronizes alarmacknowledgements between the primary <strong>and</strong> backupproviders. If an alarm is acknowledged on the primaryprovider, the same alarm is acknowledged simultaneously onthe backup provider.The Hot Backup Manager:• Provides a configuration utility to create a backup pair.• Provides a configuration utility to map alarm recordsbetween the primary <strong>and</strong> backup providers of a hotbackup pair.• Synchronizes alarm acknowledgments between backuppairs.• Establishes communication between all nodes thatbelong to a Hot Backup system when the DistributedAlarm system starts <strong>and</strong> stops.Configuring a Hot Backup PairThe Alarm Hot Backup Manager creates a backup pair fromtwo host nodes running provider applications. You can startthe Hot Backup Manager from WindowMaker. To configure ahot backup pair:• Create a hot backup pair.• Set key fields for alarm records.• Map alarm record key fields.• Import the alarm record map to Hot Backup Manager.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


398 Chapter 13 Enhancing Plant Security Through Alarm RedundancyCreating a Hot Backup PairTo create a hot backup pair, you:• Assign a name to the hot backup pair.• Identify the primary alarm provider.• Identify the backup alarm provider.You can also specify a Provacc.ini file that contains theconfiguration information.To configure a hot backup pair1 Open the Alarm Hot Backup Manager. Do the following:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm Hot Backup Manager.2 On the File menu, click Open. Select the Provacc.ini file<strong>and</strong> then click OK.By default, the Alarm Hot Backup Manager checks forthe Provacc.ini file in the last opened <strong>InTouch</strong> applicationfolder. You should use the Provacc.ini file located in the<strong>InTouch</strong> application’s folder. Otherwise, you can create acopy of the Provacc.ini file in another specified folderlocation <strong>and</strong> then select it for use with Hot BackupManager.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Hot Backup Pair 3993 Click New Pair. The Add New Pair dialog box appears.Note You cannot change the <strong>InTouch</strong> static provider name.4 In the Hot Backup Pair Name box, type a unique name forthe new backup pair.A pair name can be 32 alphanumeric characters or less.You can use the underscore character in a pair name.5 In the Primary Node area, configure the primary node. Dothe following:abIn the Name box, type the node name of the computerrunning the primary provider application. The nodename must be unique to Hot Backup Manager. Anerror message appears if you enter a non-existentnode name or the node name is used in another hotbackup pair.In the Group box, type the name of the alarm groupthat queries alarms from the primary provider.6 In the Backup Node area, configure the backup node. Dothe following:ab7 Click OK.In the Name box, type the node name of the computerrunning the backup provider application. This can bethe same node that is running the Hot BackupManager.In the Group box, type the name of the alarm groupthat queries alarms from the backup provider.8 On the File menu, click Save.9 Restart WindowMaker.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


400 Chapter 13 Enhancing Plant Security Through Alarm RedundancySetting Alarm Key Fields for a Hot Backup PairTo synchronize alarm acknowledgements between theprimary <strong>and</strong> backup providers, you must identify acombination of tag alarm record fields. This combination offields generates a unique mapping key to the paired alarmrecords stored in each provider’s current alarm repository.The figure below shows a synchronized alarmacknowledgement request based on alarm record fields in ast<strong>and</strong>ard query.Primary AlarmProviderAlarm Query$System!TagA<strong>InTouch</strong> ClientNodeAlarm RecordSynchronized AlarmAcknowledgementAlarm MemoryBackup AlarmProvider$System!TagBAlarm QueryAlarm RecordAlarm MemoryA mapping key can be a combination of design-time <strong>and</strong>run-time alarm records. Design-time alarm records are basedupon alarm properties of a tag when it is defined from theTagname Dictionary.For example, an alarm name field is known at design timebecause it takes on the name of the tag defined in theprimary <strong>and</strong> backup node applications. QuickScripts oroperators actions define or modify alarm properties stored asrecords while an application is running.You can create a map key from any combination ofdesign-time or run-time alarm record fields. The map keymust select only a single record from each provider’s currentalarm repository. The key field must create a unique query.You use the Hot Backup Manager to create a mapping keylist from alarm record fields.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Hot Backup Pair 401To create an alarm field mapping list for a hot backup pair1 Open the Alarm Hot Backup Manager. Do the following:a In the Tools view, exp<strong>and</strong> Applications.b Double-click Alarm Hot Backup Manager.2 Select a hot backup pair from the list.3 Click Set Key Fields. The Select Key Fields dialog boxappears.4 In the Alarm Record Fields area, select the alarm recordfields that you want to include in the mapping key list.The selected alarm record fields appear in the SelectedFields list box.5 Select Design-Time or Run-Time for the alarm record fieldsyou selected.6 Click OK.7 Restart WindowMaker.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


402 Chapter 13 Enhancing Plant Security Through Alarm RedundancyCreating an Alarm Record Mapping FileYou must map the alarm records of a hot backup pairwhenever the primary <strong>and</strong> backup alarm providers arerunning different applications. Alarm record mappingestablishes a correspondence between dissimilar alarmrecords of the primary <strong>and</strong> backup providers. For example,you can map alarm records based upon their assigned<strong>InTouch</strong> tag names. Although their names may be different,the alarm records are logically consistent between the twoprovider alarm repositories.Note Creating an alarm record mapping file is unnecessary if boththe primary <strong>and</strong> backup providers are running the sameapplication. If no mapping file is provided, the Distributed <strong>Alarms</strong>ystem assumes the primary <strong>and</strong> the backup providers are runningthe same applications with the same alarm records.Mapping enables alarm acknowledgements to besynchronized between providers running differentapplications. When the Distributed Alarm systemacknowledges an alarm on a provider, it also knows whichalarm to acknowledge on the other provider.The figure below shows alarm record mapping between thetwo providers of a hot backup pair. In this example, the A<strong>and</strong> B alarm records of the primary provider are mapped tothe corresponding alarm records of the backup provider, MA<strong>and</strong> MB.Primary AlarmProviderAlarm RecordMappingAB<strong>InTouch</strong>Running HotBackup ManagerRunning<strong>InTouch</strong>ApplicationAlarmMemoryBackup AlarmProviderMAMBAlarmMemory<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Hot Backup Pair 403The Hot Backup Manager imports the alarm record mapfrom a comma separated values (CSV) file that you createwith Microsoft Excel or a text editor like Notepad. Themapping file includes an ordered list of alarm record fieldsthat associate the corresponding alarm records of theprimary <strong>and</strong> backup providers.You must specify tag alarm record fields as the headers of themapping file. The order of the headers within the file mustmatch the alarm record fields shown from the Select KeyFields dialog box. The figure below shows the column headersof an Excel file that match the order of alarm record fields ofthe Select Key Fields dialog box.You can create a mapping file that only includes the selectedheaders of alarm field records used to generate mappingkeys. The figure below shows an Excel file that includes onlythe Name, Class, <strong>and</strong> Type headers. When you add headers,their order must always match the order of alarm recordfields of the Select Key Fields dialog box.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


404 Chapter 13 Enhancing Plant Security Through Alarm RedundancySpecify the alarm field records of the primary provider in theleft set of columns. Likewise, specify the same records of thebackup provider in the right set of columns.Mapping FileColumnHeaderGroupNameClassValues Assigned to Alarm Field RecordsName of the alarm group in which the taghas been assigned. An alarm group namecannot contain a blank space.Name of the tag whose alarm records aremapped. A tag name cannot contain a blankspace.Class of alarm assigned to the tag. PossibleClass values are:• VALUE for a value alarm.• DEV for a deviation alarm.• ROC for a rate of change alarm.• DSC for a discrete alarm.TypeType of alarm condition associated with analarm class.• LOLO, LO, HI, <strong>and</strong> HIHI for a valuealarm• MinDev <strong>and</strong> MajDev for a deviationalarm• ROC for a rate of change alarm• DSC for a discrete alarmPriorityValueLimitCommentPriority assigned to an alarm condition.Priority must be a number from 1 to 999.See the following notes.See the following notes.See the following notes.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Hot Backup Pair 405Value, Limit, <strong>and</strong> Comment columns:• The "Value" <strong>and</strong> "Limit" column values can be anythingother than Null, when the "Class" or "Type" values forthat particular record in that particular node are notknown.• The "Value" <strong>and</strong> "Limit" column values can accept only1234567890.-+eE characters when the Class value forthat particular record in that particular node is known asValue, Dev or ROC.• The "Value" <strong>and</strong> "Limit" column values can accept only1234567890.-+eE characters when the Type value forthat particular record in that particular node is known asLOLO, LO, HI, HIHI, MinDev, MajDev or ROC.• The "Value" <strong>and</strong> "Limit" column values can be anythingother than Null, when any one of the "Class" or "Type"values for that particular record in that particular node isknown as DSC.• The Comment column values have no limitations.• All records of the mapping file should be unique. The HotBackup Manager skips any duplicate records during theimport process. You can see details after the importprocess is completed.You can combine the field values of alarm records - such asGroup, name, <strong>and</strong> Priority - to generate a "compositemapping key" that uniquely identifies alarm records.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


406 Chapter 13 Enhancing Plant Security Through Alarm RedundancyAn <strong>InTouch</strong> Alarm Provider equates the "Name" field to thename of the tag that generated the alarm. Therefore, whengiven hot backup pair, a mapping key can be generated usingthe combination of the alarm group name <strong>and</strong> the tag name.For example:Provider Node$System!TagABackup Node$System!TagBIf a provider has a name field <strong>and</strong> comment field together asa unique field then the mapping key can be a combination ofname <strong>and</strong> comment.Provider NodetagA!CommentABackup NodetagB!CommentBThis could be true for any other field combination for a thirdprovider.Importing an Alarm Record Mapping FileYou can import the contents of the alarm record mapping fileto the Hot Backup Manager.No cross-validation between the Alarm Class <strong>and</strong> AlarmType fields is done when you import the mapping file.To import alarm records from a mapping file1 Open the Alarm Hot Backup Manager. Do the following:abIn the Tools view, exp<strong>and</strong> Applications.Double-click Alarm Hot Backup Manager.2 Select the hot backup pair from the list.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Hot Backup Pair 4073 Click Map <strong>Alarms</strong>. The Map Alarm Records dialog boxappears.4 Click Import. The Open dialog box appears. Select themapping file <strong>and</strong> click Open.The Hot Backup Manager begins importing records fromthe file.5 Click OK after all mapping records have been imported.6 On the File menu, click Save.7 Restart WindowMaker.Troubleshooting Alarm Mapping File Import ProblemsThe following situations prevent a file from importing:• The required number of columns should be filled withvalues for all the records at the import file. There shouldnever be fewer values or more values for any record.• The headings at the import file should be the same asthat of the headings at the Select Key Fields dialog box<strong>and</strong> should be in the same order.If a record that is imported has a wrong entry, you areprompted to skip that particular record number or to abortthe importing process itself.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


408 Chapter 13 Enhancing Plant Security Through Alarm RedundancyExample of a Hot Backup PairThis section describes a typical working scenario to set up analarm backup pair. The figure below shows the configurationof a hot backup pair for an <strong>InTouch</strong> tank farm application. Inthis example, the <strong>InTouch</strong> application monitors pumppressure as an alarm condition.Tank Farm 1PLC<strong>InTouch</strong>Primary ProviderFrmPNPump_1Pump_2Pump_3PLCPLCPLCI/OServerPmp1IPPmp1OP<strong>InTouch</strong>Backup ProviderFrmBU<strong>InTouch</strong>Client ApplicationFrmApPump1 InletPressure Too HighPump_4PLCPump_5IPPmp1OPPmp1All three computers are running the <strong>InTouch</strong> <strong>HMI</strong>. The hotbackup pair includes FrmPN as the primary provider <strong>and</strong>FrmBU as the backup. These two nodes serve as alarmproviders within an <strong>InTouch</strong> Distributed Alarm system.The Hot Backup Manager run on the FrmAp node. The<strong>InTouch</strong> client application runs on FrmAp <strong>and</strong> consumesalarms from the two providers of the hot backup pair.The <strong>InTouch</strong> application running on FrmPN generates twosummary alarms for pump inlet <strong>and</strong> outlet pressure. The twoalarms belong to the TnkFrm1 alarm group. The <strong>InTouch</strong>application running on FrmBU generates two logicallyequivalent alarms for pump pressure.When you set up a redundant hot backup pair, you:• Create a hot backup pair.• Set the alarm record key fields.• Create an alarm record mapping file.• Import the alarm record mapping file.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Example of a Hot Backup Pair 409To create a hot backup pair1 Open the <strong>InTouch</strong> application in WindowMaker. In thisexample, the application runs on the FrmAp node.2 Open the Alarm Hot Backup Manager. Do the following:a In the Tools view, exp<strong>and</strong> Applications.b Double-click Alarm Hot Backup Manager.3 Click New Pair. The Add New Pair dialog box appears.4 Complete the options of the Add New Pair dialog box, asshown in the following figure.5 Click OK to return to the Alarm Hot Backup Manager dialogbox.6 Keep the Alarm Hot Backup Manager dialog box openwithin WindowMaker.You are done with the first step to create a hot backup pair.Next, complete the following procedure to generate a uniquemapping key to the paired alarm records stored in eachprovider’s alarm repository.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


410 Chapter 13 Enhancing Plant Security Through Alarm RedundancyTo map alarm record key fields1 Select the hot backup pair in the list.2 Click Set Key Fields. The Select Key Fields dialog boxappears.Complete the options of the Select Key Fields dialog box,as shown in the following figure.The alarms between theprimary <strong>and</strong> backup provider are logically consistent buthave been assigned different names <strong>and</strong> belong todifferent alarm groups. A unique mapping key to recordsstored in each provider’s alarm repository can begenerated by selecting Alarm Group, Alarm Name, AlarmClass, <strong>and</strong> Alarm Type as Design-Time options.3 Click OK. When a message appears, click Yes.You are done with the second step to create an alarm recordmapping key.In this scenario all three nodes are running <strong>InTouch</strong>applications. The two provider nodes generate equivalentalarms, but are using different tagnames. The primaryprovider generates two summary alarms when a pump’s inlet<strong>and</strong> outlet pressures are too high. The backup providergenerates two logically identical alarms for the same pumppressure alarm conditions. Next, complete the followingprocedure to create a mapping file that associates equivalentrecords stored in each provider’s alarm repository.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Example of a Hot Backup Pair 411To create an alarm mapping file1 Create a .csv file with Excel or a text editor like Notepad.2 Enter the names of the file headers in the same order asthe alarm record field options of the Select Key Fieldsdialog box.In this example, the file headers should be ordered byalarm group, alarm name, the class of alarm, <strong>and</strong> thetype of alarm condition.3 Map the alarms between the two providers on each row ofthe file.4 The example of the Excel file below shows how theheaders <strong>and</strong> alarm conditions should be specified for thetwo providers of the hot backup pair. Save the mappingfile to a location accessible to the Hot Backup Managerrunning on the client node.You are done with the third step to create an alarm recordmapping file.In the last step, you import the contents of the alarmmapping file to the Hot Backup Manager. In this example,the client application knows which pump pressure alarmrecords to acknowledge between the two alarm providers.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


412 Chapter 13 Enhancing Plant Security Through Alarm RedundancyTo import an alarm record mapping .csv file1 Open the Alarm Hot Backup Manager.The alarm backup pair you created earlier should belisted.2 Click Map <strong>Alarms</strong>. The Map Alarm Records dialog boxappears.3 Click Import. The Open dialog box appears.4 Select your mapping file <strong>and</strong> click Open. The Map AlarmRecords dialog box lists the alarm mapping records fromthe file.5 Click OK. The Hot Backup Manager begins importingrecords from the file.6 Click OK after all mapping records have been imported.You can now run the hot backup application.Acknowledgement Synchronization ExampleFor this example:• Alarm Name, Alarm Class, <strong>and</strong> Alarm Type are selectedas design-time key fields.• Alarm Group is selected as a run-time field.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Example of a Hot Backup Pair 413The following alarm record map file was created usingMicrosoft Excel.The Pmp1IP alarm is mapped to the IPPmp1 alarm. Bothhave a Class of VALUE <strong>and</strong> a Type of HIHI.The Pmp1OP alarm is mapped to the OPPmp1 alarm. Bothhave a Class of VALUE <strong>and</strong> a Type of Lo.• When the HiHi alarm for Pmp1IP is acknowledged at theprimary alarm node, the acknowledgment also appearson the HiHi alarm for IPPmp1 at the secondary providernode, provided that the alarm group names on both nodesremain the same.• When the Low alarm for Pmp1OP is acknowledged at theprimary alarm node, the acknowledgment also appearson the Low alarm for OPPmp1 at the secondary providernode, provided that the alarm group names on both nodesremain the same.Acknowledgement synchronization occurs only if thedesign-time <strong>and</strong> run-time mapping match.You can select any combination of design-time <strong>and</strong> run-timealarm record fields for mapping. However, make sure thatthe mappings do not result in multiple references.For example, if two alarm record fields such as Class <strong>and</strong>Priority are selected, it is very possible that more than onealarm matches the criteria. In such a case, the Hot Backupsynchronization is not guaranteed to work. In the process ofpropagating the acknowledgment, a r<strong>and</strong>om alarm thatmatches the criteria may also be picked up, while othermatching alarms may be left unacknowledged.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


414 Chapter 13 Enhancing Plant Security Through Alarm RedundancyNotes Regarding Hot Backup Pairs• You can use a hot backup only for <strong>InTouch</strong> 7.11 <strong>and</strong> laterclients.• Exp<strong>and</strong>ed summary alarms or event-oriented alarms arenot supported.• If the Distributed Alarm Display object queries a hotbackup pair <strong>and</strong> then queries the primary provider againseparately, the Distributed Alarm Display object showsduplicate records.• Do not configure a provider as a primary or secondary ofmore than one hot backup pair.• If a record at the primary provider is acknowledged <strong>and</strong>the secondary provider (which was down when theacknowledgment took place) starts up at a later time, thetime stamp of the acknowledged record is identical withthe record in the primary provider.• The alarm consumer querying a hot backup pair showsthe individual node name as the provider.• You can choose any combination of design-time <strong>and</strong>run-time alarm record fields for mapping. However, besure that the mappings do not result in multiplereferences.• When mapping the Value <strong>and</strong> Limit key fields, the valuesare rounded off to the fourth decimal place <strong>and</strong> thenmapped.• An alarm record that does not have the specificcombination of design-time <strong>and</strong> run-time mapping usesthe default runtime mapping.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


415Chapter 14Creating an Alarm Audit TrailWhen you configure an <strong>InTouch</strong> alarm provider to use eitheroperating system or ArchestrA authentication <strong>and</strong> an alarmoccurs, the alarm display contains the full name of theoperator in the Operator Full Name column, assuming theoperator is logged on.For example if a user is registered in the PLANT_FLOORdomain with a user ID of JohnS <strong>and</strong> a full name of JohnSmith, the Operator Full Name column contains John Smith.If the alarm is subsequently acknowledged, <strong>and</strong> the nodeperforming the acknowledgement is set to use operatingsystem or ArchestrA security, the Operator Full Namecolumn is updated to show the full name of theacknowledgement operator. Otherwise, the alarm displayshows a computer name concatenated with whatever is in the$Operator tag.<strong>InTouch</strong> security can include an operator’s full name withalarm acknowledgements. This is also possible on recordspertaining to alarm detection. In most organizations, a logonID is not a person's full name, but rather an abbreviation orrole classification.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


416 Chapter 14 Creating an Alarm Audit TrailWhen you configure operating system authentication for theprovider <strong>and</strong> consumer <strong>InTouch</strong> nodes:• The alarm display shows full names when alarms aregenerated <strong>and</strong> when acknowledgements are performed.• The alarm printer prints full names when alarms aregenerated <strong>and</strong> when acknowledgements are performed.• The Alarm DB Logger records domain name, log on userID, <strong>and</strong> full user name with each alarm record for bothOperator <strong>and</strong> AckOperator fields. This allows for uniqueidentification even if an organization has two employeeswith identical full names.• The Operator field shows the user account in theDomainName\UserName format.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


417Appendix AWorking with the DistributedAlarm Display ObjectThe Distributed Alarm Display object is included in thisversion of the <strong>InTouch</strong> <strong>HMI</strong> to support applicationsdeveloped with <strong>InTouch</strong> version 7 <strong>and</strong> earlier. You shoulduse the Alarm Viewer Control instead to create alarmdisplays with more recent versions of the <strong>InTouch</strong> <strong>HMI</strong>.About the Distributed Alarm Display ObjectThe Distributed Alarm Display object provides a singledisplay to show both local <strong>and</strong> remote alarms.This display object’s features include built in scroll bars,sizable columns, multiple selection of alarms, a status bar, ashortcut menu, <strong>and</strong> colors based on alarm priority <strong>and</strong> state.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


418 Appendix A Working with the Distributed Alarm Display ObjectThe Distributed Alarm Display object includes propertiesthat can set the appearance of the alarm display (includingthe information that is shown), the colors used for variousalarm conditions, <strong>and</strong> which alarm group <strong>and</strong> alarm prioritylevels are shown.For more information about the display object, see Using aDistributed Alarm Display Object at Run Time on page 434.Distributed Alarm Display Object <strong>Guide</strong>linesObserve the following guidelines when using the DistributedAlarm Display object:• Each display must have an identifier so that anyassociated QuickScript functions knows which display tomodify. This identifier, entered in the Display Name box inthe Alarm Configuration dialog box, must be unique foreach display.• Displays should not overlap other <strong>InTouch</strong> objects, suchas window controls or graphic objects. You can easilyverify this by clicking on the Distributed Alarm Displayobject in WindowMaker, <strong>and</strong> checking the display’s"h<strong>and</strong>les." The h<strong>and</strong>les should not touch other objects onthe screen.• Displays should be used sparingly. Placing numerousdisplays on one screen can result in reduced systemperformance. When possible, limit the number of displayson your window <strong>and</strong> call further windows with additionaldisplays.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Distributed Alarm Display Object at Design Time 419Configuring a Distributed Alarm DisplayObject at Design TimeYou can configure:• General features, such as a status bar, scroll bars, <strong>and</strong> soon.• The columns <strong>and</strong> sorting order.• The alarm query to use to retrieve alarm records.• The time format the alarm records are shown in.• The font <strong>and</strong> colors for the shown alarm records.• What run-time users can do in the display, such as resizecolumns, select alarms, access a shortcut menu, <strong>and</strong> soon.Creating a Distributed Alarm Display ObjectYou create a Distributed Alarm Display object just as youwould a wizard.To create a Distributed Alarm Display object1 Click the Wizard tool in the Wizard/ActiveX Toolbar. TheWizard Selection dialog box appears.2 Select Alarm Displays in the list of wizards.3 Double-click the Dist. Alarm Display wizard. The dialogbox closes <strong>and</strong> your window reappears with the cursor inthe "paste" mode.4 Click in the window to paste the Distributed AlarmDisplay object. To size the wizard, drag the selectionh<strong>and</strong>les.You are now ready to configure the display.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


420 Appendix A Working with the Distributed Alarm Display ObjectConfiguring the Appearance of the GridFor the display grid, you can configure:• A title bar, status bar, <strong>and</strong> scroll bars.• Where new alarms appear in the grid <strong>and</strong> whether toauto-scroll to them.• A default message to be shown if there are no alarmrecords to show.To configure the appearance of the grid1 Right-click the Distributed Alarm Display object <strong>and</strong>then click Properties. The Alarm Configuration dialog boxappears.2 In the Display Name box, type the name for the alarmdisplay. This name must be unique for each alarmdisplay used. This name is used throughout the systemfor referring to this object for execution of tasks such asalarm acknowledgment <strong>and</strong> queries.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Distributed Alarm Display Object at Design Time 4213 In the New <strong>Alarms</strong> Appear At area, configure where youwant new alarms to appear in the object:• Click Top of List to show the most recent alarm at thetop of the list.• Click Bottom of List to show most recent alarm at thebottom of the list.4 In the Properties area, configure title bar, status bar, <strong>and</strong>scroll bars. Do any of the following:• Select the Show Titles check box to show the alarmmessage title bar.• Select the Show Status Bar check box to show thestatus bar.• Select the Show Vert Scrollbar check box to show thevertical scroll bar.• Select the Show Horz Scrollbar check box to show thehorizontal scroll bar.5 Select the Show Message check box to show a defaultmessage if there are no alarm records to show. Type themessage in the box.6 Select the Auto-Scroll to New <strong>Alarms</strong> check box to have theselection automatically jumps to the new alarm. Newalarms are defined as those that are not currently shownwithin the display object.7 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


422 Appendix A Working with the Distributed Alarm Display ObjectControlling Which Features Users Can Access atRun TimeYou can allow the run-time user to change the columnsettings, select alarms, <strong>and</strong> open the shortcut menu.Note You can use script functions to run the comm<strong>and</strong>s thatappear on the shortcut menu.To configure the run-time features1 Right-click the Distributed Alarm Display object <strong>and</strong>then click Properties. The Alarm Configuration dialog boxappears.2 Configure the which options are available at run time. Doany of the following:• Select the Allow Runtime Grid Changes check box toallow the user to change column settings.• Select the Show Context Sensitive Menu check box toenable the shortcut menu.• Select the Allow Runtime Alarm Selection check box toallow the user to select alarms.• Select the Use Extended Alarm Selection check box toallow the user to select multiple alarms by holdingdown Ctrl or Shift in conjunction with mouseselection. The default is to toggle selection of alarmsby simply clicking on them.3 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Distributed Alarm Display Object at Design Time 423Configuring Which <strong>Alarms</strong> to ShowYou can configure the Distributed Alarm Display object toshow alarms based on:• Priority.• State, such as acknowledged or unacknowledged.• Type, either summary or historical.When you configure the alarm query, you use text only. Youcannot use tags. Example queries are as follows.Full path to Alarm Group:\\Node\<strong>InTouch</strong>!GroupFull path to local Alarm Group\<strong>InTouch</strong>!GroupAnother Group List:GroupListTo perform multiple queries, separate each query with aspace. For example:\<strong>InTouch</strong>!Group GroupListThe default query properties are only used if you select thePerform Query on Startup check box or if the almDefQuery()function is executed.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


424 Appendix A Working with the Distributed Alarm Display ObjectTo configure which alarms to show1 Right-click the Distributed Alarm Display object <strong>and</strong>then click Properties. The Alarm Configuration dialog boxappears.2 Select the Perform Query on Startup check box.3 In the Default Query Properties area, configure the defaultquery for the object.• In the From Priority box, type the default minimumalarm priority.• In the To Priority box, type the default maximumalarm priority.• In the Alarm State list, click the default alarm state toquery (All, Unack, Ack).• In the Query Type list, click the alarm type, eitherSummary or Historical.• In the Alarm Query box, type the initial alarm query.4 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Distributed Alarm Display Object at Design Time 425Configuring a Default Alarm CommentYou can configure a default comment to be used when anoperator acknowledges an alarm. If you do not configure adefault comment, when the operator acknowledges an alarm,a dialog box appears to let the operator enter a comment. Thedialog box can be filled in or left blank.To configure a default comment1 Right-click the Distributed Alarm Display object <strong>and</strong>then click Properties. The Alarm Configuration dialog boxappears.2 Select the Show Context Sensitive Menu check box.3 Select the Use Default Ack Comment check box <strong>and</strong> thentype the comment text in the box.4 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


426 Appendix A Working with the Distributed Alarm Display ObjectConfiguring the Time Format for Alarm RecordsThe original alarm time is the date/time stamp of the onset ofthe alarm. If tag is an I/O tag, then it is the time stamp fromthe I/O Server if that server is capable of passing timestamps.To configure the alarm display time format1 Right-click the Distributed Alarm Display object <strong>and</strong>then click Properties. The Alarm Configuration dialog boxappears.2 Click the Message tab.3 In the Date Format list, click the format for the date.Available formats are:Selection Shows Selection ShowsDD MMM 28 Feb MM/DD 02/28DD MM YYYY 28 Feb 2007 MM/DD/YY 02/28/07DD/MM 28/07 MMM DD Feb 28DD/MM/YY 28/02/07 MMM DD YYYY Feb 28 2007YY/MM/DD 07/02/28 YYYY/MM/DD 2007/02/28<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Distributed Alarm Display Object at Design Time 4274 In the Time Format list, click the format for the time. Usethe values in this list as a template to specify the formatof the time. For example, to specify the time as 10:24:30AM, use HH:MM:SS AP. The template characters are asfollows:CharacterAPHHMMSSSSSDescriptionSelects the AM/PM format. Forexample, three o’clock in the afternoonis shown as 3:00 PM. A time withoutthis designation defaults to 24 hourmilitary time format. For example,three o’clock in the afternoon is shownas 15:00.Shows the hour the alarm/eventoccurred.Shows the minute the alarm/eventoccurred.Shows the second the alarm/eventoccurred.Shows the millisecond the alarm/eventoccurred.5 In the Sort Order area, configure the order in which youwant the alarms to be sorted in the object:• Click OAT to use the original alarm time, which is thedate/time stamp of the onset of the alarm.• Click LCT to use the last alarm change time, which isthe date/time stamp of the most recent change ofstatus for the instance of the alarm: onset of thealarm, change of sub-state, return to normal, oracknowledgment.6 Click OK.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


428 Appendix A Working with the Distributed Alarm Display ObjectConfiguring the Font for Alarm RecordsYou can set the font for the records <strong>and</strong> the heading in thecontrol.To configure the font properties1 Right-click the Distributed Alarm Display object <strong>and</strong>then click Properties. The Alarm Configuration dialog boxappears.2 Click the Message tab.3 Click Select Display Font. The st<strong>and</strong>ard Windows Fontdialog box appears.4 Configure the font <strong>and</strong> then click OK.Configuring the Columns for Alarm RecordsYou can select the columns to show, specify the column order,<strong>and</strong> set the column names <strong>and</strong> widths.To configure the display column details1 Right-click the Distributed Alarm Display object <strong>and</strong>then click Properties. The Alarm Configuration dialog boxappears.2 Click the Message tab.3 Click Column Management. The Column Details dialog boxappears.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Distributed Alarm Display Object at Design Time 4294 Select the check box in the Column Name list to show thatcolumn in the Distributed Alarm Display object. Youmust select at least one column. The following tabledescribes the columns:ColumnDateTimeStateClassTypePriorityNameGroupProviderValueLimitOperatorCommentDescriptionShows the date in the format selectedfrom the Message tab.Shows the time in the format selectedfrom the Message tab.Shows the state of the alarm.Shows the category of the alarm.Shows the alarm type.Shows the alarm priority.Shows the alarm/tagname.Shows the Alarm Group name.Shows the name of the alarm provider.Shows the value of the tagname whenthe alarm occurred.Shows the alarm limit value of thetagname.Shows the logged-on operator’s IDassociated with the alarm condition.Shows the tagname comment. Thiscomment is typed in the Alarm Commentbox when the tagname’s alarm wasdefined in the database.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


430 Appendix A Working with the Distributed Alarm Display Object5 To rearrange the columns, select the column name <strong>and</strong>use the Move Up <strong>and</strong> Down arrow buttons. The columnname appearing at the top of the Column Details dialogbox is the column shown to the furthest left of the alarmdisplay.6 To edit the column name <strong>and</strong> width, select a columnname <strong>and</strong> then click Edit. The Edit dialog box appears forthat column.abcIn the New Name box, type a new name if you want toshow a column name other than the default columnname.In the New Width box, type in a default column width.The column width can range from 1 to 999 pixels. Thedefault column width is 100 pixels.Click OK in the Edit dialog box.7 Click OK in the Column Details dialog box.8 Click Apply.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Distributed Alarm Display Object at Design Time 431Configuring Colors for Alarm RecordsYou can configure colors for various parts of the DistributedAlarm Display object, such as the background color <strong>and</strong> thecolor of selected records. You can also configure differentcolors for alarm records of different ranges.To configure the alarm display colors1 Right-click the Distributed Alarm Display object <strong>and</strong>then click Properties. The Alarm Configuration dialog boxappears.2 Click the Color tab.3 In the General area, click each color box to open the<strong>InTouch</strong> color palette. Click the color that you want touse for each of the following:OptionWindowGridSelection BackSelection TextTitle Bar BackDescriptionSets the display background color.Sets the grid color.Sets the highlighted textbackground color.Sets the highlighted text color.Sets the title bar background color(visible only if the Show Titlesoption is on).<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


432 Appendix A Working with the Distributed Alarm Display ObjectOptionTitle Bar TextAlarm ReturnEventDescriptionSets the title bar text color (visibleonly if the Show Titles option ison).Sets the color of returned alarms(alarms that have returned tonormal without beingacknowledged).Sets the color of event alarms.4 In the Alarm Priority boxes, type the breakpoint values forthe alarm display.5 Click the UnAck Alarm <strong>and</strong> Ack Alarm color boxes to openthe <strong>InTouch</strong> palette. Click the color in the palette thatyou want to use.6 Click OK.Configuring the Display TypeThe Distributed Alarm Display object can show summaries ofactive alarms or listings of historical alarms.You can also change the display type dynamically at runtime. This can be done, for example, by running thealmQuery() script function. The almQuery() script functionuses parameters that you can use to set the specifiedDistributed Alarm Display object (for example: "AlmObj_1")to a specified display type (for example: "Summary"). Formore information, see almQuery() Function on page 472.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Configuring a Distributed Alarm Display Object at Design Time 433To configure the query default1 Right-click the Distributed Alarm Display object <strong>and</strong>then click Properties. The Alarm Configuration dialog boxappears.2 In the Query Type list, click the type of alarm display thatyou want to use for the run-time default.3 Click OK.Using the Distributed Display to Monitor Local<strong>Alarms</strong>You can use the Distributed Alarm Display object to show<strong>and</strong> acknowledge both local <strong>and</strong> remote alarms.To set up a display to monitor just local alarms1 Right-click the Distributed Alarm Display object <strong>and</strong>then click Properties. The Alarm Configuration dialog boxappears.2 In the Alarm Query box, type: \<strong>InTouch</strong>!$SystemYou can substitute any valid alarm group for $System.You can also define an alarm group list containing just\<strong>InTouch</strong>!$System, <strong>and</strong> then use this group list insteadof a direct reference.3 Configure the other parameters for the type of display<strong>and</strong> any filtering your application requires.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


434 Appendix A Working with the Distributed Alarm Display ObjectUsing a Distributed Alarm Display Object atRun TimeThe Distributed Alarm Display object uses a grid to show thealarm messages. This grid allows you to dynamically sizecolumn widths simply by selecting a column h<strong>and</strong>le <strong>and</strong>dragging it to the desired width. This functionality isavailable only during run time.Grid column changes are not saved; therefore, if you makegrid column changes <strong>and</strong> close the window containing thealarm display, the grid columns will again be at their defaultwidth upon re-opening that window. You can adjust thedefault column width in WindowMaker.The grid allows you to select single or multiple alarms in alist box. The selected alarms can be acknowledged by usingthe almAckSelect() QuickScript function. When you configurethe Distributed Alarm Display object, you can also define theselection behavior to allow either toggle selection (item byitem) or multiple selection (holding down CTRL or SHIFTkeys in conjunction with a mouse click to select multiplealarms). You can turn off run-time selection.You can also configure up to eight different colors for eachshown alarm message based on the priority of the alarm <strong>and</strong>whether or not it is acknowledged.The scroll bars are available if they were turned on atconfiguration time.The alarm display object may have controls to page throughalarm records, depending on how the control is configured.Sizable Display ColumnsThe Distributed Alarm Display object uses a grid to hold thealarm messages. At run-time, you can dynamically size thecolumn widths simply by selecting a column <strong>and</strong> dragging it.You can also double-click on the vertical grid line toautomatically size the column. This functionality is availableonly during run time. Column resizing must be turned on atconfiguration time.Grid column changes are not saved when you close thewindow containing the alarm display.Multiple SelectionYou can select a single or multiple alarms in a list box,depending on how the alarm display is configured.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using a Distributed Alarm Display Object at Run Time 435Alarm Message ColorsUp to eight different colors can be used for each shown alarmmessage, based on the priority of the alarm <strong>and</strong> whether it isacknowledged or not.Status BarDepending on how the alarm object is configured, the statusbar shows a status message, the current alarm query, <strong>and</strong> aprogress bar.The left portion of the status bar shows the current status ofthe control.These indicators provide an overview of the current state ofthe display query <strong>and</strong> provide details about the suppressionavailable in the Distributed Alarm Display object. The rightpane of the status bar is red when freeze is in effect <strong>and</strong> theleft pane of the status bar is red when suppression is ineffect. The word "Suppression" shows in the left pane whensuppression is in effect.FeatureStatusMessageAlarm QueryProgress BarDescriptionThe status message at the left end of thestatus bar provides a more detaileddescription of the current query status.The Alarm Query provides a visualindication of the current alarm query.The update progress bar at the right endof the status bar provides a visualindication of the current query progress.The status messages are as follows:Status Message State/Indicator Progress BarNone No Query NoneUpdate<strong>Inc</strong>ompleteUpdateSuccessfulQuery <strong>Inc</strong>ompleteQuery CompleteBlue/GreenRedSuppression Query name Solid BlueFreeze Query name Red<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


436 Appendix A Working with the Distributed Alarm Display ObjectShortcut MenuDepending on how the alarm object is configured, you canright-click on the object to open a shortcut menu for commoncomm<strong>and</strong>s:Click thiscomm<strong>and</strong>Ack SelectedAck OthersSuppressSelectedSuppress OthersQuery FavoritesStatsSuppressionFreezeTo do thisAcknowledge the selected alarm.Acknowledge all alarms in the display,or only visible alarms, selected groups,selected tagnames, <strong>and</strong> priorities.Suppress the selected alarm.Suppress all alarms in the display, oronly visible alarms, selected groups,selected tagname, <strong>and</strong> selectedpriorities.Opens the Alarm Query dialog box,where you can select the query to use.Opens the Alarm Statistics dialog box.Opens the Alarm Suppression dialogbox.Freezes the current display.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using a Distributed Alarm Display Object at Run Time 437Selecting <strong>and</strong> Configuring Alarm Query FavoritesUse the Query Favorites comm<strong>and</strong> on the shortcut menu toquickly select an alarm query from a list of previouslydefined alarm queries. You can also create new namedqueries, edit an existing query, or delete an existing query.Note For multi-line alarm queries appearing in the DistributedAlarm Display, line separations appear as "garbage" characters.This does not affect the function.To select an alarm query for display1 At run time, right-click the Distributed Alarm Display<strong>and</strong> then click Query Favorites. The Alarm Query dialogbox appears.2 In the list of currently defined queries, select the namedquery to use.3 Click OK. The Distributed Alarm Display object shows thealarm information for the selected query.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


438 Appendix A Working with the Distributed Alarm Display ObjectTo add a new named query1 At run time, right-click the Distributed Alarm Display<strong>and</strong> then click Query Favorites. The Alarm Query dialogbox appears.2 Click Add. The Add Query dialog box appears.3 Configure the query. Do the following:abcdeIn the Name box, type the name for the query.In the Query box, type the sets of <strong>InTouch</strong> alarmqueries that you want to perform. You can specify oneor more alarm providers <strong>and</strong> groups.In the From Priority box, type the minimum alarmpriority value (1 to 999). In the To Priority box, typethe maximum alarm priority value (1 to 999).In the Alarm State list, click the alarm state that youwant to use in the alarm query.In the Display Type area, click the type of alarms toshow. For more information, see Summary <strong>Alarms</strong>versus Historical <strong>Alarms</strong> on page 30.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Using a Distributed Alarm Display Object at Run Time 4394 Click OK to close the Add Query dialog box.5 Click OK in the Alarm Query dialog box.To modify an existing named query1 At run time, right-click the Distributed Alarm Display<strong>and</strong> then click Query Favorites. The Alarm Query dialogbox appears.2 In the list of currently defined queries, select the namedquery to modify.3 Click Modify. The Modify Query dialog box appears.4 Make the necessary modifications <strong>and</strong> then click OK toclose the Modify Query dialog box.5 Click OK on the Alarm Query dialog box.Note Modifications are not automatically applied to otherDistributed Alarm Display objects that are using the alarm querybeing modified.To delete an existing named query1 At run time, right-click the Distributed Alarm Display<strong>and</strong> then click Query Favorites. The Alarm Query dialogbox appears.2 In the list of currently defined queries, select the namedquery to modify.3 Click Delete. When a message appears, click Yes.4 Click OK on the Alarm Query dialog box.Note Deletion are not automatically applied to other DistributeAlarm Display objects that are using the alarm query beingdeleted.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


440 Appendix A Working with the Distributed Alarm Display ObjectControlling the Distributed Alarm DisplayObject Using Functions <strong>and</strong> DotfieldsYou can control the Distributed Alarm Display object at runtime using functions <strong>and</strong> .dotfields.For a list of returned error numbers for functions, see ErrorDescriptions on page 503.Getting or Setting PropertiesProperties are accessible through the GetPropertyX()function, where X is the data type (D for Discrete, I forInteger, <strong>and</strong> M for Message). For example:GetPropertyM(ControlName.Property, MsgTag)For more information on the GetPropertyX() functions, seeChapter 6, Built-In Functions, in the <strong>InTouch</strong>® <strong>HMI</strong>Scripting <strong>and</strong> <strong>Logic</strong> <strong>Guide</strong>.When you run the script that includes the GetPropertyX()function, the property value is saved to the MsgTag. Ifmultiple rows are selected, the property assigned to MsgTagis the tag value in the first row of the multiple selection.Acknowledging <strong>Alarms</strong>The Distributed Alarm Display object is capable ofacknowledging any alarms that it can query (summarydisplay only). The Distributed Alarm Display object includesalarm acknowledgment functions. These functionssupplement the .Ack dotfield used to acknowledge localalarms <strong>and</strong> alarm groups. Use these functions toacknowledge all alarms, shown alarms, <strong>and</strong> selected alarms.You can also acknowledge alarms by their characteristics.such as group membership, priority, application name, <strong>and</strong>tag name.• almAckAll() Function• almAckDisplay() Function• almAckGroup() Function• almAckPriority() Function• almAckRecent() Function<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 441• almAckTag() Function• almAckSelect() Function• almAckSelectedGroup() Function• almAckSelectedPriority() Function• almAckSelectedTag() FunctionalmAckAll() FunctionAcknowledges all alarms in a current query, including thosenot currently shown in the Distributed Alarm Display objectin summary mode.Category<strong>Alarms</strong>Syntax[Result=]almAckAll(ObjectName,Comment);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.CommentAlarm acknowledgment comment.ExamplesMessageTag = “Acknowledge All by ” + $Operator;almAckAll(“AlmObj_1”,MessageTag);See AlsoAck(), almAckGroup(), almAckTag(), almAckDisplay(),almAckRecent(), almAckSelect(), almAckSelectedGroup(),almAckSelectedPriority(), almAckSelectedTag()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


442 Appendix A Working with the Distributed Alarm Display ObjectalmAckDisplay() FunctionAcknowledges only those alarms currently visible in theDistributed Alarm Display object in summary mode.Category<strong>Alarms</strong>Syntax[Result=]almAckDisplay(ObjectName,Comment);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.CommentAlarm acknowledgment comment.ExamplealmAckDisplay(“AlmObj_1”,“DisplayAcknowledgement”);See AlsoAck(), almAckAll(), almAckGroup(), almAckTag(),almAckRecent(), almAckSelect(), almAckSelectedGroup(),almAckSelectedPriority(), almAckSelectedTag()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 443almAckGroup() FunctionAcknowledges all alarms shown in the named DistributedAlarm object that match the specified provider <strong>and</strong> groupname.Category<strong>Alarms</strong>Syntax[Result=]almAckGroup( “ObjectName”,ApplicationName, GroupName, Comment);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.ApplicationNameThe name of the Application for example, \\node1\IntouchGroupNameThe name of the <strong>InTouch</strong> alarm group, such as $System.CommentAlarm acknowledgment comment.ExampleMessageTag = “Acknowledge group, Turbines, by ” +$Operator;almAckGroup(“AlmObj_1”, “\Intouch”, “Turbine”,MessageTag);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


444 Appendix A Working with the Distributed Alarm Display ObjectalmAckPriority() FunctionAcknowledges all alarms shown in the named DistributedAlarm object as a result of the last query that match thealarm’s application name, alarm group, <strong>and</strong> priority range.Category<strong>Alarms</strong>Syntax[Result=]almAckPriority(ObjectName,ApplicationName, GroupName, FromPri, ToPri,Comment);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.ApplicationNameThe name of the Application for example, \\node1\IntouchGroupNameThe name of the Group for example, $SystemFromPriStarting number of the alarm priority range. For example,100.ToPriEnding number of the alarm priority range. For example,900.CommentAlarm acknowledgment comment.ExamplealmAckPriority(“AlmObj_1”, “\\node1\Intouch”,“Turbines”, 10, 100, “Range 10 to 100acknowledged”);almAckRecent() FunctionAcknowledges the most recent alarms that have occurred.Syntax[Result=]almAckRecent(ObjectName, Comment)ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.CommentAlarm acknowledgment comment.ExamplealmAckRecent(“AlmObj_1”,$DateString);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 445almAckTag() FunctionAcknowledges all alarms shown in the named DistributedAlarm Display object as a result of the last query. The alarmmust match the application name, group name, tag name,<strong>and</strong> priority range specified by the query.Category<strong>Alarms</strong>Syntax[Result=]almAckTag(“ObjectName”, ApplicationName,GroupName, TagName, FromPri, ToPri, Comment);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.ApplicationNameThe name of the application. For example,\\node1\Intouch.GroupNameThe name of the alarm group. For example, $System.TagNameThe name of the tag whose value is in an alarm state.FromPriStarting number of the alarm priority range. For example,100.ToPriEnding number of the priority range. For example, 900.CommentAlarm acknowledgment comment.ExamplealmAckTag(“AlmObj_1”, “\\node1\Intouch”,“Turbines”, “Valve1”, 10, 100, "Acknowledged forValve1");See AlsoAck(), almAckAll(), almAckGroup(), almAckDisplay(),almAckRecent(), almAckSelect(), almAckSelectedGroup(),almAckSelectedPriority(), almAckSelectedTag()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


446 Appendix A Working with the Distributed Alarm Display ObjectalmAckSelect() FunctionAcknowledges only those alarms selected in the DistributedAlarm Display object in summary mode.Category<strong>Alarms</strong>Syntax[Result=]almAckSelect(ObjectName,Comment);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.CommentAlarm acknowledgment comment.ExampleThis example acknowledges only those alarms that occurredduring the day shift or the night shift.IF ($Hour >= 0 <strong>and</strong> $Hour < 8) THENAckTag = “Night Shift”;ELSEAckTag = “Day Shift”;ENDIF;almAckSelect (“AlmObj_1”,AckTag);See AlsoAck(), almAckAll(), almAckGroup(), almAckTag(),almAckDisplay(), almAckRecent(), almAckSelectedGroup(),almAckSelectedPriority(), almAckSelectedTag()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 447almAckSelectedGroup() FunctionAcknowledges all alarms with same provider <strong>and</strong> groupnames that have the same group name as one or more of thealarms that are selected within the named DistributedAlarm Display object.Category<strong>Alarms</strong>Syntax[Result=]almAckSelectedGroup(ObjectName,Comment);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.CommentAlarm acknowledgment comment.ExampleMessageTag = “Acknowledge selected groups by ” +$Operator;almAckSelectedGroup (“AlmObj_1”, MessageTag);See AlsoAck(), almAckAll(), almAckGroup(), almAckTag(),almAckDisplay(), almAckRecent(), almAckSelect(),almAckSelectedPriority(), almAckSelectedTag()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


448 Appendix A Working with the Distributed Alarm Display ObjectalmAckSelectedPriority() FunctionAcknowledges all alarms with same provider <strong>and</strong> groupnames that have the same priority value as one or more ofthe alarms that are selected within the named DistributedAlarm Display object. The priorities are calculated from theminimum <strong>and</strong> maximum priorities of the selected alarmrecords.Category<strong>Alarms</strong>Syntax[Result=]almAckSelectedPriority(ObjectName,Comment);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.CommentAlarm acknowledgment comment.ExampleMessageTag = “Acknowledge selected priorities by ”+ $Operator;almAckSelectedPriority (“AlmObj_1”, MessageTag);See AlsoAck(), almAckAll(), almAckGroup(), almAckTag(),almAckDisplay(), almAckRecent(), almAckSelect(),almAckSelectedGroup(), almAckSelectedTag()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 449almAckSelectedTag() FunctionAcknowledges all alarms that have the same Tagname fromthe same provider <strong>and</strong> group name <strong>and</strong> having the samepriority as one or more of the selected alarms within thenamed Distributed Alarm Display object.Category<strong>Alarms</strong>Syntax[Result=]almAckSelectedTag(ObjectName,Comment);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.CommentAlarm acknowledgment comment.ExampleMessageTag = “Acknowledge selected tagnames by ” +$Operator;almAckSelectedTag (“AlmObj_1”, MessageTag);See AlsoAck(), almAckAll(), almAckGroup(), almAckTag(),almAckDisplay(), almAckRecent(), almAckSelect(),almAckSelectedGroup(), almAckSelectedPriority()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


450 Appendix A Working with the Distributed Alarm Display ObjectSelecting <strong>Alarms</strong>You can create scripts to select alarms from a DistributedAlarm Display object. You can select all alarms, only selectedalarms, or obtain a count of current alarms.• almSelectAll() Function• almUnselectAll() Function• almSelectionCount() Function• almSelectGroup() Function• almSelectItem() Function• almSelectPriority() Function• almSelectTag() FunctionYou can also select specific alarms based upon the datasource, alarm priority, <strong>and</strong> <strong>InTouch</strong> tags.almSelectAll() FunctionToggles the selection of all the alarms in a named DistributedAlarm Display object.Category<strong>Alarms</strong>Syntax[Result=]almSelectAll(ObjectName);ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.ExampleIf $AccessLevel > 8000 THENalmSelectAll(“AlmObj_1”);almAckSelect(“AlmObj_1”, “Ack Selected by aManager”);ENDIF;See AlsoalmSelectItem(), almSelectGroup(), almSelectPriority(),almSelectTag(), almUnSelectAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 451almUnselectAll() FunctionUnselects all selected alarms in a named Distributed AlarmDisplay object.Category<strong>Alarms</strong>Syntax[Result=]almUnselectAll(ObjectName);ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.ExampleIf $AccessLevel == 9999 THENalmAckSelect(“AlmObj_1”, “Comment”);{Thisalarm can be acknowledged by onlyAdministrator}ELSEalmUnselectAll(“AlmObj_1”);ENDIF;See AlsoalmSelectAll(), almSelectItem(), almSelectGroup(),almSelectPriority(), almSelectTag()almSelectionCount() FunctionReturns the number of alarms selected by the operator in theDistributed Alarm Display object.Category<strong>Alarms</strong>Syntax[Result=]almSelectionCount(ObjectName);ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.ExampleThe AlarmCount tag is assigned the number of alarmsselected by the operator from the Distributed Alarm Displayobject.AlarmCount = almSelectionCount(“AlmObj_1”);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


452 Appendix A Working with the Distributed Alarm Display ObjectalmSelectGroup() FunctionToggles the selection of all alarms that are contained by anamed Distributed Alarm Display object as a result of thedisplay’s last query <strong>and</strong> where the resultant alarm containsthe same alarm group name.Category<strong>Alarms</strong>Syntax[Result=]almSelectGroup(ObjectName,ApplicationName,GroupName);ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.ApplicationNameThe name of the Application. For example,\\node1\Intouch.GroupNameThe name of the Group. For example, $System.ExamplealmSelectGroup(“AlmObj_1”,“\<strong>InTouch</strong>”,“Turbine”);See AlsoalmSelectAll(), almSelectItem(), almSelectPriority(),almSelectTag(), almUnSelectAll()almSelectItem() FunctionToggles the selection of the last selected or unselected item inan alarm display object.Syntax[Result=]almSelectItem(ObjectName);ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.ExamplealmSelectItem(“AlmObj_1”);See AlsoalmSelectAll(), almSelectGroup(), almSelectPriority(),almSelectTag(), almUnSelectAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 453almSelectPriority() FunctionToggles the selection of all alarms in a named DistributedAlarm Display object as a result of the display’s last query<strong>and</strong> where the resultant alarms are within the specifiedpriority range.Category<strong>Alarms</strong>Syntax[Result=]almSelectPriority( "objectName",ApplicationName, GroupName, FromPri, ToPri );ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.ApplicationNameThe name of the Application. For example,\\node1\Intouch.GroupNameThe name of the Group. For example, $System.FromPriStarting priority of alarms. For example, 100 or integer tag.ToPriEnding priority of alarms. For example, 900 or integer tag.ExamplealmSelectPriority(“AlmObj_1”,“\\node1\Intouch”,“Turbines”,10,100);See AlsoalmSelectAll(), almSelectItem(), almSelectGroup(),almSelectTag(), almUnSelectAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


454 Appendix A Working with the Distributed Alarm Display ObjectalmSelectTag() FunctionToggles the selection of all alarms in a named DistributedAlarm Display object as a result of the display’s last query<strong>and</strong> given tag name.Category<strong>Alarms</strong>Syntax[Result=]almSelectTag (ObjectName,ApplicationName, GroupName, TagName, FromPri,ToPri);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.ApplicationNameThe name of the Application. For example,\\node1\Intouch.GroupNameThe name of the Group. For example, $System.TagNameThe name of the alarm tag.FromPriStarting priority of alarms. For example, 100 or integer tag.ToPriEnding priority of alarms. For example, 900 or integer tag.ExamplealmSelectTag(“AlmObj_1”,“\\node1\Intouch”,“Turbines”,“Valve1”,10,100);See AlsoalmSelectAll(), almSelectItem(), almSelectGroup(),almSelectPriority(), almUnSelectAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 455Retrieving Information about a Selected AlarmRecordYou can create scripts that return information about selectedalarms. Use the following dotfields in your script:• .AlarmTime Dotfield• .AlarmDate Dotfield• .AlarmName Dotfield• .AlarmValue Dotfield• .AlarmClass Dotfield• .AlarmType Dotfield• .AlarmState Dotfield• .AlarmLimit Dotfield• .AlarmPri Dotfield• .AlarmGroupSel Dotfield• .AlarmAccess Dotfield• .AlarmProv Dotfield• .AlarmOprName Dotfield• .AlarmOprNode Dotfield• .AlarmComment Dotfield<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


456 Appendix A Working with the Distributed Alarm Display Object.AlarmTime DotfieldReturns the time when an alarm occurred. The alarm mustbe selected in Distributed Alarm Display object in summarymode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmTime",TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleIn this example, AlmObj_1 is the name of the DistributedAlarm Display object <strong>and</strong> almTime is a memory message tag.GetPropertyM("AlmObj_1.AlarmTime",almTime);If used in a Touch Pushbutton QuickScript, this statementreturns the time when the alarm occurred to the almTimetag.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName,.AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv,.AlarmState, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 457.AlarmDate DotfieldReturns the date associated with a selected alarm. The alarmhas to be selected by clicking on the Distributed AlarmDisplay object in summary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmDate",TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleIf used in a Touch Pushbutton QuickScript, this statementreturns the date to the almDate tag.GetPropertyM("AlmObj_1.AlarmDate",almDate);AlmObj_1 is the name of the Distributed Alarm Displayobject <strong>and</strong> almDate is a memory message tag that retrievesthe date for the tag associated with the selected alarm.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmLimit, .AlarmName,.AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv,.AlarmState, .AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


458 Appendix A Working with the Distributed Alarm Display Object.AlarmName DotfieldReturns the name of the tag associated with a selected alarm.The alarm has to be selected by clicking the DistributedAlarm Display object in summary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmName",TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleIf used in a Touch Pushbutton QuickScript, this statementreturns the name of the alarm to almName.GetPropertyM("AlmObj_1.AlarmName",almName);Where AlmObj_1 is the name of the Distributed AlarmDisplay object <strong>and</strong> almName is a memory message tag thatretrieves the name of the tag associated with the selectedalarm.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmDate, .AlarmLimit,.AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv,.AlarmState, .AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 459.AlarmValue DotfieldReturns the value of the alarm for the tag associated with theselected alarm. The alarm has to be selected by clicking theDistributed Alarm Display object in summary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmValue,TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)RemarksThis function uses a message tag to retrieve the numericvalue. This is because the GetProperty functions do notsupport real numbers. You can use the StringToReal()function to assign the result to a real tag.ExampleIf used in a Touch Pushbutton QuickScript, this statementreturns the value to almValue.GetPropertyM("AlmObj_1.AlarmValue", almValue);Where AlmObj_1 is the name of the Distributed AlarmDisplay object <strong>and</strong> almValue is a memory message tagcontaining the alarm value for the tag associated with theselected alarm.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmDate, .AlarmLimit,.AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv,.AlarmState, .AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


460 Appendix A Working with the Distributed Alarm Display Object.AlarmClass DotfieldReturns the class of alarm for the tag associated with aselected alarm. The alarm must be selected from theDistributed Alarm Display object in summary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmClass",Tagname);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleThe following statement returns the alarm class associatedwith the selected alarm.GetPropertyM("AlmObj_1.AlarmClass",almClass);AlmObj_1 is the name of the Distributed Alarm Displayobject <strong>and</strong> almClass is a memory message tag containing theclass of alarm for the tag associated with the selected alarm.If used in a Touch Pushbutton QuickScript, this statementreturns the alarm class of the alarm to the almClass tag.See AlsoGetPropertyM(), .AlarmAccess, .AlarmComment,.AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName,.AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState,.AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 461.AlarmType DotfieldReturns the alarm type for the tag associated with a selectedalarm. The alarm has to be selected by clicking theDistributed Alarm Display object in summary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmType”,TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleIf used in a Touch Pushbutton QuickScript, this statementreturns the type of the selected alarm to the almType tagwhen the operator acknowledges the alarm.GetPropertyM("AlmObj_1.AlarmType",almType);Where AlmObj_1 is the name of the Distributed AlarmDisplay object <strong>and</strong> almType is a memory message tagcontaining the alarm type for the tag associated with theselected alarm.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName,.AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv,.AlarmState, .AlarmTime, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


462 Appendix A Working with the Distributed Alarm Display Object.AlarmState DotfieldReturns the state of the selected alarm. The alarm has to beselected by clicking the Distributed Alarm Display object insummary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmState",TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleIf used in a Touch Pushbutton QuickScript, this statementreturns the state of the selected alarm to the almState tag.GetPropertyM("AlmObj_1.AlarmState",almState);Where AlmObj_1 is the name of the Distributed AlarmDisplay object <strong>and</strong> almState is a memory message tagcontaining the alarm state for the tag associated with theselected alarm.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName,.AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv,.AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 463.AlarmLimit DotfieldReturns the limit for the tag associated with a selectedalarm. The alarm has to be selected by clicking theDistributed Alarm Display object in summary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmLimit",TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)RemarksThis function uses a message tag to retrieve the numericvalue. This is because the GetProperty functions do notsupport real numbers. You can use the StringToReal()function to assign the result to a real tag.ExampleIf used in a pushbutton QuickScript, this statement returnsthe limit of the selected alarm to the almLimit tag.GetPropertyM("AlmObj_1.AlarmLimit",almLimit);Where AlmObj_1 is the name of the Distributed AlarmDisplay object <strong>and</strong> almLimit is a memory message containingthe alarm limit for the tag associated with the selectedalarm.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmDate, .AlarmName,.AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv,.AlarmState, .AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


464 Appendix A Working with the Distributed Alarm Display Object.AlarmPri DotfieldReturns the priority (1-999) for the tag associated with aselected alarm. The alarm must be selected by clicking theDistributed Alarm Display object in summary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmPri",TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleIf used in a Touch Pushbutton QuickScript, this statementreturns the alarm priority to the almPrilvl tag.GetPropertyM("AlmObj_1.AlarmPri",almPrilvl);Where AlmObj_1 is the name of the Distributed AlarmDisplay object <strong>and</strong> almPrilvl is a memory message tagcontaining the priority level of the tag associated with theselected alarm.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName,.AlarmOprName, .AlarmOprNode, .AlarmProv, .AlarmState,.AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 465.AlarmGroupSel DotfieldReturns the alarm group of the tag associated with a selectedalarm. The alarm has to be selected by clicking on theDistributed Alarm Display object in summary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmGroupSel",TagName);ParameterObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleIf used in a Touch Pushbutton QuickScript, this statementreturns the name of the alarm group to the almGroup tag.GetPropertyM("AlmObj_1.AlarmGroupSel",almGroup);Where AlmObj_1 is the name of the Distributed AlarmDisplay object <strong>and</strong> almGroup is a memory message tagcontaining the alarm group of the tag associated with theselected alarm.See AlsoGetPropertyM(), .AlarmGroup, .AlarmName<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


466 Appendix A Working with the Distributed Alarm Display Object.AlarmAccess DotfieldReturns the Access Name of the tag associated with aselected alarm. The alarm record must be selected by clickingon the Distributed Alarm Display object in summary mode.Category<strong>Alarms</strong>UsageGetPropertyM("Objectname.AlarmAccess",TagName);ParameterObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleIf used in a Touch Pushbutton QuickScript, this statementreturns the Access Name of the tag associated with the alarmto the almAccess tag.GetPropertyM("AlmObj_1.AlarmAccess",almAccess);Where AlmObj_1 is the name of the Distributed AlarmDisplay object <strong>and</strong> almAccess is a memory message tagcontaining the Access Name of the tag associated with theselected alarm.See AlsoGetPropertyM(), .AlarmClass, .AlarmComment, .AlarmDate,.AlarmLimit, .AlarmName, .AlarmOprName,.AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState,.AlarmTime, .AlarmType<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 467.AlarmProv DotfieldReturns the alarm provider for the tag associated with aselected alarm. The alarm has to be selected by clicking theDistributed Alarm Display object in summary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmProv",TagName);ParameterObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleIf used in a Touch Pushbutton QuickScript, this statementreturns the provider name to the almProv tag.GetPropertyM("AlmObj_1.AlarmProv", almProv);AlmObj_1 is the name of the Distributed Alarm Displayobject <strong>and</strong> almProv is a memory message tag containing thename of the provider for the tag associated with the selectedalarm.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName,.AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmState,.AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


468 Appendix A Working with the Distributed Alarm Display Object.AlarmOprName DotfieldReturns the name of the logged on operator whoacknowledged the selected alarm. The alarm has to beselected by clicking the Distributed Alarm Display object insummary mode.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmOprName",TagName);ParameterObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleGetPropertyM("AlmObj_1.AlarmOprName",almOprName);Where AlmObj_1 is the name of the Distributed AlarmDisplay object <strong>and</strong> almOprName is a memory message tagcontaining the name of the operator responding to the alarmassociated with the tag.If used in a Touch Pushbutton QuickScript, this statementreturns the name of the operator to the almOprName tag.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName,.AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState,.AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 469.AlarmOprNode DotfieldReturns the operator node for the tag associated with aselected alarm. The alarm must be selected by clicking theDistributed Alarm Display object in summary mode.When an alarm is acknowledged in a Terminal Servicesenvironment, the Operator Node is the name of the clientmachine that the respective operator established theTerminal Services session from. If the node name cannot beretrieved, the node's IP address is used instead.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmOprNode",TagName);ParameterObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleGetPropertyM("AlmObj_1.AlarmOprNode",almOprNode);Where AlmObj_1 is the name of the Distributed AlarmDisplay object <strong>and</strong> almOprNode is a memory message tagcontaining the name of the operator's node for the tagassociated with the selected alarm.If used in a Touch Pushbutton QuickScript, this statementreturns the operator’s node to the almOprNode tag.See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass,.AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName,.AlarmOprName, .AlarmPri, .AlarmProv, .AlarmState,.AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


470 Appendix A Working with the Distributed Alarm Display Object.AlarmComment DotfieldReturns the alarm comment, which is a read/write text stringthat describes the alarm, not the tag. By default, thecomment is empty in a new application.However, when an old <strong>InTouch</strong> application is converted to<strong>InTouch</strong> version 7.11 or later, the tag comment is copied tothe .AlarmComment dotfield for backward compatibility.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmComment",TagName);ParameterObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny message tag.Data TypeString (read-only)ExampleThe following example returns the alarm comment for a tagselected in the AlmObj_1 Distributed Alarm Display object<strong>and</strong> places it in the almComment tag :GetPropertyM(“AlmObj_1.AlarmComment”,almComment);See AlsoGetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmDate,.AlarmLimit, .AlarmName, .AlarmOprName,.AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState,.AlarmTime, .AlarmType, .AlarmValue<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 471Setting the Alarm QueryUse the following query functions to retrieve records from thealarm memory.• almDefQuery() Function• almQuery() Function• almSetQueryByName() FunctionalmDefQuery() FunctionPerforms a query using default properties to update a namedDistributed Alarm Display object.Category<strong>Alarms</strong>Syntax[Result=]almDefQuery(ObjectName);ArgumentObjectNameThe name of the Distributed Alarm Display object. Forexample, AlmObj_1.RemarksThe default query properties are specified while developingthe Distributed Alarm Display object in WindowMaker.ExamplealmDefQuery(“AlmObj_1”);See AlsoalmQuery(), almSetQueryByName()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


472 Appendix A Working with the Distributed Alarm Display ObjectalmQuery() FunctionPerforms a query to update a named Distributed AlarmDisplay object <strong>and</strong> uses the specified parameters.Category<strong>Alarms</strong>Syntax[Result=]almQuery(ObjectName,AlarmList,FromPri,ToPri,State,Type);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.AlarmListSets the Alarm Query/Name Manager alias to perform thequery against, for example, "\intouch!$System" or aMessage tag.FromPriStarting priority of alarms to show. For example, 100 orinteger tag.ToPriEnding priority of alarms to show. For example, 900 orinteger tag.StateSpecifies type of alarms to show. For example, "UnAck" orMessage tag. Valid states are All, UnAck or Ack.TypeThe type of alarm records that appear in the updateddisplay:"Hist" = Historical alarms"Summ" = Summary alarmsExampleThis statement retrieves all historical alarms specified inMyAlarmListGroup with a priority of 500 to 600. The alarmsappear in the AlmObj_1 alarm display.almQuery("AlmObj_1","MyAlarmListGroup",500,600,"All","Hist");In this example, MyAlarmListGroup is an alarm listconfigured from the Name Manager setup.See AlsoalmDefQuery(), almSetQueryByName()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 473almSetQueryByName() FunctionStarts a new alarm query for the named instance of theDistributed Alarm Display object using the parameters froma user-defined query favorite file.Category<strong>Alarms</strong>Syntax[Result=]almSetQueryByName(ObjectName,QueryName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.QueryNameThe name of the query created by using Query Favorites.RemarksThis is a query for the particular instance of the DistributedAlarm Display object. There may be several such displays onthe screen, each with its own query.ExampleThis example starts a new query using parameters from thequery named “Turbine Queries.”almSetQueryByName(“AlmObj_1”,“Turbine Queries”);See AlsoalmQuery(), almDefQuery()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


474 Appendix A Working with the Distributed Alarm Display ObjectChecking the Current Query PropertiesUse the following dotfields to return the status of alarmmemory queries.• .AlarmGroup Dotfield• .QueryType Dotfield• .QueryState Dotfield• .Successful Dotfield• .PriFrom Dotfield• .PriTo Dotfield.AlarmGroup DotfieldContains the current query used to populate a DistributedAlarm Display object.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyM("ObjectName.AlarmGroup",TagName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.TagNameAny message tag.RemarksThis read-only dotfield contains the current alarm queryused by the named Distributed Alarm Display object. Thisquery can be a list of alarm groups or direct alarm providerreferences.Data TypeString (read-only)ExampleThis statement returns the current alarm query used by theAlmObj_1 Distributed Alarm Display object to theCurrentQuery tag:GetPropertyM("AlmObj_1.AlarmGroup",CurrentQuery);See AlsoGetPropertyM(), .AlarmGroupSel, .AlarmName<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 475.QueryType DotfieldShows the current type of alarm query.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyI("ObjectName.QueryType",TagName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.TagNameAny integer tagRemarksThis read-only dotfield contains the current query type usedby a named Distributed Alarm Display object.Data TypeInteger (read-only)Valid Values1 = Historical2 = SummaryExampleThe following statement returns the current query type ofthe AlmObj_1 Distributed Alarm Display object to theAlmQueryType tag:GetPropertyI("AlmObj_1.QueryType",AlmQueryType);See AlsoGetPropertyI(), .QueryState<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


476 Appendix A Working with the Distributed Alarm Display Object.QueryState DotfieldShows the current alarm state query filter.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyI("ObjectName.QueryState",TagName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.TagNameAny integer tagRemarksThis read-only dotfield contains the current query filter usedby a named Distributed Alarm Display object.Data TypeInteger (read-only)Valid Values0 = All1 = Unacknowledged2 = AcknowledgedExampleThe following statement returns the current query filter ofthe AlmObj_1 Distributed Alarm Display object to theAlmQueryState tag:GetPropertyI("AlmObj_1.QueryState",AlmQueryState);See AlsoGetPropertyI(), .QueryType<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 477.Successful DotfieldIndicates whether the current query is successful or not.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyD("ObjectName.Successful",TagName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.TagNameA discrete tag that holds the property value when thefunction is processed.RemarksThis read-only dotfield contains the state of the last queryused by a named Distributed Alarm Display object.Data TypeDiscrete (read-only)Valid Values0 = Error in query1 = Successful queryExampleThe following statement returns the status of the last queryof the AlmObj_1 Distributed Alarm Display object to theAlmFlag tag:GetPropertyD("AlmObj_1.Successful",AlmFlag);See AlsoGetPropertyD()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


478 Appendix A Working with the Distributed Alarm Display Object.PriFrom DotfieldReturns the minimum value of an alarm priority range usedby the current query.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyI("ObjectName.PriFrom",Tagname);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAny integer tag.Data TypeInteger (read-only)ExampleThe following statement returns the minimum priority valueof the query used by Distributed Alarm Display objectAlmObj_1to the MinPri integer tag:GetPropertyI("AlmObj_1.PriFrom",MinPri);See AlsoGetPropertyI(), .PriTo, .AlarmPri<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 479.PriTo DotfieldContains the maximum value of the alarm priority rangeused by the current query.Usage[ErrorNumber=]GetPropertyI("ObjectName.PriTo",Tagname);ParameterObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAn integer tag that holds the property value when thefunction is processed.Data TypeInteger (read-only)ExampleThe following statement returns the maximum priority valueof the query used by AlmObj_1 Distributed Alarm Displayobject to the MaxPri integer tag:GetPropertyI("AlmObj_1.PriTo",MaxPri);See AlsoGetPropertyI(), .PriFrom, .AlarmPri<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


480 Appendix A Working with the Distributed Alarm Display ObjectChecking for Updates to the Distributed AlarmDisplay ObjectUse the following dotfields to find out whether theDistributed Alarm Display object contains all current alarmsor if there are pending updates.• .ListChanged Dotfield• .PendingUpdates Dotfield.ListChanged DotfieldIndicates whether there are any new alarms or updates forthe Distributed Alarm Display object.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyD(“ObjectName.ListChanged”,TagName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.TagNameA discrete tag that holds the property value when thefunction is processed.RemarksThis read-only dotfield contains the status about whetherthere have been any changes that need to be updated in theDistributed Alarm Display object. This property isautomatically reset on reading the property.Data TypeDiscrete (read-only)Valid Values0 = No new alarms or updates for the display object1 = New updates for the display objectExampleThe following statement returns the status of any newalarms or updates for the AlmObj_1 Distributed AlarmDisplay object to the AlmDispStat tag:GetPropertyD(“AlmObj_1.ListChanged”,AlmDispStat);See AlsoGetPropertyD()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 481.PendingUpdates DotfieldIndicates the number of pending updates to the DistributedAlarm Display object. There are pending updates usuallywhen the display is frozen <strong>and</strong> new alarm records arecreated. These do not show, but the pending updates count isincreased.Category<strong>Alarms</strong>Usage[ErrorMessage=]GetPropertyI(“ObjectName.PendingUpdates”, TagName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.TagNameAn integer tag that holds the property value when thefunction is processed.RemarksThis read-only dotfield contains the number of pendingupdates for a named Distributed Alarm Display object. Anyvalue greater than zero indicates the Distributed AlarmDisplay object has new alarm data. This value is reset eachtime the object is refreshed.Data TypeInteger (read-only)ExampleThe following statement returns an integer 1 or greater ifthere are any pending updates for the AlmObj_1 DistributedAlarm Display object to the AlarmPendingUpdates tag:GetPropertyI(“AlmObj_1.PendingUpdates”,AlarmPendingUpdates);See AlsoGetPropertyI()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


482 Appendix A Working with the Distributed Alarm Display ObjectSuppressing <strong>Alarms</strong>The Distributed Alarm Display object can suppress one ormore alarms at an alarm consumer that match exclusioncriteria. If an alarm matches the exclusion criteria, it doesnot appear in the instance of the display.You can use QuickScript functions to suppress alarms.• almSuppressAll() Function• almUnsuppressAll() Function• almSuppressDisplay() Function• almSuppressGroup() Function• almSuppressPriority() Function• almSuppressTag() Function• almSuppressSelected() Function• almSuppressSelectedGroup() Function• almSuppressSelectedPriority() Function• almSuppressSelectedTag() Function• almSuppressRetain() Function• .SuppressRetain Dotfield<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 483almSuppressAll() FunctionSuppresses the showing of all current <strong>and</strong> future instances ofthe alarms in the current query, including those notcurrently shown in the Distributed Alarm Display object insummary mode.Syntax[Result=] almSuppressAll(ObjectName);ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.RemarksThis function works like almAckAll(), identifying whichalarms to suppress by identifying all alarms that you wouldsee if you looked at the display <strong>and</strong> scrolled up <strong>and</strong> down tolook at them all.ExamplealmSuppressAll(“AlmObj_1”);See AlsoalmSuppressGroup(), almSuppressTag(),almSuppressDisplay(), almSuppressPriority(),almSuppressRetain(), almSuppressSelected(),almSuppressSelectedGroup(),almSuppressSelectedPriority(), almSuppressSelectedTag(),almUnSuppressAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


484 Appendix A Working with the Distributed Alarm Display ObjectalmUnsuppressAll() FunctionClears all suppressed alarms.Syntax[Result=] almUnSuppressAll(ObjectName);ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.ExamplealmUnSuppressAll(“AlmObj_1”);See AlsoalmSuppressAll(), almSuppressGroup(), almSuppressTag(),almSuppressDisplay(), almSuppressPriority(),almSuppressRetain(), almSuppressSelected(),almSuppressSelectedGroup(),almSuppressSelectedPriority(), almSuppressSelectedTag()almSuppressDisplay() FunctionSuppresses the showing of current <strong>and</strong> future occurrences ofalarms visible in the Distributed Alarm Display object insummary mode.Syntax[Result=]almSuppressDisplay(ObjectName);ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.RemarksThis function works like the corresponding almAckDisplay()function, identifying which alarms to suppress by identifyingall alarms that are currently shown.ExamplealmSuppressDisplay(“AlmObj_1”);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 485almSuppressGroup() FunctionSuppresses the showing of current <strong>and</strong> future occurrences ofany alarm with the specified provider <strong>and</strong> group name.Syntax[Result=]almSuppressGroup(ObjectName,ApplicationName,GroupName);ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.ApplicationNameThe name of the application. For example,\\node1\<strong>InTouch</strong>GroupNameThe name of the alarm group. For example, $SystemExamplealmSuppressGroup(“AlmObj_1”,“\<strong>InTouch</strong>”,“Turbines”);See AlsoalmSuppressAll(), almSuppressTag(), almSuppressDisplay(),almSuppressPriority(), almSuppressRetain(),almSuppressSelected(), almSuppressSelectedGroup(),almSuppressSelectedPriority(), almSuppressSelectedTag(),almUnSuppressAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


486 Appendix A Working with the Distributed Alarm Display ObjectalmSuppressPriority() FunctionSuppresses the showing of current <strong>and</strong> future occurrences ofany alarm of the specified priority range having the sameprovider name <strong>and</strong> Group name.Syntax[Result=]almSuppressPriority(ObjectName,ApplicationName, GroupName, FromPri, ToPri);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.ApplicationNameThe name of the application. For example,\\node1\<strong>InTouch</strong>GroupNameThe name of the Group. For example, $SystemFromPriStarting priority of alarms. For example, 100 or Integer tag.ToPriEnding priority of alarms. For example, 900 or Integer tag.ExamplealmSuppressPriority(“AlmObj_1”,“\\node1\Intouch”,“Turbines”,10,100);See AlsoalmSuppressAll(), almSuppressGroup(), almSuppressTag(),almSuppressDisplay(), almSuppressRetain(),almSuppressSelected(), almSuppressSelectedGroup(),almSuppressSelectedPriority(), almSuppressSelectedTag(),almUnSuppressAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 487almSuppressTag() FunctionSuppresses the showing of current <strong>and</strong> future occurrences ofany alarm that belongs to the specified tagname having thesame provider name, group name, <strong>and</strong> priority range.Category<strong>Alarms</strong>Syntax[Result=]almSuppressTag(ObjectName,ApplicationName, GroupName, TagName, FromPri,ToPri, AlarmClass, AlarmType);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.ApplicationNameThe name of the application. For example,\\node1\<strong>InTouch</strong>GroupNameThe name of the Group. For example, $SystemTagNameThe name of the alarm tag.FromPriStarting priority of alarms. For example, 100 or Integer tag.ToPriEnding priority of alarms. For example, 900 or Integer tag.AlarmClassThe class of the alarm. For example, “Value.”AlarmTypeThe alarm type of the alarm. For example, “HiHi.”ExamplealmSuppressTag(“AlmObj_1”,“\\node1\Intouch”,“Turbines”,“Valve1”,10,100,“Value”,“LoLo”);See AlsoalmSuppressAll(), almSuppressGroup(),almSuppressDisplay(), almSuppressPriority(),almSuppressRetain(), almSuppressSelected(),almSuppressSelectedGroup(),almSuppressSelectedPriority(), almSuppressSelectedTag(),almUnSuppressAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


488 Appendix A Working with the Distributed Alarm Display ObjectalmSuppressSelected() FunctionSuppresses the showing of current <strong>and</strong> future occurrences ofthe alarms selected in the Distributed Alarm Display objectin summary mode.Category<strong>Alarms</strong>Syntax[Result=]almSuppressSelected(ObjectName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.RemarksThis functions works like the almAckSelect() function,identifying the alarms by the ones selected in the displayobject.ExamplealmSuppressSelected(“AlmObj_1”);See AlsoalmSuppressAll(), almSuppressGroup(), almSuppressTag(),almSuppressDisplay(), almSuppressPriority(),almSuppressSelectedGroup(),almSuppressSelectedPriority(), almSuppressSelectedTag(),almUnSuppressAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 489almSuppressSelectedGroup() FunctionSuppresses the showing of current <strong>and</strong> future occurrences ofthe alarms that belong to the same groups of one or moreselected alarms having the same provider name within thenamed Distributed Alarm Display object.Category<strong>Alarms</strong>Syntax[Result=]almSuppressSelectedGroup(ObjectName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.RemarksThis functions works like the almAckSelectedGroup()function, identifying the alarms that are selected, thenidentifying the groups to which they belong, <strong>and</strong> suppressingfuture occurrences of the alarms from those groups.ExamplealmSuppressSelectedGroup(“AlmObj_1”);See AlsoalmSuppressAll(), almSuppressGroup(), almSuppressTag(),almSuppressDisplay(), almSuppressSelected(),almSuppressSelectedPriority(), almSuppressSelectedTag()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


490 Appendix A Working with the Distributed Alarm Display ObjectalmSuppressSelectedPriority() FunctionSuppresses the showing of current <strong>and</strong> future occurrences ofthe alarms that belong to the same priority of one or moreselected alarms having the same provider name <strong>and</strong> Grouptag within the named Distributed Alarm Display object.Category<strong>Alarms</strong>Syntax[Result=]almSuppressSelectedPriority(ObjectName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.RemarksThe priorities are calculated from the minimum <strong>and</strong>maximum of the selected alarm records.This function works like the almAckSelectedPriority()function, identifying the alarms selected in the display, thenidentifying the corresponding priorities of those alarms, <strong>and</strong>suppressing future occurrences of alarms with the samepriorities.ExamplealmSuppressSelectedPriority(“AlmObj_1”);See AlsoalmSuppressAll(), almSuppressGroup(),almSuppressTagName(), almSuppressDisplay(),almSuppressSelected(), almSuppressSelectedGroup(),almSuppressSelectedTag(), almAckSelectedPriority()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 491almSuppressSelectedTag() FunctionSuppresses the showing of current <strong>and</strong> future occurrences ofany alarm that belongs to the same Tagname name of one ormore selected alarms having the same provider name, groupname, <strong>and</strong> priority range.Category<strong>Alarms</strong>Syntax[Result=]almSuppressSelectedTag(ObjectName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.ExamplealmSuppressSelectedTag(“AlmObj_1”);See AlsoalmSuppressAll(), almSuppressGroup(), almSuppressTag(),almSuppressDisplay(), almSuppressSelectedAlarm(),almSuppressSelectedGroup(),almSuppressSelectedPriority(), almAckSelectedTag(),almUnSuppressAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


492 Appendix A Working with the Distributed Alarm Display ObjectalmSuppressRetain() FunctionSuppresses all alarms raised by subsequent queries.Category<strong>Alarms</strong>Syntax[Result=]almSuppressRetain(ObjectName,SuppressionRetainFlag);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.SuppressionRetainFlagAny discrete or analog tag, 0, or non-zero value. TRUE ifsuppression information is retained for following queries,FALSE otherwise.RemarksIf the flag is 0 when the alarm query is changed, thesuppression filters are removed.ExamplealmSuppressRetain(“AlmObj_1”, 0);See AlsoalmSuppressAll(), almSuppressGroup(), almSuppressTag(),almSuppressDisplay(), almSuppressPriority(),almSuppressSelected(), almSuppressSelectedGroup(),almSuppressSelectedPriority(), almSuppressSelectedTag(),almUnSuppressAll()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 493.SuppressRetain DotfieldReads/writes the status of the feature that retains thesuppression for the Distributed Alarm Display object.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyD(“ObjectName.SuppressRetain”,TagName);[ErrorNumber=]SetPropertyD(“ObjectName.SuppressRetain”,TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagnameA discrete tag that holds the property value when the scriptis processed.Data TypeDiscrete (read-write)Valid Values0 = Retain Off1 = Retain OnExample(s)The following statement sets the status of suppressionretainer for the “AlmObj_1” from the SupRtn discrete tag:SetPropertyD(“AlmObj_1.SuppressRetain”, SupRtn);See AlsoGetPropertyD(), SetProperty()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


494 Appendix A Working with the Distributed Alarm Display ObjectScrolling the Alarm DisplayUse the following function <strong>and</strong> dotfields to scroll the alarmlist within the Distributed Alarm Display object vertically orhorizontally. You can also freeze the display.• almMoveWindow() Function• .Freeze Dotfield• .PrevPage Dotfield• .NextPage dotfieldalmMoveWindow() FunctionScrolls the alarm list of the Distributed Alarm Display objectvertically or horizontally.Category<strong>Alarms</strong>Syntax[Result=]almMoveWindow(ObjectName,Option,Repeat);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.OptionThe type of scrolling action to perform:TypeLineDnLineUpPageDnPageUpTopBottomPageRtPageLfRightLeftDescriptionOne line down.One line up.One page down.One page up.To the top of the list.To the bottom of the list.One page to the right.One page to the left.To the end of the list (right side).To the beginning of the list (left side).RepeatThe number of times this operation should be repeated.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 495ExamplealmMoveWindow(“AlmObj_1”, ”Bottom”, 0);almMoveWindow(“AlmObj_1”, ”LineDn”, 3);almMoveWindow(“AlmObj_1”, ”PageUp”, 0);.Freeze DotfieldThe .Freeze dotfield reads the freeze status orfreezes/unfreezes the Distributed Alarm Display object.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyD(“ObjectName.Freeze”,TagName);[ErrorNumber=]SetPropertyD(“ObjectName.Freeze”,TagName);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.TagNameA discrete tag that holds the property value when thefunction is processed.RemarksA read-write dotfield that contains or changes the freezestatus of a Distributed Alarm Display object. When the alarmdisplay object is frozen, the shown alarms cannot be updatednor can new alarms be added. Freeze has no effect onwhether the alarms flash or not.Data TypeDiscrete (read-write)Valid Values0 = Freeze OFF1 = Freeze ONExampleThe following statement sets the Freeze property for the“AlmObj_1” from the AlmFreeze discrete tag.SetPropertyD(“AlmObj_1.Freeze”,AlmFreeze);See AlsoGetPropertyD(), SetPropertyD()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


496 Appendix A Working with the Distributed Alarm Display Object.PrevPage DotfieldScrolls the Distributed Alarm Display object one page (onescreen full of alarms) up.Category<strong>Alarms</strong>Usage[ErrorNumber=]SetPropertyD("ObjectName.PrevPage",0);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.RemarksWhen this property is set, the Distributed Alarm Displayobject shows the previous page. After the previous page isshown, the variable is automatically set to 1, unless the topof the list has been reached. In this case, the value remains 0.Data TypeDiscrete (read/write)See AlsoGetPropertyD(), SetPropertyD(), .NextPage, .PageNum,.TotalPages.NextPage dotfieldScrolls the Distributed Alarm Display object one page (onescreen full of alarms) down.Category<strong>Alarms</strong>Usage[ErrorNumber=]SetPropertyD("ObjectName.NextPage",0);ArgumentsObjectNameThe name of the alarm object. For example, AlmObj_1.RemarksWhen this property is set, the alarm display object shows thenext page.Data TypeDiscrete (read/write)See AlsoGetPropertyD(), SetPropertyD(), .PrevPage, .PageNum,.TotalPages<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 497Showing Alarm Statistics <strong>and</strong> CountsUse the following functions <strong>and</strong> dotfields to show statisticalinformation about the current Distributed Alarm Displayobject.• almShowStats() Function• .PageNum Dotfield• .TotalPages Dotfield• .Num<strong>Alarms</strong> Dotfield• .ProvidersReq Dotfield• .ProvidersRet DotfieldalmShowStats() FunctionShows the Alarm Statistics dialog box of the specifiedDistributed Alarm Display object.Category<strong>Alarms</strong>Syntax[Result=]almShowStats(ObjectName);ArgumentObjectNameThe name of the alarm object. For example, AlmObj_1.ExamplealmShowStats(“AlmObj_1”);<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


498 Appendix A Working with the Distributed Alarm Display Object.PageNum DotfieldContains the current page number shown in the alarmobject.Category<strong>Alarms</strong>Syntax[ErrorNumber=]GetPropertyI("ObjectName.PageNum",TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAn integer tag that holds the number of the page currentlyshown from the Distributed Alarm Display object.RemarksThis read-only dotfield returns the number of the currentlyshown page in a named Distributed Alarm Display object.Data TypeInteger (read-only)ExampleThe following statement returns the number of the pagecurrently shown from the AlmObj_1 Distributed AlarmDisplay object to the AlarmPage integer tag:GetPropertyI("AlmObj_1.PageNum",AlarmPage);See AlsoGetPropertyI(), .NextPage, .PrevPage, .TotalPages<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 499.TotalPages DotfieldContains the total number of pages in the Distributed AlarmDisplay object.Category<strong>Alarms</strong>Syntax[ErrorNum=]GetPropertyI("ObjectName.TotalPages",TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAn integer tag that retrieves the total number of alarmpages contained in the named Distributed Alarm Displayobject.RemarksThis dotfield returns the total number of alarm pagescontained in a named Distributed Alarm Display object. Onepage equals to all alarms shown in the object on the screen atany given time.Data TypeInteger (read-only)ExampleThe following statement returns the total number of pagescontained in the AlmObj_1 Distributed Alarm Display objectto the AlmTotalPages integer tag:GetPropertyI("AlmObj_1.TotalPages",AlmTotalPages);See AlsoGetPropertyI(), NextPage, PrevPage, PageNum<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


500 Appendix A Working with the Distributed Alarm Display Object.Num<strong>Alarms</strong> DotfieldContains the number of alarms within a Distributed AlarmDisplay object.Category<strong>Alarms</strong>Syntax[ErrorNum=]GetPropertyI("ObjectName.Num<strong>Alarms</strong>”,Tagname);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAn integer tag that holds the current number of alarmsregistered in a named Distributed Alarm Display object.This includes not only those alarms shown, but all alarmsregistered.RemarksThis read-only dotfield returns the total number of alarmswithin a Distributed Alarm Display object.Data TypeInteger (read-only)ExampleThe following statement returns the current number ofalarms used by the AlmObj_1 Distributed Alarm Displayobject to the AlarmCount integer tag:GetPropertyI("AlmObj_1.Num<strong>Alarms</strong>",AlarmCount);See AlsoGetPropertyI()<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 501.ProvidersReq DotfieldContains the number of alarm providers required by thecurrent query used by a named Distributed Alarm Displayobject.Category<strong>Alarms</strong>Syntax[ErrorNumber=]GetPropertyI("ObjectName.ProvidersReq”,TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAn integer tag that holds the current number of alarmproviders registered in a named Distributed Alarm Displayobject. This includes not only those alarms shown, but allalarms registered.Data TypeInteger (read-only)ExampleThe following statement returns the number of alarmproviders required by the current query used by DistributedAlarm Display object "AlmObj_1". This value is written to theTotalProv integer tag:GetPropertyI("AlmObj_1.ProvidersReq",TotalProv);See AlsoGetPropertyI(), .ProvidersRet<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


502 Appendix A Working with the Distributed Alarm Display Object.ProvidersRet DotfieldContains the number of alarm providers returned by thecurrent query used by a named Distributed Alarm Displayobject.Category<strong>Alarms</strong>Usage[ErrorNumber=]GetPropertyI("ObjectName.ProvidersRet",TagName);ParametersObjectNameName of the Distributed Alarm Display object. Forexample, AlmObj_1.TagNameAn integer tag that holds the number of alarm providersthat have successfully returned their alarms to the namedDistributed Alarm Display object.RemarksThis read-only dotfield contains the number of alarmproviders returned by the current query used by a namedDistributed Alarm Display object.Data TypeInteger (read-only)ExampleThe following statement returns the number of alarmproviders that have successfully returned their alarms to theAlmObj_1 Distributed Alarm Display object . This value iswritten to the RetProv integer tag:GetPropertyI("AlmObj_1.ProvidersRet",RetProv);See AlsoGetPropertyI(), .ProvidersReq<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Controlling the Distributed Alarm Display Object Using Functions <strong>and</strong> Dotfields 503Error DescriptionsThe following table describes the error numbers. If a numberis returned that is not in this table, the error is an unknownerror.ErrorNumberDescription0 Success-1 General failure-2 Insufficient memory available-3 Property is read-only-4 Specified item already present-5 Object name unknown-6 Property name unknown<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


504 Appendix A Working with the Distributed Alarm Display Object<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


505Appendix BMigrating from Legacy AlarmSystemsYou can migrate your applications built using the St<strong>and</strong>ardAlarm System or AlarmSuite.Migrating from the St<strong>and</strong>ard Alarm System tothe Distributed Alarm SystemWhen you migrate a St<strong>and</strong>ard Alarm system to theDistributed Alarm system, all of the St<strong>and</strong>ard AlarmDisplays in the master/slave application are migrated toDistributed Alarm Display objects.Colors, fonts, the expressions, <strong>and</strong> the alarm query settingsare not migrated. The new Distributed Alarm Display objecthas the following default query, where node name is thename of the master node:\\nodename\intouch!$systemThe acknowledgement <strong>and</strong> alarm status dotfields continue towork as before. Depending if the I/O tag was configured forNetDDE or SuiteLink, you may need to enable NetDDE.However, you may decide you no longer need separatecontrols for issuing acknowledgements, as the alarms cannow be acknowledged using the Distributed Alarm Displayobject.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


506 Appendix B Migrating from Legacy Alarm SystemsMigrating an AlarmSuite DatabaseYou can use the AlarmSuite History Migration Utility tomigrate data from an AlarmSuite database to a SQL Serveralarm database.During the migration, the source or target databases shouldnot be logging new data. Logging during migration can causeloss of data integrity.Important You can select to recreate the tables in the targetdatabase during the migration. Recreating tables results in theloss of existing data in the target database.To migrate AlarmSuite data1 On the Windows Start menu, point to Programs, point toWonderware, point to <strong>InTouch</strong>, <strong>and</strong> then click AlarmSuiteHistory Migration. The AlarmSuite History Migration Utilitydialog box appears.2 In the Source (AlarmSuite) Database area, configure theconnection to the AlarmSuite database. Do the following:a In the DSN list, click the data source name for theAlarmSuite database.b In the User Name box, type your user name for thedata source name.c In the Password box, type your user password for thedata source name.d In the Purge Source Database area, click Yes to purgethe source database at the end of data migration.Table creation is part of the transaction, but creationof the database is not. If you select Yes, thetransaction with purging is committed aftermigrating the data from the source database.Click No to not purge the source database after datamigration is finished.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Migrating an AlarmSuite Database 5073 In the Target Database area, configure the connection tothe Distributed Alarm system database. Do the following:abcdeIn the Server list, click the name of the databaseserver to use. The read-only Database Name box showsthe database name. The default is WWALMDB.In the User Name box, type a SQL Server user name.In the Password box, type the password associatedwith the SQL Server user account.Select the Recreate Tables check box to recreate thetables in the target database. If you recreate thetables, the existing information is deleted. If you donot select this option, the data is appended to existingtables.In the Logging Mode area, click either Detailed torestore the detailed tables only or Consolidated torestores the consolidated tables only.4 Click Test Connection to test your connection to the source<strong>and</strong> target databases.5 Click Start to begin migrating the data from the sourcedatabase to the target database.6 Click Stop to abort the migration process that is inprogress. This rolls back the transaction. (Clicking Closeis equivalent to clicking Stop.)Note Table creation is part of the transaction, but creating thedatabase is not. If you have set the Purge Source Database optionto Yes, the transaction with purging is committed after migratingthe data from the source database.7 After the migration completes, click Close.<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


508 Appendix B Migrating from Legacy Alarm Systems<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


509IndexSymbols$NewAlarm system tag 138$System system tag 138AAbout boxAlarm DB View control 352Alarm Pareto control 377Alarm Viewer control 104AboutBox() method 104, 225, 352, 377.Ack dotfield 116Ack() function 123AckAll() method 89AckAlmBackColor property 316AckAlmBackColorRange1 property 317AckAlmBackColorRange2 property 317AckAlmBackColorRange3 property 318AckAlmBackColorRange4 property 318AckAlmForeColor property 319AckAlmForeColorRange1 property 319AckAlmForeColorRange2 property 320AckAlmForeColorRange3 property 320AckAlmForeColorRange4 property 321.AckDev dotfield 121.AckDsc dotfield 120AckGroup() method 92acknowledgementalarms 20automatic 124acknowledgement comments 126acknowledgement modelsalarm 112checking at run time 115condition 112acknowledging alarms 111Alarm Viewer control 88alarms or alarm groups 116automatic acknowledgement 124deviation alarms 121discrete alarms 120Distributed Alarm Display object 440from WindowViewer 124rate-of-change alarms 122redundancy synchronization 412script functions 123using dotfields 116value alarms 118AckPriority() method 92.AckROC dotfield 122AckRtnBackColor property 321AckRtnForeColor property 322AckSelected() method 89<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


510 IndexAckSelectedGroup() method 90AckSelectedPriority() method 91AckSelectedTag() method 91AckTag() method 93.AckValue dotfield 118AckVisible() method 90ActiveX controls, configuring colorsfor 87ActiveX eventsAlarm DB View control 354Alarm Pareto control 378Alarm Tree Viewer control 234ActiveX methodsAlarm DB View control 347Alarm Pareto control 373Alarm Tree Viewer control 225Alarm Viewer control 88ActiveX propertiesAlarm DB View control 316Alarm Pareto control 370Alarm Tree Viewer control 223Alarm Viewer control 80alarm <strong>and</strong> events, global settings 46alarm buffer size, configuring 47alarm comments 126changing for a tag 186Distributed Alarm Display object 425alarm conditionsalarm groups 137tags 137alarm consumer 28alarm databaseAlarm DB Logger 275, 280archiving purged data 382data to purge 381database connection 380, 390files to restore 391log file settings 384maintaining 379manually archiving the database 386purge or archive settings 380restoring 389, 393scheduling automatic purges 388stored procedures 288alarm database views, Alarm DBLogger 280Alarm DB Loggerabout 273alarm database views 280Alarm Event History view 286Alarm History view 281, 283alarm logging 275, 280alarm stored procedures 288AlarmCounter stored procedure 289alarms to log 276AlarmSuite Alarm Log view 287database connection 275Event History view 283, 284EventCounter stored procedure 290logging interval 278SQL Server accounts 274stored procedure 288using 274Windows service 279Alarm DB View controlaccessing filter favorites 352ActiveX events 354ActiveX methods 347ActiveX properties 316alarm or event data 296colors 312columns 297configuring 292database connections 293, 347error h<strong>and</strong>ling 353filter criteria 308filter favorites 306font 295grid 294grouping columns 310query filters 310retrieving alarm information 350retrieving records 348run-time features 300showing the About box 352showing the context menu 352sort order 314sorting records 315, 351status bar 316time format 301time period 303<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Index 511time zone 301, 305using at run time 315values for the state column 311viewing recorded alarms 291alarm deadb<strong>and</strong>s, changing 184.Alarm dotfield 139Alarm Event History view 286alarm group list file, creating 50alarm groupsalarm conditions 137creating 34deleting 37modifying 36alarm groups, inhibitor tag 190alarm hierarchiesAlarm Tree Viewer control 211defining 33Alarm History view 281, 283alarm instance, user-definedinformation 187alarm limitschanging 176tag 151alarm or event data, Alarm DB Viewcontrol 296Alarm Pareto controlabout 355ActiveX events 378ActiveX methods 373ActiveX properties 370alarms to analyze 362appearance <strong>and</strong> colors 357configuring 355copying or moving query filters 367database connection 356, 373error h<strong>and</strong>ling 377filter criteria 366filter favorites 364font 360grouping columns 367presentation of the analysis results 368retrieving information about specificpareto bars 374retrieving records 374run-time features 360selecting alarm or event data 362showing the About box 377status bar 369time period 363using at run time 369alarm printer instancestarting 249stopping 249alarm printer querystarting 249stopping 249alarm printer, starting 248alarm printing <strong>and</strong> logging 236alarm properties, controlling at runtime 127alarm provider 27alarm queries 53alarm query information, printingalarms 252, 267alarm statistics <strong>and</strong> counts, DistributedAlarm Display object 497alarm tag, inhibitor tag 190Alarm Tree Viewer controlActiveX events 234ActiveX methods 225ActiveX properties 223appearance <strong>and</strong> colors 212configuring 212creating a query string 232error h<strong>and</strong>ling 234fonts 215freezing the tree 232providers <strong>and</strong> groups 217query favorites 219, 222refresh 215retrieving information 225, 226running queries 233run-time features 216sort order 220status bar 222using at run time 221viewing alarm hierarchies 211Alarm Viewer controlacknowledging alarms 88ActiveX events 108ActiveX methods 88ActiveX properties 80alarms to show 68colors 71, 87columns 62configuring 58<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


512 Indexerror h<strong>and</strong>ling 108font 62grid 58moving <strong>and</strong> freezing the display 102query favorites 70, 78retrieving information about analarm 99running a script when a new alarm isdetected 109running queries 99run-time features 66selecting specific alarms 105showing statistics 104showing the About box 104showing the context menu 108sort order 75sorting alarm records 103status bar 77suppressing alarms 94time format 73using at run time 76viewing current alarms 57.AlarmAccess dotfield 466.AlarmAckModel dotfield 115.AlarmClass dotfield 460.AlarmComment dotfield 186, 470AlarmCounter stored procedure 289.AlarmDate dotfield 457.AlarmDev dotfield 142.AlarmDevCount dotfield 206.AlarmDevDeadb<strong>and</strong> dotfield 185.AlarmDevUnAckCount dotfield 207.AlarmDisabled dotfield 159.AlarmDsc dotfield 141.AlarmDscCount dotfield 204.AlarmDscDisabled dotfield 169.AlarmDscEnabled dotfield 168.AlarmDscInhibitor dotfield 190.AlarmDscUnAckCount dotfield 205.AlarmEnabled dotfield 158.AlarmGroup dotfield 474.AlarmGroupSel dotfield 465AlarmHiDisabled dotfield 165AlarmHiEnabled dotfield 164.AlarmHiHiDisabled dotfield 167.AlarmHiHiEnabled dotfield 166.AlarmHiHiInhibitor dotfield 195.AlarmHiInhibitor dotfield 194.AlarmLimit dotfield 463.AlarmLoDisabled dotfield 163.AlarmLoEnabled dotfield 162.AlarmLoInhibitor dotfield 193.AlarmLoLoDisabled dotfield 161.AlarmLoLoEnabled dotfield 160.AlarmLoLoInhibitor dotfield 192.AlarmMajDevDisabled dotfield 173.AlarmMajDevEnabled dotfield 172.AlarmMajDevInhibitor dotfield 197.AlarmMinDevDisabled dotfield 171.AlarmMinDevEnabled dotfield 170.AlarmMinDevInhibitor dotfield 196.AlarmName dotfield 458.AlarmOprName dotfield 468.AlarmOprNode dotfield 469.AlarmPri dotfield 464.AlarmProv dotfield 467.AlarmROC dotfield 143.AlarmROCCount dotfield 208.AlarmROCDisabled dotfield 175.AlarmROCEnabled dotfield 174.AlarmROCInhibitor dotfield 198.AlarmROCUnAckCount dotfield 209alarmsabout 17, 18acknowledgement 20, 116acknowledgement models 112analog alarms 23analyzing 362audit trail 415configuring 33consumers 27counting 199deviation alarms 23disabling 44discrete alarms 22enabling or disabling 158groups 20inhibiting 44logging 276maintaining the database 379printing 238priorities 19providers 27rate of change alarms 24redundancy 395<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Index 513redundancy synchronization 412showing 423sub-states 19types 22value alarms 23.AlarmState dotfield 462AlarmSuite Alarm Log view 287AlarmSuite database, migration 506.AlarmTime dotfield 456.AlarmTotalCount dotfield 200.AlarmType dotfield 461.AlarmUnAckCount dotfield 201.AlarmUserDefNumX dotfields 187.AlarmUserDefStr dotfield 188.AlarmValDeadb<strong>and</strong> dotfield 184.AlarmValue dotfield 459.AlarmValueCount dotfield 202.AlarmValueUnAckCount dotfield 203almAckAll() function 441almAckDisplay() function 442almAckGroup() function 443almAckPriority() function 444almAckRecent() function 444almAckSelect() function 446almAckSelectedGroup() function 447almAckSelectedPriority() function 448almAckSelectedTag() function 449almAckTag() function 445almDefQuery() function 471almMoveWindow() function 494almQuery() function 472AlmRtnBackColor property 322AlmRtnForeColor property 322almSelectAll() function 450almSelectGroup() function 452almSelectionCount() function 451almSelectItem() function 452almSelectPriority() function 453almSelectTag() function 454almSetQueryByName() function 473almShowStats() function 497almSuppressAll() function 483almSuppressDisplay() function 484almSuppressGroup() function 485almSuppressPriority() function 486almSuppressRetain() function 492almSuppressSelected() function 488almSuppressSelectedGroup()function 489almSuppressSelectedPriority()function 490almSuppressSelectedTag() function 491almSuppressTag() function 487almUnselectAll() function 451almUnsuppressAll() function 484analog alarms 23analysis results, Alarm Paretocontrol 368ApplyDefaultQuery() method 101ApplyQuery() method 100APUFindAlarmGroupInstance()function 260APUFindFileInstance() function 261APUFindPrinterInstance() function 262APUGetAlarmGroupText() function 253APUGetConfigurationFilePath()function 256APUGetInstanceCount() function 263APUGetPrinterJobCount() function 257APUGetPrinterName() function 265APUGetPrinterStatus() function 266APUGetQueryAlarmState() function 258APUGetQueryFromPriority()function 254APUGetQueryProcessingState()function 259APUGetQueryToPriority() function 255APUIsInstanceUsed() function 264APUSetAlarmGroupText() function 267APUSetQueryAlarmState() function 268APUSetQueryFromPriority()function 269APUSetQueryToPriority() function 270APUSetTimeoutValues() function 271APUStartInstance() function 249APUStartQuery() function 250APUStopInstance() function 251APUStopQuery() function 252APUTranslateErrorCode() function 272archiving, alarm database 386audit trail, alarms 415AutoConnect property 323<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


514 IndexBbuffer size 47CCheckElementMembership() method 226ColorPriorityRange1 property 323ColorPriorityRange2 property 324ColorPriorityRange3 property 324colorsActiveX controls 87Alarm DB View control 312Alarm Pareto control 357Alarm Tree Viewer control 212Alarm Viewer control 71Distributed Alarm Display object 431,435ColumnResize property 324columnsAlarm DB View control 297, 310, 311Alarm Pareto control 367Alarm Viewer control 62Distributed Alarm Display object 428,434condition, acknowledgement alarmmodel 112configuration files, printing alarms 245Connect() method 347, 373ConnectStatus property 325consumers, alarms 27context menuAlarm DB View control 352Alarm Viewer control 108counting, active or unacknowledgedalarms 199current alarms, Alarm Viewer control 57CustomMessage property 325Ddata storage, distributed alarmsystem 32database connectionsalarm database 380, 390Alarm DB Logger 275Alarm DB View control 293, 347Alarm Pareto control 356, 373DatabaseName property 325deviation alarmsacknowledging alarms 121alarms 23configuring 41.DevTarget dotfield 182disablement 30disablingalarms 158discrete alarms 168high alarms 164HiHi alarms 166LoLo alarms 160low alarms 162major deviation alarms 172minor deviation alarms 170rate-of-change alarms 174Disconnect() method 347discrete alarmsacknowledging alarms 120alarms 22configuring 37enabling or disabling 168display type, Distributed Alarm Displayobject 432DisplayedTimeZone property 326DisplayMode property 326Distributed Alarm Display objectabout 417acknowledging alarms 440alarm comment 425alarm statistics <strong>and</strong> counts 497alarms to show 423checking the current queryproperties 474colors 431, 435columns 428configuring 419controlling with scripts 440creating 419display columns 434display type 432errors 503font 428getting or setting properties 440grid appearance 420guidelines for use 418<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Index 515monitoring local alarms 433multiple selection 434query favorites 437retrieving alarm record 455run time features 422scrolling 494selecting alarms 450shortcut menu 436sort order 428status bar 435suppressing alarms 482time format 426using at run time 434distributed alarm group lists 29distributed alarm systemabout 25data storage 32documentation conventions 15dotfields, using to acknowledgealarms 116Duration property 327Eenablingalarms 158discrete alarms 168events 48high alarms 164HiHi alarms 166LoLo alarms 160low alarms 162major deviation alarms 172minor deviation alarms 170rate-of-change alarms 174End Time property 328errorsAlarm DB View control 353Alarm Pareto control 377Alarm Tree Viewer control 234Distributed Alarm Display object 503printing alarms 272Event History view 283, 284event properties, for individual tags 46EventBackColor property 328event-based alarm model 114EventCounter stored procedure 290EventForeColor property 329eventsabout 17, 21enabling 48exp<strong>and</strong>ed summary alarmsmodel 112using 113Ffilter criteriaAlarm DB View control 308Alarm Pareto control 366filter favoritesAlarm DB View control 306, 352Alarm Pareto control 364FilterFavoritesFile property 329FilterMenu property 329FilterName property 330fontAlarm DB View control 295Alarm Viewer control 62fontsAlarm Pareto control 360Alarm Tree Viewer control 215Distributed Alarm Display object 428format, printing alarms 239.Freeze dotfield 495Freeze() method 232FreezeDisplay() method 103freezingAlarm Tree Viewer control 232Alarm Viewer control 102FromPriority property 330GGetAlarmQueryFromSelection()method 232GetElementCount() method 225, 227GetElementName() method 227GetElementPath() method 227GetItem() method 99, 350GetItemAlarmName() method 375GetItemAlarmType() method 375GetItemCount() method 375GetItemEventType() method 376GetItemProviderName() method 376GetItemTotalTime() method 376GetLastError() method 353<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


516 IndexGetNext() method 349GetPrevious() method 348GetSelectedElementCount() method 228GetSelectedElementName() method 228GetSelectedElementPath() method 228GetSelectedItem() method 350GetSubElementCount() method 229GetSubElementName() method 230GetSubElementPath() method 231getting or setting properties, DistributedAlarm Display object 440gridAlarm DB View control 294Alarm Viewer control 58Distributed Alarm Display object 420GroupExactMatch property 331GroupName property 331groups, alarms 20Hhigh alarms, enabling or disabling 164HiHi alarms, enabling or disabling 166.HiHiLimit dotfield 179.HiHiSet dotfield 154.HiHiStatus dotfield 147.HiLimit dotfield 178.HiSet dotfield 153.HiStatus dotfield 146historical alarms 30hot backup pair example,redundancy 408hot backup pair, redundancy 397, 398hot backups, redundancy 396Iinhibition, alarms 44inhibitor tagfor an alarm group 190for an alarm tag 190instance information, printingalarms 260Kkey fields, redundancy 400Llegacy alarm systems, migration 505.ListChanged dotfield 480log files, printing alarms 243logging alarmsfile settings 384printing alarms 247logging information, printing alarms 265logging interval, alarm database 278logging, making retentive 49.LoLimit dotfield 177LoLo alarms, enabling or disabling 160.LoLoLimit dotfield 176.LoLoSet dotfield 151.LoLoStatus dotfield 145.LoSet dotfield 152.LoStatus dotfield 144low alarms, enabling or disabling 162Mmaintaining, alarm database 379major deviation alarms, enabling ordisabling 172.MajorDevPct dotfield 181.MajorDevSet dotfield 156.MajorDevStatus dotfield 149mapping file, redundancy 402, 406MaxRecords property 332migrationAlarmSuite database 506legacy alarm systems 505st<strong>and</strong>ard alarm system 505minor deviation alarms, enabling ordisabling 170.MinorDevPct dotfield 180.MinorDevSet dotfield 155.MinorDevStatus dotfield 148monitoring local alarms, DistributedAlarm Display object 433MoveWindow() method 102N.NextPage dotfield 496.Normal dotfield 140.Num<strong>Alarms</strong> dotfield 500P.PageNum dotfield 498Password property 332.PendingUpdates dotfield 481.PrevPage dotfield 496<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Index 517.PriFrom dotfield 478PrimarySort property 332printer settings, printing alarms 236printing alarmsalarm printing <strong>and</strong> logging 236alarm query information 252, 267alarms to print 238controlling using scripting 248errors 272format of print <strong>and</strong> file output 239instance information 260logging alarms to a file 243, 247logging information 265printer settings 236printing alarms 235, 246saving <strong>and</strong> loading configurationfiles 245starting the alarm printer 248starting the alarm printer instance 249starting the alarm printer query 249stopping the alarm printerinstance 249stopping the alarm printer query 249priorities, alarms 19.PriTo dotfield 479ProviderExactMatch property 333ProviderName property 333providersAlarm Tree Viewer control 217alarms 27.ProvidersReq dotfield 501.ProvidersRet dotfield 502purge or archive settings, configuring foralarm database 380purged data, archiving 382purgingalarm database 381scheduling automatic 388Qquery favoritesAlarm Tree Viewer control 219, 222Alarm Viewer control 70, 78Distributed Alarm Display object 437query filtersAlarm DB View control 310Alarm Pareto control 367query properties, checking for theDistributed Alarm Display object 474query string, Alarm Tree Viewercontrol 232.QueryState dotfield 476QueryTimeZoneName property 334.QueryType dotfield 475Rrate-of-change alarmsabout 24acknowledging 122configuring 43enabling or disabling 174recorded alarms, Alarm DB Viewcontrol 291redundancyabout 395acknowledgement synchronization 412alarm synchronization 412alarms 395configuring a hot backup pair 397creating a hot backup pair 398creating a mapping file 402hot backup pair example 408importing a mapping file 406notes 414setting alarm key fields 400troubleshooting map file imports 407underst<strong>and</strong>ing hot backups 396Refresh() method 349, 374refresh, Alarm Tree Viewer control 215RefreshMenu property 334Requery() method 100Reset() method 351ResetMenu property 334restoringalarm database 389, 393alarm database files 391retentive alarm logging 49retrieving informationAlarm DB View control 350Alarm Pareto control 374Alarm Tree Viewer control 225Alarm Viewer control 99<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


518 Indexretrieving recordsAlarm DB View control 348Alarm Pareto control 374Distributed Alarm Display object 455.ROCPct dotfield 183.ROCSet dotfield 157.ROCStatus dotfield 150RowCount property 335RowSelection property 335run timeAlarm DB View control 315Alarm Pareto control 369alarm properties 127Alarm Tree Viewer control 221Alarm Viewer control 76checking acknowledgement model 115Distributed Alarm Display object 434run time featuresAlarm DB View control 300Alarm Pareto control 360Alarm Tree Viewer control 216Alarm Viewer control 66Distributed Alarm Display object 422running queriesAlarm Tree Viewer control 233Alarm Viewer control 99Sscriptingacknowledging alarms 123Alarm Viewer control 109Distributed Alarm Display object 440printing alarms 248scrolling, Distributed Alarm Displayobject 494Secondary Sort property 335SelectAll() method 107SelectGroup() method 105SelectItem() method 107SelectPriority() method 106SelectQuery() method 348, 374SelectTag() method 106ServerName property 336SetQueryByName() method 101, 233SetQueryByString() method 233SetSort() method 104shortcut menu, Distributed AlarmDisplay object 436ShowContext() method 108, 352ShowFetch property 336ShowFilter() method 352ShowGrid property 336ShowHeading property 337ShowMessage property 337ShowQueryFavorites() method 99ShowSort() method 103, 351ShowStatistics() method 104ShowStatusBar property 337ShowSuppression() method 94SilentMode property 338sort orderAlarm DB View control 314Alarm Tree Viewer control 220configuring for Alarm Viewercontrol 75Distributed Alarm Display object 428sorting recordsAlarm DB View control 315, 351Alarm Viewer control 103SortMenu property 338SortOnCol() method 351SortOrder property 339SpecificTime property 339SQL Server accounts, Alarm DBLogger 274st<strong>and</strong>ard alarm system 505StartTime property 340statistics, Alarm Viewer control 104status barAlarm DB View control 316Alarm Pareto control 369Alarm Tree Viewer control 222Alarm Viewer control 77Distributed Alarm Display object 435stored procedure, EventCounter storedprocedure 290stored procedures 288alarm database 288AlarmCounter stored procedure 289EventCounter stored procedure 290sub-states, alarms 19.Successful dotfield 477summary alarm model, exp<strong>and</strong>ed 112summary alarms 30SuppressAll() method 95SuppressGroup() method 96<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


Index 519suppressing alarms 30Alarm Viewer control 94Distributed Alarm Display object 482suppression, alarms 30SuppressPriority() method 97.SuppressRetain dotfield 493SuppressSelected() method 94SuppressSelectedGroup() method 95SuppressSelectedPriority() method 96SuppressSelectedTag() method 95SuppressTag() method 98SuppressVisible() method 95Ttagsalarm conditions 37, 137alarm limits 151changing alarm comments 186event properties 46technical support, contacting 16Terminal Services 31Terminal Services, alarm support 31time formatAlarm DB View control 301Alarm Viewer control 73Distributed Alarm Display object 426time periodAlarm DB View control 303Alarm Pareto control 363Time property 340time zones, Alarm DB View control 301,305ToPriority property 340.TotalPages dotfield 499TotalRowCount property 341troubleshooting, map file imports 407U.UnAck dotfield 117UnAckAlmBackColor property 341UnAckAlmBackColorRange1property 342UnAckAlmBackColorRange2property 342UnAckAlmBackColorRange3property 343UnAckAlmBackColorRange4property 343UnAckAlmForeColor property 344UnAckAlmForeColorRange1property 344UnAckAlmForeColorRange2property 345UnAckAlmForeColorRange3property 345UnAckAlmForeColorRange4property 346UnAckOrAlarmDuration property 346UnSelectAll() method 107UnSuppressAll() method 96updates, checking for Distributed AlarmDisplay object 480user-defined information, alarminstance 187UserID property 346Vvalue alarmsacknowledging alarms 118alarms 23configuring 39viewsAlarm Event History view 286Alarm History view 281, 283AlarmSuite Alarm Log view 287Event History view 283, 284WWindows service 279WindowViewer, acknowledgingalarms 124<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>


520 Index<strong>InTouch</strong> <strong>HMI</strong> <strong>Alarms</strong> <strong>and</strong> <strong>Events</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!