It Alarms and Events
It Alarms and Events
It Alarms and Events
Copyright
2007 Invensys Systems, Inc. All Rights Reserved. All rights reserved. No part of this documentation shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Invensys Systems, Inc. No copyright or patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this documentation, the publisher and the author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. The information in this documentation is subject to change without notice and does not represent a commitment on the part of Invensys Systems, Inc. The software described in this documentation is furnished under a license or nondisclosure agreement. This software may be used or copied only in accordance with the terms of these agreements. Invensys Systems, Inc. 26561 Rancho Parkway South Lake Forest, CA 92630 U.S.A. (949) 727-3200 http://www.wonderware.com For comments or suggestions about the product documentation, send an e-mail message to productdocs@wonderware.com.
Trademarks
All terms mentioned in this documentation that are known to be trademarks or service marks have been appropriately capitalized. Invensys Systems, Inc. cannot attest to the accuracy of this information. Use of a term in this documentation should not be regarded as affecting the validity of any trademark or service mark. Alarm Logger, ActiveFactory, ArchestrA, Avantis, DBDump, DBLoad, DT Analyst, FactoryFocus, FactoryOffice, FactorySuite, FactorySuite A2, InBatch, InControl, IndustrialRAD, IndustrialSQL Server, InTouch, MaintenanceSuite, MuniSuite, QI Analyst, SCADAlarm, SCADASuite, SuiteLink, SuiteVoyager, WindowMaker, WindowViewer, Wonderware, and Wonderware Logger are trademarks of Invensys plc, its subsidiaries and affiliates. All other brands may be trademarks of their respective owners.
Contents
Welcome.......................................... 15
Documentation Conventions.............................................15 Technical Support .............................................................16
Contents
Contents
Using an Alarm Viewer Control at Run Time .................76 Understanding Status Bar Information........................77 Using Query Favorites at Run Time .............................78 Using Alarm Viewer Control ActiveX Properties ............80 Configuring Colors for ActiveX Controls.......................87 Using Alarm Viewer Control ActiveX Methods ...............88 Acknowledging Alarms ..................................................88 Suppressing Alarms .......................................................94 Retrieving Information About an Alarm.......................99 Running Queries.............................................................99 Moving and Freezing the Display................................102 Sorting Alarm Records .................................................103 Showing Other Information .........................................104 Selecting Specific Alarms.............................................105 Showing the Context Menu..........................................108 Error Handling When Using Methods and Properties ..............................................................108 Using ActiveX Events to Trigger Scripts .......................108 Running a Script When a New Alarm is Detected .....109
Contents
Chapter 6 Controlling Alarm Properties of Tags and Groups at Run Time .......................... 127
Determining if Tags or Alarm Groups are in an 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..................................................... 150 Determining 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 .......................................................... 157 Enabling and Disabling Alarms for a Tag or Alarm Group ............................................................ 158 Enabling/Disabling All Alarms....................................158 Enabling/Disabling LoLo Alarms ................................ 160 Enabling/Disabling Low Alarms ................................. 162 Enabling/Disabling High Alarms ................................ 164 Enabling/Disabling HiHi Alarms ................................ 166 Enabling/Disabling Discrete Alarms........................... 168 Enabling/Disabling Minor Deviation Alarms ............. 170 Enabling/Disabling Major Deviation Alarms ............. 172 Enabling/Disabling Rate-Of-Change Alarms.............. 174 Changing a Tag's Alarm Limits ..................................... 176 .LoLoLimit Dotfield...................................................... 176 .LoLimit Dotfield .......................................................... 177
Contents
.HiLimit Dotfield ..........................................................178 .HiHiLimit Dotfield ......................................................179 .MinorDevPct Dotfield..................................................180 .MajorDevPct Dotfield..................................................181 .DevTarget Dotfield ......................................................182 .ROCPct Dotfield ..........................................................183 Changing a Tag's Alarm Deadbands ..............................184 .AlarmValDeadband Dotfield ......................................184 .AlarmDevDeadband Dotfield......................................185 Changing the Alarm Comment Associated with a Tag .....................................................................186 .AlarmComment Dotfield .............................................186 Associating User-Defined Information with an Alarm Instance........................................................187 .AlarmUserDefNumX Dotfields...................................187 .AlarmUserDefStr Dotfield ..........................................188 Determining the Inhibitor Tag of a Tag or Alarm 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 ......................................198 Counting the Number of Active or Unacknowledged Alarms .............................................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
Contents
Contents
Querying Printer Information .....................................265 Setting Alarm Query Information ...............................267 Handling Alarm Printer Errors...................................272
10
Contents
Using an Alarm DB View Control at Run Time ............ 315 Sorting Records ............................................................ 315 Understanding Status Bar Information...................... 316 Using Alarm DB View ActiveX Properties .................... 316 AckAlmBackColor Property......................................... 316 AckAlmBackColorRange1 Property ............................ 317 AckAlmBackColorRange2 Property ............................ 317 AckAlmBackColorRange3 Property ............................ 318 AckAlmBackColorRange4 Property ............................ 318 AckAlmForeColor Property ......................................... 319 AckAlmForeColorRange1 Property ............................. 319 AckAlmForeColorRange2 Property ............................. 320 AckAlmForeColorRange3 Property ............................. 320 AckAlmForeColorRange4 Property ............................. 321 AckRtnBackColor Property ......................................... 321 AckRtnForeColor Property .......................................... 322 AlmRtnBackColor Property ......................................... 322 AlmRtnForeColor Property.......................................... 322 AutoConnect Property.................................................. 323 ColorPriorityRange1 Property..................................... 323 ColorPriorityRange2 Property..................................... 324 ColorPriorityRange3 Property..................................... 324 ColumnResize Property ............................................... 324 ConnectStatus Property............................................... 325 CustomMessage Property ............................................ 325 DatabaseName Property.............................................. 325 DisplayMode Property ................................................. 326 DisplayedTimeZone Property ...................................... 326 Duration Property ........................................................ 327 EndTime Property........................................................ 328 EventBackColor Property ............................................ 328 EventForeColor Property............................................. 329 FilterFavoritesFile Property........................................ 329 FilterMenu Property .................................................... 329 FilterName Property .................................................... 330 FromPriority Property ................................................. 330 GroupExactMatch Property......................................... 331 GroupName Property ................................................... 331 MaxRecords Property................................................... 332 Password Property ....................................................... 332 PrimarySort Property .................................................. 332 ProviderExactMatch Property..................................... 333 ProviderName Property ............................................... 333
InTouch HMI Alarms and Events Guide
Contents
11
QueryTimeZoneName Property...................................334 RefreshMenu Property .................................................334 ResetMenu Property.....................................................334 RowCount Property ......................................................335 RowSelection Property .................................................335 SecondarySort Property ...............................................335 ServerName Property ..................................................336 ShowFetch Property .....................................................336 ShowGrid Property.......................................................336 ShowHeading Property ................................................337 ShowMessage Property ................................................337 ShowStatusBar Property .............................................337 SilentMode Property ....................................................338 SortMenu Property.......................................................338 SortOrder Property ......................................................339 SpecificTime Property ..................................................339 StartTime Property ......................................................340 Time Property ...............................................................340 ToPriority Property ......................................................340 TotalRowCount Property .............................................341 UnAckAlmBackColor Property....................................341 UnAckAlmBackColorRange1 Property .......................342 UnAckAlmBackColorRange2 Property .......................342 UnAckAlmBackColorRange3 Property .......................343 UnAckAlmBackColorRange4 Property .......................343 UnAckAlmForeColor Property ....................................344 UnAckAlmForeColorRange1 Property ........................344 UnAckAlmForeColorRange2 Property ........................345 UnAckAlmForeColorRange3 Property ........................345 UnAckAlmForeColorRange4 Property ........................346 UnAckOrAlarmDuration Property ..............................346 UserID Property ...........................................................346 Using Alarm DB View ActiveX Methods........................347 Controlling Database Connections ..............................347 Retrieving Records from the Database .......................348 Retrieving Information About an Alarm.....................350 Sorting the Alarm Records...........................................351 Showing the Context Menu..........................................352 Accessing Filter Favorites............................................352 Showing Other Information .........................................352 Error Handling When Using Methods and Properties..353 Using Alarm DB View ActiveX Events to Trigger Scripts .........................................................354
12
Contents
Contents
13
Chapter 14 Creating an Alarm Audit Trail .............. 415 Appendix A Working with the Distributed Alarm Display Object ......................... 417
About the Distributed Alarm Display Object ................417 Distributed Alarm Display Object Guidelines ............418 Configuring a Distributed Alarm Display Object at Design Time..................................................419 Creating a Distributed Alarm Display Object ............419 Configuring the Appearance of the Grid .....................420 Controlling Which Features Users Can Access at Run Time..................................................422 Configuring Which Alarms to Show ............................423 Configuring a Default Alarm Comment......................425 Configuring the Time Format for Alarm Records ......426 Configuring the Font for Alarm Records.....................428 Configuring the Columns for Alarm Records..............428 Configuring Colors for Alarm Records ........................431 Configuring the Display Type......................................432 Using the Distributed Display to Monitor Local Alarms ............................................................433 Using a Distributed Alarm Display Object at Run Time..................................................................434 Sizable Display Columns .............................................434 Multiple Selection.........................................................434 Alarm Message Colors..................................................435 Status Bar.....................................................................435 Shortcut Menu ..............................................................436 Selecting and Configuring Alarm Query Favorites ....437
14
Contents
Controlling the Distributed Alarm Display Object Using Functions and Dotfields ....................................440 Getting or Setting Properties ...................................... 440 Acknowledging Alarms ................................................ 440 Selecting Alarms .......................................................... 450 Retrieving Information about a Selected Alarm Record ........................................................... 455 Setting the Alarm Query ............................................. 471 Checking the Current Query Properties ..................... 474 Checking for Updates to the Distributed Alarm Display Object .............................................. 480 Suppressing Alarms ..................................................... 482 Scrolling the Alarm Display ........................................ 494 Showing Alarm Statistics and Counts ........................ 497 Error Descriptions........................................................ 503
15
Welcome
This documentation describes how to manage alarms and events generated by your InTouch applications. You can view this documentation or you can print it, in part or whole, by using the print feature in Adobe Reader. This documentation assumes you know how to use Microsoft Windows, including navigating menus, moving from application to application, and drawing objects on the screen. If you need help with these tasks, see the Microsoft documentation.
Documentation Conventions
This documentation uses the following conventions:
Convention Used for
Initial Capitals
Bold Monospace
Paths and file names. Menus, commands, dialog box names, and dialog box options. Code samples and display text.
16
Welcome
Technical Support
Wonderware Technical Support offers a variety of support options to answer any questions on Wonderware products and their implementation. Before you contact Technical Support, refer to the relevant section(s) in this documentation for a possible solution to the problem. If you need to contact technical support for help, have the following information ready:
The type and version of the operating system you are using. 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 any other diagnostic applications. Details of what you did to try to solve the problem(s) and your results. If known, the Wonderware Technical Support case number assigned to your problem, if this is an ongoing problem.
17
Chapter 1
Overview of Alarms and Events
You can create InTouch applications that generate alarms and events to notify operators about the status of process activity.
Alarms warn run-time operators about process conditions that could potentially cause problems. Typically, you set up an alarm to trigger when a process value exceeds a defined limit. An operator must usually acknowledge the alarm. Events represent normal system status messages. A typical event is when a system condition occurs, such as an operator logging on to an InTouch application. Operators do not have to acknowledge events.
18
The following figure shows how the InTouch HMI handles alarms and events while an application is running. Alarm and event data is saved to the alarm database.
Running Physical Process HiHi Alarm InTouch Client Alarm Provider HiHi Alarm Alarm Ack 90
Log On Event
Alarm Database
You can configure any tag for event monitoring. An event message is logged to the alarm system each time the tag value changes. The event message includes how the value changed and whether the operator, I/O, scripts, or the system initiated the change.
Alarm was acknowledged. Alarm has occurred. Tag returned from an alarm state to a normal state.
19
Alarm Priorities
You assign a level of priority, or severity, to an alarm. A boiler temperature limit, for example, would require a high-priority alarm, requiring immediate attention. An end of a shift alarm is a much less severe. The alarm priority usually depends upon the circumstancesthe factory application, the nature of the equipment, safety, availability of backup systems, potential costs of damage, or downtime. You assign an alarm priority when you define a tag. The priority can range from 1 to 999, with 1 being the most severe. You can designate a range of alarm priorities to represent a classification of alarms. For example, if a process requires four levels of severity, you can create four priority ranges.
Alarm Severity Priority Range
Ranges are useful for alarm filtering. For example, you can configure an alarm display to filter out all but the critical alarms. You can create animation links, acknowledgment scripts, and filtered viewing and printing, all based on the alarm priority range.
Alarm Sub-States
A multi-state alarm includes a range of alarm sub-conditions. For example, an analog alarm typically has several limits.
A High and Low threshold set the boundaries for the normal operating range. HiHi and LoLo limits mark the extreme deviations from the normal range of values.
A boiler temperature level can be in the alarmed condition for any one of these sub-states. The boiler temperature can also transition between any two sub-states while continuing to remain in the overall alarmed condition.
20
Alarm Acknowledgement
When an alarm occurs, the run time operator (or system) must acknowledge the alarm. Acknowledgement merely indicates that someone is aware of the alarm. This is separate from taking corrective action, which might not happen right away. It is also separate from whether the alarm condition returns to normalwhich it might do on its own, even without any external intervention. A high or medium priority alarm usually requires immediate acknowledgment, while a very low-priority alarm might not. Although the condition that generated the alarm may go away (for example, a temperature rises too high and then becomes lower again), the alarm itself is not considered resolved until it is acknowledged.
Alarm Groups
You can group alarms to make tracking and management easier. Alarm groups are logical representations of different areas of a factory, pieces of equipment, operator responsibility, or a manufacturing process. For example, the following figure shows a three-tier alarm group hierarchy for a tank farm application.
$System
TnkFrm1
TnkFrm2
TnkFrm3
F1Tk1Lvl
F2Tk1Lvl
F2Tk2Lvl
F3Tk1Lvl
F3Tk2Lvl
Alarm groups are useful for filtering in alarm displays, alarm printers, and acknowledgment scripts. Every tag is associated with an alarm group. By default, tags are assigned to main $System group. You can create a hierarchy of additional alarm groups under the $System group, up to a maximum of 32 levels. You create alarm groups and associate tags with them while you are defining your tags in the Tagname Dictionary. Alarm groups and group variables are not compatible with SmartSymbols. You can't use references to alarm groups or group variables in a SmartSymbol.
21
The operator modified the tag value using the 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 and USER events are generated by the system regardless of whether event logging is enabled for any tags. DDE, OPR, and LGC events relate to tag values and are only generated for tags that have event logging enabled.
22
Discrete Value - LoLo Value - Low Value - High Value - HiHi Deviation - Major Deviation - Minor Rate-of-Change SPC
You associate each InTouch tag with an alarm condition when you define the tag. Depending upon a tags type, you can define one or more of the alarm classes or types for it.
Discrete Alarms
A discrete alarm corresponds to a discrete tag with two possible states. When you create a discrete tag, you configure whether the alarmed state corresponds to the true or false state of the tag.
23
Analog Alarms
An analog alarm corresponds to an analog tag, which is associated with an integer or real number. Within the analog alarm type, there are several sub-types: value, deviation, and rate-of-change.
Value Alarms
The current tag value is compared to one or more predetermined limits. If the value exceeds the limit, the alarmed state is declared. You can individually configure values and priorities for the LoLo limit, Lo limit, Hi limit, and HiHi limit, and indicate whether or not each limit is to be used.
LoLo Alarm Level Lo Alarm Level Hi Alarm Level 80 HiHi Alarm Level 90
10
20
Deviation Alarms
The current tag value is compared to a target value, and then the absolute value of the difference is compared to one or more limits, expressed as a percent of the range of the tag value.
Target 50% No Alarm 10% Minor Deviation 20% Major Deviation
60 50
70
24
You can individually configure values and priorities for the minor deviation limit and the major deviation limit, and indicate whether or not each limit is to be used. You can also configure a value for a deviation deadband, also expressed as a percent of the tag's range. This controls the percentage (of the total range) that the tag value must change before it is evaluated 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 minor deviation thresholds at 40 and 60. Major deviation of 20 percent, which sets the major deviation thresholds at 30 and 70. Deadband of 10 percent
If the tag value is 39, a minor deviation alarm occurs. However, the value must change at least to 50 (40 plus the deadband of 10) before the alarm is evaluated and cleared. If the tag value is 72, a major deviation alarm occurs. The value drop to at least 61 before the alarm is cleared.
You can configure the value and priority for the ROC limit, and whether or not the limit is to be used. The limit is expressed as a percentage of the tags value range over a time interval - which can be per second, per minute, or per hour.
25
An Alarm Manager, which manages currently active alarms (summary alarms) and historical alarms and events. The summary and historical alarms are held in the InTouch internal alarm memory. An Alarm DB Logger, which stores historical alarms and events to the alarm database. The alarm database is a SQL Server database. An Alarm Printer, which prints historical alarms and events. A set of ActiveX controls, which retrieve alarms and events from either the internal alarm memory or the alarm database at run time.
Alarm Manager
Current Alarms (Summary)
Alarm DB Logger
alarm database Smart Cache (buffer)
Alarm Printer
26
Run time operators can use the Distributed Alarm system to:
Show, log, and print alarms and events generated by a local InTouch application and by alarm systems of other networked applications. Acknowledge alarms locally or from a remote network node. Use the alarm ActiveX controls in your InTouch applications to show alarm displays that you pre-configure. Provide more feedback about the alarm using a separate alarm comment field.
Control the alarms through dotfields. Configure your alarms so that they are enabled or disabled directly or indirectly under full control of the application. You can apply alarm suppression to single alarm classes, tags, or groups to prohibit the showing of alarm information on a specific view node. System-wide disablement can block alarm activity at the source. Configure alarm information to be logged to history. The Alarm DB Logger can run as a Windows service or be manually started on demand. Alarm logging uses UTC (GMT) time stamping and provides compatibility with DST and across time zones. Set up failover alarm providers. If a primary alarm provider fails, the Distributed Alarm system seamlessly acquires alarm information from the backup system. On reconnection of the primary node, the Distributed Alarm system ensures that alarm acknowledgements are re-synchronized prior to the returning primary system becoming live.
Sends data through the Wonderware SuiteLink protocol and uses a minimal amount of CPU and network resources. Time stamps the alarm at the time the alarm occurs, not when the consumer receives the alarm. The time stamp includes milliseconds.
27
Alarm Provider
An alarm provider:
Keeps track of alarmable itemsthat is, items that can transition into an alarmed conditionand provides the Distributed Alarm system with the list of these items, including information on any hierarchical grouping of the items. Notifies the Distributed Alarm system when the status of an alarm item changes. Status changes include whether the item is in or out of the alarmed state and whether the most recent alarm has been acknowledged. Keeps track of whether an alarm item is disabled.
The InTouch HMI supports external alarm providers, such as SPCPro, QI Analyst, an ArchestrA Galaxy, and other software built with the Wonderware Alarm API toolkit. The date/time stamp for these alarm records is provided by the alarm provider, and is not generated by the Distributed Alarm system.
28
Alarm Consumer
An alarm consumer:
Provides the Distributed Alarm system with a set of queries identifying alarmable items about which it wishes to receive notifications. A query remains active until changed or removed by the alarm consumer, and specifies an alarm provider or group of alarms - much like a SQL query with wildcards. Whenever an alarm provider issues notification of a change, the Distributed Alarm system checks the alarm for matches with all registered queries and passes updates to the corresponding alarm consumers. Upon receiving updates, shows or logs information relating to the status of the items or their transitions. Acknowledges alarms. The alarm consumer sends an acknowledgement notification to the Distributed Alarm system, identifying the alarm and the alarm provider. The notification is passed to the alarm provider, which then updates the status of the item to acknowledged (if appropriate) and in turn notifies the Distributed Alarm system, thereby ensuring that the update gets distributed to all interested alarm consumers.
Note The majority of communication in the Distributed Alarm system consists of sending alarm queries and alarm records from one node to another. Within a node, alarm queries and alarm records are tracked and buffered by the internal alarm memory to minimize network traffic.
29
Alarm Storage
Alarm Storage
Alarm Storage
The Distributed Alarm Display shows the alarms resulting from a query across all of the alarm groups that belong to the list. For example, if you were interested in showing all tank farm alarms across several InTouch nodes, you can create a list called TankFarmAlarms. To this list, you add alarm groups from all nodes that run tank farm InTouch applications. For more information on creating alarm groups, see Creating an Alarm Group on page 34.
InTouch HMI Alarms and Events Guide
30
Disablement. You disable an alarm at the alarm provider by setting a flag that marks it as disabled. No matter what alarm conditions occur, the item is never put into an alarmed state. For information on dotfields you can use to disable an alarm, see Enabling and Disabling Alarms for a Tag or Alarm Group on page 158. You can disable or enable all of a tags alarms at one time. Also, for an alarm that has sub-states, you can disable each sub-state individually.
Adding an inhibitor tag to the alarm configuration in WindowMaker. The inhibitor tag is used at run time to mark the alarm as inhibited.
Setting the inhibitor tag to True or False at run time. When the inhibitor tag is False, the alarm is handled normally. When the inhibitor tag is True, the item cannot alarm. Each alarm sub-state can be inhibited by a different tag, and you can leave some sub-states with no inhibitor tag assigned. Assigning a tag as an inhibitor tag for an alarm increases its cross-reference use count.
31
Suppression. Suppression causes an alarm consumer to ignore certain alarms. If an alarm matches the exclusion criteria, it is not visible. That is, it is not shown on a display, printed, or logged at that particular alarm consumer. The actual alarm generation is completely unaffected by suppression. Alarm records can still be logged into alarm history.
If an alarm becomes disabled or actively inhibited while the item is in an alarmed state, the item is forced to a different (valid) state. What that state should be depends upon which states are available and whether they have also been disabled. This activity is handled by the alarm provider according to the type of alarm, limit values, and so on. An alarm that is disabled or actively inhibited is not waiting for an acknowledgment. If the alarm has sub-states, it can only be waiting for an acknowledgment on sub-states that are still available.
32
Internal alarm memory (buffer) Most information about current and recent alarms is held in memory on various computer nodes. InTouch uses two memory locations: one for summary alarms (current) and one for historical alarms and events. This model is also used in the Distributed Alarm system. The memory for summary alarms grows as needed to accommodate all current alarms up to the limit of available memory. The memory for historical alarms can grow only to a pre-determined limit. After the historical memory reaches this limit, the oldest alarm records are discarded as new ones are added. In a multi-node environment, the alarm memory on the various nodes constitute a single collective of alarm memory. For information about setting the limit, see Configuring the Alarm Buffer Size on page 47.
Alarm database The Alarm DB Logger creates a database, keeping track of when an alarm occurs, makes a sub-state transition, is acknowledged, and when it returns to normal. Essentially, these records constitute a history of alarms in the system.
Because it is based on the use of queries, the Distributed Alarm system supports using one computer node to log alarms for several other nodes.
33
Chapter 2
Configuring Alarms
To configure alarms, you simply configure tags with alarm conditions. If required, you can also:
Define alarm hierarchies. Disable and inhibit alarms. Configure alarm comments. Configure miscellaneous alarm and event properties.
34
TnkFrm1
TnkFrm2
TnkFrm3
F1Tk1Lvl
F2Tk1Lvl
F2Tk2Lvl
F3Tk1Lvl
F3Tk2Lvl
Also, notice that subordinate group names reference their parent groups by including a portion of the parent name. For example, the third-level alarm group name F1Tk1Lvl references its alarm group parent TnkFrm1 by including the F1 prefix in its group name. Develop a naming convention that suggests the parent-child relationship between alarm groups at different levels within the hierarchy.
Note While alarm groups do not count as tags for InTouch licensing, they do count as tags in the database. Therefore, the total number of alarm groups plus actual tags cannot exceed the maximum limit set by your InTouch license.
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 character position within the name. If a name contains a hyphen (-), the name must begin with an alphabetic character. A name cannot contain a blank space. A name must have at least one alphabetic character.
35
On the Special menu, click Alarm Groups. The Alarm Groups dialog box appears.
3 4
In the Group Name box, type a name for the new alarm group. To reassign the alarm group to another parent group:
a
Click Parent Group to show the Alarm Groups dialog box. If this is the first alarm group defined for the InTouch application, the group is automatically assigned to the parent $System group. Select a new parent group from the list and click Close.
b 5
In the Comment box, type an optional comment up to 49 characters for the new alarm group and click OK. The Alarm Groups dialog box appears and shows the new alarm group added to the list. Click Close.
36
On the Special menu, click Alarm Groups. The Alarm Groups dialog box appears. Select the alarm group to modify and click Modify. The Modify Alarm Group dialog box appears.
3 4
Make any changes to the alarm groups name or comment. To reassign the alarm group to another parent group:
a b
Click Parent Group to show the Alarm Groups dialog box. Select a new parent group from the list and click Close.
Click OK.
37
On the Special menu, click Alarm Groups. The Alarm Groups dialog box appears. Select the alarm group and click Delete. When a message appears, click Yes. Click Close.
Open the Tagname Dictionary. Select an existing discrete tag or create a new discrete tag. Click either Alarms or Details & Alarms at the top of the Tagname Dictionary dialog box to show the discrete alarm details dialog box.
38
In the ACK Model area, select the alarm acknowledgement model for the tag. Click Condition for acknowledgment to count against all transitions into the alarmed state or a sub-state up to the time of the acknowledgement. This is the default acknowledgement model.
Click Event Oriented for an acknowledgment to only be for a particular transition to the alarmed state or a sub-state; an acknowledgment is accepted only if it refers to the most recent transaction. Click Expanded Summary for an acknowledgment to only be for a particular transition, whether to an alarmed state, to a sub-state, or a return to normal. Each transition from the normal state marks the beginning of a new return to normal (RTN) group. All transitions in an RTN group must be acknowledged individually before the overall RTN group is considered acknowledged.
5 6 7
In the Alarm Comment box, type an alarm comment up to 131 characters. In the Alarm State area, select the active alarm state to be the discrete tags On or Off value. In the Priority box, assign an alarm priority number between 1 to 999. The default priority number is 1, which is the highest alarm priority. Optionally assign an alarm inhibitor tag for the discrete alarm.
a b
In the Alarm Inhibitor box, click the button to show the Select Tag dialog box containing a list of defined tags. Select a tag from the list and click OK. The name of the tag you selected as the inhibitor tag appears in the Alarm Inhibitor box.
For more information on inhibiting alarms, see Inhibiting Alarms on page 44.
9
Click Save.
39
Open the Tagname Dictionary. Select an existing real or integer tag or create a new tag. Click either Alarms or Details & Alarms at the top of the Tagname Dictionary dialog box to show the alarm details dialog box.
In the ACK Model area, select the alarm acknowledgement model for the tag. Click Condition for acknowledgment to count against all transitions into the alarmed state or a sub-state up to the time of the acknowledgement. This is the default acknowledgement model.
Click Event Oriented for an acknowledgment to only be for a particular transition to the alarmed state or a sub-state. An acknowledgment is accepted only if it refers to the most recent transaction. Click Expanded Summary for acknowledgment to only be for a particular transition, whether to an alarmed state, to a sub-state, or a return to normal. Each transition from the normal state marks the beginning of a new return to normal (RTN) group. All transitions in an RTN group must be acknowledged individually before the overall RTN group is considered acknowledged.
40
In the Alarm Comment box, type a default comment up to 131 characters. The comment is assigned to the tags .AlarmComment dotfield. Select the alarm types (LoLo, Low, High, HiHi) to detect when the value of the tag is beyond an absolute limit. In the Alarm Value boxes, type the limit values for the alarm types. For example, in the case of LoLo and Low alarms, an alarm condition exists whenever the value of the tag is less than the Alarm Value. In the case of High and HiHi alarms, an alarm occurs whenever the value of the tag exceeds the Alarm Value. You can use real numbers for the limits.
6 7
In the Value Deadband box, type the number of engineering units the tag value must drop below or above the alarm value before it transitions out of an alarm state. For example, to return-to-normal from an alarm condition, a tag value must not only return inside its alarm limit, but also return through your specified Value Deadband. The Value Deadband prevents nuisance alarms caused by repetitive re-annunciation of an alarm where the tag value hovers around the limit, continually fluctuating in and out of an alarm state.
Optionally assign an alarm inhibitor tag for the tags alarm types (LoLo, Low, High, HiHi).
a
In the Alarm Inhibitor area, click the button to show the Select Tag dialog box containing a list of defined tags. Select a tag from the list and click OK. The name of the tag you selected as the inhibitor tag appears in the Alarm Inhibitor box.
For more information on inhibitor tags, see Inhibiting Alarms on page 44.
10 Click Save. 11 Click Close to exit the Tagname Dictionary dialog box.
41
Calculate the total value range of the tag. 1000 - (-1000) = 2000 Multiply the total value range of the tag by minor and major deviation percentages. 2000 x 0.10 = 200 = minor deviation limit 2000 x 0.15 = 300 = major deviation limit
Add and subtract the minor and major deviation limits from the target value. 500 - 200 = 300 = minor deviation lower limit 500 + 200 = 700 = minor deviation upper limit 500 - 300 = 200 = Major deviation lower limit 500 + 300 = 800 = Major deviation upper limit
42
Open the Tagname Dictionary. Select an existing real or integer tag or create a new tag. Click either Alarms or Details & Alarms at the top of the Tagname Dictionary dialog box to show the alarm details dialog box.
Select the deviation (Minor and Major Deviation) alarm types you want to use to detect when the value of an analog type tag is in a major or minor deviation from the specified target value. In the %Deviation box, type the percentage that the analog tag can deviate from the target value to trigger a minor or major deviation alarm condition. It is expressed as a percentage of the range of the tag. For an I/O tag, the Min EU and Max EU values entered in the tag's details dialog box define the range. For memory tags, the range is defined by the minimum value and maximum value. In the Target box, type the tag reference value that minor and major deviation percentages are based. In the Deviation Deadband % box, type the deviation percentage the tag value must drop below the limit before the tag is taken out of its alarm condition. Click Save. Click Close to close the Tagname Dictionary dialog box.
6 7
8 9
43
Open the Tagname Dictionary. Select an existing real or integer tag or create a new tag. Click either Alarms or Details & Alarms at the top of the Tagname Dictionary dialog box to show the alarm details dialog box. The following figure shows only those options that apply to rate-of-change alarms.
4 5 6 7 8
Select the Rate of Change box. In the % per box, enter the maximum allowable percentage change limit. Select Sec, Min, or Hr as the time interval unit. In the Priority box, type a number between 1 and 999 to set the alarm priority. Optionally assign an alarm inhibitor tag for the rate of change alarm.
a
In the Alarm Inhibitor area, click the button to show the Select Tag dialog box containing a list of defined tags. Select a tag from the list and click OK. The name of the tag you selected as the inhibitor tag appears in the Alarm Inhibitor box.
For more information on inhibiting alarms, see Inhibiting Alarms on page 44.
9
Click Save.
44
Disabling Alarms
You can disable or enable all alarms of a tag at once using the .AlarmEnabled or AlarmDisabled dotfields. For an alarm that has sub-states, each sub-state can be individually disabled. For example, an analog value alarm can have Hi enabled and HiHi disabled. During run time, the Alarm Provider does not generate alarms for an alarm or sub-state that is disabled. Changes to whether an alarm is disabled or enabled can be made at run time. Whenever an alarm transitions from disabled to enabled, the checking logic determines whether the item should be put in the alarmed state by the Alarm Provider. If an alarm becomes disabled or actively inhibited while the item is in an alarmed state, the item will be forced to a different (valid) state. What that state should be depends upon which states are available and whether they have also been disabled. This activity is handled by the Alarm Provider according to the type of alarm and limit values.
Inhibiting Alarms
You can optionally assign to each alarm or alarm sub-state an inhibitor alarm tag that prevents the alarm from transitioning into an active state.
When the inhibitor tag value becomes and remains TRUE (non-zero or non-NULL), the alarm is inhibited. Likewise, when the inhibitor alarm tag becomes and remains FALSE (zero or NULL), the alarm is not inhibited.
You can only change the inhibitor tag in WindowMaker. You can 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, and you can leave some sub-states with no inhibitor tag assigned. An alarm that is inhibited (and for which the tag is TRUE) is not waiting for an acknowledgment. If the alarm has sub-states, it can only be waiting for an acknowledgment on sub-states that are still available. An alarm or sub-state can be independently disabled, inhibited, or both. Only if the alarm is both enabled and not actively inhibited is the alarm capable of becoming active.
45
If 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 is always FALSE. Whenever the transition causes an alarm to change from being actively inhibited, the checking logic determines whether InTouch should put the item in the alarmed state. If an alarm becomes actively inhibited while the item is in an alarmed state, the item must be forced to a different (valid) state. What that state should be depends upon which states are available and whether they have also been disabled or actively inhibited. This activity is handled by InTouch according to the type of alarm, limit values, and so on. If an alarm (or an alarm sub-state) becomes actively inhibited while waiting for an acknowledgment, the item must be forced to a different (valid) state. As with whether the item is alarmed, InTouch must determine what this state should be. Alarm inhibitor tags are included in use counts and license limitations. Use the following read-only tag dotfields to get the name of the alarm inhibitor tag:
These fields return the name of a tag. Therefore, you can use the name in an indirect tag reference in an InTouch QuickScript to find out the current value of the alarm inhibitor tag, or to change the value of the alarm inhibitor tag. By doing this, you can force groups of alarms to be enabled or actively inhibited during run time.
46
Open the Tagname Dictionary. Select an existing tag or create a new tag associated with data that will be recorded as an event. Select Log Events. The Priority box becomes available. The value you enter for the Priority determines the event priority level for the tag.
In the Priority box, assign a number from 1 to 999 as the event priority. 1 is the highest event priority and 999 the lowest. Click Save. Click Close to close the Tagname Dictionary dialog box.
5 6
Internal alarm memory (buffer) size. Whether an alarms return to normal implies acknowledgement. For more information, see Using Automatic Acknowledgement When the Tag Value Returns to Normal on page 124.
47
Event logging. Whether alarm enabling is retentive when WindowViewer is restarted. Whether to use alarm acknowledgement comments as the general alarm comment. For more information, see Using Alarm and Acknowledgement Comments on page 126.
Open the InTouch application in WindowMaker. On the Special menu, point to Configure, and then click Alarms. The Alarm Properties dialog box appears.
In the Alarm Buffer Size box, type the maximum number of alarm entries that can be stored in the memory alarm buffer for summary or historical queries. Click OK.
48
Enabling Events
You can enable events to be logged within the application. An event represents a recognized change in application data resulting from an operator action, QuickScript, or I/O. A tags Log Events property must be set from the Tagname Dictionary before the tags associated events are stored in the internal alarm memory or logged to the alarm database. For more information about specifying event logging for a tag, see Setting Event Properties for Individual Tags on page 46.
To enable events 1 2
Open the InTouch application in WindowMaker. On the Special menu, point to Configure, and then click Alarms. The Alarm Properties dialog box appears.
3 4
Select the Events Enabled check box to log all events that occur while an InTouch application is running. Click OK.
49
Open the InTouch application in WindowMaker. On the Special menu, point to Configure, and then click Alarms. The Alarm Properties dialog box appears.
Select the Alarm Enable Retentive check box to retain the current state of the .AlarmEnabled dotfield as the initial value when the InTouch application re-started. Click OK.
50
Local
\InTouch!Group_Name or .Group_Name
Remote
\\Node_Name\InTouch!Group_Name or Node_Name.Group_Name
For these examples, Node_Name is the name of the InTouch remote node. Group_Name is the name of the alarm group. If the alarm group is defined on the local node where the alarm group list is being defined, you can simply enter the alarm group name with a preceding period. For example, .Group_Name.
To create an alarm group list 1
On the Special menu, point to Configure, and then click Distributed Name Manager. The Distributed Name Manager dialog box appears.
In the Group Properties area, type the name of the alarm query in the Name box.
51
In the Members box, type the list of InTouch nodes and alarm groups to be included in the query. You can enter the node names and alarm group names using Standard Group Entry syntax or as short cut entries using periods. Short cut entries are converted to Standard Group Entries when you save the alarm group list.
Note The Node.Group and .Group syntax can be used only in this configuration dialog box. It is not valid in the alarm display configuration 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 6
Click OK. Add the name of the alarm group list to a query in an Alarm Viewer control. The Alarm Viewer control now shows alarms for all groups specified in the list.
52
53
Chapter 3
Alarm Queries
Alarms and events (historical alarms) from the InTouch internal alarm memory or the alarm database. Current alarms (summary alarms) from the InTouch internal alarm memory.
When you configure an InTouch alarm ActiveX control, you specify the query source. You can also select query options to filter the query results. The following figure shows the Query tab for the Alarm Viewer ActiveX control.
54
In this example, you create an alarm display that shows alarm 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 query favorites file. During run time, you can update the alarm display with new alarm data by running another query using selection criteria saved to the file. Other InTouch alarm ActiveX controls provide more extensive query criteria. The following figure shows the Query Filter tab of the Alarm DB Viewer control.
You build your queries by selecting alarm or event attributes from the list shown in the left pane of the dialog box. Then, you assign a value to the selected attributes. Finally, you can combine attributes using Boolean operators to set your query filter conditions. You can write QuickScripts that include query functions or dotfields to select alarm and event records from alarm memory. The following Alarm Viewer control statement uses the ApplyQuery() method to query the alarm memory.
#AlarmViewerCtrl1.ApplyQuery ("\InTouch!$System",500,600,"All", "Historical");
This statement retrieves all historical alarms specified by the \InTouch!$System query with a priority between 500 and 600. The selected alarm records appear in the Alarm Viewer control display.
55
56
Alarm DB Logger Manager Alarm Printer Utility Alarm Viewer Control Alarm Tree Viewer Control Alarm Pareto Control Distributed Alarm Display Object Hot Backup Manager
Configuring Which Alarms to Log on page 276 Configuring Which Alarms to Print on page 238 Configuring Which Alarms to Show on page 68 Configuring Which Providers and Groups to Show on page 217 Configuring Which Alarms to Analyze on page 362 Configuring Which Alarms to Show on page 423 Creating an Alarm Record Mapping File on page 402
57
Chapter 4
Viewing Current Alarms
Use the InTouch Alarm Viewer ActiveX control to view alarms. The Alarm Viewer control has scroll bars, sizable columns, multiple alarm selections, an update status bar, dynamic display types, and show colors based on the type of alarm.
We recommend that you use the Alarm Viewer control to view InTouch alarms. However, you can continue to use the Distributed Alarm object to view alarms from applications created with versions of InTouch earlier than 7.1.
58
Include a status bar. Include a column header. Include horizontal and vertical grid lines that show the rows and columns. Include a run-time option that allows the user to adjust the width of columns. Set the colors of visual elements.
The following figure shows how the Alarm Viewer control appears when all visual properties are active.
Heading Column Resize Control
Grid Lines
Status Bar
59
Right-click the Alarm Viewer control, and then click Properties. The AlarmViewerCtrl Properties dialog box appears. Click the General tab.
Automatically begins updating the control using default query properties. If a query is not run when the application starts, you need to run a script using the Requery() function to update the grid. The Requery option is also available on the grids shortcut menu during run time. Enables a right-click shortcut menu during run time. Controls whether a default comment appears when an operator acknowledges an alarm. If this box is checked and a string is entered, the string is used during run time as the default comment. If this box is not selected, when the operator acknowledges an alarm, a dialog box appears to enter an optional comment. The dialog box can be filled in or left blank.
60
Description
Retain alarm suppression between alarm queries when the alarm query is changed Toggles whether the status bar appears at the bottom of the Alarm Viewer control. Allow users to select individual rows during run time. Each row represents an alarm record. Users can select multiple alarms. If Silent Mode is selected, the Alarm Viewer control does not show error messages during run time. If it is not selected, the alarm display shows pop up error messages. In either case, error messages are always sent to the ArchestrA Log Viewer. Shows the message typed in the text box. This is the message shown when there are no alarms. Toggles whether the heading bar appears at the top of the Alarm Viewer control. Allows the user to select multiple alarms simultaneously by holding down CTRL or SHIFT keys in conjunction with the mouse button. Available only if Row Selection check box is selected. Enables unacknowledged alarms to flash once per second until they are acknowledged. Freezing the alarm display in WindowViewer does not stop unacknowledged alarms from flashing.
Row Selection
Silent Mode
Show Message
Show Heading
61
Description
If Resize Columns is selected, the user can resize the width of the columns during run time. Otherwise, column width is static and can be set only from WindowMaker. If Show Grid is selected, the Alarm Viewer control shows horizontal and vertical lines that separate the rows and columns of the alarm display. If it is not selected, no grid is visible.
Show Grid
4 5
6 7 8
Click the palette button to assign colors to the visual elements of the Alarm Viewer control. Click Apply to save your color selections. Click OK.
62
Right-click the Alarm Viewer control, and then click Properties. The AlarmViewerCtrl Properties dialog box appears. Click the General tab.
3 4
Click Font. The standard Windows Font dialog box appears. Configure the font and then click OK. Click OK.
Select and order the columns. Set the width of a column in pixels. Rename a column.
Right-click the Alarm Viewer control and then click Properties. The AlarmViewerCtrl Properties dialog box appears. Click the General tab.
63
In the Name column, select the check boxes next to the names of the columns that you want to appear. You must select at least one column from the list.
Column Time State Class Type Priority Name Group Provider Value Shows
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 alarm occurred. The width of the column should be large enough to provide the desired level of precision. The alarm limit value of the tag. The width of the column should be large enough to provide the desired level of precision. The logged-on operators ID associated with the alarm condition. The logged-on operators full name.
Limit
64
Shows
The logged on operators node associated with the alarm condition. In a Terminal Services environment, this is the name of the client computer that the operator established the Terminal Services session from. If the node name can't be retrieved, the node's IP address is used instead.
The logged on operators domain associated with the alarm condition. The comment for the tag. The comment associated with the tag's alarm. This comment was typed in the Alarm Comment box when the tags alarm was defined. When an acknowledgement comment is introduced for alarms, the new comment is updated in this comment column. The numerical value of the AlarmUserDefNum1 property of the alarm. The numerical value of the AlarmUserDefNum2 property of the alarm. The string value of the AlarmUserDefStr property of the alarm.
User1
User2
User3
Rearrange columns by selecting the column name and using the up and down arrows. The column name appearing at the top of the Column Details dialog box is the left-most column of the alarm control.
65
To change the name of a column or its width, select the column and click Edit. The Edit dialog box appears.
a a b 7 8
In the New Name box, type the new column name. In the New Width box, type the column width. The column width can range from 1 to 999 pixels. Click OK.
66
You can control which menu commands are shown in the shortcut menu.
To configure the shortcut menu 1
Right-click the Alarm Viewer control, and then click Properties. The AlarmViewerCtrl Properties dialog box appears. Click the General tab. Select the Show Context Sensitive Menu check box. Click Configure Context Menus. The Context Sensitive Menus dialog box appears.
2 3 4
This dialog box shows a hierarchical list of commands that can appear in an Alarm Viewer control shortcut menu.
67
Configure the shortcut menu options. You must select at least one shortcut menu command.
This command Ack Selected Allows the run-time user to
Acknowledge selected alarms. If Ack Selected and Ack Others menu items are both unchecked, the Use Default Ack Comment check box and the text box are disabled. Acknowledge alarms by other methods. The user can select which alarms to acknowledge. If Ack Others is selected, you must select at least one of the submenu items. Acknowledge all active alarms. Acknowledge visible alarms. Acknowledge all alarms with the same group name as the selected group(s) and with the same provider name. Acknowledge all alarms with the same tagname as the selected tag(s) and with the same provider, group, and priority. Acknowledge all alarms with the same priority as the selected priority or priorities and with the same provider and group. Suppress selected alarms. Suppress alarms by other methods shown in the shortcut menu. Suppress all alarms. Suppress visible alarms. Suppress all alarms with the same group name as the selected group(s). Suppress all alarms with the same tagname as the selected tag(s).
Ack Others
Suppress Selected Suppress Others Suppress All Suppress Visible Suppress Selected Groups Suppress Selected Tags
68
This command Suppress Selected Priorities Unsuppress All Query Favorites Stats Suppression Freeze Requery Sort 6 7 8
Suppress all alarms with the same priority as the selected priority or priorities. Unsuppress all suppressed alarms. Open the Alarm Query dialog box. Open the Alarm Statistics dialog box. Open the Alarm Suppression dialog box. Toggle the freeze/unfreeze mode of the Alarm Viewer control. Re-run the alarm query. Open the Sort dialog box.
Click OK. Click Row Selection to allow users to select a row from the Alarm Viewer control during run time. Click Use Extended Selection to allow users to select multiple alarm records simultaneously from the Alarm Viewer control using the SHIFT or CTRL keys. Click Apply.
Right-click the Alarm Viewer control and then click Properties. The AlarmViewerCtrl Properties dialog box appears. Click the General tab. Select the Perform Query on Startup check box to automatically update the Alarm Viewer control using default query properties when the application starts. Select the Show Message check box to show a default message when there are no alarms. In the text box, type the message to show. Click Apply.
2 3
69
Right-click the Alarm Viewer control and then click Properties. The AlarmViewerCtrl Properties dialog box appears. Click the Query tab.
3 4 5
In the From Priority box, type the minimum alarm priority value (1 to 999). In the To Priority box, type the maximum alarm priority value (1 to 999). Click the Query Type arrow and select either Historical or Summary as the default run-time alarm display. The default type of display can be changed during run time by running a QuickScript containing a query function. For example, if the script includes the ApplyQuery() method with its Type parameter set to Summary, then the grid shows a summary of current alarms. Conversely, if the same grid has an ApplyQuery() method run against it with the Type parameter set to "Historical", it shows historical alarms. The QueryType property reflects the current state of the alarm display. For more information on the ApplyQuery() method, see ApplyQuery() Method on page 100.
In the Alarm Query box, type a valid alarm query. For example, type \InTouch!$System to query for all alarms that belong to the default $System alarm group. Click OK.
70
Right-click the Alarm Viewer control and then click Properties. The AlarmViewerCtrl Properties dialog box appears. Click the Query tab.
In the Query Favorites File box, type the network path and file name or click the ellipse button to browse for the file. To edit the Filter Favorites file, click the Edit Query Favorites button. The Alarm Query window opens, allowing you to add, modify, or delete filters from your favorites file. When you are done, click OK to save your changes and close the window.
Click OK.
71
Right-click the Alarm Viewer control and then click Properties. The AlarmViewerCtrl Properties dialog box appears. Click the Color tab.
Click each color box to open the color palette. Click the color that you want to use in the palette for each of the following:
Property Description
Sets display background color. Sets title bar text color (available only if Show Heading option is selected). Sets color of returned alarms (alarms that have returned to normal without being acknowledged). Sets color of the grid. By default the grid is not shown. The default grid color is light gray. The color of the grid in the alarm object is automatically set to a contrasting color of the selected Window color.
Alarm Return
Grid
72
Property
Description
Sets title bar background color (available only if the Show Heading option is selected). Sets color of events.
Event
4
In the Alarm Priority boxes, type alarm priority numbers that serve as breakpoints for the different colors used to identify unacknowledged alarms, acknowledged alarms, and flashing unacknowledged alarms. Click the UnAck Alarm and Ack Alarm color boxes to open the color palette. Click the color in the palette that you want to use. To configure the alarm query to flash unacknowledged alarms, click the General tab, select the Flash Unack Alarms check box, then click the Color tab and select the Flash Unack Alarms color boxes. Select the color that you want to use for each alarm priority range.
Note The Alarm Viewer control cannot show changes that occur in less than a second. If an alarm changes state twice within a second, the Alarm Viewer control does not recognize the change. 7
Click Apply.
73
Right-click the Alarm Viewer control and then click Properties. The AlarmViewerCtrl Properties dialog box appears. Click the Time Format tab.
In the Time Format list, click the desired time format. The Time Format box shows a set of strings consisting of characters separated by the % symbol for the format you selected.
String character d b Y m y #x B H Description
Two-digit day of the month. Three-letter month abbreviation. Four-digit year. Two-digit month. Two-digit year. Full day and date. For example: Friday, August 10, 2007 Complete month name. Hours in 24 hour time format.
74
String character M p S s I 4
Description
Minute. AM or PM (for 12 hour time format). Seconds. Fractions of a second. Hours in 12 hour time format.
The original alarm time, which is the date/time stamp of the onset of the alarm. The last changed time, which is the date/time stamp of the most recent change of state for the instance of the alarm: onset of the alarm, change of sub-state, return to normal, or acknowledgment. The last changed time, but the original alarm time on acknowledge. The last changed time is used while the alarm is unacknowledged, then the original alarm time is used after the alarm has been acknowledged.
LCT
Greenwich Mean Time, also known as Coordinated Universal Time, UTC, or Zulu. Alarm time adjusted for the local time zone. Alarm time adjusted for the time zone of the alarm source.
Click Apply.
75
Right-click the Alarm Viewer control, and then click Properties. The AlarmViewerCtrl Properties dialog box appears. Click the Query tab.
Select the primary sort column from the Sort Column list. Only visible columns appear in the Sort Column list. If you do not see the column you want, go to the General tab and select the column from Column Details. Select the secondary sort column from the Secondary Sort Column list. If you selected Time as the primary sort column, the Auto Scroll to New Alarms check box becomes available. Select this option if you want to automatically scroll and show new alarms as they occur. Select Ascending or Descending as the sort direction.
b c
d 4
Click Apply.
76
acknowledgement commands.
Ack All - Acknowledges all the alarms in the current alarm query. Because the alarm grid has only a limited display area, the Ack All command may acknowledge alarms that are not visible in the grid. Ack Visible - Acknowledges only those alarms that are
the same tag from the same provider and group name and having the same priority as one or more of the selected alarms.
Ack Selected Priorities - Acknowledges all alarms that
have the same priority from the same provider and group name as one or more of the selected alarms.
Suppress Selected - The selected alarm(s) is/are
suppressed.
Suppress Others - A sub-menu opens that contains
suppression commands.
Suppress All - Suppress showing current and future
77
Suppress Selected Tags - Suppress showing current and future occurrences of any alarm that belongs to the same tag name of one or more selected alarms having the same Provider name, Group name and Priority range. Suppress Selected Priorities - Suppress showing
current and future occurrences of any alarm that belongs to the same priorities of one or more selected alarms having the same Provider name and Group name.
Unsuppress All - Clears the suppression settings. Query Favorites - Shows the Alarm Query dialog box to
select a previously saved alarm query. You can also add, modify and 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.
78
Right-click the Alarm Viewer control and then click Query Favorites. The Alarm Query dialog box appears.
2 3
Select the named query that you want to show in the list of currently defined queries. Click OK. The Alarm Viewer control now shows alarm information retrieved by the query.
79
Right-click the Alarm Viewer control and then click Query Favorites. The Alarm Query dialog box appears. Click Add. The Add Query dialog box appears.
In the Name box, type the name that you want to use to identify the query. In the Query box, type the sets of InTouch alarm queries that you want to perform. You can specify one or more Alarm Providers and groups. In the From Priority box, type the minimum alarm priority value (1 to 999). In the To Priority box, type the maximum alarm priority value (1 to 999). Click the Alarm State arrow and select the alarm state that (All, Ack, Unack) you want to use in the alarm query. In the Display Type area, select Summary or Historical for the type of records you want to query.
c d e
f 4 5
Click OK to close the Add Query dialog box. Click OK in the Alarm Query dialog box to add the query to your favorites.
80
Right-click the Alarm Viewer control and then click Query Favorites. The Alarm Query dialog box appears. Select the named query that you want to modify in the list of currently defined queries. Click Modify. The Modify Query dialog box appears. Make the necessary modifications and then click OK. Click OK in the Alarm Query dialog box.
Right-click the Alarm Viewer control and then click Query Favorites. The Alarm Query dialog box appears. Select the named query that you want to delete in the list of currently defined queries. Click Delete. When a message appears, click Yes. Click OK in the Alarm Query dialog box.
Discrete Integer
Enables/disables Ack All menu item. Sets color to be used to show acknowledged alarms with priorities in the range 1 to ColorPriorityRange1. The default priority range is 1 to 250. Sets color to be used to acknowledged alarms with priorities in the range ColorPriorityRange1 to ColorPriorityRange2. The default priority range is 250 to 500.
AckAlmColorRange2
Integer
81
Property AckAlmColorRange3
Type
Purpose
Integer
Sets color to be used to acknowledged alarms with priorities in the range ColorPriorityRange2 to ColorPriorityRange3. The default priority range is 500 to 750. Sets color to be used to acknowledged alarms with priorities in ColorPriorityRange3 to 999. The default priority range is 750 to 999. Enables/disables Ack Others menu item. Enables/disables Ack Selected Groups menu item. Enables/disables Ack Selected menu item. Enables/disables Ack Selected Priorities menu item. Enables/disables Ack Selected Tags menu item. Enables/disables Ack Visible menu item. Sets the initial alarm query. This field accepts text only; it does not accept tags. The following example uses the full path to the alarm group: \\Node\InTouch!Group This example uses the full path to the local alarm group: \InTouch!Group This example uses another Group List: GroupList
AckAlmColorRange4
Integer
AlarmState
Message
82
Property AlmRtnColor
Type
Purpose
Integer
Sets the color for alarms that have returned to normal and were unacknowledged. This color is also used for alarms that returned to normal from the acknowledged state but the acknowledgement state transition was not observed. If the user scrolls the list from the beginning, this automatically jumps to the new alarm. (New alarms are defined as those that are not currently shown within the display object.) Sets the boundary of the priority range in which alarms are to be shown. The value of this property must be greater than one and less than the value for ColorPriorityRange2. Sets the boundary of the priority range in which alarms are to be shown. The value of this property must be greater than the value for ColorPriorityRange1 and less than the value for ColorPriorityRange3 Sets the boundary of the priority range in which alarms are to be shown. The value of this property must be greater than the value of ColorPriorityRange2 and less than 999. Returns or sets a value that determines whether the columns can be resized at run time. The default message to show when there are no alarms. Used as a comment when the alarm is acknowledged and when the "UseDefaultAckComment" is TRUE. Otherwise, the user is prompted to enter a comment. Shows the alarm message time. The values can only be "OAT" or "LCT" or "LCT But OAT on ACK."
AutoScroll
Discrete
ColorPriorityRange1
Integer
ColorPriorityRange2
Integer
ColorPriorityRange3
Integer
ColumnResize
Discrete
CustomMessage DefaultAckComment
Message Message
DisplayedTime
Message
83
Property DisplayedTimeZone
Type
Purpose
Message
Gets or sets the current time zone string. The values can only be "GMT" or "Origin Time" or "Local Time." Sets color of events. Allows you to select multiple alarms by holding down the Ctrl or Shift key in conjunction with the mouse button. The default is to toggle selection of alarms by simply clicking on them (available only if the Row Selection check box is selected). Enables or disables the flashing of unacknowledged alarms. It takes a discrete input value of 1 or 0. If this property is set to 1, unacknowledged alarms flash once per second. If this property is set to 0, unacknowledged alarms do not flash. This property corresponds to the Flash Unack Alarms check box on the Alarm Viewer control General tab. Sets the flashing color for unacknowledged alarms belonging to Alarm Priority Range 1. Sets the flashing color for unacknowledged alarms belonging to Alarm Priority Range 2. Sets the flashing color for unacknowledged alarms belonging to Alarm Priority Range 3. Sets the flashing color for unacknowledged alarms belonging to Alarm Priority Range 4. Sets the font for the records and the header in the control. Enables/disables the Freeze menu item. Sets the low priority value of the default query. Sets the color of the background grid.
EventColor ExtendedSelection
Integer Discrete
FlashUnAckAlarms
Discrete
FlashUnackAlmColorRange1
Integer
FlashUnackAlmColorRange2
Integer
FlashUnackAlmColorRange3
Integer
FlashUnackAlmColorRange4
Integer
84
Property NewAlarmEventMode
Type
Purpose
Integer
Controls the triggering of the NewAlarm event. 0 = The NewAlarm event can not be triggered. (Default). 1 = The NewAlarm event is active. 2 = The NewAlarm event is active and continually triggers when at least one new unacknowledged alarm arrives.
Returns or sets the query favorites file name. Enables/disables the Query Favorites menu item. Returns the current query name. Automatically begins updating the grid using default query properties, if set. Otherwise, you must run the ApplyDefaultQuery or ApplyQuery method in a script to update the grid. Sets the display type as either Summary or Historical. Enables/disables Requery shortcut menu item. Retains alarm suppression between alarm queries when the alarm query is changed. Allows user to select alarms during run time. Returns or sets the current secondary sort column. Returns the total number of selected alarms. Enables the activation of the shortcut menu. Returns or sets a value that determines whether the grid lines are shown in the control. Shows the title bar of the control.
ShowHeading
Discrete
85
Property ShowMessage
Type
Purpose
Discrete
Returns or sets a value that determines whether error messages are shown for the control. Gets or sets a value that determines whether the status bar is shown. Gets or sets a value that determines whether the control is in silent mode. Gets or sets the current sort column. Enables/disables the Sort menu item. Gets or sets the sort direction. Possible values are "Ascending" and "Descending," represented as 0 and 1 respectively. Enables/disables the Stats menu item. Enables/disables the Suppress All menu item. Gets the total number of suppressed alarms. Enables/disables the Suppression menu item. Enables/disables the Suppress Others menu item. Enables/disables the Suppress Selected
Groups menu item.
StatsMenu SuppressAllMenu SuppressedAlarms SuppressionMenu SuppressOthersMenu SuppressSelectedGroupsMenu SuppressSelectedMenu SuppressSelectedPrioritiesMenu SuppressSelectedTagsMenu SuppressVisibleMenu TimeFormat TitleBackColor TitleForeColor
Discrete Discrete Integer Discrete Discrete Discrete Discrete Discrete Discrete Discrete Message Integer Integer
Enables/disables the Suppress Selected menu item. Enables/disables the Suppress Selected
Priorities menu item.
Enables/disables Suppress Selected Tags menu item. Enables/disables the Suppress Visible menu item. Sets the format of the alarm time stamps. Sets title bar background color. Sets title bar foreground color.
86
Type
Purpose
Sets the maximum priority for the alarm query. Gets the number of alarms. Gets the total number of unacknowledged alarms. Sets the color to be used to show unacknowledged alarms with priorities in the range of 1 to ColorPriorityRange1. Sets the color to be used to show unacknowledged alarms with priorities in the range of ColorPriorityRange1 to ColorPriorityRange2. Sets the color to be used to show unacknowledged alarms with priorities in the range of ColorPriorityRange2 to ColorPriorityRange3. Sets the color to be used to show unacknowledged alarms with priorities in the range of ColorPriorityRange3 to 999. Enables/disables Unsuppress All menu item. If set to True, the default acknowledgement comment is used when the alarm is acknowledged. Otherwise, the operator is prompted to enter a comment. Sets the grid background color.
UnAckAlmColorRange2
Integer
UnAckAlmColorRange3
Integer
UnAckAlmColorRange4
Integer
UnsuppressAllMenu UseDefaultAckComment
Discrete Discrete
WindowColor
Integer
87
88
Acknowledge alarms. Suppress alarms. Get information about an alarm. Run alarm queries. Move and freeze the display. Sort alarm records. Select specific alarms. Show the shortcut menu, About dialog box, and Alarm
Statistics dialog box.
For more information about calling methods, see Chapter 8, Scripting ActiveX Controls, in the InTouch HMI Scripting and Logic Guide.
Acknowledging Alarms
Use the following methods to acknowledge alarms during run time.
AckSelected() Method AckAll() Method AckVisible() Method AckSelectedGroup() Method AckSelectedTag() Method AckSelectedPriority() Method AckGroup() Method AckPriority() Method AckTag() Method
89
AckSelected() Method
Acknowledges alarms that are selected in the Alarm Viewer control at run time.
Syntax
Object.AckSelected (Comment)
Parameter
Tag1 is defined as a message tag and the name of the control is AlarmViewerCtrl1.
Tag1 = "Alarm Comment"; #AlarmViewerCtrl1.AckSelected (Tag1);
AckAll() Method
Acknowledges 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 shown in the display.
Syntax
Object.AckAll (Comment)
Parameter
Tag1 is defined as a message tag and the name of the control is AlarmViewerCtrl1.
Tag1 = "Alarm Comment"; #AlarmViewerCtrl1.AckAll (Tag1);
90
AckVisible() Method
Acknowledges only those alarms that are currently visible in the Alarm Viewer control.
Syntax
Object.AckVisible (Comment)
Parameter
Tag1 is defined as a message tag and the name of the control is AlarmViewerCtrl1.
Tag1 = "Alarm Comment"; #AlarmViewerCtrl1.AckVisible (Tag1);
AckSelectedGroup() Method
Acknowledges all alarms that have the same group name as one or more selected alarms.
Syntax
Object.AckSelectedGroup (Comment)
Parameter
Tag1 is defined as a message tag and the name of the control is AlarmViewerCtrl1.
Tag1 = "Alarm Comment"; #AlarmViewerCtrl1.AckSelectedGroup (Tag1);
91
AckSelectedTag() Method
Acknowledges all alarms that have the same tag, group name and priority as one or more of the selected alarms.
Syntax
Object.AckSelectedTag (Comment)
Parameter
Tag1 is defined as a message tag and the name of the control is AlarmViewerCtrl1.
Tag1 = "Alarm Comment"; #AlarmViewerCtrl1.AckSelectedTag (Tag1);
AckSelectedPriority() Method
Acknowledges all alarms that have the same priority range as one or more of the selected alarms.
Syntax
Object.AckSelectedPriority (Comment)
Parameter
Tag1 is defined as a message tag and the name of the control is AlarmViewerCtrl1.
Tag1 = "Alarm Comment"; #AlarmViewerCtrl1.AckSelectedPriority (Tag1);
92
AckGroup() Method
Acknowledges all alarms for a given group name and provider.
Syntax
Object.AckGroup(ApplicationName, GroupName, Comment)
Parameter
ApplicationName The name of the Application for example, \\node1\Intouch GroupName The name of the group. For example, Turbine. Comment Alarm acknowledgment comment.
Example
AckPriority() Method
Acknowledges all of the alarms specified priority range having same provider name and group name.
Syntax
Object.AckPriority(ApplicationName, GroupName, FromPriority, ToPriority, Comment)
Parameter
ApplicationName The name of the application. For example, \\node1\Intouch GroupName The name of the group. For example, Turbine. FromPriority Starting priority of alarms. For example, 100. ToPriority Ending priority of alarms. For example, 900. Comment Alarm acknowledgment comment.
Example
93
AckTag() Method
Acknowledges the alarms of the given tag name having the same provider name and group name within the given priority range.
Syntax
Object.AckTag(ApplicationName, GroupName, tag, FromPriority, ToPriority, Comment)
Parameter
ApplicationName The name of the Application for example, \\node1\Intouch GroupName The name of the group. For example, Turbine. tag The name of the alarm tag. For example, Valve1. FromPriority Starting priority of alarms. For example, 100. ToPriority Ending priority of alarms. For example, 900. Comment Alarm acknowledgment comment.
Example
94
Suppressing Alarms
Use the following methods to suppress alarms during run time:
ShowSuppression() Method SuppressSelected() Method SuppressAll() Method SuppressVisible() Method SuppressSelectedGroup() Method SuppressSelectedTag() Method SuppressSelectedPriority() Method UnSuppressAll() Method SuppressGroup() Method SuppressPriority() Method SuppressTag() Method
ShowSuppression() Method
Shows the suppression dialog box, which contains all suppressed alarms.
Syntax
Object.ShowSuppression()
Example
SuppressSelected() Method
Suppresses showing current and future occurrences of the selected alarm(s).
Syntax
Object.SuppressSelected()
Example
95
SuppressAll() Method
Suppresses showing current and future occurrences of all active alarms.
Syntax
Object.SuppressAll()
Example
SuppressVisible() Method
Suppress showing current and future occurrences of any visible alarm.
Syntax
Object.SuppressVisible()
Example
SuppressSelectedGroup() Method
Suppresses showing current and future occurrences of any alarm that belongs to the same Group and Provider of one or more selected alarms.
Syntax
Object.SuppressSelectedGroup()
Example
SuppressSelectedTag() Method
Suppresses showing current and future occurrences of any alarm that belongs to the same tag name of one or more selected alarms having the same Group name, Provider name, and Priority range.
Syntax
Object.SuppressSelectedTag()
Example
96
SuppressSelectedPriority() Method
Suppresses showing current and future occurrences of any alarm that belongs to the same priority range of one or more selected alarms.
Syntax
Object.SuppressSelectedPriority()
Example
UnSuppressAll() Method
Clears alarm suppression.
Syntax
Object.UnSuppressAll()
Example
SuppressGroup() Method
Suppresses showing current and future occurrences of any alarm that belongs to a given Group name.
Syntax
Object.SuppressGroup(ApplicationName, GroupName)
Parameter
ApplicationName The name of the Application for example, \\node1\Intouch GroupName The name of the group. For example, Turbine.
Example
97
SuppressPriority() Method
Suppresses showing current and future occurrences of any alarm of the specified priority range, having the same Provider name and Group name.
Syntax
Object.SuppressPriority(ApplicationName, GroupName, FromPriority, ToPriority)
Parameter
ApplicationName The name of the Application for example, \\node1\Intouch GroupName The name of the group. For example, Turbine. FromPriority Starting priority of alarms. For example, 100. ToPriority Ending priority of alarms. For example, 900.
Example
98
SuppressTag() Method
Suppresses showing current and future occurrences of any alarm emitted by a given tag name or group name and in the specified priority range.
Syntax
Object.SuppressTag(ApplicationName, GroupName, tag, FromPriority, ToPriority)
Parameter
ApplicationName The name of the Application for example, \\node1\Intouch. GroupName The name of the group. For example, Turbine. tag The name of the alarm tag. For example, valve 1. FromPriority Starting priority of alarms. For example, 100. ToPriority Ending priority of alarms. For example, 900.
Example
99
GetItem() Method
Returns a string corresponding to the alarm at the specified row and column.
Syntax
Object.GetItem(Row Number, Column Name)
Parameter
RowNumber An integer expression that evaluates to a specific row in the control. ColumnName A string expression that evaluates to the column name in the control.
Example
The name of the control is AlarmViewerCtrl1 and Tag1 is defined as Memory Message.
Tag1 = #AlarmViewerCtrl1.GetItem(1, "Group");
Running Queries
Use the following methods to run queries.
ShowQueryFavorites() Method Requery() Method ApplyQuery() Method ApplyDefaultQuery() Method SetQueryByName() Method
ShowQueryFavorites() Method
Shows the Query Favorites dialog box if the QueryFavoritesFile property contains a valid query favorite file name in .xml format.
Syntax
Object.ShowQueryFavorites()
Example
100
Requery() Method
Queries the alarm provider again.
Syntax
Object.Requery()
Example
ApplyQuery() Method
Performs the query as specified by its parameters Alarm Query, From and To Priorities, State of alarms to query for. and the type of alarms to retrieve.
Syntax
Object.ApplyQuery(AlarmQuery, FromPriority, ToPriority, State, Type)
Parameter
AlarmQuery The alarm query. For example: \InTouch!$System FromPriority Starting priority of alarms. For example, 100. ToPriority Ending priority of alarms. For example, 900. State Specifies type of alarms to show. For example, "UnAck" or message tag. Valid states are All, UnAck, or Ack. Type Specifies type of query for example, Historical (Historical alarms) or Summary (Summary alarms).
Example
101
ApplyDefaultQuery() Method
Performs a query using the FromPriority, ToPriority, AlarmState, QueryType, and AlarmQuery properties as specified at design time. The default properties can only be changed at development time and are not overwritten by other alarm queries.
Syntax
Object.ApplyDefaultQuery()
Example
SetQueryByName() Method
Sets the current query specified by a query name. The query name is defined in the query favorites file.
Syntax
Object.SetQueryByName(QueryName)
Parameter
QueryName The name of the query as created by using "Query Favorites," for example, Turbine Queries.
Example
102
MoveWindow() Method
Scrolls the alarms in the control in a specified way.
Syntax
Object.MoveWindow(Option, Repeat)
Parameter
LineDn LineUp PageDn PageUp Top Bottom PageRt PageLf Right Left Home
Line down. The Repeat parameter controls the number of lines to be scrolled. Line up. The Repeat parameter controls the number of lines to be scrolled. Page down. The Repeat parameter controls the number of pages to be scrolled. Page up. The Repeat parameter controls the number of pages to be scrolled. To the top of the control To the bottom of the control. Page to the right. The Repeat parameter controls the number of pages to be scrolled. Page to the left. The Repeat parameter controls the number of pages to be scrolled. Scrolls right. The Repeat parameter controls the number of columns to be scrolled. Scrolls left. The Repeat parameter controls the number of columns to be scrolled. Scrolls to the top row and left most column of the control.
103
Example
FreezeDisplay() Method
Freezes the display.
Syntax
Object.FreezeDisplay(Freeze)
Parameter
Tag1 is defined as Memory discrete tag and the name of the control is AlarmViewerCtrl1.
Tag1 = 1; #AlarmViewerCtrl1.FreezeDisplay(Tag1);
ShowSort() Method
Shows the Secondary Sort dialog box if the SortMenu property is enabled.
Syntax
Object.ShowSort()
Example
104
SetSort() Method
Sets the sort criteria as specified by the SortColumn and SortOrder properties.
Syntax
Object.SetSort()
Example
AboutBox() Method
Shows the About dialog box.
Syntax
Object.AboutBox
Example
ShowStatistics() Method
Shows the Alarm Statistics dialog box.
Syntax
Object.ShowStatistics()
Example
105
SelectGroup() Method SelectPriority() Method SelectTag() Method SelectAll() Method SelectItem() Method UnSelectAll() Method
SelectGroup() Method
Selects all of the alarms that contain the same alarm group name and provider name.
Syntax
Object.SelectGroup(ApplicationName, GroupName)
Parameter
ApplicationName The name of the Application for example, \\node1\Intouch GroupName The name of the group. For example, Turbine.
Example
106
SelectPriority() Method
Selects all of the alarms that are of the specified priority range, having the same provider name and group name.
Syntax
Object.SelectPriority(ApplicationName, GroupName, FromPriority, ToPriority)
Parameter
ApplicationName The name of the Application for example, \\node1\Intouch GroupName The name of the group. For example, Turbine. FromPriority Starting priority of alarms. For example, 100. ToPriority Ending priority of alarms. For example, 900.
Example
SelectTag() Method
Selects all of the alarms from a specific Provider/Group/Tag. You can also specify a Priority range, or use 1-999.
Syntax
Object.SelectTag(ApplicationName, GroupName, tag, FromPriority, ToPriority)
Parameter
ApplicationName The name of the Application for example, \\node1\Intouch GroupName The name of the group. For example, Turbine. tag The name of the alarm tag. For example, valve 1. FromPriority Starting priority of alarms. For example, 100. ToPriority Ending priority of alarms. For example, 900.
Example
107
SelectAll() Method
Toggles the selection of all the alarms in a display. Because the alarm display has only a limited display area, the SelectAll() function may select alarms that are not visible in the display.
Syntax
Object.SelectAll()
Example
#AlarmViewerCtrl1.SelectAll();
SelectItem() Method
Toggles the selection of an alarm record at a given row.
Syntax
Object.SelectItem(RowNumber)
Parameter
RowNumber An integer value that is the row number for the alarm record to select. The first row in the control is 0.
Example
The name of the control is AlarmViewerCtrl1 and Tag1 is defined as a memory integer. This toggles the selection of the tenth alarm record in the Alarm Viewer control.
Tag1 = 9; #AlarmViewerCtrl1.SelectItem (Tag1);
UnSelectAll() Method
Unselects all the selected records.
Syntax
Object.UnSelectAll()
Example
108
ShowContext() Method
Shows the shortcut menu if any one of the shortcut menus are enabled.
Syntax
Object.ShowContext()
Example
The Click event has one parameter called ClicknRow, which identifies the row that is clicked at run time. The DoubleClick event has one parameter called DoubleClicknRow, which identifies the row that is double-clicked at run time.
109
Click and DoubleClick events are zero-based. When Click and/or DoubleClick events are published for the user, the row count in the display starts with 0.
Note The Alarm Viewer control ignores the user interface methods when they are called from StartUp event, because the control is not visible yet. These include: ShowSort(), ShowContext(), GetSelectedItem(), GetNext(), GetPrevious() and AboutBox().
For more information about scripting ActiveX events, see Chapter 8, Scripting ActiveX Controls, in the InTouch HMI Scripting and Logic Guide.
If you set NewAlarmEventMode property to 0, the NewAlarm event does not trigger. This is the default. If you set the NewAlarmEventMode property to 1, and a new alarm occurs:
An event is triggered. The ActiveX event script associated with the NewAlarm event runs. The NewAlarmEventMode property is set to 0.
You must change the NewAlarmEventMode property back to 1 to process subsequent events. Use this setting if the application performs an action that should not be performed again until the condition has been corrected or acknowledged. For example, when the event triggers, the ActiveX script can play an alarm sound until the alarm is acknowledged. Then the alarm sound can play again the next time a new alarm is received.
If you set the NewAlarmEventMode property to 2, the NewAlarm event is active and continually triggers when at least one new unacknowledged alarm arrives. You do not need to change the value to process subsequent events. The new event triggers at most one time per second, regardless of how many additional new alarms arrive in the same second.
110
111
Chapter 5
Acknowledging Alarms in Real Time
When tag data transitions from a normal to an alarm state, a new instance of its alarm is generated. The InTouch Distributed Alarm system tracks each alarm instance through the following states:
When the tag first enters the alarmed state When the alarm makes a sub-state transition, if the alarm is a multi-state alarm When the alarm returns to normal Whether the alarm is waiting for an acknowledgment When the alarm is acknowledged
The life cycle of an alarm instance ends when the tag value associated with the alarm returns to a normal, unalarmed state. A subsequent transition to the alarmed state generates a new alarm instance.
112
For condition-oriented alarms, an acknowledgment counts against all entries into the alarmed state up to the time of the acknowledgment. For expanded summary alarms, an acknowledgment is only for a particular transition, whether to an alarmed state, to a sub-state, or a return to normal. All transitions into different alarm sub-states must be acknowledged before the overall alarm is considered acknowledged. For event-oriented alarms (as in OPC), an acknowledgment is accepted only if it refers to the most recent activation event.
113
Any transition to a new alarm sub-state is treated as a new occurrence that must be acknowledged, and whose return to normal must also be acknowledged. Sub-state transitions are treated as belonging to a "return to normal group," starting with the first entry into an alarmed state when the item was previously normal. If the item returns to normal and subsequently enters the alarmed state again, a new return to normal group is created. Each transition must be acknowledged individually and explicitly; and the alarm is considered acknowledged only when the item has returned to normal and all transitions in all pending return to normal groups have been acknowledged.
Note The term "summary" means "awaiting acknowledgment." Alarms in this model are also known as ring-back alarms.
114
115
.AlarmAckModel Dotfield
Monitors the acknowledgment model associated with a tag as follows: 0 = condition (default) 1 = event oriented 2 = expanded summary
Category
Alarms
Usage Tagname.AlarmAckModel Parameter
Tagname Any discrete, integer, real, indirect discrete and analog tag.
Remarks
Analog (read-only)
Valid Values
0, 1 or 2
Example
The body of this IF-THEN statement is processed if the PumpStation tag is associated with an event alarm:
IF (PumpStation.AlarmAckModel == 1) THEN MyAlarmMessage="PumpStation is an Event alarm"; ENDIF; See Also
116
You cannot acknowledge alarms that originate from the Wonderware Application Server using these dotfields. To acknowledge all local alarms of the running InTouch application, use the $System alarm group in combination with the appropriate .Ack dotfield.
.Ack Dotfield
Monitors or controls the alarm acknowledgment status of all types of local alarms.
Category
Alarms
Usage TagName.Ack=1; Parameter
TagName Any discrete, integer, real, indirect discrete and analog tag, or alarm group.
Remarks
Set this dotfield to a value of 1 to acknowledge any outstanding alarms associated with a specified tag or alarm group. When the specified tag is an alarm group, all unacknowledged alarms associated with the tags within the specified group are acknowledged. When the specified tag is of any type other than alarm group, only the unacknowledged alarm associated with that tag is acknowledged. Setting the .Ack dotfield to a value other than 1 has no meaning.
117
Data Type
Discrete (read/write)
Valid Values
1
Example
The following statement acknowledges an alarm associated with the Tag1 tag:
Tag1.Ack=1;
This next example would be used to acknowledge all unacknowledged alarms within the PumpStation alarm group:
PumpStation.Ack=1; Note The .ACK dotfield has an inverse dotfield called .UnAck. When an unacknowledged alarm occurs, .UnAck is set to 1. .UnAck can then be used with animation links or in condition scripts to trigger annunciators for any unacknowledged alarms. See Also
.UnAck Dotfield
Monitors or controls the alarm acknowledgment status of local alarms.
Category
Alarms
Usage TagName.UnAck=0; Parameter
TagName Any discrete, integer, real, indirect discrete and analog tag, or alarm group.
Remarks
Set this dotfield to a value of 0 to acknowledge any outstanding alarms associated with the specified tag or alarm group. When the specified tag is an alarm group, all unacknowledged alarms associated with the tags within the specified group are acknowledged. When the specified tag is any other type, only the unacknowledged alarm associated with that tag is acknowledged. Setting this dotfield to a value other than 0 has no meaning.
118
Data Type
0
Example
The following statement acknowledges any alarm associated with the Tag1 tag.
Tag1.UnAck=0;
This statement acknowledges all unacknowledged alarms within the alarm group named PumpStation.
PumpStation.UnAck=0;
.UnAck has an inverse dotfield called .Ack. When an alarm has been acknowledged, the value of the .Ack dotfield is set to 1.
See Also
.AckValue Dotfield
Monitors and controls the acknowledgment of local value alarms.
Usage
TagName.AckValue=1;
Parameter
Set the .AckValue dotfield to 1 to acknowledge any outstanding value alarms associated the specified tag/group. When the specified tag is an alarm group, all unacknowledged value alarms associated with the tags within the specified group are acknowledged. When the specified tag is of any type, only the unacknowledged value alarm associated with that tag is acknowledged. Setting this dotfield to a value other than 1 has no meaning.
119
Data Type
Discrete (read/write)
Valid Values
1
Examples
The following statement acknowledges a value alarm associated with the Tag1 tag:
Tag1.AckValue=1;
This example acknowledges all unacknowledged value alarms within the alarm group named PumpStation:
PumpStation.AckValue=1;
An indirect alarm group (using GroupVar) can be used to acknowledge value alarms. For example, using an assignment such as:
StationAlarms.Name = "PumpStation";
Where StationAlarms is defined as an alarm group type tag and is then associated with PumpStation. Thus, the statement below is similar to the above examples, except it is used to acknowledge any unacknowledged value alarms within the alarm group PumpStation, which is currently associated with the StationAlarms alarm group tag.
StationAlarms.AckValue=1; See Also
120
.AckDsc Dotfield
Acknowledges the discrete alarm of a specified tag or all discrete alarms of a specified alarm group.
Usage
TagName.AckDsc=1;
Parameter
TagName Name assigned to the discrete tag or the name of an alarm group.
Remarks
Set to 1 to acknowledge an active discrete alarm associated with the specified tag or alarm group. When the specified tag is an alarm group, all unacknowledged discrete alarms associated with the tags within the specified group are acknowledged. When the specified tag is of any type other than alarm group, only the unacknowledged discrete alarm associated with that tag is acknowledged. Setting this dotfield to a value other than 1 has no meaning.
Data Type
Discrete (read/write)
Valid Values
0 or 1
Examples
The following statement verifies if Tag1 has an active discrete alarm associated with it:
IF (Tag1.AlarmDsc == 1) THEN MyAlarmMessage="The pumping station currently has an ALARM!"; ENDIF;
This dotfield is not linked to the .Ack or .UnAck dotfield. Therefore, even when an active alarm has been acknowledged, this dotfield remains equal to 1.
See Also
121
.AckDev Dotfield
Acknowledges the minor or major deviation alarms of a specified local tag or all deviation alarms of a specified alarm group.
Category
Alarm
Usage TagName.AckDev=1; Parameter
Set this dotfield to a value of 1 to acknowledge any outstanding deviation alarms associated with the specified tag or alarm group. When the specified tag is an alarm group, all unacknowledged deviation alarms associated with the tags within the specified group are acknowledged. Setting this dotfield to a value other than 1 has no meaning.
Data Type
Discrete (read/write)
Valid Values
1
Example
The following statement acknowledges a deviation alarm associated with the Tag1 tag:
Tag1.AckDev=1;
This next example would be used to acknowledge all unacknowledged deviation alarms within the alarm group named PumpStation:
PumpStation.AckDev=1;
See Also
122
.AckROC Dotfield
Acknowledges the rate-of-change alarm of a specified local tag or all rate-of-change alarms of a specified alarm group.
Usage
TagName.AckROC=1;
Parameter
TagName Name assigned to the integer, real, or indirect analog tag or the name of an alarm group.
Remarks
Set this dotfield to a value of 1 to acknowledge any outstanding rate-of-change alarms associated with a specified tag or alarm group. When the specified tag is an alarm group, all unacknowledged rate-of-change alarms associated with the tags within the specified group are acknowledged. When the specified tag is of any type other than alarm group, only the unacknowledged rate-of-change alarm associated with that tag is acknowledged. Setting this dotfield to a value other than 1 has no meaning.
Data Type
Discrete (read/write)
Valid Values
1
Examples
The following statement acknowledges a rate-of-change alarm associated with a tag named Tag1.
Tag1.AckROC=1;
This next example acknowledges all unacknowledged rate-of-change alarms within the alarm group named PumpStation:
PumpStation.AckROC=1; See Also
123
Ack() Function
Acknowledges any unacknowledged InTouch alarm.
Category
Alarm
Syntax Ack TagName; Arguments
The following statements can be used on a push button to acknowledge any unacknowledged alarm:
Ack $System; {All alarms} Ack Tagname; Ack GroupName; See Also
almAckAll(), almAckGroup() almAckTag(), almAckDisplay(), almAckRecent(), almAckPriority(). almAckSelect(), almAckSelectedGroup(), almAckSelectedPriority(), almAckSelectedTag()
124
On the Special menu, point to Configure, and then click Alarms. The Alarm Properties dialog box appears.
Select the RTN implies ACK check box to have the InTouch HMI automatically acknowledge alarms whose values return to the normal state (RTN). Click OK.
125
Right-click in the display, point to Ack Others, and then click the appropriate command: Click Ack All to acknowledge all current alarms.
Select one or more alarms. Right-click and then click Ack Selected. The Ack Comment dialog box appears. Type an optional acknowledgement comment and click OK.
Select the alarm(s). Right-click in the display, point to Ack Others, and then click the appropriate command: Click Ack Selected Groups to acknowledge all alarms that belong to the selected alarm group(s).
Click Ack Selected Tags to acknowledge alarms for all tags that have the same name(s) as the selected alarm(s). Click Ack Selected Priorities to acknowledge all alarms with the same priority or priorities as the selected alarm(s).
126
The alarm comment is set when the new alarm instance occurs. The .AlarmComment dotfield is used for alarm comments and can be set or read in an InTouch script. You specify the default value for this comment in the tag's definition in the Tagname Dictionary. Alarm comments can be up to 131 characters. The acknowledgement comment is provided by the operator when he or she acknowledges the alarm.
You can use the acknowledgement comment to update the alarm comment in the tag database.
To allow alarm acknowledgement comments to update the .AlarmComment dotfield 1
On the Special menu, point to Configure, and then click Alarms. The Alarm Properties dialog box appears.
Select the Retain ACK Comment As Alarm Comment check box to update the tags .AlarmComment dotfield and the Tagname Dictionary with the comments entered with alarm acknowledgments. If you do not select this check box, the acknowledgment comment is shown with the acknowledged alarm (in the database, printouts, and displays), but .AlarmComment does not change.
Click OK.
127
Chapter 6
Controlling Alarm Properties of Tags and Groups at Run Time
You can use alarm dotfields to dynamically manage alarm conditions. Many of these dotfields are accessible using I/O, expressions, and scripts. Through I/O access, you can monitor and control a specific tags alarm information using other Windows applications, such as Excel, or WindowViewer running on a remote node. To access dotfields associated with a tag, use this syntax: tag.dotfield For example, if you want to allow run-time changes to the HiHi alarm limit on a tag named Analog_tag, you can create an Analog - User Input touch link to a button and enter Analog_tag.HiHiLimit as the expression in the links dialog box. During run time, the operator simply clicks the button and types in a new value for the HiHi alarm limit assigned to the Analog_tag.
128
.Ack
Monitors/controls the alarm acknowledgment status of tags and alarm groups. .Ack has an inverse tag dotfield called .UnAck. When an unacknowledged alarm occurs, .UnAck is set to 1. The .UnAck dotfield can be used in animation links or condition scripts to trigger annunciators for any unacknowledged alarms.
.AckDev
Monitors/controls the alarm acknowledgment status of deviation type alarms active on an analog tag or alarm group. Monitors/controls the current acknowledgement status of a discrete tag. Monitors/controls the alarm acknowledgment status of rate-of-change type alarms active on the tag. Monitors the alarm acknowledgment status of value type alarms active on the tag. Signals that an alarm condition exists.
.AckDsc
.AckROC
.AckValue
.Alarm
129
Dotfield
Description
.AlarmAckModel
Monitors the acknowledgement model associated with the tag as follows: 0=condition (default) 1=event 2=expanded Applies to discrete or analog tags with alarms. Read only, but can be configured in WindowMaker.
.AlarmDev .AlarmDevCount
Signals that a deviation alarm exists. Tracks the total number of active deviation alarms for a given tag or alarm group. Monitors/controls the deviation percentage deadband for both minor and major deviation alarms. Tracks the number of unacknowledged deviation alarms active on a given tag or alarm group. Disables/enables events and alarms. Applies to discrete and analog tags with alarms, or to alarm groups. Indicates that a discrete alarm condition is currently active. Tracks the total number of discrete alarms active on a given tag or alarm group.
.AlarmDevDeadband
.AlarmDevUnAckCount
.AlarmDisabled
.AlarmDsc
.AlarmDscCount
130
Dotfield
Description
.AlarmDscDisabled
.AlarmDscEnabled
.AlarmDscInhibitor
Returns the name of the inhibitor tag assigned to the discrete alarm (if any) for this tag. Tracks the total number of unacknowledged discrete alarms active for a given tag or alarm group. Disables/enables events and alarms. Disables/enables the High limit for analog tags with alarms. Disables/enables the High limit for analog tags with alarms. Disables/enables the HiHi limit for analog tags with alarms. Disables/enables the HiHi limit for analog tags with alarms.
.AlarmDscUnAckCount
.AlarmEnabled .AlarmHiDisabled
.AlarmHiEnabled
.AlarmHiHiDisabled
.AlarmHiHiEnabled
131
Dotfield
Description
.AlarmHiHiInhibitor
Returns the inhibitor tag reference for the HiHi limit. Applies to analog tags with alarms. Read only but can be configured in WindowMaker. Returns the inhibitor tag reference for the High limit. Applies to analog tags with alarms. Read only but can be configured in WindowMaker.
.AlarmHiInhibitor
.AlarmLoDisabled
Disables/enables the Low limit for analog tags with alarms. Disables/enables the Low limit for analog tags with alarms. Returns the inhibitor tag reference for the Low limit. Applies to analog tags with alarms. Read only but can be configured in WindowMaker.
.AlarmLoEnabled
.AlarmLoInhibitor
.AlarmLoLoDisabled
Disables/enables the LoLo limit for analog tags with alarms. Disables/enables the LoLo limit for analog tags with alarms. Returns the inhibitor tag reference for the LoLo limit. Applies to analog tags with alarms. Read only but can be configured in WindowMaker.
.AlarmLoLoEnabled
.AlarmLoLoInhibitor
132
Dotfield
Description
.AlarmMajDevDisabled
Disables/enables the Major Deviation limit for analog tags with alarms. Disables/enables the Major Deviation limit for analog tags with alarms. Returns the inhibitor tag reference for the Major Deviation limit. Applies to analog tags with alarms. Read only but can be configured in WindowMaker.
.AlarmMajDevEnabled
.AlarmMajDevInhibitor
.AlarmMinDevDisabled
Disables/enables the Minor Deviation limit for analog tags with alarms. Disables/enables the Minor Deviation limit for analog tags with alarms. Returns the inhibitor tag reference for the Minor Deviation limit. Applies to analog tags with alarms. Read only but can be configured in WindowMaker.
.AlarmMinDevEnabled
.AlarmMinDevInhibitor
.AlarmROC
Signals that a rate-of-change type alarm exists. Tracks the total number of rate of change alarms active on a given tag or alarm group. Disables/enables the rate of change limit for analog tags with alarms. Disables/enables the rate of change limit for analog tags with alarms.
.AlarmROCCount
.AlarmROCDisabled
.AlarmROCEnabled
133
Dotfield
Description
.AlarmROCInhibitor
Returns the inhibitor tag reference for the rate of change limit. Applies to analog tags with alarms. Read only but can be configured in WindowMaker.
.AlarmROCUnAckCount
Tracks the total number of unacknowledged rate of change alarms on a given tag or alarm group. Tracks the total number of alarms active for a given tag or alarm group. Tracks the total number of unacknowledged alarms active for a tag or alarm group. Read/write real (floating point), default 0 and value not set. Applies to discrete tags with alarms, to analog tags with alarms, or to alarm groups.
Note The value of this dotfield is attached to the alarm, but ONLY if a value has been set, for example, by a script or a POKE.
.AlarmTotalCount
.AlarmUnAckCount
.AlarmUserDefNum1
.AlarmUserDefNum1Set
Read/write discrete. TRUE if a script has defined the .AlarmUserDefNum1 for the corresponding tag. To disassociate the value of .AlarmUserDefNum1 for the tag, set this dotfield to FALSE. The default is FALSE.
134
Dotfield
Description
.AlarmUserDefNum2
Read/write real (floating point), default 0 and value not set. Applies to discrete tags with alarms, to analog tags with alarms, or to alarm groups.
Note The value of this dotfield is attached to the alarm, but ONLY if a value has been set, for example, by a script or a POKE.
.AlarmUserDefNum2Set
Read/write discrete. TRUE if a script has defined the .AlarmUserDefNum2 for the corresponding tag. To disassociate the value of .AlarmUserDefNum2 for the tag, set this dotfield to FALSE. The default is FALSE. Read/write text string, default "" and value not set. Applies to discrete tags with alarms, to analog tags with alarms, or to alarm groups.
Note The value of this dotfield is attached to the alarm, but ONLY if a value has been set, for example, by a script or a POKE.
.AlarmUserDefStr
.AlarmUserDefStrSet
Read/write discrete. TRUE if a script has defined the .AlarmUserDefStr for the corresponding tag. To disassociate the value of .AlarmUserDefStr for the tag, set this dotfield to FALSE. The default is FALSE.
135
Dotfield
Description
.AlarmValDeadband
Monitors/controls the value of an alarms value deadband. Tracks the total number of value alarms active on a given tagname or alarm group. Tracks the total number of unacknowledged value alarms active on a given tagname or alarm group. Monitors/controls the target for minor and major deviation alarms. Read/write analog tagname dotfields that monitors /controls the limits for value alarm checks. These dotfields are only valid for integer and real tags. Read only discrete dotfields that determines whether an alarm of a specified type exists. These fields are only valid for integer and real tags. Read/write integer dotfield that monitors or controls the major percentage of deviation for alarm checking. Read-only discrete dotfield that determines whether a major deviation alarm exists for the specified tagname. Read/write integer dotfield monitors and/or controls the minor percentage of deviation for alarm checking.
.AlarmValueCount
.AlarmValueUnAckCount
.DevTarget
.MajorDevPct
.MajorDevStatus
.MinorDevPct
136
Dotfield
Description
.MinorDevStatus
Read only discrete dotfield used to determine whether a minor deviation alarm exists for the specified tagname. Read/write message dotfield used to display the actual name of the tagname. For example, it can be used to determine the name of an Alarm Group that a Group Variable is pointing to, or the name of a TagID tags. It can also be written to change the Alarm Group that a Group Variable is pointing to. Read only discrete dotfield that is equal to 1 when there are no alarms for the specified tagname. This dotfield is valid for Alarm Groups and Group Variables as well as ordinary tags. Read/write dotfield used to monitor and/or control the rate of change for alarm checking. Read only discrete dotfield used to determine whether a rate-of-change alarm exists for the specified tag.
.Name
.Normal
.ROCPct
.ROCStatus
137
$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
138
Data Type
Discrete (read/write)
Valid Values
0 or 1
Remarks
Associate the $NewAlarm system tag with an animation object in an application window. For example, associate the tag with an acknowledgment button that an operator clicks to reset the value of the tag to 0 and acknowledge the alarm. You can also link the $NewAlarm system tag to the PlaySound logic function to sound an audible warning when an alarm occurs.
Example
Add a button to an alarm acknowledgement window and attach the following action script that runs when the operator clicks the button.
Ack $System; $NewAlarm=0; HideSelf;
When the operator clicks on the button, all alarms are acknowledged, the $NewAlarm system tag is reset to 0, and the alarm acknowledgement window is hidden from view.
alarms
Usage
$System
Remarks
By default, tags are assigned to this root alarm group. All defined alarm groups are descendants of $System.
139
Data Type
.Alarm Dotfield
Returns 0 when a specified tag or alarm group is not currently in an alarm state. When an alarm occurs, the .Alarm dotfield returns 1. It remains at 1 until the alarm condition no longer exists. The .Alarm dotfield has an inverse dotfield called .Normal. If the specified tag is the name of an alarm group, the .Alarm dotfield returns 1 if any of the tags that belong to the group are in an alarm state.
Category
Alarms
Usage
TagName.Alarm
Parameter
TagName Any discrete, integer, real tag, indirect discrete and analog tag, or alarm group tag.
Data Type
Discrete (read-only)
Valid Values
0 or 1
Example
The following statement verifies if Tag1 has an active alarm associated with it:
IF (Tag1.Alarm == 1) THEN
The body of this IF-THEN statement is processed if active alarms exist within the PumpStation alarm group.
IF (PumpStation.Alarm == 1) THEN MyAlarmMessage="The pumping station currently has an ALARM!"; ENDIF;
This dotfield is not linked to the .Ack or .UnAck dotfields. Therefore, even when an active alarm has been acknowledged, .Alarm remains equal to 1.
140
.Normal Dotfield
Returns 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
Alarms
Syntax
TagName.Normal
Parameter
TagName Any discrete, integer, real tag, indirect discrete and analog tag, or alarm group tag.
Data Type
Discrete (read-only)
Valid Values
0 or 1
Example
The following IF-THEN statement runs when there are no alarms associated with the Tag1 tag. When there is one or more alarms active for Tag1, the "ELSE" body runs:
IF (Tag1.Normal==1) THEN MyOperatorMessage="Tag1 is OK - No alarms associated with it"; ELSE MyOperatorMessage="Tag1 has one or more alarms active!"; ENDIF;
141
.AlarmDsc Dotfield
Indicates whether an alarm condition exists for a specified discrete tag or alarm group. The default value is 0. When a discrete alarm condition exists for the specified tag, it is set to a value of 1. The value remains 1 until the alarm condition no 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 the group are in an active discrete alarm.
Category
Alarms
Usage
TagName.AlarmDsc
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The following statement verifies if Tag1 has an active discrete alarm associated with it:
IF (Tag1.AlarmDsc == 1) THEN MyAlarmMessage="The pumping station currently has an ALARM!"; ENDIF;
This dotfield is not linked to the .Ack or .UnAck dotfields. Therefore, even when an active alarm has been acknowledged, the .AlarmDsc dotfield remains equal to 1.
See Also
142
.AlarmDev Dotfield
Indicates when a deviation alarm becomes active for the specified tag or alarm group. The default value is 0. When a deviation alarm condition exists for the specified tag, it is set to a value of 1. The value remains 1 until the alarm condition no 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 the group are in an active alarm state.
Category
Alarms
Usage
TagName.AlarmDev
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The following statement verifies if Tag1 has an active deviation alarm associated with it:
IF (Tag1.AlarmDev == 1) THEN
The body of this IF-THEN statement is processed if there are active deviation alarms within the PumpStation alarm group.
IF (PumpStation.AlarmDev == 1) THEN MyAlarmMessage="The pumping station currently has an ALARM!"; ENDIF;
This dotfield is not linked to the .Ack or .UnAck dotfields. Therefore, even when an active alarm has been acknowledged, this dotfield remains equal to 1.
See Also
143
.AlarmROC Dotfield
Indicates when a rate-of-change alarm condition becomes active for the specified tag or alarm group. The default value is 0. When a rate-of-change alarm condition exists for the specified tag, it is set to a value of 1. The value remains 1 until 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 the group are in a rate-of-change alarm state.
Category
Alarms
Usage
TagName.AlarmROC
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The following statement verifies if Tag1 has an active rate-of-change alarm associated with it:
IF (Tag1.AlarmROC == 1) THEN
The body of this IF-THEN statement would be processed if there were active rate-of-change alarms within the alarm group named PumpStation.
IF (PumpStation.AlarmROC == 1) THEN MyAlarmMessage="The pumping station currently has an ALARM!"; ENDIF;
This dotfield is not linked to the .Ack or .UnAck dotfield. Therefore, even when an active rate-of-change alarm has been acknowledged, this dotfield remains equal to 1.
See Also
144
.LoStatus Dotfield
Indicates when a Low alarm condition becomes active for the specified tag or alarm group. The default value is 0. When a Low alarm condition exists for the specified tag, it is set to a value of 1. The value remains 1 until the Low alarm condition no longer exists. This dotfield is often used in conjunction with the .Alarm and .Ack dotfields to determine the specific alarm state of a particular tag.
Category
Alarms
Usage
TagName.LoStatus
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The following IF-THEN runs when the .LoStatus (low alarm condition) for the MyTag tag is equal to 1.
IF (MyTag.LoStatus == 1) THEN OperatorMessage="MyTag has gone into Low Alarm"; ENDIF; See Also
.Alarm, .AlarmValue, .Ack, .LoLimit, .LoSet, .AlarmDisabled, .AlarmEnabled, .AlarmLoDisabled, .AlarmLoEnabled, .AlarmLoInhibitor
145
.LoLoStatus Dotfield
Indicates when a LoLo alarm condition becomes active for the specified tag or alarm group. The default value is 0. When a LoLo alarm condition exists for the specified tag, it is set to a value of 1. The value remains 1 until the LoLo alarm condition no longer exists. This dotfield is often used in conjunction with the .Alarm and .Ack dotfields to determine the exact nature of the alarm status of a particular tag within the system.
Category
Alarms
Usage
TagName.LoLoStatus
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The following IF-THEN statement runs when the .LoLoStatus (LoLo alarm limit) for the MyTag tag is equal to 1.
IF (MyTag.LoLoStatus == 1) THEN OperatorMessage="MyTag has gone into LoLo Alarm"; ENDIF; See Also
.Alarm, .AlarmValue, .Ack, .LoLoLimit, .LoLoSet, .AlarmDisabled, .AlarmEnabled, .AlarmLoLoDisabled, .AlarmLoLoEnabled, .AlarmLoLoInhibitor
146
.HiStatus Dotfield
Indicates when a High alarm condition becomes active for the specified tag or alarm group. The default value is 0. When a High alarm condition exists for the specified tag, it is set to a value of 1. The value remains 1 until the High alarm condition no longer exists. This dotfield is often used in conjunction with the .Alarm and .Ack dotfields to determine the specific alarm state of a tag.
Category
Alarms
Usage
TagName.HiStatus
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
This script calls another script to stop a pump motor output if the MotorAmps tag goes into high limit alarm status.
IF (MotorAmps.HiStatus == 1) THEN CALL PumpShutdown( ); ENDIF; See Also
.Alarm, .AlarmValue, .Ack, .HiLimit, .HiSet, .AlarmDisabled, .AlarmEnabled, .AlarmHiDisabled, .AlarmHiEnabled, .AlarmHiInhibitor
147
.HiHiStatus Dotfield
Indicates when a HiHi alarm condition becomes active for the specified tag or alarm group. The default value is 0. When a HiHi alarm condition exists for the specified tag, it is set to a value of 1. The value remains 1 until the HiHi alarm condition no longer exists. This dotfield is often used in conjunction with the .Alarm and .Ack dotfields to determine the specific alarm state of a tag.
Category
Alarms
Usage
TagName.HiHiStatus
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The following IF-THEN statement runs when the .HiHiStatus (HiHi alarm) for the MyTag tag is 1.
IF (MyTag.HiHiStatus == 1) THEN OperatorMessage="MyTag has gone into HiHi Alarm"; ENDIF; See Also
.Alarm, .AlarmValue, .Ack, .HiHiLimit, .HiHiSet, .AlarmDisabled, .AlarmEnabled, .AlarmHiHiDisabled, .AlarmHiHiEnabled, .AlarmHiHiInhibitor
148
.MinorDevStatus Dotfield
Indicates when a minor deviation alarm becomes active for the specified tag or alarm group. The default value is 0. When a minor deviation alarm condition exists for the specified tag, it is set to a value of 1. The value remains 1 until the minor deviation alarm condition no longer exists. This dotfield is often used in conjunction with the .Alarm and .Ack dotfields to determine the specific alarm state of a tag.
Category
Alarms
Usage
TagName.MinorDevStatus
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The following IF-THEN statement runs when the .MinorDevStatus (minor deviation alarm) for the tag MyTag is equal to 1.
IF (MyTag.MinorDevStatus == 1) THEN OperatorMessage="MyTag has gone into a Minor Deviation Alarm"; ENDIF; See Also
149
.MajorDevStatus Dotfield
Indicates when a major deviation alarm becomes active for the specified tag or alarm group. The default value is 0. When a major deviation alarm condition exists, the specified dotfield is set to 1. The value remains 1 until the major deviation alarm condition no longer exists. This dotfield is often used in conjunction with the .Alarm and .Ack dotfields to determine the specific alarm state of a tag.
Category
Alarms
Usage
TagName.MajorDevStatus
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The following IF-THEN statement runs when the .MajorDevStatus (Major deviation alarm) for the MyTag tag is equal to 1.
IF (MyTag.MajorDevStatus == 1) THEN OperatorMessage="MyTag has gone into a Major Deviation Alarm"; ENDIF; See Also
150
.ROCStatus Dotfield
Indicates when a rate-of-change alarm becomes active for the specified tag or alarm group. The default value is 0. When a rate-of-change alarm condition exists for the specified tag, it is set to a value of 1. The value remains 1 until the rate-of-change alarm condition no longer exists. This dotfield is often used in conjunction with the .Alarm and .Ack dotfields to determine the specific alarm state of a tag.
Category
Alarms
Usage
TagName.ROCStatus
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The following IF-THEN statement runs when the .ROCStatus (rate-of-change alarm) for the MyTag tag is equal to 1.
IF (MyTag.ROCStatus == 1) THEN OperatorMessage="MyTag has gone into a Rate-Of-Change alarm"; ENDIF; See Also
.ROCPct, .ROCSet
151
.LoLoSet Dotfield .LoSet Dotfield .HiSet Dotfield .HiHiSet Dotfield .MinorDevSet Dotfield .MajorDevSet Dotfield .ROCSet Dotfield
.LoLoSet Dotfield
Indicates whether a LoLo alarm limit has been set for an integer or real tag.
Category
Alarms
Usage
TagName.LoLoSet
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The THEN block executes if the LoLo alarm limit is set for the MyTag tag:
IF (MyTag.LoLoSet== 1) THEN MsgTag="LoLo alarm limit has been set for MyTag"; ENDIF; See Also
.Alarm, .AlarmValue, .Ack, .LoLoStatus, .LoLoLimit, .AlarmDisabled, .AlarmEnabled, .AlarmLoLoDisabled, .AlarmLoLoEnabled, .AlarmLoLoInhibitor
152
.LoSet Dotfield
Indicates whether a Low alarm limit has been set for an integer or real tag.
Category
Alarms
Usage
TagName.LoSet
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The THEN block executes if the Low alarm limit is set for the MyTag tag:
IF (MyTag.LoSet== 1) THEN MsgTag="Low alarm limit has been set for MyTag"; ENDIF; See Also
.Alarm, .AlarmValue, .Ack, .LoStatus, .LoLimit, .AlarmDisabled, .AlarmEnabled, .AlarmLoDisabled, .AlarmLoEnabled, .AlarmLoInhibitor
153
.HiSet Dotfield
Indicates whether a High alarm limit has been set for an integer or real tag.
Category
Alarms
Usage
TagName.HiSet
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The THEN block executes if the High alarm limit is set for the MyTag tag:
IF (MyTag.HiSet== 1) THEN MsgTag="High alarm limit has been set for MyTag"; ENDIF; See Also
.Alarm, .AlarmValue, .Ack, .HiHiStatus, .HiHiLimit, .AlarmDisabled, .AlarmEnabled, .AlarmHiHiDisabled, .AlarmHiHiEnabled, .AlarmHiHiInhibitor
154
.HiHiSet Dotfield
Indicates whether a HiHi alarm limit has been set for an integer or real tag.
Category
Alarms
Usage
TagName.HiHiSet
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The THEN block executes if the HiHi alarm limit is set for the MyTag tag:
IF (MyTag.HiHiSet== 1) THEN MsgTag="HiHi alarm limit has been set for MyTag"; ENDIF; See Also
.Alarm, .AlarmValue, .Ack, .HiHiStatus, .HiHiLimit, .AlarmDisabled, .AlarmEnabled, .AlarmHiHiDisabled, .AlarmHiHiEnabled, .AlarmHiHiInhibitor
155
.MinorDevSet Dotfield
Indicates whether a minor deviation alarm limit has been set for an integer or real tag.
Category
Alarms
Usage
TagName.MinorDevSet
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The THEN block executes if the minor deviation percentage alarm limit is set for the MyTag tag:
IF (MyTag.MinorDevSet== 1) THEN MsgTag="Minor deviation alarm limit has been set for MyTag"; ENDIF; See Also
156
.MajorDevSet Dotfield
Indicates whether a major deviation alarm limit has been set for an integer or real tag.
Category
Alarms
Usage
TagName.MajorDevSet
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The THEN block executes if the major deviation percentage alarm limit is set for the MyTag tag:
IF (MyTag.MajorDevSet== 1) THEN MsgTag="Major deviation alarm limit has been set for MyTag"; ENDIF; See Also
157
.ROCSet Dotfield
Indicates whether a rate-of-change alarm limit has been set for an integer or real tag.
Category
Alarms
Usage
TagName.ROCSet
Parameter
Discrete (read-only)
Valid Values
0 or 1
Example
The THEN block executes if the rate-of-change alarm limit is set for the MyTag tag:
IF (MyTag.ROCSet == 1) THEN MsgTag="Rate-of-change alarm limit has been set for MyTag"; ENDIF; See Also
.Alarm, .Ack, .LoLimit, .LoLoLimit, .HiHiLimit, .HiLimit, .HiSet, .LoSet, .LoLoSet, .HiStatus, .HiHiStatus, .ROCPct, .ROCStatus
158
.AlarmEnabled Dotfield
Enables or disables alarms for a tag or an alarm group.
Category
Alarms
Usage
TagName.AlarmEnabled
Parameter
TagName Any discrete, integer, real, indirect discrete, indirect analog tag, or alarm group.
Remarks
When .AlarmEnabled is set to 0, all events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. When the specified tag is an alarm group, all alarms associated with the tags within the specified alarm group are enabled.
159
Data Type
Discrete (read/write)
Valid Values
.AlarmDisabled
.AlarmDisabled Dotfield
Enables or disables alarms for a tag or an alarm group.
Category
Alarms
Usage
TagName.AlarmDisabled
Parameter
TagName Any discrete, integer, real, indirect discrete, indirect analog tag, or alarm group.
Remarks
When .AlarmDisabled is set to 1, all events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. When the specified tag is an alarm group, all alarms associated with the tags within the specified alarm group are disabled. This is the opposite of the .AlarmEnabled dotfield.
Example
.AlarmEnabled
160
.AlarmLoLoEnabled Dotfield
Enables or disables LoLo condition events and alarms.
Category
Alarms
Usage
TagName.AlarmLoLoEnabled
Parameter
When .AlarmLoLoEnabled is set to 0, all LoLo condition events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss.
Data Type
Discrete (read/write)
Valid Values
The following example disables the LoLo alarms of the Tag1 tag:
Tag1.AlarmLoLoEnabled=0; See Also
161
.AlarmLoLoDisabled Dotfield
Enables or disables LoLo condition events and alarms.
Category
Alarms
Usage
TagName.AlarmLoLoDisabled
Parameter
When .AlarmLoLoDisabled is set to 1, all LoLo condition events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss.
Data Type
Discrete (read/write)
Valid Values
162
.AlarmLoEnabled Dotfield
Enables or disables Low condition events and alarms.
Category
Alarms
Usage
TagName.AlarmLoEnabled
Parameter
When .AlarmLoEnabled is set to 0, all Low condition events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss.
Data Type
Discrete (read/write)
Valid Values
The following example disables the Low alarms of the Tag1 tag:
Tag1.AlarmLoEnabled=0; See Also
163
.AlarmLoDisabled Dotfield
Enables or disables Low condition events and alarms.
Category
Alarms
Usage
TagName.AlarmLoDisabled
Parameter
When .AlarmLoDisabled is set to 1, all Low condition events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss.
Data Type
Discrete (read/write)
Valid Values
164
.AlarmHiEnabled Dotfield
Enables or disables High condition events and alarms.
Category
Alarms
Usage
TagName.AlarmHiEnabled
Parameter
When .AlarmHiEnabled is set to 0, all High condition events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. This is the opposite of the .AlarmHiDisabled dotfield.
Data Type
Discrete (read/write)
Valid Values
The following example disables the High alarms of the tag Tag1:
Tag1.AlarmHiEnabled=0; See Also
.AlarmHiDisabled, .AlarmEnabled
165
.AlarmHiDisabled Dotfield
Enables or disables High condition events and alarms.
Category
Alarms
Usage
TagName.AlarmHiDisabled
Parameter
When .AlarmHiDisabled is set to 1, all High condition events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. This is the opposite of the .AlarmHiEnabled dotfield.
Data Type
Discrete (read/write)
Valid Values
.AlarmHiEnabled, .AlarmDisabled
166
.AlarmHiHiEnabled Dotfield
Enables and/or disables HiHi condition events and alarms.
Category
Alarms
Usage
TagName.AlarmHiHiEnabled
Parameter
When .AlarmHiHiEnabled is set to 0, all HiHi condition events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss.
Data Type
Discrete (read/write)
Valid Values
The following example disables the HiHi alarms of the Tag1 tag:
Tag1.AlarmHiHiEnabled=0; See Also
.AlarmHiHiDisabled, .AlarmEnabled
167
.AlarmHiHiDisabled Dotfield
Enables or disables HiHi condition events and alarms.
Category
Alarms
Usage
TagName.AlarmHiHiDisabled
Parameter
When .AlarmHiHiDisabled is set to 1, all HiHi condition events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. This is the opposite of the .AlarmHiHiEnabled dotfield.
Data Type
Discrete (read/write)
Valid Values
.AlarmHiHiEnabled, .AlarmDisabled
168
.AlarmDscEnabled Dotfield
Indicates indicates whether or not the tag can generate discrete alarms.
Category
Alarms
Usage
TagName.AlarmDscEnabled
Parameter
When .AlarmDscEnabled is set to 0, all discrete condition alarms and events are ignored. They are not stored in alarm memory, nor are they written to a disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. This is the opposite of the .AlarmDscDisabled dotfield.
Data Type
Discrete (read/write)
Valid Values
The following example disables the discrete alarms of the Tag1 tag:
Tag1.AlarmDscEnabled=0; See Also
.AlarmDscDisabled
169
.AlarmDscDisabled Dotfield
Indicates whether or not the tag can generate discrete alarms.
Category
Alarms
Usage
TagName.AlarmDscDisabled
Parameter
When .AlarmDscDisabled is set to 1, all discrete condition alarms and events are ignored. They are not stored in alarm memory, nor are they written to a disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. This is the opposite of the .AlarmDscEnabled dotfield.
Data Type
Discrete (read/write)
Valid Values
170
.AlarmMinDevEnabled Dotfield
Enables or disables minor deviation events and alarms.
Category
Alarms
Usage TagName.AlarmMinDevEnabled Parameter
When .AlarmMinDevEnabled is set to 0, all minor deviation events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss.
Data Type
Discrete (read/write)
Valid Values
The following example disables the minor deviation alarms of the Tag1 tag:
Tag1.AlarmMinDevEnabled=0; See Also
171
.AlarmMinDevDisabled Dotfield
Enables or disables minor deviation events and alarms.
Category
Alarms
Usage
TagName.AlarmMinDevDisabled
Parameter
When .AlarmMinDevDisabled is set to 1, all minor deviation events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. This is the opposite of the .AlarmMinDevEnabled dotfield.
Data Type
Discrete (read/write)
Valid Values
The following example enables minor deviation alarms of the Tag2 tag:
Tag2.AlarmMinDevDisabled=0; See Also
172
.AlarmMajDevEnabled Dotfield
Enables or disables major deviation events and alarms.
Category
Alarms
Usage
TagName.AlarmMajDevEnabled
Parameter
When .AlarmMajDevEnabled is set to 0, all major deviation events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. This is the opposite of the .AlarmMajDevDisabled dotfield.
Data Type
Discrete (read/write)
Valid Values
The following example disables major deviation alarms of the Tag1 tag:
Tag1.AlarmMajDevEnabled=0; See Also
173
.AlarmMajDevDisabled Dotfield
Enables or disables major deviation events and alarms.
Category
Alarms
Usage
TagName.AlarmMajDevDisabled
Parameter
When .AlarmMajDevDisabled is set to 1, all major deviation events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. This is the opposite of the .AlarmMajDevEnabled dotfield.
Data Type
Discrete (read/write)
Valid Values
The following example enables major deviation alarms of the Tag2 tag:
Tag2.AlarmMajDevDisabled=0; See Also
174
.AlarmROCEnabled Dotfield
Enables or disables rate-of-change events and alarms.
Category
Alarms
Usage
TagName.AlarmROCEnabled
Parameter
When .AlarmROCEnabled is set to 0, all rate-of-change condition events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. This is the opposite of the .AlarmROCDisabled dotfield.
Data Type
Discrete (read/write)
Valid Values
The following example disables the rate-of-change alarms of the Tag1 tag:
Tag1.AlarmROCEnabled=0; See Also
175
.AlarmROCDisabled Dotfield
Disables or enables rate-of-change events and alarms.
Category
Alarms
Usage
TagName.AlarmROCDisabled
Parameter
When .AlarmROCDisabled is set to 1, all rate-of-change events and alarms are ignored. They are not stored in alarm memory, nor are they written to disk. It is very important to re-enable events/alarms, whenever possible, to avoid data loss. This is the opposite of the .AlarmROCEnabled property.
Data Type
Discrete (read/write)
Valid Values
176
.LoLoLimit Dotfield .LoLimit Dotfield .HiLimit Dotfield .HiHiLimit Dotfield .MinorDevPct Dotfield .MajorDevPct Dotfield .DevTarget Dotfield .ROCPct Dotfield
.LoLoLimit Dotfield
Changes a tags LoLo alarm limit.
Category
Alarms
Usage
TagName.LoLoLimit
Parameter
If you want to continue to use the run-time value of this dotfield after an intentional or accidental shutdown of WindowViewer, select the Retentive Parameters option in the Tagname Dictionary.
Data Type
Analog (read/write)
Valid Values
177
Example
This statement decreases the LoLo alarm limit for the MyTag1 tag by a value of 10:
MyTag1.LoLoLimit=MyTag1.LoLoLimit - 10; See Also
.Alarm, .AlarmValue, .Ack, .LoLoStatus, .LoLoSet, .AlarmDisabled, .AlarmEnabled, .AlarmLoLoDisabled, .AlarmLoLoEnabled, .AlarmLoLoInhibitor
.LoLimit Dotfield
Changes a tags Low alarm limit.
Category
Alarms
Usage
Tagname.LoLimit
Parameter
If you want to continue to use the run-time value of this dotfield after an intentional or accidental shutdown of WindowViewer, select the Retentive Parameters option in the Tagname Dictionary.
Data Type
Analog (read/write)
Valid Values
This statement decreases the Low alarm limit for the MyTag tag by a value of 10:
MyTag.LoLimit=MyTag.LoLimit - 10; See Also
.Alarm, .AlarmValue, .Ack, .LoStatus, .LoSet, .AlarmDisabled, .AlarmEnabled, .AlarmLoDisabled, .AlarmLoEnabled, .AlarmLoInhibitor
178
.HiLimit Dotfield
Changes a tags High alarm limit.
Category
Alarms
Usage
TagName.HiLimit
Parameter
If you want to continue to use the run-time value of this dotfield after an intentional or accidental shutdown of WindowViewer, select the Retentive Parameters option in the Tagname Dictionary.
Data Type
Analog (read/write)
Valid Values
This statement sets the High limit alarm for the PumpTemp tag to 212:
PumpTemp.HiLimit = 212; See Also
.Alarm, .AlarmValue, .Ack, .HiHiStatus, .HiHiSet, .AlarmDisabled, .AlarmEnabled, .AlarmHiHiDisabled, .AlarmHiHiEnabled, .AlarmHiHiInhibitor
179
.HiHiLimit Dotfield
Changes a tags HiHi alarm limit.
Category
Alarms
Usage
TagName.HiHiLimit
Parameter
If you want to continue to use the run-time value of this dotfield after an intentional or accidental shutdown of WindowViewer, select the Retentive Parameters option in the Tagname Dictionary.
Data Type
Analog (read/write)
Valid Values
The following statement increases the HiHi alarm limit for the MyTag tag by a value of 5:
MyTag.HiHiLimit=MyTag.HiHiLimit + 5; See Also
.Alarm, .AlarmValue, .Ack, .HiHiStatus, .HiHiSet, .AlarmDisabled, .AlarmEnabled, .AlarmHiHiDisabled, .AlarmHiHiEnabled, .AlarmHiHiInhibitor
180
.MinorDevPct Dotfield
Changes a tags minor deviation alarm limit.
Category
Alarms
Usage
TagName.MinorDevPct
Parameter
If you want to continue to use the run-time value of this dotfield after an intentional or accidental shutdown of WindowViewer, select the Retentive Parameters option in the Tagname Dictionary.
Data Type
Real (read/write)
Valid Values
0 to 100
Example
The following statement sets the minor deviation limit property for the MyTag tag to 25 percent:
MyTag.MinorDevPct=25; See Also
181
.MajorDevPct Dotfield
Changes a tags major alarm deviation limit.
Category
Alarms
Usage
TagName.MajorDevPct
Parameter
If you want to continue to use the run-time value of this dotfield after an intentional or accidental shutdown of WindowViewer, select the Retentive Parameters option in the Tagname Dictionary.
Data Type
Real (read/write)
Valid Values
0 to 100
Example
The following statement sets the major deviation limit property for the MyTag tag to 25 percent:
MyTag.MajorDevPct=25; See Also
182
.DevTarget Dotfield
Changes the target for a tags minor and major deviation alarms.
Category
Alarms
Usage
TagName.DevTarget
Parameter
If you want to continue to use the run-time value of this dotfield after an intentional or accidental shutdown of WindowViewer, select the Retentive Parameters option in the Tagname Dictionary.
Data Type
Real (read/write)
Valid Values
The following statement sets the deviation target for the MyTag tag to 500;
MyTag.DevTarget=500; See Also
183
.ROCPct Dotfield
Changes a tags rate-of-change alarm limit.
Category
Alarms
Usage
TagName.ROCPct
Parameter
The dotfield corresponds directly to the same field configured within the alarm section of the Tagname Dictionary.
Data Type
Integer (read/write)
Valid Values
0 to 100
Example
The following statement sets the rate-of-change alarm limit of the MyTag tag to 25 percent:
MyTag.ROCPct=25; See Also
.ROCStatus, .ROCSet
184
.AlarmValDeadband Dotfield
Changes a tags deadband value while an InTouch application is running.
Category
Alarms
Usage
TagName.AlarmValDeadband
Parameter
If you want to continue to use the run-time value of this dotfield after an intentional or accidental shutdown of WindowViewer, select the Retentive Parameters option in the Tagname Dictionary.
Data Type
Analog (read/write)
Valid Values
The following statement changes the deadband for Tag1 tag to a value of 25:
Tag1.AlarmValDeadband=25; See Also
.AlarmDevDeadband
185
.AlarmDevDeadband Dotfield
Changes a tags deviation percentage deadband for both minor and major deviation alarms.
Category
Alarms
Usage
TagName.AlarmDevDeadband
Parameter
If you want to continue to use the run-time value of this dotfield after an intentional or accidental shutdown of WindowViewer, select the Retentive Parameters option in the Tagname Dictionary.
Data Type
Integer (read/write)
Valid Values
0 to 100
Example
.AlarmValDeadband, .AlarmDev
186
.AlarmComment Dotfield
Returns a comment text string that is associated with the alarm of a tag or alarm group. By default, it is empty in a new application.
Category
Alarms
Usage
TagName.AlarmComment
Parameter
Message (read/write)
Valid Values
Text
Example
The following example returns the alarm comment for a tag and places it in another memory Message tag:
mTag1=Tag1.AlarmComment;
The following example returns the alarm comment for a tag selected in an distributed alarm object AlmObj_1 and places it in the almComment memory message tag :
GetPropertyM(AlmObj_1.AlarmComment, almComment);
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
187
.AlarmUserDefNumX Dotfields
To simplify setting user values, you can set these dotfields on an alarm group as well as on a specific tag. For example, InBatch could set the batch number in .AlarmUserDefNum1 all the way up at the $System alarm group, causing all alarms to have the batch number attached. The .AlarmUserDefNum1 and .AlarmUserDefNum2 dotfields correspond to the User1 and User2 columns in the Alarm Viewer control, respectively. If you set .AlarmUserDefNum1 on an alarm group, it applies to all alarms in that group and any of its sub-groups. You can also specifically set the value of .AlarmUserDefNum1 on a tag. In this case, it applies only to that tag and overwrites any setting of .AlarmUserDefNum1 in the tag's alarm group.
Category
Alarms
Usage
TagName.AlarmUserDefNum1 TagName.AlarmUserDefNum2
Parameter
TagName Any discrete, integer, real, indirect discrete, indirect analog tag, or alarm group.
Remarks
This user-defined dotfield is enabled for a wide range of tags, particularly discrete tags, analog tags, and alarm groups (whether or not they have alarms defined). You can leave these items unset, set all of them, or set only some of them for any individual tag, group, or parent group. The value of this dotfield is attached to the alarm, but ONLY if a value has been set, for example, by a script or a POKE.
Data Types
Analog (read/write)
188
Valid Values
The following examples use constant values. However, you can use InTouch QuickScripts to copy the value of another tag to any of these user-defined fields. You can also use PtAcc to set or inspect them, or use InTouch as an I/O Server to get or set the values.
$System.AlarmUserDefNum1 = 4; GroupA.AlarmUserDefNum1 = 27649;
In concept, the lowest-level setting prevails, when an alarm notification is sent to the Distributed Alarm system. That is, if the tag has .AlarmUserDefNum1 set to some value, the alarm record should be populated using that setting. However, if the tag doesn't have one, WindowViewer checks if the tag's alarm group has one, and so on up the line until the root group $System is reached. If no setting is found at any level, the entry in the alarm record will be left empty (zero for numbers, an empty string for strings).
Note This hierarchical search is handled independently for each item. Therefore, if a tag has a setting for .AlarmUserDefNum2 but not 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 Dotfield
The .AlarmUserDefStr dotfield is attached to the information recorded for each alarm by Alarm DB Logger in the alarm database. The .AlarmUserDefStr dotfield corresponds to database field User3. You can use the "user-defined" columns in a SELECT statement to select particular collections of alarms for database operations. For example, if $System.AlarmUserDefStr is set to a Batch String and is changed each time the Batch changes, a selection involving the database field User3 can be used to select alarms for particular batches.
Category
Alarms
Usage Tagname.AlarmUserDefStr
189
Parameter
Tagname Any discrete, integer, real, indirect discrete, or indirect analog tag, or alarm group.
Remarks
This user-defined dotfield is enabled for a wide range of tags, particularly discrete tags, analog tags, and alarm groups (whether or not they have alarms defined). You can leave these items unset, set all of them, or set only some of them for any individual tag, group, or parent group. The value of this dotfield is attached to the alarm, but ONLY if a value has been set, for example, using a script or a POKE.
Data Type
Message (read/write)
Valid Values
This example uses a constant value. However, you can use InTouch QuickScripts to copy the value of another tag to any of these user-defined fields. You can also use PtAcc to set or inspect them, or use InTouch as an I/O Server to get or set the values.
Tag04.AlarmUserDefStr = "Joe";
In concept, the lowest-level setting prevails, when an alarm notification is sent to the Distributed Alarm system. That is, if the tag has .AlarmUserDefStr set to some value, the alarm record should be populated using that setting. However, if the tag doesn't have one, WindowViewer will check if the tag's alarm group has one, and so on up the line until the root group $System is reached. If no setting is found at any level, the entry in the alarm record will be left empty (zero for numbers, an empty string for strings). Also note that this hierarchical search is handled independently for each item. Therefore, if a tag has a setting for .AlarmUserDefNum1 but not for .AlarmUserDefStr, but its parent group has a setting for .AlarmUserDefStr, that setting is used in the alarm record.
See Also
.AlarmUserDefNumX
190
.AlarmDscInhibitor Dotfield .AlarmLoLoInhibitor Dotfield .AlarmLoInhibitor Dotfield .AlarmHiInhibitor Dotfield .AlarmHiHiInhibitor Dotfield .AlarmMinDevInhibitor Dotfield .AlarmMajDevInhibitor Dotfield .AlarmROCInhibitor Dotfield
.AlarmDscInhibitor Dotfield
Returns the name of the inhibitor tag assigned to a discrete alarm.
Category
Alarms
Usage
TagName.AlarmDscInhibitor
Parameter
Message (read-only)
191
Examples
The .AlarmDSCInhibitor dotfield is used by setting .Name to an Indirect tag that is equal to the value of the .AlarmDscInhibitor tag then manipulating the value of the Indirect tag. The following statement returns the name of the alarm inhibitor tag for a discrete alarm (assuming SomeIndirectTag is an analog indirect tag):
SomeIndirectTag.Name = AlarmedTag.AlarmDscInhibitor;
The inhibition state of the alarmed tag can be controlled by setting the value of the indirect tag as follows:
SomeIndirectTag = 1;
192
.AlarmLoLoInhibitor Dotfield
Returns the name of the inhibitor tag assigned to a LoLo alarm.
Category
Alarms
Usage
TagName.AlarmLoLoInhibitor
Parameter
TagName Any integer, real, indirect analog tag, or alarm group tag.
Remarks
Message (read-only)
Examples
The .AlarmLoLoInhibitor dotfield is used by setting .Name to an Indirect tag that is equal to the value of the .AlarmLoLoInhibitor tag then manipulating the value of the Indirect tag. The following statement returns the name of the alarm inhibitor tag for a LoLo alarm limit (assuming SomeIndirectTag is an analog indirect tag):
SomeIndirectTag.Name = AlarmedTag.AlarmLoLoInhibitor;
The inhibition state of the alarmed tag can be controlled by setting the value of the Indirect tag as follows:
SomeIndirectTag = 1;
193
.AlarmLoInhibitor Dotfield
Returns the name of the inhibitor tag assigned to a Low alarm.
Category
Alarms
Usage
TagName.AlarmLoInhibitor
Parameter
TagName Any integer, real, indirect analog tag, or alarm group tag.
Remarks
Message (read-only)
Examples
The .AlarmLoInhibitor dotfield is used by setting .Name to an Indirect tag that is equal to the value of the .AlarmLoInhibitor tag then manipulating the value of the Indirect tag. The following statement returns the name of the alarm inhibitor tag for a Low alarm limit (assuming SomeIndirectTag is an analog indirect tag):
SomeIndirectTag.Name = AlarmedTag.AlarmLoInhibitor;
The inhibition state of the alarmed tag can be controlled by setting the value of the Indirect tag as follows:
SomeIndirectTag = 1;
194
.AlarmHiInhibitor Dotfield
Returns the name of the inhibitor tag assigned to a High alarm.
Category
Alarms
Usage
TagName.AlarmHiInhibitor
Parameter
TagName Any integer, real, indirect analog tag, or alarm group tag.
Remarks
Message (read-only)
Example
The .AlarmHiInhibitor dotfield is used by setting .Name to an Indirect tag that is equal to the value of the .AlarmHiInhibitor tag then manipulating the value of the Indirect tag. The following statement returns the name of the alarm inhibitor tag for a High alarm limit (assuming SomeIndirectTag is an analog indirect tag):
SomeIndirectTag.Name = AlarmedTag.AlarmHiInhibitor;
The inhibition state of the alarmed tag can be controlled by setting the value of the Indirect tag as follows:
SomeIndirectTag = 1;
195
.AlarmHiHiInhibitor Dotfield
Returns the name of the inhibitor tag assigned to a HiHi alarm condition.
Category
Alarms
Usage
TagName.AlarmHiHiInhibitor
Parameter
TagName Any integer, real, indirect analog tag, or alarm group tag.
Remarks
Message (read-only)
Example
The .AlarmHiHiInhibitor dotfield is used by setting .Name to an Indirect tag that is equal to the value of the .AlarmHiHiInhibitor tag then manipulating the value of the Indirect tag. The following statement returns the name of the alarm inhibitor tag for a HiHi alarm limit (assuming SomeIndirectTag is an analog indirect tag):
SomeIndirectTag.Name = AlarmedTag.AlarmHiHiInhibitor;
The inhibition state of the alarmed tag can be controlled by setting the value of the indirect tag as follows:
SomeIndirectTag = 1;
196
.AlarmMinDevInhibitor Dotfield
Returns the name of the alarm inhibitor tag associated with a minor deviation alarm condition.
Category
Alarms
Usage
TagName.AlarmMinDevInhibitor
Parameter
TagName Any integer, real, indirect analog tag, or alarm group tag.
Remarks
Message (read-only)
Example
The .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 of the Indirect tag. The following statement returns the name of the 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 by setting the value of the Indirect tag as follows:
SomeIndirectTag = 1;
Turns off inhibition Minor deviation alarms can be generated for AlarmedTag
See Also
.AlarmMajDevInhibitor
197
.AlarmMajDevInhibitor Dotfield
Returns the name of the alarm inhibitor tag associated with a major deviation alarm condition.
Category
Alarms
Usage
TagName.AlarmMajDevInhibitor
Parameter
TagName Any integer, real, indirect analog tag, or alarm group tag.
Data Types
Message (read-only)
Example
The .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 of the Indirect tag. The following statement returns the name of the 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 by setting the value of the Indirect tag as follows:
SomeIndirectTag = 1;
Turns off inhibition Major deviation alarms can be generated for AlarmedTag
See Also
.AlarmMinDevInhibitor
198
.AlarmROCInhibitor Dotfield
Returns the name of the alarm inhibitor tag associated with a rate-of-change alarm condition.
Category
Alarms
Usage
TagName.AlarmROCInhibitor
Parameter
TagName Any integer, real, indirect analog tag, or alarm group tag.
Data Types
Message (read-only)
Example
The .AlarmROCInhibitor dotfield is used by setting .Name to an Indirect tag that is equal to the value of the .AlarmROCInhibitor tag then manipulating the value of the Indirect tag. The following statement returns the name of the alarm 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 by setting the value of the Indirect tag as follows:
SomeIndirectTag = 1;
199
Counts the number of alarms associated with a tag or alarm group. Counts the number of unacknowledged alarms associated with a tag or alarm group. Counts the number of value alarms associated with a tag. Counts the number of unacknowledged value alarms associated with a tag. Counts the number of discrete alarms. Counts the number of unacknowledged discrete alarms. Counts the number of deviation alarms. Counts the number of unacknowledged deviation alarms. Counts the number of rate-of-change alarms. Counts the number of unacknowledged rate-of-change alarms.
.AlarmValueCount Dotfield .AlarmValueUnAckCount Dotfield .AlarmDscCount Dotfield .AlarmDscUnAckCount Dotfield .AlarmDevCount Dotfield .AlarmDevUnAckCount Dotfield .AlarmROCCount Dotfield .AlarmROCUnAckCount Dotfield
200
.AlarmTotalCount Dotfield
Tracks the total number of active alarms for a specified tag or alarm group.
Category
Alarms
Usage
TagName.AlarmTotalCount
Parameter
The count includes value, deviation, rate-of-change, and discrete alarms. It includes both acknowledged and unacknowledged alarms.
Data Types
Integer (read-only)
Valid Values
Tag1 is an analog tag configured for alarms. ATC is also an analog tag, which gets the total number of all active alarms (both UnAck and Ack) present in Tag1.
ATC = Tag1.AlarmTotalCount; See Also
201
.AlarmUnAckCount Dotfield
Tracks the total number of unacknowledged alarms for a specified tag or alarm group.
Category
Alarms
Usage
TagName.AlarmUnAckCount
Parameter
The count includes unacknowledged value, deviation, rate-of-change, and discrete alarms.
Data Types
Integer (read-only)
Valid Values
Tag1 is an analog or discrete tag configured for alarms. AUC is an analog tag, which gets the total number of unacknowledged alarms present in Tag1.
AUC = Tag1.AlarmUnAckCount; See Also
202
.AlarmValueCount Dotfield
Tracks the total number of active value alarms for a specified tag or alarm group.
Category
Alarms
Usage
TagName.AlarmValueCount
Parameter
This includes the count of HiHi, High, Low, and LoLo alarms. It includes both acknowledged and unacknowledged alarms. For non-expanded summary alarm tags, this count will not exceed 1. However, the count may vary with alarm groups.
Data Types
Integer (read-only)
Valid Values
Tag1 is an analog tag configured for value alarms. AVC is also an analog tag, which gets the total number of all alarm values present in Tag1.
AVC = Tag1.AlarmValueCount; See Also
203
.AlarmValueUnAckCount Dotfield
Tracks the total number of unacknowledged value alarms for a specified tag or alarm group. This includes the count of HiHi, High, Low, and LoLo alarms.
Category
Alarms
Usage
TagName.AlarmValueUnAckCount
Parameter
Integer (read-only)
Valid Values
Tag1 is an analog tag configured for value alarms. AVUC is also an analog tag, which gets the total number of all unacknowledged value alarms present in Tag1.
AVUC = Tag1.AlarmValueUnAckCount; See Also
204
.AlarmDscCount Dotfield
Tracks the total number of active discrete alarms for a specified tag or alarm group.
Category
Alarms
Usage
TagName.AlarmDscCount;
Parameter
The count assigned to The AlarmDscCount dotfield includes both acknowledged and unacknowledged alarms. For non-expanded summary alarm tags, this count is always 1. However, the count can vary for alarm groups.
Data Types
Integer (read-only)
Valid Values
Tag1 is a discrete tag configured for discrete alarms. ADC is an analog tag, which gets the total number of active discrete alarms (both unacknowledged and acknowledged) present in Tag1.
ADC = Tag1.AlarmDSCCount; See Also
205
.AlarmDscUnAckCount Dotfield
Tracks the total number of unacknowledged discrete alarms for a specified tag or alarm group.
Category
Alarms
Usage
TagName.AlarmDscUnAckCount
Parameter
Integer (read-only)
Valid Values
Tag1 is a discrete tag configured for discrete alarms. ADUC is an analog tag, which gets the total number of unacknowledged discrete alarms present in Tag1.
ADUC = Tag1.AlarmDscUnAckCount; See Also
206
.AlarmDevCount Dotfield
Tracks the total number of active deviation alarms for a specified tag or alarm group.
Category
Alarms
Usage
TagName.AlarmDevCount
Parameter
TagName Any real tag, integer tag, indirect analog tag, or alarm group.
Remarks
This includes the count of minor and major deviation alarms. It includes both acknowledged and unacknowledged alarms. For non-expanded summary alarm tags, this count is always 1. However, the count can vary with alarm groups.
Data Types
Analog (read-only)
Valid Values
Tag1 is an analog tag configured for Deviation alarms. ADC is also an analog tag, which gets the total number of active deviation (both unacknowledged and acknowledged) alarms present in Tag1.
ADC=Tag1.AlarmDevCount; See Also
207
.AlarmDevUnAckCount Dotfield
Tracks the total number of unacknowledged deviation alarms for a specified tag or alarm group. This includes the count of minor and major deviation alarms.
Category
Alarms
Usage
TagName.AlarmDevUnAckCount
Parameter
TagName Any real tag, integer tag, indirect analog tag, or alarm group.
Data Types
Analog (read-only)
Valid Values
Tag1 is an analog tag configured for Deviation alarms. ADUC is also an analog tag, which gets the total number of unacknowledged deviation alarms present in Tag1.
ADUC = Tag1.AlarmDevUnAckCount; See Also
208
.AlarmROCCount Dotfield
Tracks the total number of active rate-of-change alarms for a specified tag or alarm group. It includes both acknowledged and unacknowledged alarms. For non-expanded summary alarm tags, this count will always be 1. However, the count may vary with alarm groups.
Category
Alarms
Usage
TagName.AlarmROCCount
Parameter
TagName Any real tag, integer tag, indirect analog tag, or alarm group.
Data Types
Integer (read-only)
Valid Values
Tag1 is an analog tag configured for rate-of-change alarms. ARC is also an analog tag, which gets the total number of active rate-of-change alarms (both unacknowledged and acknowledged) present in Tag1.
ARC = Tag1.AlarmROCCount; See Also
209
.AlarmROCUnAckCount Dotfield
Tracks the total number of unacknowledged rate-of-change alarms for a specified analog tag or alarm group.
Category
Alarms
Usage
TagName.AlarmROCUnAckCount
Parameter
TagName Any real tag, integer tag, indirect analog tag, or alarm group.
Data Types
Integer (read-only)
Valid Values
Tag1 is an analog tag configured for rate-of-change alarms. ARUC is also an analog tag, which gets the total number of unacknowledged rate-of-change alarms present in Tag1.
ARUC = Tag1.AlarmROCUnAckCount; See Also
210
211
Chapter 7
Viewing Alarm Hierarchies
The Alarm Tree Viewer ActiveX control shows the alarm group hierarchy of alarm providers selected by an alarm query. Items that appear in the Alarm Tree Viewer control include alarm providers, nodes, and groups.
You can enhance the usability of the Alarm Viewer control by using an Alarm Tree Viewer control. You can create a script so that when the operator selects an alarm provider in the Alarm Tree Viewer control, the Alarm Viewer control queries the new alarm provider.
212
You can configure how the Alarm Tree Viewer control appears and what data is shown. For more information, see Configuring 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 InTouch HMI Visualization Guide.
General control appearance, including colors Text font Automatic refresh Which features users can access at run time Which providers and groups to show Custom saved queries Sort order for alarm groups
You can configure these options from within WindowMaker and while the Alarm Tree Viewer control is running.
Include a status bar. Include a column header. Set the colors of visual elements.
Right-click the Alarm Tree Viewer control, and then click Properties. The AlarmTreeViewerCtrl Properties dialog box appears.
213
Configure how the Alarm Tree Viewer control appears to run-time users. Do any of the following: Select the Perform Query on Startup check box for the tree to automatically update using default query properties. Otherwise, users must run the Refresh command to update the tree.
Select the Show Context Sensitive Menu check box to activate the shortcut menu. Click Configure Context Menus to configure what commands appear on the menu. For more information, see Controlling Which Features Users can Access at Run Time on page 216. In the Display Mode list, click how you want the tree to refresh. For an automatic refresh, type the refresh interval the Auto Refresh Interval box. The range is 5 to 32767 seconds. In the Expansion Level box, type the number of expansion levels for the tree. This determines to which alarm group branch level the alarm tree is opened when you manually refresh the control. A value of 1 shows only the provider, a value of 2 shows the direct alarm groups of the provider, and so on. Select the Sort Elements in Alphabetical Order check box to sort the tree elements in alphabetical order. Click either Ascending or Descending for the sort direction. Select the Show Heading check box to show a header above the hierarchy. In the box, type the header bar text. Select the Show Status Bar check box to show a status bar at the bottom of the Alarm Tree Viewer control. Click Font to configure the font properties for the tree. The standard Windows Font dialog box appears.
214
Select the Element Selection check box to allow users to select an element in the tree. Select the Allow Multiple Selections check box to allow users to select one or more elements using the CTRL and SHIFT keys. Select the Silent Mode check box prevent the Alarm Tree Viewer control from showing run-time error messages. Error messages are always sent to the Logger.
4 5
Click the palette button to assign colors to the visual elements of the Alarm Tree Viewer control. You can set the colors of the title bar text, window background, selected element text, and selected element background.
Click Apply.
215
Configuring Fonts
You can configure how the text appears for the Alarm Tree Viewer control.
To configure the font 1
Right-click the Alarm Tree Viewer control, and then click Properties. The AlarmTreeViewerCtrl Properties dialog box appears. Click the General tab.
3 4
Click Font. The standard Windows Font dialog box appears. Configure the font and then click OK. Click OK.
Right-click the Alarm Tree Viewer control, and then click Properties. The AlarmTreeViewerCtrl Properties dialog box appears. Click the General tab. In the Display Mode list, click how you want the tree to refresh, either Manual Refresh or Auto Refresh. For an automatic refresh, type the tree refresh interval the Auto Refresh Interval box. The range is 5 to 32767 seconds. Click Apply.
2 3
216
Right-click the Alarm Tree Viewer control, and then click Properties. The AlarmTreeViewerCtrl Properties dialog box appears. Click the General tab. Select the Show Context Sensitive Menu check box to activate the shortcut menu. Click Configure Context Menus. The Context Sensitive Menus dialog box appears.
2 3 4
Select the check box for each command that you want to appear in the shortcut menu. You must select least one shortcut command.
Command Refresh Freeze Query Favorites Description
Refreshes the data shown in the Alarm Tree Viewer control. Allows you to toggle the freeze/unfreeze mode of the tree. Shows the Alarm Query dialog box to select a query favorite from an available list. Allows you to add new queries from the Add Query dialog box.
Add to Favorites
217
Command Sort
Description
Shows the Sort dialog box to sort Alarm Tree Viewer control data in ascending or descending order Shows the Alarm Statistics dialog box with the percentage of current retrieved alarm providers shown in the Alarm Tree Viewer control.
Statistics
6 7
Click OK to close the Context Sensitive Menus dialog box. Click Apply.
218
Right-click the Alarm Tree Viewer control and then click Properties. The AlarmTreeViewerCtrl Properties dialog box appears. Click the Query tab.
3 4
In the Alarm Query box, type the path to the initial alarm query. Click Apply.
219
Right-click the Alarm Tree Viewer control and then click Properties. The AlarmTreeViewerCtrl Properties dialog box appears. Click the Query tab.
In the Query Favorites File box, type the network path and file name or click the ellipse button to browse for the file. To edit the Filter Favorites file, click the Edit Favorites File button. The Alarm Query window opens, allowing you to add, modify, or delete filters from your favorites file. When you are done, click OK to save your changes and close the window.
Click OK.
220
Right-click the Alarm Tree Viewer control and then click Properties. The AlarmTreeViewerCtrl Properties dialog box appears. Click the General tab.
3 4 5
Select the Sort Elements in Alphabetical Order check box to list alarm groups in alphabetical order. Click Ascending or Descending to specify the sort direction. Click OK.
221
The Alarm Tree Viewer control can show multiple nodes and 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 generate queries for alarms that can be used in the Alarm Tree Viewer control and the Alarm DB View controls. To select multiple alarm groups, hold down the shift key while clicking on a group. To un-select all groups, click on an empty area. One or more of the following commands appears on the run-time shortcut menu, depending on how the control is configured:
Refresh Forces a manual update of the alarms. Freeze Stops the alarms from updating. Query Favorites Opens the Alarm Query dialog box
where you can select an alarm query from a list of previously defined alarm queries.
222
Name of the current query Percentage complete status of the current query
Right-click the Alarm Tree Viewer control at run time. Click Query Favorites. The Alarm Query dialog box appears. Select the named query that you want to show in the list of currently defined queries. Click OK. The Alarm Tree Viewer control shows alarm group information from the selected query.
223
Enables or disables the Add to Favorites shortcut menu command. Shows the initial alarm query and allows you to change the query. The valid syntax is \\<node>\<provider> or \<provider>. Controls whether an element in the tree can be selected or not by the operator during run time. Sets the branch level to which the alarm tree is opened when you manually refresh the control. A value of 1 shows only the provider, a value of 2 shows the direct alarm groups of the provider, and so on. Gets or sets the font of records and headings shown in the control. Enables or disables the Freeze menu command. Gets or sets the text that appears in the header of the Alarm Tree Viewer control. Allows you to select multiple elements in the Alarm Tree Viewer control. Gets or sets the query favorites file name. Enables or disables the Query Favorites menu command. Automatically updates the Alarm Tree Viewer control using default query properties if selected. If not selected, you must requery 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 Refresh command appears in the shortcut menu. Gets or sets the background color for the selected element.
ElementSelection ExpansionLevel
224
Property Name SelTextColor ShowContextMenu ShowHeading ShowStatusBar SilentMode SortElements SortMenu SortOrder
Purpose
Gets 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 Viewer control. Gets or sets a value that determines whether the status bar is shown. Gets or sets a value that determines whether the control is in Silent mode. Enables or disables sorting in the Alarm Tree Viewer control. Enables or disables the Sort menu command. Gets or sets the sort direction. Possible values are "Ascending" and "Descending," represented as 0 and 1 respectively. Enables or disables the Statistics menu command. Gets or sets the text color the Alarm Tree Viewer control. Gets or sets the title bar background color. Available only if the ShowHeading property is set. Gets or sets the title bar foreground color. Available only if the ShowHeading property is set. Gets or sets the window background color of the Alarm Tree Viewer control.
225
Retrieve information about the control. Retrieve information about specific entries in the alarm hierarchy. Freeze the control. Create query strings. Run queries.
For more information about calling methods, see Chapter 8, Scripting ActiveX Controls, in the InTouch HMI Scripting and Logic Guide.
AboutBox() Method
Shows the Alarm Tree Viewer About dialog box.
Syntax
Object.AboutBox()
Example
GetElementCount() Method
Gets the total number of elements in the tree.
Syntax
Object.GetElementCount()
Example
The name of the control is AlarmTreeViewerCtrl1 and nTag1 is an integer or real tag.
nTag1 = #AlarmTreeViewerCtrl1.GetElementCount();
226
CheckElementMembership() Method GetElementCount() Method GetElementName() Method GetElementPath() Method GetSelectedElementCount() Method GetSelectedElementName() Method GetSelectedElementPath() Method GetSubElementCount() Method GetSubElementName() Method GetSubElementPath() Method
CheckElementMembership() Method
Checks if the descendant tree element is part of the ancestor tree element.
Syntax
Object.CheckElementMembership(PathName, DescendantElementName, AncestorElementName)
Parameter
PathName The name of the path. For example, \InTouch or \\NodeName. DescendantElementName The name of the descendant element name. For example, GroupA. AncestorElementName The name of the ancestor element name. For example, GroupB.
227
GetElementCount() Method
Gets the total number of elements in the tree.
Syntax
Object.GetElementCount()
Example
The name of the control is AlarmTreeViewerCtrl1 and nTag1 is an integer or real tag.
nTag1 = #AlarmTreeViewerCtrl1.GetElementCount();
GetElementName() Method
Gets the element name corresponding to the index.
Syntax
Object.GetElementName(ElementIndex)
Parameter
GetElementPath() Method
Gets the element path corresponding to the index, down to the indicated expansion level.
Syntax
Object.GetElementPath(ElementIndex, ExpansionLevel)
Parameter
The name of the control is AlarmTreeViewerCtrl1, StrTag is a message tag, and returns the path of the element at index 17 up to 4 levels.
StrTag = #AlarmTreeViewerCtrl1.GetElementPath(17, 4);
228
GetSelectedElementCount() Method
Gets the number of selected elements in the tree.
Syntax
Object.GetSelectedElementCount()
Example
The name of the control is AlarmTreeViewerCtrl1 and nTag1 is an integer or real tag.
nTag1 = #AlarmTreeViewerCtrl1.GetSelectedElementCount();
GetSelectedElementName() Method
Gets the name of the selected element on the Alarm Tree Viewer control.
Syntax
Object.GetSelectedElementName()
Example
GetSelectedElementPath() Method
Gets the path of the selected element to the indicated expansion level.
Syntax
Object.GetSelectedElementPath(ExpansionLevel)
Parameter
229
GetSubElementCount() Method
Gets the total number of sub-elements from the indicated element.
Syntax
Object.GetSubElementCount(Path, ElementName)
Parameter
Path The name of the path. For example: \\NodeName\InTouch If the path parameter is empty, the Alarm Tree Viewer control finds the first element of the tree that matches the indicated element name. ElementName The name of the element. For example, Group1.
Examples
The name of the control is AlarmTreeViewerCtrl1 and nTag1 is an integer or real tag.
nTag1 = #AlarmTreeViewerCtrl1.GetSubElementCount("", "Group1" ); nTag1 = #AlarmTreeViewerCtrl1.GetSubElementCount( "\\NodeName", "Group1" ); nTag1 = #AlarmTreeViewerCtrl1.GetSubElementCount( "\InTouch", "Group1" ); nTag1 = #AlarmTreeViewerCtrl1.GetSubElementCount( "\\NodeName\InTouch", "Group1" );
230
GetSubElementName() Method
For the indicated element, gets the name of the sub-element at the corresponding index.
Syntax
Object.GetSubElementName(Path, ElementName, ElementIndex)
Parameter
Path The name of the path. For example: \\NodeName\InTouch If the path parameter is empty, the Alarm Tree Viewer control finds the first element of the tree that matches the indicated element name. ElementName The name of the element. For example, Group1. ElementIndex The index of the element.
Examples
231
GetSubElementPath() Method
Gets the path of the sub-element from the index of the element name to the indicated expansion level.
Syntax
Object.GetSubElementPath(Path, ElementName, ElementIndex, ExpansionLevel)
Parameter
Path The name of the path. For example: \\NodeName\InTouch If the path parameter is empty, the Alarm Tree Viewer control finds the first element of the tree that matches the indicated element name. ElementName The name of the element. For example, Group1. ElementIndex The index of the element. ExpansionLevel The level of expansion.
Examples
232
Freeze() Method
Freezes the Alarm Tree Viewer control tree.
Syntax
Object.Freeze(Frozen)
Parameters
Frozen Contols whether the tree can be updated. 1 = Freezes the tree. 0 = Unfreezes the tree.
Example
Tag1 is defined as memory discrete tag and the name of the control is AlarmTreeViewerCtrl1.
Tag1 = 1; #AlarmTreeViewerCtrl1.Freeze(Tag1);
GetAlarmQueryFromSelection() Method
Returns an alarm query string from the selected element in the Alarm Tree Viewer control.
Syntax
Object.GetAlarmQueryFromSelection()
Example
The name of the control is AlarmTreeViewerCtrl1 and StrTag is a message tag. For example: StrTag is set to \\NodeName\InTouch\GroupA.
StrTag = #AlarmTreeViewerCtrl1.GetAlarmQueryFromSelection();
233
Running Queries
You can run queries for the Alarm Tree Viewer control using methods that either retrieve an existing query saved in a query favorites file or set a string that specifies a new collection of alarm providers.
SetQueryByName() Method
Sets the current query as specified by the query name passed. The query must be in the query favorites file.
Syntax
Object.SetQueryByName(QueryName)
Parameter
QueryName The name of the query as created by using query favorites. For example, Turbine Queries.
Example
SetQueryByString() Method
Sets the current query as a new string specifying a new collection of Alarm Providers.
Syntax
Object.SetQueryByString(NewQuery)
Parameters
234
The Click event has one parameter called ClicknElementID, which identifies the element in the tree that is clicked at run time. The DoubleClick event has one parameter called DoubleClicknElementID, which identifies the element in the tree that is double-clicked at run time. For the Click and DoubleClick events, an ElementID of -1 is returned for the "All Providers" node.
Note The Alarm Tree Viewer control ignores the user interface methods when they are called from the StartUp event, because the control is not visible yet. These methods include: AboutBox(), CheckElementMembership(), Freeze(), GetAlarmQueryFromSelection(), GetElementCount(), GetElementName(), GetElementPath(), GetSelectedElementCount(), GetSelectedElementName(), GetSelectedElementPath(), GetSubElementCount(), GetSubElementName(), GetSubElementPath(), and Refresh().
For more information about scripting ActiveX events, see Chapter 8, Scripting ActiveX Controls, in the InTouch HMI Scripting and Logic Guide.
235
Chapter 8
Printing Alarms
You use the InTouch Alarm Printer utility to print alarms from multiple nodes. You can print alarm records stored in the alarm memory on an event-by-event basis using a dedicated line or network printer. Also, you can use the Alarm Printer to save alarm records to a file.
WindowViewer Session Alarm Provider Alarm Memory Record Record Alarm Provider Record Record Record Alarm Provider InTouch Node Printer Cable Alarm Query Alarm Printer Utility Running InTouch Application Network Printer LAN Alarm Printer File
You can configure the Distributed Alarm system to print certain events on a line printer as they occur. Typically, you print alarms immediately to record information in the event of a catastrophic failure. Generally, you use a dot matrix printer connected through a serial or parallel port directly to the computer running the InTouch application. Windows network printers and laser printers are usually inappropriate for gathering data for catastrophic events because they hold entire pages in memory before actually printing a page.
236
On the menu bar, click Configure. The Configuration Settings dialog box appears.
237
In the Print To area, select the connection to the alarm printer. Click None to not use a printer.
Click LPT1-3 to use a printer connected by a parallel port to the computer running the InTouch application. Click COM1-4 to use a printer connected by a serial port to the computer running the InTouch application. Click Port Configuration to show the COM Properties dialog box and change the default values assigned to the selected COM port. Click Printer to use a printer connected through the network to the computer running the InTouch application. In the box, type the name of the printer or click Browse to select an available printer.
Note If the printer you want does not appear, add the printer using the Windows Add Printer wizard. 5
Select the Remove Trailing Spaces in Printout check box to prevent the printer from printing blank lines or empty pages. Select the Enable Printing check box to print alarms. Select the Disable Realtime Alarm Printing check box to prevent the Alarm Printer from printing alarms as they occur. Click OK.
6 7
238
Each alarm has an assigned priority number that represents the severity of the alarm. An alarm priority ranges from 1 to 999. The most severe alarm is assigned a priority of 1. The least severe alarm is assigned a priority of 999. If a network or printer connection fails, the Alarm Printer does not reprint all alarms. The Alarm Printer only prints the alarms that have not been printed before the connection failure.
To configure which alarms to print 1
2 3
On the menu bar, click Configure. The Configuration Settings dialog box appears. Click the Query tab.
4 5
In the From Priority box, enter the highest priority alarm value (1 to 999). In the To Priority box, enter the lowest priority alarm value (1 to 999).
239
In the Alarm Query box, type one or more alarm queries. You can specify one or more alarm providers and groups. Use blank spaces to separate the queries. Select the Record alarms generated after query starts check box to only include alarms that occur after the query starts. The Alarm Printer ignores alarms records that are in the alarm memory and were triggered before the Alarm Printer started querying. Click OK.
2 3
On the menu bar, click Configure. The Configuration Settings dialog box appears. Click the Message tab.
240
In the Date/Time area, select the Date check box, and then select a date format from the list. The listed date formats include the following components:
Option DD MM YY YYYY MMM Description
Two-digit day of the month (01-31) Two-digit month of the year (01-12) Last two digits of the year Four-digit year Three-character abbreviation of the month
Select the Time check box and select a time format from the list. The listed formats included the following time components:
Option AP Description
Selects the AM/PM time format. For example, 3:00 PM is shown as 3:00 PM. A time without this designation defaults to 24 hour military time format. For example, 3:00 PM is shown as 15:00. Two-digit hour of the day (00-23 or 01-12) when the alarm/event occurred. Two-digit minute of the hour (00-59) when the alarm/event occurred. Two-digit second of the minute (00-59) when the alarm/event occurred. Three-digit millisecond of the second when the alarm/event occurred.
HH MM SS SSS 6
Select the order that alarms appear in the alarm record according to the onset time of the alarm:
Option OAT LCT Description
(Original Alarm Time) The date/time stamp of the onset of the alarm. (Last Changed Time) The date/time stamp of the most recent change of status for the instance of the alarm: onset of the alarm, change of sub-state, return to normal, or acknowledgment.
241
Description
(Last Changed Time, but Original Alarm Time on acknowledgement ) The last changed time is used while the alarm is unacknowledged, then original alarm time is used after the alarm has been acknowledged.
Prints 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. Prints the alarm priority (1-999). Selects the default settings for the Alarm Printer utility for InTouch version 7.1. Selects the default settings for the Alarm Printer utility for InTouch version 7.11. Removes the extra trailing spaces from a printed field when the length of the actual field value is less than the value configured for that field. Reduces the spacing between columns so that more fields can fit on the printed page. Prints the alarm name (tag). In the Length box, type the number of characters (64 characters maximum) for the alarm name. Prints the alarm group name. In the Length box, type the number of characters (64 characters maximum) for the alarm group name.
Group Name
242
Description
Prints the name of the alarm provider. In the Length box, type the number of characters (64 characters maximum) for the alarm provider name. Prints the value of the tag. In the Length box, type the number of characters (32 characters maximum) for the alarm value. Prints the tags alarm limit. In the Length box, type the number of characters (32 characters maximum) allowed for alarm limit. The number should be large enough to provide the desired level of precision. Prints the operator node associated with the alarm condition. In the Length box, type the number of characters (64 characters maximum) allowed for the operators node. In a Terminal Services environment, this is the name of the client computer that the respective operator established the Terminal Services session from. If the node name can't be retrieved, the node's IP address is used instead. Prints the operator name associated with the alarm condition. In the Length box, type the number of characters (16 characters maximum) allowed for the operators name. Prints the alarm comment associated with the tag. In the Length box, type the number of characters (131 characters maximum) allowed for the comment. Prints the numerical values of User Defined Number 1 corresponding to the alarm. Prints the numerical values of User Defined Number 2 corresponding to the alarm.
Value at Alarm
Limit
Operator Node
Operator Name
Comment
User1
User2
243
Option User3
Description
Prints the string value of the user-defined string property associated with the alarm. The maximum number of characters is 131.
Click Apply.
YY MM DD HH
Last two digits of the year when the log file is created. Two-digit number of the month (01-12) when the log file is created. Two-digit day of the month (01-31) when the log file is created. Two-digit hour of the day (00-23) when the log file is created.
On the menu bar, click Configure. The Configuration Settings dialog box appears.
244
4 5 6
Select the Enable Alarm File Logging check box to save alarm records to log files. In the Directory box, type the path or browse to a folder location to save the alarm log files. In the Number of Hours to Cycle Filename box, enter the number of hours worth of alarm records to save to an individual log file. Valid entries are 1 to 24. If your InTouch application runs continuously, select a file logging interval that creates a set of equal length daily log files. For example, setting Number of Hours to Cycle Filename to 6 creates 4 equal length daily log files.
In the Starting at Hour box, enter the starting hour to begin logging alarm records to a file each day. Valid entries are 0 to 23. For example, an oil refinery operates three daily work shifts. The first shift begins at 06:00. Management wants alarm records logged for each shift. To do this, enter 8 for the Number of Hours to Cycle Filename option. Enter 6 for the Starting at Hour (0-23) option. The Alarm Printer creates a log file from 06:00 to 14:00, another from 14:00 to 22:00, and a third from 22:00 to 06:00.
In the Keep Log Files for box, enter the number of days to retain log files. The Alarm Printer saves log files for the number of specified days plus the current day. The Alarm Printer deletes log files older than the retention period. To save log files indefinitely, enter 0.
245
In the Log File Name Extension box, accept the default ALG file name extension or assign another three-character extension to log files. If you use a .csv extension, you can import the log file directly 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 at the end of each record in the log file.
11 Select the Original Column Ordering check box to maintain
the same order from the alarm display to log file records.
12 Click Apply.
2 3 4 5
On the File menu, click New to show the Alarm Printer with its default values. On the menu bar, click Configure. The Configuration Settings dialog box appears. Configure the alarm settings. On the File menu, select Save.
On the File menu, select Open. Select the Alarm Printer Configuration file that you want to edit. Edit the file. On the File menu, select Save. Select Save as to save the changes to a new file without changing the existing file.
246
Printing Alarms
Each query logs all of the alarms specified in the Alarm Printer configuration file (.alc) that is currently open. If no file has been specified, the settings currently selected during Alarm Printer configuration are used. You can run multiple queries with Alarm Printer. Each query uses different parameters and is associated with a separate instance of the Alarm Printer. If two instances of Alarm Printer are running the same query, the entries are duplicated. While Alarm Printer is running, you can manually start or stop queries. Be sure that you have printing enabled.
To start an alarm query
247
2 3 4
If necessary, configure the query to collect alarm records for logging. Click the File Logging button. Run an alarm query.
Alarm records collected by the query are written to the configured log file.
248
Where, MYQUERY.ALC is the name of the Alarm Printer configuration file that opens. Specifying the .exe file name extension is optional. Make sure that the batch file switches to the folder where the InTouch HMI is installed. To prevent the loss of any query data due to a system inadvertently being shut down and restarted, you can automatically start the Alarm Printer and automatically run a specific query by running the following command from a batch file:
ALMPRT.EXE -q MYQUERY.ALC
By using the -q in the command, your query runs automatically when the system starts up.
Error Message
0 1 2 3 4 5 6 7
Success Instance not found or not running Interface not initialized Failure to access virtual memory Invalid error code Too many instances already running Result string would be too long Invalid instance index passed to the function
249
Error Code
Error Message
8 9 20 21 22 23 24 25 26 27 28
Failed to post the message to the alarm printer application Failed to wait for a response from the alarm printer application To priority must be equal to or greater than From priority Invalid priority value Invalid alarm state Failed to execute the command because the query is running Query string is not valid Invalid query processing state Invalid print state selector Command received by the alarm printer window is not recognized Query could not be started
APUStartInstance() Function
Starts an instance of the Alarm Printer in a minimized state with values specified from a configuration file.
Category
View
Syntax [Result=] APUStartInstance(sFilePath, iTagInstance);
250
Arguments
sFilePath Full path to a configuration file (input string). iTagInstance Integer tag. The function returns an instance number to it if the function executes successfully.
Remarks
You can start up to sixteen instances of the Alarm Printer. This function writes the instance number (0 - 15) to the iTagInstance parameter. The instance number increments when a new Alarm Printer instance starts. This instance number can be used by other Alarm Printer functions 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 begin processing alarms from the alarm memory. Use the APUStartQuery() function to begin processing data from the alarm memory for the instance.
Example
Status = APUStartInstance("c:\MyAlarmCfg\Area1Alarms.alc", Inst);
See Also
APUStartQuery() Function
Sets the date and time limits for records to be processed from the alarm memory and then starts the query. Category View
Syntax [Result=] APUStartQuery(iInstance,iYear,iMonth,iDay, iHour,iMinute); Arguments
iInstance The instance of Alarm Printer (0 to 15). iYear The number of the year. iMonth The number of the month.
251
iDay The day of the month. iHour The hour number. iMinute The minute number.
Remarks
An error occurs if you try to start a query when a query is already running. If you set all date and time values to 0, all alarms are printed. This is because 0 is interpreted as January 01, 1900 at midnight. The time and dates specified are in local time. A value of -1 for the year sets the date to the current time that the command is processed. Returns an integer error code.
Example Status = APUStartQuery(Inst,2007,4,16,22,12); See Also
APUStopInstance() Function
Stops a specified instance of the Alarm Printer. Any further addition of records to be printed stops, any currently executing print query stops, and the instance of the program closes.
Category
View
Syntax [Result=] APUStopInstance(iInstance); Arguments
252
APUStopQuery() Function
Requests the specified instance to stop running its query. The application remains running, but it does not process any queries. A call to APUStartQuery() can cause the instance to start querying.
Category
View
Syntax [Result=] APUStopQuery(iInstance); Arguments
APUGetAlarmGroupText() Function APUGetQueryFromPriority() Function APUGetQueryToPriority() Function APUGetConfigurationFilePath() Function APUGetPrinterJobCount() Function APUGetQueryAlarmState() Function APUGetQueryProcessingState() Function
253
APUGetAlarmGroupText() Function
Gets the Alarm Query alarm group text.
Category
View
Syntax [Result=] APUGetAlarmGroupText(iInstance,sTagGroup); Arguments
iInstance The instance of Alarm Printer (0 to 15). sTagGroup Text - alarm group
Remarks
The initial alarm group text is read from the .alc configuration file that the Alarm Printer with the specified instance is using. The alarm group text is passed to the sTagGroup parameter into an InTouch message tag. Returns an integer error code.
Example
The TagGroup message tag can contain the following value after the function is run: \intouch!$system
Status = APUGetAlarmGroupText(Inst,TagGroup);
See Also
254
APUGetQueryFromPriority() Function
Gets the From Priority value for a query.
Category
View
Syntax [Result=] APUGetQueryFromPriority(iInstance, iTagPriority ); Arguments
iInstance The instance of Alarm Printer (0 to 15). iTagPriority An integer tag that receives the From Priority value.
Remarks
The initial priority is read from the .alc file that the Alarm Printer with the specified instance is using. The From Priority value is passed to the iTagPriority parameter into an InTouch integer tag. Returns an integer error code.
Example
In this example, FromPri is an integer tag that contains the From Priority value, such as 1.
Status = APUGetQueryFromPriority(Inst, FromPri);
See Also
255
APUGetQueryToPriority() Function
Gets the To Priority from the query.
Category
View
Syntax [Result=] APUGetQueryToPriority(iInstance,iPriority ); Arguments
iInstance The instance of Alarm Printer (0 to 15). iPriority An integer tag that receives the To Priority value.
Remarks
Another query cannot be running at the same time as the script that includes the APUGetQueryToPriority() function. The To Priority value is written to the iPriority parameter of the function, which is an integer tag. Returns an integer error code.
Example
The integer tag ToPri receives the To Priority value, such as 999.
Status = APUGetQueryToPriority(Inst,ToPri); See Also
256
APUGetConfigurationFilePath() Function
Returns the full file path of the .alc configuration file used for a query.
Category
View
Syntax [Result=] APUGetConfigurationFilePath(iInstance, sTagFilePath); Arguments
iInstance The instance of Alarm Printer (0 to 15). sTagFilePath A message tag to retrieve the name of the file path to the configuration file the Alarm Printer instance is using.
Remarks
The file path text is returned to an message tag that you can specify as sTagFilePath parameter of this function. Returns an integer error code.
Example
The CfgFilePath message tag receives the file path of the configuration file associated with the Alarm Printer instance contained in the Inst integer tag. For example: c:\MyAlarmCfg\Area1Alarms.alc
Status = APUGetConfigurationFilePath(Inst, CfgFilePath);
See Also
257
APUGetPrinterJobCount() Function
Returns the most recent Windows printer status job count for the printer used by this instance.
Category
View
Syntax
[Result=] APUGetPrinterJobCount(iInstance, iTagCount);
Arguments
iInstance The instance of Alarm Printer (0 to 15). iTagCount An integer tag that receives the count value.
Remarks
This function returns the count value in the iTagCount parameter, which is an integer tag. The results are not current unless a query is running. The results are not current unless an alarm has been printed the job count is typically updated when the printer is initially opened, and then each time an alarm line is printed. The returned job count value is only valid for Windows printers and does not have much meaning for printers associated with a parallel or serial port. Returns an integer error code.
Example
PJCount is an integer tag that receives the count value from the specified instance.
Status = APUGetPrinterJobCount(Inst, PJCount);
See Also
258
APUGetQueryAlarmState() Function
Returns the alarm state for the query.
Category
View
Syntax [Result=] APUGetQueryAlarmState(iInstance, iTagState ); Arguments
iInstance The instance of Alarm Printer (0 to 15). iTagState An integer tag that receives the alarm state of the query associated with the specified instance. The value has following meanings: 0 = All 1 = Acknowledged 2 = Unacknowledged
Remarks
The initial alarm state is read from the .alc file. This function returns it in the iTagState parameter of the function which is an integer tag. Returns an integer error code.
Example
259
APUGetQueryProcessingState() Function
Returns the status of the alarm query processing.
Category
View
Syntax [Result=] APUGetQueryProcessingState(iInstance, iTagState); Arguments
iInstance The instance of Alarm Printer (0 to 15). iTagState An integer tag that receives the processing state from the function. It has following meaning: 0 = Stop 1 = Start
Remarks
This function returns an integer value to the iTagState parameter, which is an integer tag. Returns an integer error code.
Example
ProcState is an integer tag that is set to 0 if the query is not running, or 1 if the query is running.
Status = APUGetQueryProcessingState(Inst, ProcState); See Also
260
APUFindAlarmGroupInstance() Function APUFindFileInstance() Function APUFindPrinterInstance() Function APUGetInstanceCount() Function APUIsInstanceUsed() Function
APUFindAlarmGroupInstance() Function
Returns the first instance of the Alarm Printer using the specified alarm group string.
Category
View
Syntax [Result=] APUFindAlarmGroupInstance(sGroup, iInstance); Arguments
sGroup The name of the alarm group to be found among the instances. iInstance An integer tag that receives the value of a found instance that uses the specified group name.
Remarks
This function returns the instance number to an integer tag as the iInstance parameter. The initial alarm group string is read from the .alc file. If no instance is found, the function returns 1 as the error code (no instance available) and writes 0 to the integer tag parameter. Returns an integer error code.
Example
FoundInstance is an integer tag that receives the number of the first instance found that uses the $System as its query.
Status = APUFindAlarmGroupInstance("$System", FoundInstance);
See Also
261
APUFindFileInstance() Function
Finds the first instance of the Alarm Printer using the specified .alc configuration file.
Category
View
Syntax [Result=] APUFindFileInstance(sFilePath,iInstance); Arguments
sFilePath The path of the .alc configuration file for which the instance is to be found. iInstance An integer tag that receives the number of the instance.
Remarks
This function returns the instance number to an integer tag as the iInstance parameter. Use this function to initially obtain the desired instance of the Alarm Printer. The file path string match is not case-sensitive. If no instance is found, the function returns 1 as the error code (no instance available) and writes 0 to the integer tag parameter. Returns an integer error code.
Example
InstFound is an integer tag that receives the number of the first instance that uses the configuration file c:\MyAlarmCfg\Area1Alarms.alc.
Status = APUFindFileInstance("c:\MyAlarmCfg\Area1Alarms.alc", InstFound);
See Also
262
APUFindPrinterInstance() Function
Finds the first instance of the Alarm Printer using the specified printer name or port.
Category
View
Syntax [Result=] APUFindPrinterInstance(sPrinter,iInstance); Arguments
sPrinter The name of the printer for which the instance is to be found. iInstance An integer tag that receives the number of the instance.
Remarks
This function returns the instance number to an integer tag as the iInstance parameter. Use this function to initially obtain the desired instance of an Alarm Printer. The printer name is stored and read from the .alc file. The printer name string match is not case-sensitive. If no instance is found, the function returns 1 as the error code (no instance available) and writes 0 to the integer tag parameter. Returns an integer error code.
Example
FoundInst is an integer tag that receives the number of the first instance that uses LPT1 as printer name in its associated .alc file.
Status = APUFindPrinterInstance("LPT1", FoundInst); See Also
263
APUGetInstanceCount() Function
Returns the number of running instances of the Alarm Printer, up to a maximum of 16 instances.
Category
View
Syntax [Result=] APUGetInstanceCount(iCount); Arguments
This function returns the number of instances to an integer tag as parameter. Any instances beyond the first sixteen running simultaneously are not dynamically controlled nor can their status be obtained. Returns an integer error code.
Example
ICount is an integer tag. A run-time value of 7 means that there are currently seven instances of Alarm Printer running.
Status = APUGetInstanceCount( iCount ); See Also
264
APUIsInstanceUsed() Function
Returns a discrete value that indicates the instance is currently in use.
Category
View
Syntax [Result=] APUIsInstanceUsed(iInstance); Arguments
InUse is a discrete tag that is set to true (1), if instance 5 is in use, or set to false (0), if instance 5 is not in use.
InUse = APUIsInstanceUsed(5); See Also
265
APUGetPrinterName() Function
Returns the Windows printer name or port name of the printer used by this instance.
Category
View
Syntax [Result=] APUGetPrinterName(iInstance, sTagPrinter); Arguments
iInstance The number of the Alarm Printer instance (0 to 15). sTagPrinter A message tag that receives the printer name or port name of the configuration associated with the specified instance.
Remarks
This function returns the value NONE if no printer is configured for an instance. The printer name is stored and read from the .alc file. This function returns the printer name or port name to a message tag as the sTagPrinter parameter. Returns an integer error code.
Example
PrtName is a message tag that receives the printer name or port name of the configuration associated with instance 3 of Alarm Printer.
Status = APUGetPrinterName(3,PrtName); See Also
APUGetPrinterStatus()
266
APUGetPrinterStatus() Function
Returns the most recent status of the Windows printer used by this instance.
Category
View
Syntax [Result=] APUGetPrinterStatus(iInstance,iSelector, iTagStatus); Arguments
iInstance The instance of Alarm Printer (0 to 15). iSelector An integer value specifying the following: 0 = Get status for Alarm Printer Error 1 = Get status for Alarm Printer No Paper 2 = Get status for Alarm Printer Offline 3 = Get status for Alarm Printer Overflow iTagStatus An integer or real tag that receives the status of the printer associated with specified instance number and the type of selection made by the iSelector parameter.
Remarks
This function returns the printer status to an integer or real tag as the iTagStatus parameter. The results are not current unless a query is running and an alarm has been printed. The status typically updates when the printer initially opens, and then each time an alarm line prints. This status information is being queried to the printer based on Microsoft or Windows driver standards. Not all printer manufacturers follow these standards. Therefore, not all printers return status information. Returns an integer error code.
Example
PrtStat is an integer tag that receives the "Printer Offline" status from the printer associated with instance 5.
Status = APUGetPrinterStatus(5, 2, PrtStat); See Also
APUGetPrinterName()
267
APUSetAlarmGroupText() Function APUSetQueryAlarmState() Function APUSetQueryFromPriority() Function APUSetQueryToPriority() Function APUSetTimeoutValues() Function
APUSetAlarmGroupText() Function
Sets the Alarm Query alarm group text.
Category
View
Syntax [Result=] APUSetAlarmGroupText(iInstance,sGroup); Arguments
iInstance The instance of Alarm Printer (0 to 15). sGroup Alarm group text.
Remarks
A query cannot be running for this function to succeed. Returns an integer error code.
Example
This example sets the query of the Alarm Printer instance 1 to \InTouch!GroupA.
Status = APUSetAlarmGroupText(1, "\intouch!GroupA"); See Also
268
APUSetQueryAlarmState() Function
Sets the alarm state for the query.
Category
View
Syntax [Result=] APUSetQueryAlarmState(iInstance, iState); Arguments
iInstance The instance of Alarm Printer (0 to 15). iState An integer with following possible values: 0 = All 1 = Acknowledged 2 = Unacknowledged
Remarks
A query cannot be running simultaneously while running a script using the APUSetQueryAlarmState() function. Returns an integer error code.
Example
This example sets the query of the Alarm Printer instance 3 to query for acknowledged alarms only.
Status = APUSetQueryAlarmState(3, 1); See Also
269
APUSetQueryFromPriority() Function
Sets the lower boundary or from priority of an alarm query.
Category
View
Syntax [Result=] APUSetQueryFromPriority(iInstance,iPriority); Arguments
iInstance The instance of Alarm Printer (0 to 15). iPriority An integer value for the From Priority (1 to 999).
Remarks
A query cannot be running for this function to succeed. Returns an integer error code.
Example
This example sets the From Priority value of the query associated with the instance value of the Inst integer tag to the value of the FromPri integer tag.
Status = APUSetQueryFromPriority(Inst, FromPri); See Also
270
APUSetQueryToPriority() Function
Sets the To Priority for the query.
Category
View
Syntax [Result=] APUSetQueryToPriority(iInstance,iPriority); Arguments
iInstance The instance of Alarm Printer (0 to 15). iPriority An integer value for the To Priority in the range of 1 to 999. It should also be set higher than or equal to the From Priority value of the same query of the specified instance.
Remarks
The To priority must be equal to or greater than the From priority to set a valid alarm priority range. A script containing the APUSetQueryToPriority() function cannot run at the same time as a query. Returns an integer error code.
Example
This example sets the To Priority value of the query associated with the instance 0 to 240.
Status = APUSetQueryToPriority(0,240); See Also
271
APUSetTimeoutValues() Function
The APUSetTimeoutValues() function sets time-out intervals in seconds. A time-out interval controls how many errors caused by memory access or failing to obtain valid responses are observed while program is running. The default memory access time-out is two seconds. The default short response wait time is 10 second and the default long response wait time is 20 seconds.
Category
View
Syntax [Result=] APUSetTimeoutValues(iMemory,iShort, iLong); Arguments
iMemory Integer - access time out iShort Short response wait time (integer) iLong Long response wait time (integer)
Example Status = APUSetTimeoutValues(iMemory,iShort,iLong); See Also
272
APUTranslateErrorCode() Function
Converts an error code returned by one of the APU functions into an English string that briefly describes the error code.
Category
View
Syntax [Result=] APUTranslateErrorCode(iErrorCode,sTagMessage); Arguments
iErrorCode An integer error code, normally returned by most other APU functions. sTagMessage A message tag that receives the error message.
Remarks
This function returns the error message to a message tag as sTagMessage parameter. This function can fail if an unknown error code is passed. Returns an integer error code.
Example
This example sets the message tag errmsg to "No instance available." if there is no instance 15 of Alarm Printer currently running.
Status = APUTranslateErrorCode(APUSetAlarmGroupText(15," $system"), ErrMsg);
273
Chapter 9
Recording Alarms into an Alarm Database
The InTouch Distributed Alarm system includes the Alarm DB Logger utility that logs alarms and events to the alarm database. Alarm DB Logger is an alarm consumer. You configure it with one or more queries to select alarms from InTouch alarm providers. The alarms selected by the queries are stored in a transient memory cache, called the Smart Cache. The Alarm DB Logger writes the contents of the Smart Cache to the alarm database as alarm and event records at a periodic interval.
Alarms A Alarm Query Alarm DB Logger Smart Cache B B A C B A C InTouch Alarm Database
The Alarm DB Logger can auto-reconnect. When the connection to the database is lost, the logger checks for the database connection at regular intervals. Logging resumes when the connection to the alarm database is re-established. The Alarm DB Logger reports all errors whether running as a service or a normal application to the ArchestrA Logger.
274
In the Tools view, expand Applications. Double-click Alarm DB Logger Manager. The Alarm DB Logger Manager appears.
275
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 Logger
276
In the Server Name box, enter the node name of the computer where the alarm database is installed. In the Database box, type the name of the InTouch alarm database. In User Name box, type the user account name created for the alarm database. In the Password box, type the password associated with the alarm database user account.
In the Logging Mode area, configure how records are stored. Do either of the following: Click Detailed to store a separate record for each alarm condition (in alarm, acknowledged, and returned to normal).
Click Consolidated to store all states of an alarm (in alarm, acknowledged, and returned to normal) in a single record with time stamps for each transition.
5 6
Click Create to create the database, if required. Click Test Connection to verify connectivity to the alarm database. A message indicates a successful connection to the database. Click Next to configure which alarms to log. See Configuring Which Alarms to Log on page 276.
277
Open the Alarm DB Logger Manager and start the configuration wizard. Do the following:
a b c
In the Tools view, expand Applications. Double-click Alarm DB Logger Manager. Click Settings. The Alarm DB Logger Manager Configuration wizard appears.
Click Next. The Alarm DB Logger Manager - Query Selection page appears.
The read-only Alarm State box shows the alarm state for logging. The read-only Query Type box shows the type of query.
3 4 5
In the From Priority box, enter the starting value of the alarm priority range. In the To Priority box, enter the ending value of the alarm priority range. In the Alarm Query box, type the alarm queries that you want to use to store or retrieve data from the alarm database. Click Next to configure the logging interval. See Configuring the Logging Interval on page 278.
278
Open the Alarm DB Logger Manager and start the configuration wizard. Do the following:
a b c
In the Tools view, expand Applications. Double-click Alarm DB Logger Manager. Click Settings. The Alarm DB Logger Manager Configuration wizard appears.
2 3
Click Next. The Alarm DB Logger Manager - Query Selection page appears. Click Next. The Alarm DB Logger Manager - Advanced Setting page appears.
279
Select the Log Events check box if you want to store InTouch event records to the alarm database. You can also store events coming from an ArchestrA Galaxy. In the Performance Tuning area, type the interval in milliseconds at which alarm records are written to the alarm database. Click Finish.
Log in to the computer as an administrator. Open the Alarm DB Logger Manager and start the configuration wizard. Do the following:
a b c
In the Tools view, expand Applications. Double-click Alarm DB Logger Manager. Click Settings. The Alarm DB Logger Manager Configuration wizard appears.
3 4
Click Next. The Alarm DB Logger Manager - Query Selection page appears. Click Next. The Alarm DB Logger Manager - Advanced Setting page appears.
5 6
In the Running Logger As area, click either Windows Service or Normal Application. Click Finish.
280
In the Tools view, expand Applications. Double-click Alarm DB Logger Manager. The Alarm DB Logger Manager appears.
The Smart Cache Status shows the percentage of the in-memory cache holding alarm records.
3 4
Click Start to begin the alarm logging process. Click Stop to end the alarm logging process.
281
Date and time of alarm event (in local time of database). State of alarm: one of UNACK, UNACK_RTN, ACK, ACK_RTN. Name of the object that generated the alarm, such as TIC101. Description string of the alarm. Can default to object description (or comment in the InTouch HMI). Or acknowledge comment for acknowledged records. Name of the Area or Group for the alarm. Type of alarm, such as Hi, HiHi, ROC, PV.HiAlarm. Value of alarm variable at time of alarm. Value of alarm limit at time of alarm. Alarm priority. Alarm class or alarm category. Such as Value, Dev, ROC, Process, Batch, System, and so on. Provider of alarm: node/InTouch, or GalaxyName. Name of the operator. Name of the domain. Full name of user in operator (for example, Joseph P. Smith). The time between the most recent alarm transition (alarm or sub-state) and the acknowledgement, if any. User-defined field number 1.
Area Type Value CheckValue Priority Category Provider Operator DomainName UserFullName UNACKDuration
nChar nChar nChar nChar Integer nChar nChar nChar nChar nChar Float
User1
Float
282
Column Name
Datatype
Description
User-defined field number 2. User-defined field, string. UTC date/ time of alarm event. Fractional seconds for event stamp in increments of 0.1 msec. Name of the node where the operator acknowledged the alarm.
Date and time of alarm event (in local time of database). State of alarm: one of UNACK, UNACK_RTN, ACK, ACK_RTN, ACK_ALM, UNACK_ALM Name of the object that generated the alarm, such as TIC101. Description string of the alarm. Can default t.o object description (or comment in InTouch). Or acknowledge comment for acknowledgement records. Name of the Area or Group for the alarm. Type of alarm, such as Hi, HiHi, ROC, PV.HiAlarm. Value of alarm variable at time of alarm. Value of alarm limit at time of alarm. Alarm priority. Alarm class or alarm category. Such as Value, Dev, ROC, Process, Batch, System, and so on. Provider of alarm: node/InTouch, or GalaxyName. Name of operator: JoeR (if any). Name of domain. Full name of user in operator (for example, Joseph P. Smith).
Area Type Value CheckValue Priority Category Provider Operator DomainName UserFullName
nChar nChar nChar nChar Integer nChar nChar nChar nChar nChar
283
Column Name
Datatype
Description
The time between onset of the alarm and return to normal. User-defined field number 1. User-defined field number 2. User-defined field, string. UTC date/ time of alarm event. Fractional seconds for event stamp in increments of 0.1 msec.
This example selects all records from the Alarm History view with a priority greater than 100:
SELECT * FROM v_AlarmHistory WHERE Priority >100
Date and time of event. Name of the object that generated the event, such as Pump1. Description string of the event. Can default to object description, or comment in InTouch. Name of the Area or Group for the event. Type of event, such as "Operator data change", "Startup", and so on. New Value (if any). Old Value (if any).
284
Column Name
Datatype
Description
Category Provider Operator DomainName UserFullName User1 User2 User 3 EventStampUTC Millisec
nChar nChar nChar nChar nChar Float Float nChar DateTime Small Int
Event category or class, such as Value, Process, Batch, System, and so on. Generator of event, such as node/InTouch, or View Engine name for user change. Name of operator1: JoeR (if any). Name of domain. Full name of user in operator (for example, Joseph P. Smith). User-defined field number 1. User-defined field number 2. User-defined field, string. UTC date/ time of event. Fractional seconds for event stamp in increments of 0.1 msec.
Date and time of event. State of alarm: one of UNACK, UNACK_RTN, ACK, ACK_RTN. Does not apply for events. Name of the object that generated the alarm, such as TIC101. Description string of the alarm/event. Can default to object description (or comment in InTouch). Or acknowledge comment for acknowledged records. Name of the Area or Group for the alarm. Type of alarm or event, such as Hi, HiHi, ROC, PV.HiAlarm, Operator data change, and so on.
Area Type
nChar nChar
285
Column Name
Datatype
Description
Value CheckValue Priority Category Provider Operator DomainName UserFullName UNACKDuration User1 User2 User 3 EventStampUTC Millisec
nChar nChar Integer nChar nChar nChar nChar nChar Float Float Float nChar DateTime Small Int
Value of alarm variable at time of alarm. Value of alarm limit at time of alarm, or old value for event. Alarm priority. Alarm or event class, or alarm category, such as Value, Process, Batch, System, and so on. Provider of alarm, such as node/InTouch, or GalaxyName. Name of acknowledgement operator or data change operator. Name of domain. Full name of user in operator (for example, Joseph P. Smith). Number of milliseconds from the most recent alarm transition to ACK. User-defined field number 1. User-defined field number 2. User-defined field, string. UTC date/ time of event. Fractional seconds for event stamp in increments of 0.1 msec.
Date and time of event. State of alarm: one of UNACK, UNACK_RTN, ACK, ACK_RTN. Does not apply for events. Name of the object that generated the alarm, such as TIC101. Description string of the alarm/event. Can default to object description (or comment in InTouch). Or acknowledge comment for acknowledged records. Name of the Area or Group for the alarm.
Area
nChar
286
Column Name
Datatype
Description
Type Value CheckValue Priority Category Provider Operator DomainName UserFullName AlarmDuration User1 User2 User 3 EventStampUTC Millisec
nChar nChar nChar Integer nChar nChar nChar nChar nChar Float Float Float nChar DateTime Small Int
Type of alarm or event, such as Hi, HiHi, ROC, PV.HiAlarm, Operator data change, and so on. Value of alarm variable at time of alarm. Value of alarm limit at time of alarm, or old value for event. Alarm priority. Alarm or event class, or alarm category, such as Value, Process, Batch, System, and so on. Provider of alarm, such as node/InTouch, or GalaxyName. Name of acknowledgement operator or data change operator. Name of domain. Full name of user in operator (for example, Joseph P. Smith). Number of milliseconds from the onset of alarm to the return to normal (RTN). User-defined field number 1. User-defined field number 2. User-defined field, string. UTC date/ time of event. Fractional seconds for event stamp in increments of 0.1 msec.
287
EventStamp EventType AlarmType AlarmState NodeName TagName GroupName Comment Value Limit ValueString Operator Priority Units
Datetime NChar NChar NChar NChar NChar NChar NChar Float Float NChar NChar Integer NChar
Date and time of the event. Type of the event, as defined by AlarmSuite. Type of the alarm. Acknowledgement state of the alarm. Node of alarm. Name of the object reporting alarm. Name of alarm group or area. Acknowledge comment (if any). Value of alarm variable. Value of alarm limit at time of alarm. See the AlarmSuite table. Operator name. Priority. Return as "" in 7.11.
288
In this example, the StartDate and EndDate parameters are required. The remaining parameters are optional. If you do not provide a value for a parameter, it is not used to filter the result set. If a stored procedure includes a date/time variable, you can use any valid format specified in the SQL Server documentation.
289
Column Name
Datatype
Description
Name of the object that generated the alarm, such as TIC101. Name of the area or group for the alarm Type of alarm such as Hi, HiHi, ROC, PV, HiAlarm. Alarm class or alarm category such, as Value, Process, Batch, etc. Number of onsets of the alarm during the time range. If an alarm occurs prior to the starting date and time, it is not included in the count. Alarm priority. Provider of alarm, such as node/InTouch, or GalaxyName. The alarm comment.
290
Column Name
Datatype
Description
Name of the object that generated the alarm, such as TIC101 Name of the Area or Group for the alarm. Type of event. Alarm class or alarm category, such as Value, Process, Batch, etc. Number of times the event of this Type for the TagName has occurred in the specified time range. Provider of event: node/InTouch, or GalaxyName. The event comment.
291
Chapter 10
Viewing Recorded Alarms
You use the Alarm DB View ActiveX control to visualize data from the alarm database. Use this control to show all alarm and event information generated from an InTouch 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 and size Database specifications (server name, user ID and password) Query filters Column management Sorting
292
Run-time users can change options while the application is running 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 column
For more information about ActiveX controls, see Chapter 6, ActiveX Controls, in the InTouch HMI Visualization Guide.
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 the application 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.
293
Right-click the Alarm DB View control and then click Properties. The AlmDbViewCtrl Properties dialog box appears. Click the Database tab.
In the Server Name box, enter the node name of the computer 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 associated with the user account.
Select the Auto Connect check box to have the Alarm DB View control automatically connect to the alarm database when the InTouch application starts running. If you do not select the Auto Connect check box, you must configure the Alarm DB View control to connect to the alarm database by explicitly calling the Connect() method. For more information about the Connect method, see Connect() Method on page 347.
5 6
Click Test Connection to verify connectivity to the alarm database. A message indicates a successful connection. Click Apply.
294
Right-click the Alarm DB View control and then click Properties. The AlmDbViewCtrl Properties dialog box appears. Click the General tab.
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 control from showing any error messages at run time. Click the Show Message check box to show a message if the alarm query does not return any records. Type the message to show in the box. Click the Show Heading check box to show the control heading. Click the Show Status Bar check box to show the status bar.
Click Apply.
295
Right-click the Alarm DB View control and then click Properties. The AlmDbViewCtrl Properties dialog box appears. Click the General tab.
3 4
Click Font. The standard Windows Font dialog box appears. Configure the font and then click OK. Click Apply.
296
Right-click the Alarm DB View control and then click Properties. The AlmDbViewCtrl Properties dialog box appears. Click the General tab.
In the Display Mode list, click the type of historical records from the list: Click Alarm & Event History to show both alarm and event historical database records.
Click Alarm History to show only historical alarm records. Click Event History to show only historical event records.
Click Apply.
297
Select and order the columns. Set the width of a column in pixels. Rename a column.
Right-click the Alarm DB View control and then click Properties. The AlmDbViewCtrl Properties dialog box appears. Click the General tab. Click Column Details. The Column Details dialog box appears.
2 3
In the Name column, select the check boxes next to the names of the columns that you want to appear in the Alarm DB View control. You must select at least one column from the list.
Column Name Time State Class Type Priority Description
Shows the time at which the alarm occurred. Shows the state of the alarm. Shows the alarm category. Shows the alarm type. Shows the alarm priority.
298
Column Name Name Group Provider Value Limit Operator Operator Full Name Operator Node
Description
Shows the tag or source that caused the alarm or event. Shows the alarm group name. Shows the name of the alarm provider. Shows the value of the tag when the alarm occurred. Shows the alarm limit value of the tag. Shows the logged-on operators ID associated with the alarm condition. Shows the logged-on operators full name. Shows the logged on operators node associated with the alarm condition. In a Terminal Services environment, this is the name of the client computer that the operator established the Terminal Services session from. If the node name can't be retrieved, the node's IP address is used instead.
Shows the logged on operators domain associated with the alarm condition. Shows the tags comments. This comment was typed in the Alarm Comment box when the tags alarm was defined in the database. When an acknowledgement comment is introduced for alarms, the new comment is updated in this comment column. Shows the numerical values of User Defined Number 1 corresponding to the alarm. Shows the numerical values of User Defined Number 2 corresponding to the alarm.
User1
User2
299
Description
Shows the string value of the user defined string property associated with the alarm. Shows the unacknowledgement duration or the alarm duration, depending on what has been selected by the operator. Shows the time of the alarm in UTC.
Duration
UTC Time 5
Rearrange columns by selecting the column name and using the up and down arrows. The column name appearing at the top of the Column Details dialog box is the left-most column of the alarm control. To change the name of a column or its width, select the column and click Edit. The Edit dialog box appears.
a a b 7 8 9
In the New Name box, type the new column name. In the New Width box, type the column width. The column width can range from 1 to 999 pixels. Click OK.
Click Reset to Default to return to the default column detail settings. Click OK in the Column Details dialog box. Click Apply.
300
Right-click the Alarm DB View control and then click Properties. The AlmDbViewCtrl Properties dialog box appears. Click the General tab.
In the Context-Sensitive Menu Options area, configure which menu commands are available at run time. Select the Enable Refresh Menu check box to enable the Refresh menu option in the shortcut menu of the control at run time. The Refresh menu refreshes the control to the database, and if the connection is successful, it shows the set of records in the range 1 to number defined by the MaxRecords property.
Select the Enable Reset Menu check box to enable the Reset menu option in the shortcut menu of the control at run time. The Reset menu arranges all the columns to the settings saved at design time. Select the Enable Sort Menu check box to enable the Sort menu option on the shortcut menu of the control at run time. This menu shows the Secondary Sort menu used to set the user-defined sorting of columns. Select the Enable Filter Menu check box to enable the Filter menu option on the shortcut menu of the control at run time. This menu shows the filter menu used to set the user-defined filtering criteria.
301
4 5 6 7
Click the Resize Column check box to allow resizing the columns. Select the Row Selection check box to enable selecting alarm records. Select the Retrieve buttons check box to show the retrieval buttons at the right side of the control. Click Apply.
Configuring the Shown Time Format and Time Zone for Alarm Records
You can configure the time format and time zone for alarm records shown in the Alarm DB View control.
To configure time format 1
Right-click the Alarm DB View control and then click Properties. The AlmDBViewCtrl Properties dialog box appears. Click the Time/Sort tab.
d b Y m /
Two-digit day Three-letter month abbreviation Four-digit year Two-digit month Date division function
302
String character
Description
Example
y #x B . , H : M p S s I
Two-digit year Full day and date Full month name Dash date division punctuation Period date division punctuation Comma date division punctuation 24 hour time Time division punctuation as in 4:41 Minute AM or PM display Seconds Fractions of a second 12 hour time with AM/PM designation
07 Friday, August 09, 2002 September 06-07 06.07 Aug 09, 2007 22:15
00:41
You can also manually enter your own format string in the list box using custom text and the formatting characters. Some sample time format character strings are shown below:
Time Format String Display
09 Aug 08/09/2002 Friday, August 09, 2002 2002-08-09 08/09/2002 16:56 PM 08/09/2002 16:56:38.07 04:56 PM
303
In the Displayed Time Zone list, click the desired time zone:
Time Zone Description
Alarm time stamps use Greenwich Mean Time. Alarm time stamps are shown with the local time of the client hosting the Alarm DB View control. Alarm time stamps are shown with the local time of the alarm provider.
Origin Time
5
Click Apply.
Right-click the Alarm DB View control and then click Properties. The AlmDBViewCtrl Properties dialog box appears. Click the Selection tab.
To use a pre-defined time interval that always queries for data using the UTC time zone, click an interval from the Duration list.
304
To use a specific start time and end time, click Use Specific Time and then configure the details.
a
In the Start Time box, enter the start time to retrieve the alarm records. The string must be in MM/DD/YYYY HH:MM:SS format. Use any date in any time zone from midnight, January 1, 1970, to January 18, 19:14:07, 2038. In the End Time box, enter the end time to stop retrieving alarm records. The string must be in MM/DD/YYYY HH:MM:SS format. Use any date in any time zone from midnight, January 1, 1970, to January 18, 19:14:07, 2038. In the Query Time Zone area, click either UTC or Origin Time. UTC time is Greenwich Mean Time, also known as Coordinated Universal Time or Zulu. Origin time is the current time in the operators time zone.
In the Duration Column area, configure which type of duration is shown. Duration is measured in milliseconds. Click UnAck Duration to show the time between the most recent alarm transition (alarm or sub-state) and the acknowledgement, if any.
Click Alarm Duration to show the amount of time elapsed between the initial occurrence of an alarm and the time at which it returned to a normal state.
In the Maximum Records box, type the number of records to view from the control at one instance. The valid range of maximum records is from 1 to 1000. Click Apply.
305
Origin time is the local time in the operators time zone. UTC time is Greenwich Mean Time, also known as Coordinated Universal Time or Zulu.
If Use Specific Time is selected, you can select between the two query time zone options. If Use Specific Time is not selected, the selected Duration predefined time interval always 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 Time Zone. If you use Local Time instead, it is possible that alarm records will be missing for the transition period from Daylight Saving Time to Normal Time. If you are running several different computers with different time zone settings, and they are all logging to the same alarm database, each record will get the time stamps in UTC, plus the time zone offset and daylight saving adjustment needed to convert that time stamp to the corresponding Origin Time. As a result, every entry in the database has two time stamps: the UTC time and the Origin Time from the computer that did the logging. This makes retrievals faster. In the table entries, the UTC time is identified as the "Transition Time" and the Origin Time is identified as the "EventStamp."
306
Right-click the Alarm DB View control and then click Properties. The AlmDBViewCtrl Properties dialog box appears. Click the Query Filter tab.
In the left pane, select filter fields and then click Add to include them in the filter, which is shown in the right pane. The filter fields are described in the following table:
Field name State Filters query by:
Alarm state. For more information, see Values for the State Column on page 311. Alarm class. Alarm type. Alarm priority.
307
Alarm name. Alarm group name. Alarm provider. Alarm value. Values in the Value column are shown as alphanumeric values. The comparisons of these values in the Query Filter are done as string comparisons. Alarm limit. Values are alphanumeric. The comparisons of these values in the Query Filter are done as a string comparisons. Operator. Operators full name. Operators node name associated with the alarm. Operators domain name associated with the alarm. Alarm comment. Alarm user-defined numeric value 1. Alarm user-defined numeric value 2. Alarm user-defined string value. Unacknowledgement and alarm duration. A Duration column set equal to zero does not produce records with a null value in the query.
Limit
To remove a field from the filters pane, click the field you want to delete and click Delete. Deleting a filter cannot be undone. When a message appears, click Yes. Configure the criteria for each filter field. For more information, see Defining the Column Filter Criteria on page 308.
308
Configure the operators and grouping for the filter. For more information, see Grouping Alarm Columns on page 310. Configure the query favorites file. Do the following:
a
In the Filter Favorites File box, type the network path and file name or click the ellipse button to browse for the file. To edit the Filter Favorites file, click the Edit Favorites File button. The Filter Favorites window opens, allowing you to add, modify, or delete filters from your favorites file. When you are done, click OK to save your changes and close the window.
Click Apply.
Right-click the field and then click Edit Filter. The Define Filter dialog box appears.
309
In the Value box, type the criteria that must be matched. The Value box does not accept values that cannot be processed for the selected query. The Value box accepts the following wildcard characters when the Like and Not Like filter operators are used for alphanumeric column names:
Character Description
% _ []
Any string of zero or more characters. Any single character. Any single character within the specified range, for example [a-f], or within a set, for example [abcdef]. Any single character not within the specified range, for example [^a-f], or set, for example [^abcdef].
[^]
All alphanumeric characters except User1, User2 and Priority. Accepts integer values from 1 to 999. Accepts only negative, positive or fractional numbers.
Click OK.
310
The AND operator returns records that meet all values of the selected fields. The OR operator returns records that meet the values of any of the selected fields.
To use AND/OR operators to set the filter selection criteria, the respective fields must be grouped together. Only a single filter expression can be created on an item in the filters pane. If multiple expressions are needed, then the item must be added to the filters pane again. By default, the grouped fields have the AND operator. The AND and OR operators are parent nodes. The fields selected under each parent node are child nodes. You cannot drag fields parent nodes to child nodes.
To group alarm columns 1 2
Right-click the field and then click Group. Drag a field onto another field.
Define the filters in the first instance of the Alarm DB View control. Right-click the filters and click Copy. To move the filters, click Cut. Close the first instance of the Alarm DB View control. Open the next instance of the Alarm DB View control and click the Query Filter tab. Position the arrow in the right pane. Right-click a selected filter and click Paste.
311
Produces a query of all system acknowledgements. Produces a query of all acknowledged alarms. Produces a query of all unacknowledged alarms. Produces a query of all acknowledged alarms that have returned to normal. Produces a query of unacknowledged alarms that have returned to normal. Produces a query of all unacknowledged records. Produces a query of all acknowledgement records. Produces a query of all alarm records. Produces a query of all alarms that have returned to normal.
UNACK_RTN
All UNACK Records All ACK Records All ALM Records All RTN Records
Note When a tag in expanded summary alarm mode is used to create an alarm, which returns to normal when the main alarm is acknowledged, two records are created. The first record is the acknowledged and returned to normal record as the new alarm is already in a returned to normal state. The second record is acknowledged, which corresponds to acknowledging the main alarm. The previous implementation of ACK_ALM has been changed to ACK.
312
Right-click the Alarm DB View control and then click Properties. The AlmDBViewCtrl Properties dialog box appears. Click the Color tab.
Configure the color for each of the following by clicking the color box to open the palette.
Option Alarm Return Forecolor Alarm Return Backcolor Event Forecolor Event Backcolor
Description Sets the foreground color of records for alarms that return to normal. Sets the background color of records for alarms that return to normal. Sets the foreground color of events records Sets the background color of events records
313
In the Alarm Priority boxes, type the breakpoint values for the alarm display. You can assign breakpoint values so that alarms will appear in different colors depending on the Alarm Priority. The default minimum and maximum alarm priority values are 1 and 999, respectively. For example, you set the Unack Alm Forecolor to be orange for the priority range of 250 to 499 and red for the priority range of 1 to 249. If an alarm occurs with a priority of 254, it is shown in an orange font. If an alarm occurs with a priority of 12, it is shown in a red font.
Configure the color for each of the following by clicking the color box to open the palette.
Option Unack Alm Forecolor Unack Alm Backcolor Ack Alm Forecolor Ack Alm Backcolor
Description Sets the foreground color for each color priority range for unacknowledged alarms. Sets the background color for each color priority range for unacknowledged alarms. Sets the foreground color for each color priority range for acknowledged alarms. Sets the background color for each color priority range for acknowledged alarms.
Click Apply.
314
Right-click the Alarm DB View control and then click Properties. The AlmDBViewCtrl Properties dialog box appears. Click the Time/Sort tab.
In the Primary Sort Column list, click the name of the primary sort column. Only visible columns appear in the Sort Column list. If you do not see the column you want, click the General tab and select the column from Column Details. In the Secondary Sort Column list, click the name of the secondary sort column. Select Ascending or Descending as the sort direction. Click OK.
4 5 6
315
Retrieve and 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 design time.
Sorting Records
You can sort records in the display. Click on the heading to sort all the rows. Right-click in the control and click Sort to open the Secondary Sort dialog box, where you can do single and multiple column sorting, in ascending or descending order. To specify the columns to be sorted, select the check box beside the column name. Use the Sort Order arrow keys to rearrange the columns. If multiple alarm events have the same time stamp, they may not appear in the expected order. For example, if the desired sorting is in descending order based on the alarm state first, then:
1 2 3 4 5
Select both the Date and State check boxes. Select the State row. Click the up sort order arrow. In the Sort Type area, click Descending. Click OK.
316
The left frame shows the server name and the database connected. The middle frame shows the number of the records that is shown out of the total number of records that is returned by the query. The right side of the frame shows the connection status with the server.
AckAlmBackColor Property
Gets or sets the acknowledged alarm background color. This setting overrides the individual range color settings for acknowledged alarms (AckAlmBackColorRange1 to AckAlmBackColorRange4).
Type
Integer
Default
White
Syntax
Object.AckAlmBackColor [= color]
Value
317
AckAlmBackColorRange1 Property
Gets or sets the acknowledged alarm background color. This color applies to the records shown in the control with state ACK_ALM with priorities in the range 1 to ColorPriorityRange1.
Type
Integer
Default
White
Syntax
Object.AckAlmBackColorRange1 [= color]
Value
AckAlmBackColorRange2 Property
Gets or sets the acknowledged alarm background color. This color applies to the records shown in the control with state ACK_ALM with priorities in the range ColorPriorityRange1 to ColorPriorityRange2.
Type
Integer
Default
White
Syntax
Object.AckAlmBackColorRange2 [= color]
Value
318
AckAlmBackColorRange3 Property
Gets or sets the acknowledged alarm background color. This color applies to the records shown in the control with state ACK_ALM with priorities in the range ColorPriorityRange2 to ColorPriorityRange3.
Type
Integer
Default
White
Syntax
Object.AckAlmBackColorRange3 [= color]
Value
AckAlmBackColorRange4 Property
Gets or sets the acknowledged alarm background color. This color applies to the records shown in the control with state ACK_ALM with priorities in the range ColorPriorityRange3 to 999.
Type
Integer
Default
White
Syntax
Object.AckAlmBackColorRange4 [= color]
Value
319
AckAlmForeColor Property
Gets or sets the acknowledged alarm foreground color. This setting overrides the individual range color settings for acknowledged alarms (AckAlmForeColorRange1 to AckAlmForeColorRange4).
Type
Integer
Default
Black
Syntax
Object.AckAlmForeColor [= color]
Value
AckAlmForeColorRange1 Property
Gets or sets the acknowledged alarm foreground color. The color applies to the records shown in the control with state ACK_ALM with priorities in the range 1 to ColorPriorityRange1.
Type
Integer
Default
Black
Syntax
Object.AckAlmForeColorRange1 [= color]
Value
320
AckAlmForeColorRange2 Property
Gets or sets the acknowledged alarm foreground color. The color applies to the records shown in the control with state ACK_ALM with priorities in the range ColorPriorityRange1 to ColorPriorityRange2.
Type
Integer
Default
Black
Syntax
Object.AckAlmForeColorRange2 [= color]
Value
AckAlmForeColorRange3 Property
Gets or sets the acknowledged alarm foreground color. The color applies to the records shown in the control with state ACK_ALM with priorities in the range ColorPriorityRange2 to ColorPriorityRange3.
Type
Integer
Default
Black
Syntax
Object.AckAlmForeColorRange3 [= color]
Value
321
AckAlmForeColorRange4 Property
Gets or sets the acknowledged alarm foreground color. The color applies to the records shown in the control with state ACK_ALM with priorities in the range ColorPriorityRange3 to 999.
Type
Integer
Default
Black
Syntax
Object.AckAlmForeColorRange4 [= color]
Value
AckRtnBackColor Property
Gets or sets the background color of acknowledged alarms that return to normal (ACK_RTN).
Type
Integer
Default
White
Syntax
Object.AckRtnBackColor [= color]
Value
322
AckRtnForeColor Property
Gets or sets the text color of acknowledged alarms that return to normal (ACK_RTN).
Type
Integer
Default
Blue
Syntax
Object.AckRtnForeColor [= color]
Value
AlmRtnBackColor Property
Gets or sets the returned alarm background color. This color applies to the records shown with state ALM_RTN.
Type
Integer
Default
White
Syntax
Object.AlmRtnBackColor [= color]
Value
AlmRtnForeColor Property
Gets or sets the returned alarm foreground color. This color applies to the records shown with state ALM_RTN.
Type
Integer
Default
Blue
Syntax
Object.AlmRtnForeColor [= color]
Value
323
AutoConnect Property
Gets or sets a value that determines whether the control automatically connects to the database at run time.
Data Type
Integer
Default
False
Syntax
Object.AutoConnect [= Integer]
Value
Integer An integer expression specifying whether the control connects to the database at run time. True = Connects to the database. False = (Default) Does not connect to the database.
Remarks
You must explicitly call the Connect() method to connect to the database.
ColorPriorityRange1 Property
Sets the boundary of the priority range in which alarms are to be shown. The value of this property must be greater than one and less than the value for ColorPriorityRange2.
Type
Integer
Default
250
Syntax
Object.ColorPriorityRange1 [= integer or priority]
324
ColorPriorityRange2 Property
Sets the boundary of the priority range in which alarms are to be shown. The value of this property must be greater than the value for ColorPriorityRange1 and less than the value for ColorPriorityRange3.
Type
Integer
Default
500
Syntax
Object.ColorPriorityRange2 [= integer or priority]
ColorPriorityRange3 Property
Sets the boundary of the priority range in which alarms are to be shown. The value of this property must be greater than the value of ColorPriorityRange2 and less than 999.
Type
Integer
Default
750
Syntax
Object.ColorPriorityRange3 [= integer or priority]
ColumnResize Property
Returns or sets a value that determines whether the columns can be resized.
Type
Discrete
Default
True
Syntax
Object.ColumnResize [= Discrete]
Value
Discrete True = (Default) Columns can be resized at runtime. False = Columns cannot be resized.
325
ConnectStatus Property
Returns the status of the connection. This property is read-only.
Data Type
Message
Syntax
Object.ConnectStatus
Values
Connected = The control is connected to the database. Not Connected = The control is not connected to the database. In Progress = The control is connecting to the database.
Example
CustomMessage Property
Gets or sets the message that the Alarm DB View control shows when no alarm records can be retrieved from the alarm database.
Type
Message
Default
DatabaseName Property
Specifies the database to connect to.
Type
Message
Syntax
Object.DatabaseName [= text]
326
DisplayMode Property
Returns the display mode of the control, which determines if just alarms, just events, or both alarms and events are shown. This property is read-only.
Type
String
Default
Remarks
Possible values are: Alarms & Events History Alarms History Events History
Example
DisplayedTimeZone Property
Gets or sets the shown time zone.
Type
String
Default
Local Time
Syntax
Object.DisplayedTimeZone [= message]
Remarks
Possible values are: GMT - Alarm time stamps use Greenwich Mean Time. Local Time - Alarm time stamps are shown with the local time of the client hosting the Alarm DB View control. Origin Time - Alarm time stamps are shown with the local time of the alarm provider.
327
Duration Property
Gets or sets the duration used to set the start and end time.
Type
Message
Default
"Last Hour"
Syntax
Object.Duration [= text]
Value
text A string expression that contains the duration. This property must have one of the following strings: Last Minute Last 5 Minutes Last 15 Minutes Last Half Hour Last Hour Last 2 Hours Last 4 Hours Last 8 Hours Last 12 Hours Last Day Last 2 Days Last 3 Days Last Week Last 2 Weeks Last 30 days Last 90 days
328
EndTime Property
Returns or sets the end time.
Type
Message
Syntax
Object.EndTime [= text]
Value
text A string expression that evaluates to the end time. The string returned is always in the format (MM/DD/YYYY HH:MM:SS). The same format is also required to set the value of the string. This property handles date in any time zone from midnight, January 1, 1970, to January 18, 19:14:07, 2038.
EventBackColor Property
Gets or sets the event alarm background color. This color applies to the records shown in the control with state EVT_EVT.
Type
Integer
Default
White
Syntax
Object.EventBackColor [= color]
Value
329
EventForeColor Property
Gets or sets the event alarm foreground color. This color applies to the records shown in the control with state EVT_EVT.
Type
Integer
Default
Red
Syntax
Object.EventForeColor [= color]
Value
FilterFavoritesFile Property
Gets or sets the filter favorites file. This file is used by the Filter Favorites dialog box to read or write filter favorites.
Type
String
Default
Null
Syntax
Object.FilterFavoritesFile [= String]
FilterMenu Property
Gets or sets a value that determines whether the Filter menu item is shown in the shortcut menu.
Type
Discrete
Default
True
Syntax
Object.FilterMenu [= Discrete]
Value
True = Filter menu item is shown (default). False = Filter menu item is not shown.
330
FilterName Property
Returns the name of the current filter (if any).
Type
String (read-only)
Default
Null
Syntax
Object.FilterName [= String]
FromPriority Property
Gets or sets the From Priority value of the control.
Type
Integer
Default
1
Syntax
Object.FromPriority [= integer]
Remarks
You can use this property to filter which alarm records are shown. For example, if you set this property to 760, then only alarms with priority from 760 to the ToPriority property value are shown.
331
GroupExactMatch Property
When the GroupExactMatch property is true, only alarms with alarm group names that exactly match the GroupName property value are shown. When it is false, then the group name need only specify part of the alarm group names it is filtering for.
Type
Discrete
Default
False
Syntax
Object.GroupExactMatch [= discrete]
Remarks
Use this property together with the GroupName property to filter the Alarm DB View control.
Example
For example:
#AlarmDBViewCtrl1.GroupName = "Group" #AlarmDBViewCtrl1.GroupExactMatch = 0; #AlarmDBViewCtrl1.Refresh();
GroupName Property
Gets or sets a alarm group name filter for the current Alarm DB View control.
Type
String
Default
(none)
Syntax
Object.GroupName [= GroupName]
Remarks
Setting this property to "GroupA" and re-querying the display shows only tags belonging to the GroupA alarm group.
332
MaxRecords Property
Returns or sets the maximum records to be retrieved.
Type
Integer
Default
100
Syntax
Object.MaxRecords [=integer]
Value
integer An integer expression specifying the number of records to be retrieved at a given time. The maximum records can be in the range from 1 to 1000. For best performance keep this value as small as needed.
Password Property
Returns or sets the SQL Server password for retrieving data.
Type
Message
Syntax
Object.Password [= text]
Value
PrimarySort Property
Gets or sets the primary column name used to sort the alarm display.
Type
Message
Default
(none)
Syntax
Object.PrimarySort [= message]
333
ProviderExactMatch Property
When the ProviderExactMatch property is true, only alarms with alarm provider names that exactly match the ProviderName property value are shown. When it is false, then the provider name need only specify part of the alarm provider names it is filtering for.
Type
Discrete
Default
False
Syntax
Object.ProviderExactMatch [= discrete]
Remarks
Use this property together with the ProviderName property to filter the Alarm DB View control.
Example
For example:
#AlarmDBViewCtrl1.ProviderName = "Provider" #AlarmDBViewCtrl1.ProviderExactMatch = 0; #AlarmDBViewCtrl1.Refresh();
ProviderName Property
Gets or sets a alarm provider name filter for the current Alarm DB View control.
Type
String
Default
(none)
Syntax
Object.ProviderName [= ProviderName]
Remarks
If a tag belongs to the Provider1 alarm provider, then setting this property to "Provider1" and re-querying the display shows only tags belonging to the Provider1 alarm provider.
334
QueryTimeZoneName Property
Gets or sets the time zone when a specific time is used for the query.
Type
Discrete
Default
False
Syntax
Object.QueryTimeZone [= Discrete]
Value
True = GMT False = Origin time, which is the local time of the alarm provider.
RefreshMenu Property
Gets or sets a value that determines whether the Refresh menu item is shown in the shortcut menu.
Type
Discrete
Default
True
Syntax
Object.RefreshMenu [= Discrete]
Value
True = Refresh menu item is shown (default). False = Refresh menu item is not shown.
ResetMenu Property
Gets or sets a value that determines whether the Reset menu item is shown in the shortcut menu.
Type
Discrete
Default
True
Syntax
Object.ResetMenu [= Discrete]
Value
True = Reset menu item is shown (default). False = Reset menu item is not shown.
335
RowCount Property
Returns the number of records shown in the control. This property is read-only.
Type
Integer
Syntax
Object.RowCount
Example
RowSelection Property
Returns or sets a value that determines whether the row selection is allowed at run time.
Type
Discrete
Default
True
Syntax
Object.RowSelection [= Discrete]
Value
Discrete True = (Default) Row selection is allowed. False = Row Selection is not allowed.
Remarks
SecondarySort Property
Gets or sets the secondary column name used to sort the alarm display.
Type
Message
Default
(none)
Syntax
Object.SecondarySort [= text]
336
ServerName Property
Returns or sets the server name to which the control connects to retrieve data.
Type
Message
Syntax
Object.ServerName [= text]
ShowFetch Property
Returns or sets a value that determines whether the retrieval buttons are shown.
Type
Discrete
Default
True
Syntax
Object.ShowFetch [= Discrete]
Value
Discrete True = (Default) Retrieve buttons are shown. False = Retrieve buttons are not shown.
ShowGrid Property
Returns or sets a value that determines whether the grid lines are shown.
Type
Discrete
Default
False
Syntax
Object.ShowGrid [= Discrete]
Value
Discrete True = Grid lines are shown. False = (Default) Grid lines are not shown.
337
ShowHeading Property
Returns or sets a value that determines whether the column headings are shown.
Type
Discrete
Default
True
Syntax
Object.ShowHeading [= Discrete]
Value
Discrete True = (Default) Column headings are shown. False = Column headings are not shown.
ShowMessage Property
Determines if the customized message for "There are no items to show in this view" is shown when there are no records in the alarm database.
Type
Discrete
Default
False
Syntax
Object.ShowMessage [= discrete]
ShowStatusBar Property
Returns or sets a value that determines whether the status bar is shown.
Type
Discrete
Default
True
Syntax
Object.ShowStatusBar [= Discrete]
Value
Discrete True = (Default) Status bar is shown. False = Status bar is not shown.
338
SilentMode Property
Gets or sets a value that determines whether the control is in Silent mode.
Type
Discrete
Default
False
Syntax
Object.SilentMode [= Discrete]
Value
SortMenu Property
Returns or sets a value that determines whether the Sort menu item is shown in the shortcut menu.
Type
Discrete
Default True Syntax
Object.SortMenu [= Discrete]
Value
A discrete expression. True = (Default) Sort menu item is shown False = Sort menu item is not shown.
339
SortOrder Property
Gets or sets the sort order of the alarms according to the column to be sorted (the primary sort column).
Type
Discrete
Default
True
Syntax
Object.SortOrder [= discrete]
Value
SpecificTime Property
Returns or sets a value that determines whether the control uses the StartTime and EndTime properties, or computes the start time and end time based on the value of the Duration property.
Type
Discrete
Default False Syntax
Object.SpecificTime [= Discrete]
Value
True = StartTime and EndTime properties are used. False = (Default) StartTime and EndTime are computed based on the "Duration" property.
340
StartTime Property
Returns or sets the start time.
Type
Message
Syntax
Object.StartTime [= text]
Value
text A string expression that evaluates to the Start Time. The string returned is always in the format (MM/DD/YYYY HH:MM:SS). The same format is also required to set the value of the string. This property handles date in any time zone from midnight, January 1, 1970, to January 18, 19:14:07, 2038
Time Property
Gets and sets the time format to be used in the display.
Type
Message
Default
%m/%d/%Y %I:%M:%S %p
Syntax
Object.Time [= message]
Remarks
For more information on the time format strings, see Configuring the Shown Time Format and Time Zone for Alarm Records on page 301.
ToPriority Property
Gets or sets the To Priority value of the control.
Type
Integer
Default
999
Syntax
Object.ToPriority [= integer]
Remarks
Use this property to filter which alarm records are shown. For example, if you set this property to 900, then only alarms with priority from the FromPriority property value to 900 are shown.
341
TotalRowCount Property
Returns the total number of records for the current query. This property is read-only.
Type
Integer
Syntax
Object.TotalRowCount
Remarks
The row count is the number of rows returned in the current query, which usually would be same as MaxRecords property except for the case when number of records retrieved are less than the MaxRecords property. For example, if there are 950 records for a specific criterion and the MaxRecords property is 100, then in the last page there would be 50 records and the row count would be 50. In the same example, the TotalRowCount property would always be 950.
Example The name of the control is AlmDbView1 and tagname is an
integer tag.
tagname = #AlmDbView1.TotalRowCount;
UnAckAlmBackColor Property
Gets or sets the unacknowledged alarm background color. This color applies to all records shown in the control with state UNACK_ALM. It overrides any settings made by the UnAckAlmBackColorRange1 to UnAckAlmBackColorRange4 property values.
Type
Integer
Default
White
Syntax
Object.UnAckAlmBackColor [= color]
Value
Color A value or constant that determines the color of the specified object.
342
UnAckAlmBackColorRange1 Property
Gets or sets the unacknowledged alarm background color. This color applies to the records shown in the control with state UNACK_ALM with priorities in the range 1 to ColorPriorityRange1.
Type
Integer
Default
White
Syntax
Object.UnAckAlmBackColorRange1 [= color]
Value
Color A value or constant that determines the color of the specified object.
UnAckAlmBackColorRange2 Property
Gets or sets the unacknowledged alarm background color. This color applies to the records shown in the control with state UNACK_ALM with priorities in the range ColorPriorityRange1 to ColorPriorityRange2.
Type
Integer
Default
White
Syntax
Object.UnAckAlmBackColorRange2 [= color]
Value
Color A value or constant that determines the color of the specified object.
343
UnAckAlmBackColorRange3 Property
Gets or sets the unacknowledged alarm background color. This color applies to the records shown in the control with state UNACK_ALM with priorities in the range ColorPriorityRange2 to ColorPriorityRange3.
Type
Integer
Default
White
Syntax
Object.UnAckAlmBackColorRange3 [= color]
Value
Color A value or constant that determines the color of the specified object.
UnAckAlmBackColorRange4 Property
Gets or sets the unacknowledged alarm background color. This color applies to the records shown in the control with state UNACK_ALM with priorities in the range ColorPriorityRange3 to 999.
Type
Integer
Default
White
Syntax
Object.UnAckAlmBackColorRange4 [= color]
Value
Color A value or constant that determines the color of the specified object.
344
UnAckAlmForeColor Property
Gets or sets the unacknowledged alarm text color. This color applies to all records shown in the control with state UNACK_ALM. It overrides any settings made by the UnAckAlmForeColorRange1 to UnAckAlmForeColorRange4 property values.
Type
Integer
Default
Red
Syntax
Object.UnAckAlmBackColor [= color]
Value
UnAckAlmForeColorRange1 Property
Gets or sets the unacknowledged alarm foreground color. This color applies to the records shown in the control with state UNACK_ALM with priorities in the range 1 to ColorPriorityRange1.
Type
Integer
Default
Red
Syntax
Object.UnAckAlmForeColorRange1 [= color]
Value
color A value or constant that determines the color of the specified object.
345
UnAckAlmForeColorRange2 Property
Gets or sets the unacknowledged alarm foreground color. This color applies to the records shown in the control with state UNACK_ALM with priorities in the range ColorPriorityRange1 to ColorPriorityRange2.
Type
Integer
Default
Red
Syntax
Object.UnAckAlmForeColorRange2 [= color]
Value
color A value or constant that determines the color of the specified object.
UnAckAlmForeColorRange3 Property
Gets or sets the unacknowledged alarm foreground color. This color applies to the records shown in the control with state UNACK_ALM with priorities in the range ColorPriorityRange2 to ColorPriorityRange3.
Type
Integer
Default
Red
Syntax
Object.UnAckAlmForeColorRange3 [= color]
Value
color A value or constant that determines the color of the specified object.
346
UnAckAlmForeColorRange4 Property
Gets or sets the unacknowledged alarm foreground color. This color applies to the records shown in the control with state UNACK_ALM with priorities in the range ColorPriorityRange3 to 999.
Type
Integer
Default
Red
Syntax
Object.UnAckAlmForeColorRange4 [= color]
Value
color A value or constant that determines the color of the specified object.
UnAckOrAlarmDuration Property
The duration column shows either UNACK Duration or Alarm Duration. FALSE (0) is UNACK Duration and TRUE (1) is Alarm Duration.
Type
Integer
Default
False
Syntax
Object.UnAckOrAlarmDuration [= integer]
UserID Property
Returns or sets the user ID used as the control to connect to the SQL Server to retrieve the data.
Type
Message
Syntax
Object.UserID [= text]
Value
347
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 InTouch HMI Scripting and Logic Guide.
Connect() Method
Connects the control to the database and if the connection is successful, shows the set of records in the range 1 to MaxRecords.
Syntax
Object.Connect
Example
Disconnect() Method
Disconnects the control from the database.
Syntax
Object.Disconnect
Example
348
SelectQuery() Method
Sets the current display to the query name specified in the .xml file.
Syntax
Object.SelectQuery(QueryName);
Parameters
This example applies the filter criteria defined by the query called "HighPriority" in the filter favorites file that is currently associated with the AlmDbView1 control.
#AlmDbView1.SelectQuery("HighPriority");
GetPrevious() Method
Retrieves the previous set of records from the database (if any).
Syntax
Object.GetPrevious();
Example
349
GetNext() Method
Retrieves the next set of records from the database (if any).
Syntax
Object.GetNext
Example
Refresh() Method
Refreshes the control from the database, and if the connection is successful, displays the set of records in the range 1 to MaxRecords.
Syntax
Object.Refresh
Remarks
After initiating a refresh of the Alarm DB View control's display by calling its Refresh() method, the value of the RowCount and TotalRowCount properties change to -1 until the refresh is complete (that is, all relevant records are retrieved from the database). When the refresh is complete, both properties are updated with the correct, current row count. The Refresh() method works asynchronously - it returns control to the calling script immediately and continues working in the background. This means that querying the value of RowCount and TotalRowCount immediately after calling Refresh() most likely returns -1, as their value is queried at a time when the refresh still hasn't completed. One way to get the correct values would be to use scripting to determine when the value of either property changes from -1 to a different value; this tells you that the correct values are now available.
Example
350
GetItem() Method
Returns the data at a specified row & column as string.
Syntax
Object.GetItem(Integer, message)
Parameters
Integer An integer expression that evaluates to a specific row in the control. Message A string expression that evaluates to the column name in the control.
Example
The name of the control is AlmDbView1 and tag is defined as a Message tag.
tag = #AlmDbView1.GetItem(1, "Group");
GetSelectedItem() Method
Returns the data for the selected row, given column as string
Syntax
Object.GetSelectedItem(message)
Parameters
Message An string expression that evaluates to the column name in the control
Example
The name of the control is AlmDbView1 and tag is defined as Message tag.
tag = #AlmDbView1.GetSelectedItem("State");
351
SortOnCol() Method
Performs primary sorting on alarm records that are shown.
Syntax
Object.SortOnCol(message, Integer)
Parameters
Message A string expression that evaluates to the column name in the control Integer Sort direction to be used. 0 = ascending, 1 = descending.
Example
ShowSort() Method
Shows the Secondary Sort dialog box if the SortMenu property is enabled.
Syntax
Object.ShowSort
Example
Reset() Method
Resets all the columns to the settings saved at design time.
Syntax
Object.Reset
Example
352
ShowContext() Method
Shows the shortcut menu if any one of RefreshMenu or ResetMenu or SortMenu property is enabled.
Syntax
Object.ShowContext
Example
ShowFilter() Method
Shows the Filter Favorites dialog box.
Syntax
Object.ShowFilter
Example
AboutBox() Method
Shows the About dialog box.
Syntax
Object.AboutBox
Example
353
GetLastError() Method
Returns the last error message if the Alarm DB View control is in silent mode.
Syntax
Object.GetLastError()
Example
The name of the control is AlmDbView1 and tagname is defined as variant or string.
Tagname = #AlmDbView1.GetLastError();
354
The Click event has one parameter called ClicknRow, which identifies the row that is clicked at run time. The DoubleClick event has one parameter called DoubleClicknRow, which identifies the row that is double-clicked at run time. Click and DoubleClick events are zero-based. When Click and/or DoubleClick events are published, the bar count in the display starts with 0.
Note The Alarm DB View control ignores the user interface methods when they are called from StartUp event, because the control is not visible yet. These methods include: ShowSort(), ShowContext(), GetSelectedItem(), GetNext(), GetPrevious(), and AboutBox().
For more information about scripting ActiveX events, see Chapter 8, Scripting ActiveX Controls, in the InTouch HMI Scripting and Logic Guide.
355
Chapter 11
Analyzing Alarm Distribution Across Tags
Using the Alarm Pareto ActiveX control, you can analyze which alarms and events occur most frequently in a given production system. You can also analyze alarm frequency by the time periods during which they occur. The analysis capabilities of the Alarm Pareto control identify the largest issues of your production systems. The Alarm Pareto control helps you recognize where you should focus your efforts to achieve the most significant improvements. The Alarm Pareto control shows a bar chart representing alarm activity. For more information about ActiveX controls, see Chapter 6, ActiveX Controls, in the InTouch HMI Visualization Guide.
The connection to the alarm database. The appearance of the pareto control, including colors and fonts. Which features users can access at run time. Which alarms are shown in the chart and how they are presented.
356
Right-click the Alarm Pareto control and then click Properties. The AlarmPareto Properties dialog box appears. Click the Database tab.
In the Server Name box, enter the node name of the computer where the alarm database is installed. In the Database Name box, type the name of the alarm database. In the User box, type the name of a valid user account for the alarm database. In the Password box, type the password associated with the alarm database user account.
357
Select the Auto Connect check box if you want the Alarm Pareto control to automatically connect to the alarm database as soon as WindowViewer starts up. If you dont select the Auto Connect check box, you must configure the Alarm Pareto control to connect to the alarm database by explicitly calling the Connect() method. For more information about the Connect method, see Connect() Method on page 373.
5 6
Click Test Connection to verify connectivity to the alarm database. A message indicates a successful connection. Click Apply.
Include a status bar. Set the orientation of the Pareto chart bars. Include descriptions of chart bars. Select the colors of the Alarm Pareto chart.
Right-click the Alarm Pareto control and then click Properties. The AlarmPareto Properties dialog box appears. Click the General tab.
358
Sets the number of bars to view in the Alarm Pareto control. This list shows the available view options. The options are Alarm & Event History, Alarm History, and Event History. Sets the message to show when no data is processed from the Alarm Pareto control. Shows the bars on a vertical scale. Shows the bars on a horizontal scale. Enables the status bar. The Alarm Pareto control does not show run-time error messages. If it is not selected, the alarm display shows error messages. Error messages are always sent to the Logger. When the space available is not enough to show the text on the selected bar correctly, Auto Font hides the text and only shows the text when the bar is selected. Shows the node name on the bar graph. Shows the description of a selected bar on the status bar. Consolidate the alarm states into two states. For example, if an analog tag has a three- state alarm: Hi, HiHi and Normal, the Hi and HiHi alarm states are classified as one state. Shows the bars based on the percentage of count to the total count.
No-Match Message
Auto Font
359
Description
Shows the Alarm Pareto control based on the time each tag is in an alarm state. This option is only enabled when the display mode is set to Alarm History.
4 5
6 7
Click each color box to open a color palette. Click the color that you want to assign for each of the following chart properties:
Property Background Color Bar Color Font Color Select Color Description
Sets the background color of the Alarm Pareto chart Sets the bar color of the chart Sets the color of text that appears in the chart Sets the color of a selected bar
Click Apply.
360
Right-click the Alarm Pareto control and then click Properties. The AlarmPareto Properties dialog box appears. Click the General tab.
3 4
Click Font. The standard Windows Font dialog box appears. Configure the font and then click OK. Click OK.
Right-click the Alarm Pareto control and then click Properties. The AlarmPareto Properties dialog box appears.
361
In the Context Sensitive Menu Options area, configure the menu commands:
a
Select the Enable Refresh Menu check box to allow the run time user to refresh the data shown in the Alarm Pareto trend and show the records in the range from 1 to the number defined by the MaxRecords property. Select the Enable Filter Menu check box to allow the user to show the Filter Favorites dialog box to select a file containing database query values for the Alarm Pareto trend. Select the Enable Reset Menu check box to allow the user to restore the run-time Alarm Pareto chart to the original values specified from WindowMaker. All run-time changes made by an operator revert to the original design-time values.
Click Apply.
362
The type of database data (alarm or event data) A time period to select records from Criteria for filtering the data
Right-click the Alarm Pareto control and then click Properties. The AlarmPareto Properties dialog box appears. Click the General tab.
In the Display Mode list, configure the type of records. Do any of the following. Click Alarm & Event History to show both alarm and event historical database records.
Click Alarm History to show only historical alarm records. Click Event History to show only historical event records.
Click Apply.
363
Right-click the Alarm Pareto control and then click Properties. The AlarmPareto Properties dialog box appears. Click the Selection tab.
3 4
To use a pre-defined time interval that always queries for data using UTC, click an interval from the Duration list. To use a specific start time and end time, click Use Specific Time and then configure the details.
a
In the Start Time box, enter the start time to retrieve the alarm records. The string must be in MM/DD/YYYY HH:MM:SS format. Use any date in any time zone from midnight, January 1, 1970, to January 18, 19:14:07, 2038. In the End Time box, enter the end time to stop retrieving alarm records. The string must be in MM/DD/YYYY HH:MM:SS format. Use any date in any time zone from midnight, January 1, 1970, to January 18, 19:14:07, 2038. In the Query Time Zone area, click either UTC or Origin Time. UTC time is Greenwich Mean Time, also known as Coordinated Universal Time or Zulu. Origin time is the current time in the operators time zone.
In the Maximum Records box, type the number of records to view from the control at one instance. The valid range of maximum records is from 0 to 1000000. Click Apply.
364
Right-click the Alarm Pareto control and then click Properties. The AlarmPareto Properties dialog box appears. Click the Query Filter tab.
In the left pane, select filter fields and then click Add to include them in the filter, which is shown in the right pane. The filter fields are described in the following table:
Field name Class Type Priority Name GroupName Provider Limit Filters query by:
Alarm class. Alarm type. Alarm priority. Alarm name. Alarm group name. Alarm provider. Alarm limit. Values are alphanumeric. The comparisons of these values in the Query Filter are done as a string comparisons. Operator.
Operator
365
Field name OperatorFullName OperatorNode OperatorDomain Comment User1 User2 User3 Duration
Operators full name. Operators node name associated with the alarm. Operators domain name associated with the alarm. Alarm comment. Alarm user-defined numeric value 1. Alarm user-defined numeric value 2. Alarm user-defined string value. Unacknowledgement and alarm duration. A Duration column set equal to zero does not produce records with a null value in the query.
To remove a field from the filters pane, click the field you want to delete and click Delete. Deleting a filter cannot be undone. When a message appears, click Yes. Configure the criteria for each filter field. For more information, see Defining the Column Filter Criteria on page 366. Configure the operators and grouping for the filter. For more information, see Grouping Alarm Columns on page 367. Configure the filter favorites file.
a
In the Filter Favorites File box, type the network path and file name or click the ellipse button to browse for the file. To edit the Filter Favorites file, click the Edit Favorites File button. The Filter Favorites window opens, allowing you to add, modify, or delete filters from your favorites file. When you are done, click OK to save your changes and close the window.
Click Apply.
366
Right-click the field and then click Edit Filter. The Dialog dialog box appears.
2 3
In the Operator list, select the operator you need. In the Value box, type the criteria that must be matched. The Value box does not accept values that cannot be processed for the selected query. The Value box accepts the following wildcard characters when the Like and Not Like filter operators are used for alphanumeric column names:
Character Finds
% _ []
Any string of zero or more characters Any single character Any single character within the specified range, for example [a-f], or within a set, for example [abcdef]. Any single character not within the specified range, for example [^a-f], or set, for example [^abcdef].
[^]
All alphanumeric characters except User1, User2 and Priority. Accepts integer values from 1 to 999. Accepts only negative, positive or fractional numbers.
Click OK.
367
The AND operator returns records that meet all values of the selected fields. The OR operator returns records that meet the values of any of the selected fields.
To use AND/OR operators to set the filter selection criteria, the respective fields must be grouped together. Only a single filter expression can be created on an item in the filters pane. If multiple expressions are needed, then the item must be added to the filters pane again. By default, the grouped fields have the AND operator. The AND and OR operators are parent nodes. The fields selected under each parent node are child nodes. You cannot drag fields parent nodes to child nodes.
To group alarm columns 1 2
Right-click the field and then click Group. Drag a field onto another field.
Define the filters in the first instance of the Alarm Pareto control. Right-click the filters and click Copy. To move the filters, click Cut. Close the first instance of the Alarm Pareto control. Open the next instance of the Alarm Pareto control and click the Query Filter tab. Position the arrow in the right pane. Right-click on a selected filter and click Paste.
368
Right-click the Alarm Pareto control and then click Properties. The AlarmPareto Properties dialog box appears. Click the General tab.
Select the Consolidated Alarms check box to combine alarms from a multi-state alarm into a single time stamped record. Select the Show Count in Percentages check box to add a percentage of the total for each bar shown in the graph. Click Apply.
4 5
369
Refreshes the display. Allows you to edit the filter to change the data received by the Pareto control. This menu item is only available if a filter favorites file is set up. Resets the graph to the default query.
Reset
The status of the database connection between the control and the alarm database. The update status of the graph to refresh the data shown in the graph.
370
Returns or sets a value that determines whether the control connects to the database as soon as the control is in run-time mode. When the space available is not enough to show the text on the selected bar correctly, Auto Font hides the text and only shows the text on the selected bar when the bar is selected. Sets the background color of the Alarm Pareto chart Sets the bar color of the Alarm Pareto control. Sets the number of bars that appear on the Alarm Pareto control. Sets the color of the selected bar in the Alarm Pareto Control. Determines if the Alarm Pareto control is connected to a database. Consolidates the alarm states into two states. For example, if an analog tag has a three state alarm: Hi, HiHi and Normal, the Hi and HiHI alarm states are classified as one state.
AutoFont
BarSelectColor Connected
ConsolidatedAlarms
371
Purpose
Sets the database name to which the Alarm Pareto control has to connect. Sets the display mode. The display mode options are Alarm & Event History, Alarm History or Event History. Returns or sets the duration used by the control to set the "Start Time" and "End Time". Enables or disables the context menu to refresh the Alarm Pareto control. Enables or disables the context menu used to reset the Alarm Pareto control. Enables or disables the Silent Mode. If Silent Mode is disabled, the Alarm Pareto control shows error message boxes. If Silent Mode is enabled, the error message boxes do not appear. Error information is written to the logger. Returns or sets the end date and time. Enables or disables the context menu where you can edit the filter to change the data received by the Pareto control. This property is only enabled if Filter Menu Files is set. Specifies the filter favorites file, as a string. Sets the font for the records and the heading in the control. Sets the font color for the view of records in the Alarm Pareto control.
DisplayMode
Duration
EnableRefresh
EnableReset
EnableSilentMode
EndTime FilterMenu
372
Purpose
Shows the chart as horizontal bars. If HorizontalChart is disabled, the chart shows vertical bars. Returns or sets a value that specifies the maximum records to be retrieved at a given time. Sets the message that appears when there is no data to be processed for the Alarm Pareto control. Sets the time zone to either UTC Time or Origin Time. Returns the current server name. If selected, shows the count for each bar as a percentage of the total count. If not selected, shows the actual count for each bar. Sets the Alarm Pareto control to show the node name in addition to the other information on the bar. Enables or disables to show the information from the selected bar on the status bar. Returns or sets a value that determines whether the status bar is shown. Returns or sets a value that determines whether the Alarm Pareto control shows the bars based on the time in which the tag has remained in alarm state. If disabled, the control shows the bars based on the number of times an alarm has occurred.
MaxRecords
NoMatchMessage
ShowNodeName
ShowSelectedInStatusBar
ShowStatusBar
ShowTimeinState
373
Purpose
Returns or sets a value that determines whether the control uses the "start time" and "end time" properties, or computes the start time and end time based on the value of the Duration property. Returns or sets the start date and time. Returns or sets the User used as the control to connect to the SQL Server.
StartTime User
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 InTouch HMI Scripting and Logic Guide.
Connect() Method
Connects to the database configured from the Database tab of the Alarm Pareto control properties.
Syntax
Object.Connect()
Example
374
Refresh() Method
Refreshes the control from the database, and if the connection is successful, shows the set of records in the range from 1 to the number defined by the MaxRecords property.
Syntax
Object.Refresh()
Example
#AlarmPareto1.Refresh();
SelectQuery() Method
Selects a filter that is configured as a query favorite file.
Syntax
Object.SelectQuery(Filter)
Parameter
GetItemAlarmName() Method GetItemAlarmType() Method GetItemCount() Method GetItemTotalTime() Method GetItemEventType() Method GetItemProviderName() Method
375
GetItemAlarmName() Method
Gets the name of the alarm for a specific bar.
Syntax
Object.GetItemAlarmName(BarIndex)
Parameter
GetItemAlarmType() Method
Gets the type of alarm for a specific bar.
Syntax
Object.GetItemAlarmType(BarIndex)
Parameter
GetItemCount() Method
Gets the number of alarms in a bar.
Syntax
Object.GetItemCount(BarIndex)
Parameter
376
GetItemTotalTime() Method
Gets the total time, in seconds, of a tag in an alarm state.
Syntax
Object.GetItemTotalTime(BarIndex)
Parameter
GetItemEventType() Method
Gets the type of event for a specific bar.
Syntax
Object.GetItemEventType(BarIndex)
Parameter
GetItemProviderName() Method
Gets the name of the provider from the generated alarms for a specific bar.
Syntax
Object.GetItemProviderName(BarIndex)
Parameter
377
AboutBox() Method
Shows the About dialog box.
Syntax
Object.AboutBox()
Example
378
The Click event has one parameter called ClicknBarIndex, which identifies the index of the bar that is clicked at run time. The DoubleClick event has one parameter called DoubleClicknBarIndex, which identifies the index of the bar that is double-clicked at run time. Click and DoubleClick events are zero-based. When Click and/or DoubleClick events are published, the bar count in the display starts with 0.
Note The Alarm Pareto control ignores the user interface methods when they are called from the StartUp event, because the control is not visible yet. These methods include: AboutBox() and Refresh().
For more information about scripting ActiveX events, see Chapter 8, Scripting ActiveX Controls, in the InTouch HMI Scripting and Logic Guide.
379
Chapter 12
Maintaining the Alarm Database
You manage the alarm database using two InTouch utilities. Use the Alarm DB Purge-Archive utility to remove records from the database permanently or archive them to files. If the database becomes corrupt, use the Alarm DB Restore utility to restore archived records. The following figure shows how both utilities purge/archive records and then restore them back to the database.
Alarm Database
Alarm DB Purge/Archive
Purge Request
Purge Records
Archive Records
Log File
Archive Records
Alarm Records
Archive Files
Alarm DB Restore
Log File
You must be logged into the computer as an administrator to use the Alarm DB Purge-Archive utility.
380
Select the type of records to purge from the alarm database. Purge records automatically on a daily, weekly, or monthly schedule. Optionally archive purged database records to files. Save the status of archive or purge operations to a log file to troubleshoot problems. Show the status of purge or archive operations.
381
In the Server Name list, click the node name of the server. In the Database box, type the name of the alarm database. In the User Information area, type the user name and password of an alarm database user account.
Click Test Connection to test the connection to the database. A message indicates if the connection to the alarm database is successful. Click OK. Click Apply.
Select the type of alarm records to be purged from the alarm database. Optionally archive purged records from the alarm database 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 is purged. Valid entries are 0-9999. If you select 0, all records are purged from the alarm database except the current days records.
To select records to purge 1
382
In the Purge Properties area, configure the type of records to purge. Do either of the following: Click Detailed Mode to purge alarm records that are saved in the database in Detailed mode.
Click Consolidated Mode to purge alarm records that are saved in the database in Consolidated mode.
4 5
In the Days Online box, type the number of days worth of records to retain in the alarm database. Click Apply.
383
3 4
Select the Archive check box. In the Archive Folder Path box, type the folder location where archive files should be saved or click the ellipsis button to browse for the location. Select the Create Unique Folders check box if you want the archive files to be placed in an individual sub-folder beneath the archive file folder. Click Apply.
384
By default, the purge log file is stored in this folder: C:\Documents and Settings\All Users\Application Data\Wonderware\InTouch. For computers running the Microsoft Windows Vista operating system, the default application folder is C:\Users\UserName\Documents\My InTouch Applications. You can change the storage location of the purge log file. The Alarm DB Purge-Archive utility appends new messages to the log file each time a purge occurs.
385
In the Log File Path box, type the folder location where the purge log file should be placed or click the ellipsis button to browse for the location. Click Apply.
386
387
Click Test Now to perform a test purge to verify your connection to the database and archive locations. The test purge creates empty archive files in the specified archive folder. The Status area shows a message that the test was successful.
The Test Now button is available only if you have chosen to archive your purged records. The Archive option is located on the General tab.
4
Purge the records from the database. Do either of the following: Click Purge Now to purge the selected records.
To stop a purge, click Cancel Purge. If you cancel the purge, the alarm database is rolled back to its original state.
388
In the Time Interval area, select a purge interval, either daily, weekly, or monthly. If you click Weekly or Monthly, a Day box appears in the Activation Time area for you to specify the day of the week or day of the month. If you click Daily, in the Time box, configure the time of day that you want the purge/archive operation to start.
In the Run As area, click Application to run the purge-archive utility as an application or click Service to run it as a service. Click Apply to save your purge and archive settings.
389
6 7
Click Activate to place the Alarm DB Purge-Archive utility on an automatic purge schedule. Click Close.
Alarm Database
Log File
Archive Request
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 as an icon in the system tray. When you right-click the icon, a menu shows the following commands:
Command Restore Cancel Restore Clear Status Hide Window Show Window Exit Description
Begins the restoring process. Cancels the restoring process. Clears the status window. Minimizes the Alarm DB Restore utility to an icon in the system tray. Opens and maximizes the Alarm DB Restore utility. Closes the Alarm DB Restore utility.
If you right-click in the Alarm DB Restore utility, the same menu appears.
390
In the SQL Server Name list, click the node name of the server that hosts the alarm database. In the Database Name box, type the name of the alarm database. In the User Information area, type an alarm database user name and password in the respective boxes. Click Test Connection to test your connection to the database. A message indicates whether the connection to the alarm database is successful or not. Click OK.
Click Close.
391
In the Folder Path for Archived Files box, type the full path (up to 255 alphanumeric characters) to the location of the archived files or click the button to locate and select the folder where archived files are stored.
392
In the Restore files later than (Date/Time) area, select the date and time to start restoring records to the database. The starting date and time are set by default to the current date and time.
In the Folder path for log file box, type the full path (up to 255 alphanumeric characters) where the log files are created and stored or click the button to locate and select a folder. If you select the Recreate Tables check box, the tables of the specified alarm database are recreated. Depending on the type of logging you selected for the alarm records contained in the archived files, select: Detailed - Recreate the alarm database tables in detailed mode.
Consolidated - Recreate the alarm database tables in
consolidated mode.
Important Recreating tables overwrites all records currently stored in the alarm database. 7
Click Restore.
393
Click Restore. A message shows whether the restoration is successful and the number of records restored to the database.
394
395
Chapter 13
Enhancing Plant Security Through Alarm Redundancy
The InTouch Distributed Alarm system issues notifications and receives alarm acknowledgments from applications running on remote nodes within a network. Alarm provider applications store alarm data within their memory. Alarm consumer applications run as clients on other nodes to remotely query, show, and acknowledge alarms from the alarm providers. You use the Alarm Hot Backup Manager to create a duplicate alarm provider. The following figure shows how the Hot Backup Manager uses a secondary current alarm repository as a backup provider.
Primary Alarm Provider InTouch Running Hot Backup Manager Running InTouch Application
Pump1 Inlet Pressure Too High
PLC
I/O Server
Alarm Memory
Backup Alarm Provider
Alarm Memory
396
You can also run the Hot Backup Manager and the backup provider on the same node, as shown in the following figure:
Primary Alarm Provider InTouch Running Hot Backup Manager Running InTouch Application
Pump1 Inlet Pressure Too High
PLC
I/O Server
Alarm Memory
PLC
I/O Server
Alarm Memory
Backup Alarm Provider
Alarm Memory
397
The Hot Backup Manager synchronizes alarm acknowledgements between the primary and backup providers. If an alarm is acknowledged on the primary provider, the same alarm is acknowledged simultaneously on the backup provider. The Hot Backup Manager:
Provides a configuration utility to create a backup pair. Provides a configuration utility to map alarm records between the primary and backup providers of a hot backup pair. Synchronizes alarm acknowledgments between backup pairs. Establishes communication between all nodes that belong to a Hot Backup system when the Distributed Alarm system starts and stops.
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.
398
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 the configuration information.
To configure a hot backup pair 1
In the Tools view, expand Applications. Double-click Alarm Hot Backup Manager.
On the File menu, click Open. Select the Provacc.ini file and then click OK. By default, the Alarm Hot Backup Manager checks for the Provacc.ini file in the last opened InTouch application folder. You should use the Provacc.ini file located in the InTouch applications folder. Otherwise, you can create a copy of the Provacc.ini file in another specified folder location and then select it for use with Hot Backup Manager.
399
Click New Pair. The Add New Pair dialog box appears.
In the Hot Backup Pair Name box, type a unique name for the new backup pair. A pair name can be 32 alphanumeric characters or less. You can use the underscore character in a pair name.
In the Primary Node area, configure the primary node. Do the following:
a
In the Name box, type the node name of the computer running the primary provider application. The node name must be unique to Hot Backup Manager. An error message appears if you enter a non-existent node name or the node name is used in another hot backup pair. In the Group box, type the name of the alarm group that queries alarms from the primary provider.
b 6
In the Backup Node area, configure the backup node. Do the following:
a
In the Name box, type the node name of the computer running the backup provider application. This can be the same node that is running the Hot Backup Manager. In the Group box, type the name of the alarm group that queries alarms from the backup provider.
b 7 8 9
400
A mapping key can be a combination of design-time and run-time alarm records. Design-time alarm records are based upon alarm properties of a tag when it is defined from the Tagname Dictionary. For example, an alarm name field is known at design time because it takes on the name of the tag defined in the primary and backup node applications. QuickScripts or operators actions define or modify alarm properties stored as records while an application is running. You can create a map key from any combination of design-time or run-time alarm record fields. The map key must select only a single record from each providers current alarm repository. The key field must create a unique query. You use the Hot Backup Manager to create a mapping key list from alarm record fields.
401
In the Tools view, expand Applications. Double-click Alarm Hot Backup Manager.
2 3
Select a hot backup pair from the list. Click Set Key Fields. The Select Key Fields dialog box appears.
In the Alarm Record Fields area, select the alarm record fields that you want to include in the mapping key list. The selected alarm record fields appear in the Selected Fields list box. Select Design-Time or Run-Time for the alarm record fields you selected. Click OK. Restart WindowMaker.
5 6 7
402
Mapping enables alarm acknowledgements to be synchronized between providers running different applications. When the Distributed Alarm system acknowledges an alarm on a provider, it also knows which alarm to acknowledge on the other provider. The figure below shows alarm record mapping between the two providers of a hot backup pair. In this example, the A and B alarm records of the primary provider are mapped to the corresponding alarm records of the backup provider, MA and MB.
Primary Alarm Provider Alarm Record Mapping InTouch Running Hot Backup Manager Running InTouch Application
Alarm Memory
Backup Alarm Provider MA MB
Alarm Memory
403
The Hot Backup Manager imports the alarm record map from a comma separated values (CSV) file that you create with Microsoft Excel or a text editor like Notepad. The mapping file includes an ordered list of alarm record fields that associate the corresponding alarm records of the primary and backup providers. You must specify tag alarm record fields as the headers of the mapping file. The order of the headers within the file must match the alarm record fields shown from the Select Key Fields dialog box. The figure below shows the column headers of an Excel file that match the order of alarm record fields of the Select Key Fields dialog box.
You can create a mapping file that only includes the selected headers of alarm field records used to generate mapping keys. The figure below shows an Excel file that includes only the Name, Class, and Type headers. When you add headers, their order must always match the order of alarm record fields of the Select Key Fields dialog box.
404
Specify the alarm field records of the primary provider in the left set of columns. Likewise, specify the same records of the backup provider in the right set of columns.
Mapping File Column Header
Group
Name of the alarm group in which the tag has been assigned. An alarm group name cannot contain a blank space. Name of the tag whose alarm records are mapped. A tag name cannot contain a blank space. Class of alarm assigned to the tag. Possible Class values are:
Name
Class
VALUE for a value alarm. DEV for a deviation alarm. ROC for a rate of change alarm. DSC for a discrete alarm.
Type
LOLO, LO, HI, and HIHI for a value alarm MinDev and MajDev for a deviation alarm ROC for a rate of change alarm DSC for a discrete alarm
Priority 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.
405
The "Value" and "Limit" column values can be anything other than Null, when the "Class" or "Type" values for that particular record in that particular node are not known. The "Value" and "Limit" column values can accept only 1234567890.-+eE characters when the Class value for that particular record in that particular node is known as Value, Dev or ROC. The "Value" and "Limit" column values can accept only 1234567890.-+eE characters when the Type value for that particular record in that particular node is known as LOLO, LO, HI, HIHI, MinDev, MajDev or ROC. The "Value" and "Limit" column values can be anything other than Null, when any one of the "Class" or "Type" values for that particular record in that particular node is known as DSC. The Comment column values have no limitations. All records of the mapping file should be unique. The Hot Backup Manager skips any duplicate records during the import process. You can see details after the import process is completed.
You can combine the field values of alarm records - such as Group, name, and Priority - to generate a "composite mapping key" that uniquely identifies alarm records.
406
An InTouch Alarm Provider equates the "Name" field to the name of the tag that generated the alarm. Therefore, when given hot backup pair, a mapping key can be generated using the combination of the alarm group name and the tag name. For example:
Provider Node Backup Node
$System!TagA
$System!TagB
If a provider has a name field and comment field together as a unique field then the mapping key can be a combination of name and comment.
Provider Node Backup Node
tagA!CommentA
tagB!CommentB
This could be true for any other field combination for a third provider.
In the Tools view, expand Applications. Double-click Alarm Hot Backup Manager.
407
Click Map Alarms. The Map Alarm Records dialog box appears.
Click Import. The Open dialog box appears. Select the mapping file and click Open. The Hot Backup Manager begins importing records from the file.
5 6 7
Click OK after all mapping records have been imported. On the File menu, click Save. Restart WindowMaker.
The required number of columns should be filled with values for all the records at the import file. There should never be fewer values or more values for any record. The headings at the import file should be the same as that of the headings at the Select Key Fields dialog box and should be in the same order.
If a record that is imported has a wrong entry, you are prompted to skip that particular record number or to abort the importing process itself.
408
Tank Farm 1
PLC
Pump_1
PLC
Pump_2 I/O Server Pmp1IP Pmp1OP InTouch Backup Provider FrmBU
PLC
Pump_3
PLC
Pump_4
PLC
Pump_5 IPPmp1 OPPmp1
All three computers are running the InTouch HMI. The hot backup pair includes FrmPN as the primary provider and FrmBU as the backup. These two nodes serve as alarm providers within an InTouch Distributed Alarm system. The Hot Backup Manager run on the FrmAp node. The InTouch client application runs on FrmAp and consumes alarms from the two providers of the hot backup pair. The InTouch application running on FrmPN generates two summary alarms for pump inlet and outlet pressure. The two alarms belong to the TnkFrm1 alarm group. The InTouch application running on FrmBU generates two logically equivalent 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.
409
Open the InTouch application in WindowMaker. In this example, the application runs on the FrmAp node. Open the Alarm Hot Backup Manager. Do the following:
a b
In the Tools view, expand Applications. Double-click Alarm Hot Backup Manager.
3 4
Click New Pair. The Add New Pair dialog box appears. Complete the options of the Add New Pair dialog box, as shown in the following figure.
5 6
Keep the Alarm Hot Backup Manager dialog box open within WindowMaker. You are done with the first step to create a hot backup pair. Next, complete the following procedure to generate a unique mapping key to the paired alarm records stored in each providers alarm repository.
410
Select the hot backup pair in the list. Click Set Key Fields. The Select Key Fields dialog box appears. Complete the options of the Select Key Fields dialog box, as shown in the following figure.The alarms between the primary and backup provider are logically consistent but have been assigned different names and belong to different alarm groups. A unique mapping key to records stored in each providers alarm repository can be generated by selecting Alarm Group, Alarm Name, Alarm Class, and Alarm Type as Design-Time options.
Click OK. When a message appears, click Yes. You are done with the second step to create an alarm record mapping key. In this scenario all three nodes are running InTouch applications. The two provider nodes generate equivalent alarms, but are using different tagnames. The primary provider generates two summary alarms when a pumps inlet and outlet pressures are too high. The backup provider generates two logically identical alarms for the same pump pressure alarm conditions. Next, complete the following procedure to create a mapping file that associates equivalent records stored in each providers alarm repository.
411
Create a .csv file with Excel or a text editor like Notepad. Enter the names of the file headers in the same order as the alarm record field options of the Select Key Fields dialog box. In this example, the file headers should be ordered by alarm group, alarm name, the class of alarm, and the type of alarm condition. Map the alarms between the two providers on each row of the file. The example of the Excel file below shows how the headers and alarm conditions should be specified for the two providers of the hot backup pair. Save the mapping file to a location accessible to the Hot Backup Manager running on the client node.
3 4
You are done with the third step to create an alarm record mapping file. In the last step, you import the contents of the alarm mapping file to the Hot Backup Manager. In this example, the client application knows which pump pressure alarm records to acknowledge between the two alarm providers.
412
Open the Alarm Hot Backup Manager. The alarm backup pair you created earlier should be listed. Click Map Alarms. The Map Alarm Records dialog box appears. Click Import. The Open dialog box appears. Select your mapping file and click Open. The Map Alarm Records dialog box lists the alarm mapping records from the file.
2 3 4
5 6
Click OK. The Hot Backup Manager begins importing records from the file.
Click OK after all mapping records have been imported. You can now run the hot backup application.
Alarm Name, Alarm Class, and Alarm Type are selected as design-time key fields. Alarm Group is selected as a run-time field.
413
The following alarm record map file was created using Microsoft Excel.
The Pmp1IP alarm is mapped to the IPPmp1 alarm. Both have a Class of VALUE and a Type of HIHI. The Pmp1OP alarm is mapped to the OPPmp1 alarm. Both have a Class of VALUE and a Type of Lo.
When the HiHi alarm for Pmp1IP is acknowledged at the primary alarm node, the acknowledgment also appears on the HiHi alarm for IPPmp1 at the secondary provider node, provided that the alarm group names on both nodes remain the same. When the Low alarm for Pmp1OP is acknowledged at the primary alarm node, the acknowledgment also appears on the Low alarm for OPPmp1 at the secondary provider node, provided that the alarm group names on both nodes remain the same.
Acknowledgement synchronization occurs only if the design-time and run-time mapping match. You can select any combination of design-time and run-time alarm record fields for mapping. However, make sure that the mappings do not result in multiple references. For example, if two alarm record fields such as Class and Priority are selected, it is very possible that more than one alarm matches the criteria. In such a case, the Hot Backup synchronization is not guaranteed to work. In the process of propagating the acknowledgment, a random alarm that matches the criteria may also be picked up, while other matching alarms may be left unacknowledged.
414
You can use a hot backup only for InTouch 7.11 and later clients. Expanded summary alarms or event-oriented alarms are not supported. If the Distributed Alarm Display object queries a hot backup pair and then queries the primary provider again separately, the Distributed Alarm Display object shows duplicate records. Do not configure a provider as a primary or secondary of more than one hot backup pair. If a record at the primary provider is acknowledged and the secondary provider (which was down when the acknowledgment took place) starts up at a later time, the time stamp of the acknowledged record is identical with the record in the primary provider. The alarm consumer querying a hot backup pair shows the individual node name as the provider. You can choose any combination of design-time and run-time alarm record fields for mapping. However, be sure that the mappings do not result in multiple references. When mapping the Value and Limit key fields, the values are rounded off to the fourth decimal place and then mapped. An alarm record that does not have the specific combination of design-time and run-time mapping uses the default runtime mapping.
415
Chapter 14
Creating an Alarm Audit Trail
When you configure an InTouch alarm provider to use either operating system or ArchestrA authentication and an alarm occurs, the alarm display contains the full name of the operator in the Operator Full Name column, assuming the operator is logged on. For example if a user is registered in the PLANT_FLOOR domain with a user ID of JohnS and a full name of John Smith, the Operator Full Name column contains John Smith. If the alarm is subsequently acknowledged, and the node performing the acknowledgement is set to use operating system or ArchestrA security, the Operator Full Name column is updated to show the full name of the acknowledgement operator. Otherwise, the alarm display shows a computer name concatenated with whatever is in the $Operator tag. InTouch security can include an operators full name with alarm acknowledgements. This is also possible on records pertaining to alarm detection. In most organizations, a logon ID is not a person's full name, but rather an abbreviation or role classification.
416
When you configure operating system authentication for the provider and consumer InTouch nodes:
The alarm display shows full names when alarms are generated and when acknowledgements are performed. The alarm printer prints full names when alarms are generated and when acknowledgements are performed. The Alarm DB Logger records domain name, log on user ID, and full user name with each alarm record for both Operator and AckOperator fields. This allows for unique identification even if an organization has two employees with identical full names. The Operator field shows the user account in the DomainName\UserName format.
417
Appendix A
Working with the Distributed Alarm Display Object
The Distributed Alarm Display object is included in this version of the InTouch HMI to support applications developed with InTouch version 7 and earlier. You should use the Alarm Viewer Control instead to create alarm displays with more recent versions of the InTouch HMI.
This display objects features include built in scroll bars, sizable columns, multiple selection of alarms, a status bar, a shortcut menu, and colors based on alarm priority and state.
418
The Distributed Alarm Display object includes properties that can set the appearance of the alarm display (including the information that is shown), the colors used for various alarm conditions, and which alarm group and alarm priority levels are shown. For more information about the display object, see Using a Distributed Alarm Display Object at Run Time on page 434.
Each display must have an identifier so that any associated QuickScript functions knows which display to modify. This identifier, entered in the Display Name box in the Alarm Configuration dialog box, must be unique for each display. Displays should not overlap other InTouch objects, such as window controls or graphic objects. You can easily verify this by clicking on the Distributed Alarm Display object in WindowMaker, and checking the displays "handles." The handles should not touch other objects on the screen. Displays should be used sparingly. Placing numerous displays on one screen can result in reduced system performance. When possible, limit the number of displays on your window and call further windows with additional displays.
419
General features, such as a status bar, scroll bars, and so on. The columns and sorting order. The alarm query to use to retrieve alarm records. The time format the alarm records are shown in. The font and colors for the shown alarm records. What run-time users can do in the display, such as resize columns, select alarms, access a shortcut menu, and so on.
Click the Wizard tool in the Wizard/ActiveX Toolbar. The Wizard Selection dialog box appears. Select Alarm Displays in the list of wizards. Double-click the Dist. Alarm Display wizard. The dialog box closes and your window reappears with the cursor in the "paste" mode.
Click in the window to paste the Distributed Alarm Display object. To size the wizard, drag the selection handles. You are now ready to configure the display.
420
A title bar, status bar, and scroll bars. Where new alarms appear in the grid and whether to auto-scroll to them. A default message to be shown if there are no alarm records to show.
Right-click the Distributed Alarm Display object and then click Properties. The Alarm Configuration dialog box appears.
In the Display Name box, type the name for the alarm display. This name must be unique for each alarm display used. This name is used throughout the system for referring to this object for execution of tasks such as alarm acknowledgment and queries.
421
In the New Alarms Appear At area, configure where you want new alarms to appear in the object: Click Top of List to show the most recent alarm at the top of the list.
Click Bottom of List to show most recent alarm at the bottom of the list.
In the Properties area, configure title bar, status bar, and scroll bars. Do any of the following: Select the Show Titles check box to show the alarm message title bar.
Select the Show Status Bar check box to show the status bar. Select the Show Vert Scrollbar check box to show the vertical scroll bar. Select the Show Horz Scrollbar check box to show the horizontal scroll bar.
Select the Show Message check box to show a default message if there are no alarm records to show. Type the message in the box. Select the Auto-Scroll to New Alarms check box to have the selection automatically jumps to the new alarm. New alarms are defined as those that are not currently shown within the display object. Click OK.
422
Right-click the Distributed Alarm Display object and then click Properties. The Alarm Configuration dialog box appears.
Configure the which options are available at run time. Do any of the following: Select the Allow Runtime Grid Changes check box to allow the user to change column settings.
Select the Show Context Sensitive Menu check box to enable the shortcut menu. Select the Allow Runtime Alarm Selection check box to allow the user to select alarms. Select the Use Extended Alarm Selection check box to allow the user to select multiple alarms by holding down Ctrl or Shift in conjunction with mouse selection. The default is to toggle selection of alarms by simply clicking on them.
Click OK.
423
When you configure the alarm query, you use text only. You cannot use tags. Example queries are as follows. Full path to Alarm Group: \\Node\InTouch!Group Full path to local Alarm Group \InTouch!Group Another Group List: GroupList To perform multiple queries, separate each query with a space. For example: \InTouch!Group GroupList The default query properties are only used if you select the
Perform Query on Startup check box or if the almDefQuery()
function is executed.
424
Right-click the Distributed Alarm Display object and then click Properties. The Alarm Configuration dialog box appears.
2 3
Select the Perform Query on Startup check box. In the Default Query Properties area, configure the default query for the object. In the From Priority box, type the default minimum alarm priority.
In the To Priority box, type the default maximum alarm priority. In the Alarm State list, click the default alarm state to query (All, Unack, Ack). In the Query Type list, click the alarm type, either Summary or Historical. In the Alarm Query box, type the initial alarm query.
Click OK.
425
Right-click the Distributed Alarm Display object and then click Properties. The Alarm Configuration dialog box appears.
2 3 4
Select the Show Context Sensitive Menu check box. Select the Use Default Ack Comment check box and then type the comment text in the box. Click OK.
426
Right-click the Distributed Alarm Display object and then click Properties. The Alarm Configuration dialog box appears. Click the Message tab.
In the Date Format list, click the format for the date. Available formats are:
Shows Selection MM/DD MM/DD/YY MMM DD MMM DD YYYY YYYY/MM/DD Shows
427
In the Time Format list, click the format for the time. Use the values in this list as a template to specify the format of the time. For example, to specify the time as 10:24:30 AM, use HH:MM:SS AP. The template characters are as follows:
Character AP Description
Selects the AM/PM format. For example, three oclock in the afternoon is shown as 3:00 PM. A time without this designation defaults to 24 hour military time format. For example, three oclock in the afternoon is shown as 15:00. Shows the hour the alarm/event occurred. Shows the minute the alarm/event occurred. Shows the second the alarm/event occurred. Shows the millisecond the alarm/event occurred.
HH MM SS SSS 5
In the Sort Order area, configure the order in which you want the alarms to be sorted in the object: Click OAT to use the original alarm time, which is the date/time stamp of the onset of the alarm.
Click LCT to use the last alarm change time, which is the date/time stamp of the most recent change of status for the instance of the alarm: onset of the alarm, change of sub-state, return to normal, or acknowledgment.
Click OK.
428
Right-click the Distributed Alarm Display object and then click Properties. The Alarm Configuration dialog box appears. Click the Message tab. Click Select Display Font. The standard Windows Font dialog box appears. Configure the font and then click OK.
2 3 4
Right-click the Distributed Alarm Display object and then click Properties. The Alarm Configuration dialog box appears. Click the Message tab. Click Column Management. The Column Details dialog box appears.
2 3
429
Select the check box in the Column Name list to show that column in the Distributed Alarm Display object. You must select at least one column. The following table describes the columns:
Column Date Time State Class Type Priority Name Group Provider Value Limit Operator Comment Description
Shows the date in the format selected from the Message tab. Shows the time in the format selected from 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 when the alarm occurred. Shows the alarm limit value of the tagname. Shows the logged-on operators ID associated with the alarm condition. Shows the tagname comment. This comment is typed in the Alarm Comment box when the tagnames alarm was defined in the database.
430
To rearrange the columns, select the column name and use the Move Up and Down arrow buttons. The column name appearing at the top of the Column Details dialog box is the column shown to the furthest left of the alarm display. To edit the column name and width, select a column name and then click Edit. The Edit dialog box appears for that column.
In the New Name box, type a new name if you want to show a column name other than the default column name. In the New Width box, type in a default column width. The column width can range from 1 to 999 pixels. The default column width is 100 pixels. Click OK in the Edit dialog box.
c 7 8
431
Right-click the Distributed Alarm Display object and then click Properties. The Alarm Configuration dialog box appears. Click the Color tab.
In the General area, click each color box to open the InTouch color palette. Click the color that you want to use for each of the following:
Option Window Grid Selection Back Selection Text Title Bar Back Description
Sets the display background color. Sets the grid color. Sets the highlighted text background color. Sets the highlighted text color. Sets the title bar background color (visible only if the Show Titles option is on).
432
Description
Sets the title bar text color (visible only if the Show Titles option is on). Sets the color of returned alarms (alarms that have returned to normal without being acknowledged). Sets the color of event alarms.
Alarm Return
Event 4 5
In the Alarm Priority boxes, type the breakpoint values for the alarm display. Click the UnAck Alarm and Ack Alarm color boxes to open the InTouch palette. Click the color in the palette that you want to use. Click OK.
433
Right-click the Distributed Alarm Display object and then click Properties. The Alarm Configuration dialog box appears.
2 3
In the Query Type list, click the type of alarm display that you want to use for the run-time default. Click OK.
Right-click the Distributed Alarm Display object and then click Properties. The Alarm Configuration dialog box appears. In the Alarm Query box, type: \InTouch!$System You can substitute any valid alarm group for $System. You can also define an alarm group list containing just \InTouch!$System, and then use this group list instead of a direct reference.
Configure the other parameters for the type of display and any filtering your application requires.
434
Multiple Selection
You can select a single or multiple alarms in a list box, depending on how the alarm display is configured.
435
Status Bar
Depending on how the alarm object is configured, the status bar shows a status message, the current alarm query, and a progress bar.
The left portion of the status bar shows the current status of the control. These indicators provide an overview of the current state of the display query and provide details about the suppression available in the Distributed Alarm Display object. The right pane of the status bar is red when freeze is in effect and the left pane of the status bar is red when suppression is in effect. The word "Suppression" shows in the left pane when suppression is in effect.
Feature Status Message Alarm Query Progress Bar Description
The status message at the left end of the status bar provides a more detailed description of the current query status. The Alarm Query provides a visual indication of the current alarm query. The update progress bar at the right end of the status bar provides a visual indication of the current query progress.
436
Shortcut Menu
Depending on how the alarm object is configured, you can right-click on the object to open a shortcut menu for common commands:
Click this command Ack Selected Ack Others
To do this
Acknowledge the selected alarm. Acknowledge all alarms in the display, or only visible alarms, selected groups, selected tagnames, and priorities. Suppress the selected alarm. Suppress all alarms in the display, or only visible alarms, selected groups, selected tagname, and selected priorities. Opens the Alarm Query dialog box, where you can select the query to use. Opens the Alarm Statistics dialog box. Opens the Alarm Suppression dialog box. Freezes the current display.
437
At run time, right-click the Distributed Alarm Display and then click Query Favorites. The Alarm Query dialog box appears.
2 3
In the list of currently defined queries, select the named query to use. Click OK. The Distributed Alarm Display object shows the alarm information for the selected query.
438
At run time, right-click the Distributed Alarm Display and then click Query Favorites. The Alarm Query dialog box appears.
In the Name box, type the name for the query. In the Query box, type the sets of InTouch alarm queries that you want to perform. You can specify one or more alarm providers and groups. In the From Priority box, type the minimum alarm priority value (1 to 999). In the To Priority box, type the maximum alarm priority value (1 to 999). In the Alarm State list, click the alarm state that you want to use in the alarm query. In the Display Type area, click the type of alarms to show. For more information, see Summary Alarms versus Historical Alarms on page 30.
d e
439
4 5
Click OK to close the Add Query dialog box. Click OK in the Alarm Query dialog box.
At run time, right-click the Distributed Alarm Display and then click Query Favorites. The Alarm Query dialog box appears. In the list of currently defined queries, select the named query to modify. Click Modify. The Modify Query dialog box appears. Make the necessary modifications and then click OK to close the Modify Query dialog box. Click OK on the Alarm Query dialog box.
2 3 4 5
Note Modifications are not automatically applied to other Distributed Alarm Display objects that are using the alarm query being modified. To delete an existing named query 1
At run time, right-click the Distributed Alarm Display and then click Query Favorites. The Alarm Query dialog box appears. In the list of currently defined queries, select the named query to modify. Click Delete. When a message appears, click Yes. Click OK on the Alarm Query dialog box.
2 3 4
Note Deletion are not automatically applied to other Distribute Alarm Display objects that are using the alarm query being deleted.
440
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
You can control the Distributed Alarm Display object at run time using functions and .dotfields. For a list of returned error numbers for functions, see Error Descriptions on page 503.
For more information on the GetPropertyX() functions, see Chapter 6, Built-In Functions, in the InTouch HMI Scripting and Logic Guide. When you run the script that includes the GetPropertyX() function, the property value is saved to the MsgTag. If multiple rows are selected, the property assigned to MsgTag is the tag value in the first row of the multiple selection.
Acknowledging Alarms
The Distributed Alarm Display object is capable of acknowledging any alarms that it can query (summary display only). The Distributed Alarm Display object includes alarm acknowledgment functions. These functions supplement the .Ack dotfield used to acknowledge local alarms and alarm groups. Use these functions to acknowledge all alarms, shown alarms, and selected alarms. You can also acknowledge alarms by their characteristics. such as group membership, priority, application name, and tag name.
almAckAll() Function almAckDisplay() Function almAckGroup() Function almAckPriority() Function almAckRecent() Function
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
441
almAckTag() Function almAckSelect() Function almAckSelectedGroup() Function almAckSelectedPriority() Function almAckSelectedTag() Function
almAckAll() Function
Acknowledges all alarms in a current query, including those not currently shown in the Distributed Alarm Display object in summary mode.
Category
Alarms
Syntax [Result=]almAckAll(ObjectName,Comment); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. Comment Alarm acknowledgment comment.
Examples MessageTag = Acknowledge All by + $Operator; almAckAll(AlmObj_1,MessageTag); See Also
442
almAckDisplay() Function
Acknowledges only those alarms currently visible in the Distributed Alarm Display object in summary mode.
Category
Alarms
Syntax [Result=]almAckDisplay(ObjectName,Comment); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. Comment Alarm acknowledgment comment.
Example almAckDisplay(AlmObj_1,Display Acknowledgement); See Also
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
443
almAckGroup() Function
Acknowledges all alarms shown in the named Distributed Alarm object that match the specified provider and group name.
Category
Alarms
Syntax [Result=]almAckGroup( ObjectName, ApplicationName, GroupName, Comment); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. ApplicationName The name of the Application for example, \\node1\Intouch GroupName The name of the InTouch alarm group, such as $System. Comment Alarm acknowledgment comment.
Example MessageTag = Acknowledge group, Turbines, by + $Operator; almAckGroup(AlmObj_1, \Intouch, Turbine, MessageTag);
444
almAckPriority() Function
Acknowledges all alarms shown in the named Distributed Alarm object as a result of the last query that match the alarms application name, alarm group, and priority range.
Category
Alarms
Syntax [Result=]almAckPriority(ObjectName, ApplicationName, GroupName, FromPri, ToPri, Comment); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. ApplicationName The name of the Application for example, \\node1\Intouch GroupName The name of the Group for example, $System FromPri Starting number of the alarm priority range. For example, 100. ToPri Ending number of the alarm priority range. For example, 900. Comment Alarm acknowledgment comment.
Example almAckPriority(AlmObj_1, \\node1\Intouch, Turbines, 10, 100, Range 10 to 100 acknowledged);
almAckRecent() Function
Acknowledges the most recent alarms that have occurred.
Syntax [Result=]almAckRecent(ObjectName, Comment) Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. Comment Alarm acknowledgment comment.
Example almAckRecent(AlmObj_1,$DateString);
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
445
almAckTag() Function
Acknowledges all alarms shown in the named Distributed Alarm Display object as a result of the last query. The alarm must match the application name, group name, tag name, and priority range specified by the query.
Category
Alarms
Syntax [Result=]almAckTag(ObjectName, ApplicationName, GroupName, TagName, FromPri, ToPri, Comment); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. ApplicationName The name of the application. For example, \\node1\Intouch. GroupName The name of the alarm group. For example, $System. TagName The name of the tag whose value is in an alarm state. FromPri Starting number of the alarm priority range. For example, 100. ToPri Ending number of the priority range. For example, 900. Comment Alarm acknowledgment comment.
Example almAckTag(AlmObj_1, \\node1\Intouch, Turbines, Valve1, 10, 100, "Acknowledged for Valve1"); See Also
446
almAckSelect() Function
Acknowledges only those alarms selected in the Distributed Alarm Display object in summary mode.
Category
Alarms
Syntax [Result=]almAckSelect(ObjectName,Comment); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. Comment Alarm acknowledgment comment.
Example
This example acknowledges only those alarms that occurred during the day shift or the night shift.
IF ($Hour >= 0 and $Hour < 8) THEN AckTag = Night Shift; ELSE AckTag = Day Shift; ENDIF; almAckSelect (AlmObj_1,AckTag); See Also
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
447
almAckSelectedGroup() Function
Acknowledges all alarms with same provider and group names that have the same group name as one or more of the alarms that are selected within the named Distributed Alarm Display object.
Category
Alarms
Syntax [Result=]almAckSelectedGroup(ObjectName,Comment); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. Comment Alarm acknowledgment comment.
Example MessageTag = Acknowledge selected groups by + $Operator; almAckSelectedGroup (AlmObj_1, MessageTag); See Also
448
almAckSelectedPriority() Function
Acknowledges all alarms with same provider and group names that have the same priority value as one or more of the alarms that are selected within the named Distributed Alarm Display object. The priorities are calculated from the minimum and maximum priorities of the selected alarm records.
Category
Alarms
Syntax [Result=]almAckSelectedPriority(ObjectName, Comment); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. Comment Alarm acknowledgment comment.
Example MessageTag = Acknowledge selected priorities by + $Operator; almAckSelectedPriority (AlmObj_1, MessageTag); See Also
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
449
almAckSelectedTag() Function
Acknowledges all alarms that have the same Tagname from the same provider and group name and having the same priority as one or more of the selected alarms within the named Distributed Alarm Display object.
Category
Alarms
Syntax [Result=]almAckSelectedTag(ObjectName,Comment); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. Comment Alarm acknowledgment comment.
Example MessageTag = Acknowledge selected tagnames by + $Operator; almAckSelectedTag (AlmObj_1, MessageTag); See Also
450
Selecting Alarms
You can create scripts to select alarms from a Distributed Alarm Display object. You can select all alarms, only selected alarms, or obtain a count of current alarms.
almSelectAll() Function almUnselectAll() Function almSelectionCount() Function almSelectGroup() Function almSelectItem() Function almSelectPriority() Function almSelectTag() Function
You can also select specific alarms based upon the data source, alarm priority, and InTouch tags.
almSelectAll() Function
Toggles the selection of all the alarms in a named Distributed Alarm Display object.
Category
Alarms
Syntax
[Result=]almSelectAll(ObjectName);
Argument
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
451
almUnselectAll() Function
Unselects all selected alarms in a named Distributed Alarm Display object.
Category
Alarms
Syntax
[Result=]almUnselectAll(ObjectName);
Argument
almSelectionCount() Function
Returns the number of alarms selected by the operator in the Distributed Alarm Display object.
Category
Alarms
Syntax
[Result=]almSelectionCount(ObjectName);
Argument
The AlarmCount tag is assigned the number of alarms selected by the operator from the Distributed Alarm Display object.
AlarmCount = almSelectionCount(AlmObj_1);
452
almSelectGroup() Function
Toggles the selection of all alarms that are contained by a named Distributed Alarm Display object as a result of the displays last query and where the resultant alarm contains the same alarm group name.
Category
Alarms
Syntax
[Result=]almSelectGroup(ObjectName, ApplicationName,GroupName);
Argument
ObjectName The name of the alarm object. For example, AlmObj_1. ApplicationName The name of the Application. For example, \\node1\Intouch. GroupName The name of the Group. For example, $System.
Example almSelectGroup(AlmObj_1,\InTouch,Turbine); See Also
almSelectItem() Function
Toggles the selection of the last selected or unselected item in an alarm display object.
Syntax
[Result=]almSelectItem(ObjectName);
Argument
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
453
almSelectPriority() Function
Toggles the selection of all alarms in a named Distributed Alarm Display object as a result of the displays last query and where the resultant alarms are within the specified priority range.
Category
Alarms
Syntax
[Result=]almSelectPriority( "objectName", ApplicationName, GroupName, FromPri, ToPri );
Argument
ObjectName The name of the alarm object. For example, AlmObj_1. ApplicationName The name of the Application. For example, \\node1\Intouch. GroupName The name of the Group. For example, $System. FromPri Starting priority of alarms. For example, 100 or integer tag. ToPri Ending priority of alarms. For example, 900 or integer tag.
Example almSelectPriority(AlmObj_1,\\node1\Intouch, Turbines,10,100); See Also
454
almSelectTag() Function
Toggles the selection of all alarms in a named Distributed Alarm Display object as a result of the displays last query and given tag name.
Category
Alarms
Syntax [Result=]almSelectTag (ObjectName, ApplicationName, GroupName, TagName, FromPri, ToPri); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. ApplicationName The name of the Application. For example, \\node1\Intouch. GroupName The name of the Group. For example, $System. TagName The name of the alarm tag. FromPri Starting priority of alarms. For example, 100 or integer tag. ToPri Ending priority of alarms. For example, 900 or integer tag.
Example almSelectTag(AlmObj_1,\\node1\Intouch, Turbines,Valve1,10,100); See Also
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
455
.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
456
.AlarmTime Dotfield
Returns the time when an alarm occurred. The alarm must be selected in Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM( "ObjectName.AlarmTime",TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Example
In this example, AlmObj_1 is the name of the Distributed Alarm Display object and almTime is a memory message tag.
GetPropertyM("AlmObj_1.AlarmTime",almTime);
If used in a Touch Pushbutton QuickScript, this statement returns the time when the alarm occurred to the almTime tag.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmType, .AlarmValue
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
457
.AlarmDate Dotfield
Returns the date associated with a selected alarm. The alarm has to be selected by clicking on the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM("ObjectName.AlarmDate" ,TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Example
If used in a Touch Pushbutton QuickScript, this statement returns the date to the almDate tag.
GetPropertyM("AlmObj_1.AlarmDate",almDate);
AlmObj_1 is the name of the Distributed Alarm Display object and almDate is a memory message tag that retrieves the date for the tag associated with the selected alarm.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
458
.AlarmName Dotfield
Returns the name of the tag associated with a selected alarm. The alarm has to be selected by clicking the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM("ObjectName.AlarmName" ,TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Example
If used in a Touch Pushbutton QuickScript, this statement returns the name of the alarm to almName.
GetPropertyM("AlmObj_1.AlarmName",almName);
Where AlmObj_1 is the name of the Distributed Alarm Display object and almName is a memory message tag that retrieves the name of the tag associated with the selected alarm.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
459
.AlarmValue Dotfield
Returns the value of the alarm for the tag associated with the selected alarm. The alarm has to be selected by clicking the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM("ObjectName.AlarmValue ,TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Remarks
This function uses a message tag to retrieve the numeric value. This is because the GetProperty functions do not support real numbers. You can use the StringToReal() function to assign the result to a real tag.
Example
If used in a Touch Pushbutton QuickScript, this statement returns the value to almValue.
GetPropertyM("AlmObj_1.AlarmValue", almValue);
Where AlmObj_1 is the name of the Distributed Alarm Display object and almValue is a memory message tag containing the alarm value for the tag associated with the selected alarm.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
460
.AlarmClass Dotfield
Returns the class of alarm for the tag associated with a selected alarm. The alarm must be selected from the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM("ObjectName.AlarmClass ",Tagname); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Example
The following statement returns the alarm class associated with the selected alarm.
GetPropertyM("AlmObj_1.AlarmClass",almClass);
AlmObj_1 is the name of the Distributed Alarm Display object and almClass is a memory message tag containing the class of alarm for the tag associated with the selected alarm. If used in a Touch Pushbutton QuickScript, this statement returns the alarm class of the alarm to the almClass tag.
See Also
GetPropertyM(), .AlarmAccess, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
461
.AlarmType Dotfield
Returns the alarm type for the tag associated with a selected alarm. The alarm has to be selected by clicking the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM("ObjectName.AlarmType ,TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Example
If used in a Touch Pushbutton QuickScript, this statement returns the type of the selected alarm to the almType tag when the operator acknowledges the alarm.
GetPropertyM("AlmObj_1.AlarmType",almType);
Where AlmObj_1 is the name of the Distributed Alarm Display object and almType is a memory message tag containing the alarm type for the tag associated with the selected alarm.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmValue
462
.AlarmState Dotfield
Returns the state of the selected alarm. The alarm has to be selected by clicking the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM( "ObjectName.AlarmState",TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Example
If used in a Touch Pushbutton QuickScript, this statement returns the state of the selected alarm to the almState tag.
GetPropertyM("AlmObj_1.AlarmState",almState);
Where AlmObj_1 is the name of the Distributed Alarm Display object and almState is a memory message tag containing the alarm state for the tag associated with the selected alarm.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmTime, .AlarmType, .AlarmValue
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
463
.AlarmLimit Dotfield
Returns the limit for the tag associated with a selected alarm. The alarm has to be selected by clicking the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM ("ObjectName.AlarmLimit",TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Remarks
This function uses a message tag to retrieve the numeric value. This is because the GetProperty functions do not support real numbers. You can use the StringToReal() function to assign the result to a real tag.
Example
If used in a pushbutton QuickScript, this statement returns the limit of the selected alarm to the almLimit tag.
GetPropertyM("AlmObj_1.AlarmLimit",almLimit);
Where AlmObj_1 is the name of the Distributed Alarm Display object and almLimit is a memory message containing the alarm limit for the tag associated with the selected alarm.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmDate, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
464
.AlarmPri Dotfield
Returns the priority (1-999) for the tag associated with a selected alarm. The alarm must be selected by clicking the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM("ObjectName.AlarmPri", TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Example
If used in a Touch Pushbutton QuickScript, this statement returns the alarm priority to the almPrilvl tag.
GetPropertyM("AlmObj_1.AlarmPri",almPrilvl);
Where AlmObj_1 is the name of the Distributed Alarm Display object and almPrilvl is a memory message tag containing the priority level of the tag associated with the selected alarm.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
465
.AlarmGroupSel Dotfield
Returns the alarm group of the tag associated with a selected alarm. The alarm has to be selected by clicking on the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM( "ObjectName.AlarmGroupSel",TagName); Parameter
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
If used in a Touch Pushbutton QuickScript, this statement returns the name of the alarm group to the almGroup tag.
GetPropertyM("AlmObj_1.AlarmGroupSel",almGroup);
Where AlmObj_1 is the name of the Distributed Alarm Display object and almGroup is a memory message tag containing the alarm group of the tag associated with the selected alarm.
See Also
466
.AlarmAccess Dotfield
Returns the Access Name of the tag associated with a selected alarm. The alarm record must be selected by clicking on the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage GetPropertyM("Objectname.AlarmAccess",TagName); Parameter
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
If used in a Touch Pushbutton QuickScript, this statement returns the Access Name of the tag associated with the alarm to the almAccess tag.
GetPropertyM("AlmObj_1.AlarmAccess",almAccess);
Where AlmObj_1 is the name of the Distributed Alarm Display object and almAccess is a memory message tag containing the Access Name of the tag associated with the selected alarm.
See Also
GetPropertyM(), .AlarmClass, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
467
.AlarmProv Dotfield
Returns the alarm provider for the tag associated with a selected alarm. The alarm has to be selected by clicking the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM( "ObjectName.AlarmProv",TagName); Parameter
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Example
If used in a Touch Pushbutton QuickScript, this statement returns the provider name to the almProv tag.
GetPropertyM("AlmObj_1.AlarmProv", almProv);
AlmObj_1 is the name of the Distributed Alarm Display object and almProv is a memory message tag containing the name of the provider for the tag associated with the selected alarm.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
468
.AlarmOprName Dotfield
Returns the name of the logged on operator who acknowledged the selected alarm. The alarm has to be selected by clicking the Distributed Alarm Display object in summary mode.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM( "ObjectName.AlarmOprName",TagName); Parameter
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Where AlmObj_1 is the name of the Distributed Alarm Display object and almOprName is a memory message tag containing the name of the operator responding to the alarm associated with the tag. If used in a Touch Pushbutton QuickScript, this statement returns the name of the operator to the almOprName tag.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
469
.AlarmOprNode Dotfield
Returns the operator node for the tag associated with a selected alarm. The alarm must be selected by clicking the Distributed Alarm Display object in summary mode. When an alarm is acknowledged in a Terminal Services environment, the Operator Node is the name of the client machine that the respective operator established the Terminal Services session from. If the node name cannot be retrieved, the node's IP address is used instead.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM( "ObjectName.AlarmOprNode",TagName); Parameter
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Where AlmObj_1 is the name of the Distributed Alarm Display object and almOprNode is a memory message tag containing the name of the operator's node for the tag associated with the selected alarm. If used in a Touch Pushbutton QuickScript, this statement returns the operators node to the almOprNode tag.
See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmComment, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
470
.AlarmComment Dotfield
Returns the alarm comment, which is a read/write text string that describes the alarm, not the tag. By default, the comment is empty in a new application. However, when an old InTouch application is converted to InTouch version 7.11 or later, the tag comment is copied to the .AlarmComment dotfield for backward compatibility.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM( "ObjectName.AlarmComment",TagName); Parameter
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any message tag.
Data Type
String (read-only)
Example
The following example returns the alarm comment for a tag selected in the AlmObj_1 Distributed Alarm Display object and places it in the almComment tag :
GetPropertyM(AlmObj_1.AlarmComment, almComment); See Also
GetPropertyM(), .AlarmAccess, .AlarmClass, .AlarmDate, .AlarmLimit, .AlarmName, .AlarmOprName, .AlarmOprNode, .AlarmPri, .AlarmProv, .AlarmState, .AlarmTime, .AlarmType, .AlarmValue
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
471
almDefQuery() Function
Performs a query using default properties to update a named Distributed Alarm Display object.
Category
Alarms
Syntax [Result=]almDefQuery(ObjectName); Argument
ObjectName The name of the Distributed Alarm Display object. For example, AlmObj_1.
Remarks
The default query properties are specified while developing the Distributed Alarm Display object in WindowMaker.
Example almDefQuery(AlmObj_1); See Also
almQuery(), almSetQueryByName()
472
almQuery() Function
Performs a query to update a named Distributed Alarm Display object and uses the specified parameters.
Category
Alarms
Syntax [Result=]almQuery(ObjectName,AlarmList,FromPri,To Pri,State,Type); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. AlarmList Sets the Alarm Query/Name Manager alias to perform the query against, for example, "\intouch!$System" or a Message tag. FromPri Starting priority of alarms to show. For example, 100 or integer tag. ToPri Ending priority of alarms to show. For example, 900 or integer tag. State Specifies type of alarms to show. For example, "UnAck" or Message tag. Valid states are All, UnAck or Ack. Type The type of alarm records that appear in the updated display: "Hist" = Historical alarms "Summ" = Summary alarms
Example
This statement retrieves all historical alarms specified in MyAlarmListGroup with a priority of 500 to 600. The alarms appear in the AlmObj_1 alarm display.
almQuery("AlmObj_1","MyAlarmListGroup",500,600, "All","Hist");
In this example, MyAlarmListGroup is an alarm list configured from the Name Manager setup.
See Also
almDefQuery(), almSetQueryByName()
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
473
almSetQueryByName() Function
Starts a new alarm query for the named instance of the Distributed Alarm Display object using the parameters from a user-defined query favorite file.
Category
Alarms
Syntax [Result=]almSetQueryByName(ObjectName, QueryName); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. QueryName The name of the query created by using Query Favorites.
Remarks
This is a query for the particular instance of the Distributed Alarm Display object. There may be several such displays on the screen, each with its own query.
Example
This example starts a new query using parameters from the query named Turbine Queries.
almSetQueryByName(AlmObj_1,Turbine Queries); See Also
almQuery(), almDefQuery()
474
.AlarmGroup Dotfield .QueryType Dotfield .QueryState Dotfield .Successful Dotfield .PriFrom Dotfield .PriTo Dotfield
.AlarmGroup Dotfield
Contains the current query used to populate a Distributed Alarm Display object.
Category
Alarms
Usage [ErrorNumber=]GetPropertyM( "ObjectName.AlarmGroup",TagName); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. TagName Any message tag.
Remarks
This read-only dotfield contains the current alarm query used by the named Distributed Alarm Display object. This query can be a list of alarm groups or direct alarm provider references.
Data Type
String (read-only)
Example
This statement returns the current alarm query used by the AlmObj_1 Distributed Alarm Display object to the CurrentQuery tag:
GetPropertyM("AlmObj_1.AlarmGroup",CurrentQuery); See Also
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
475
.QueryType Dotfield
Shows the current type of alarm query.
Category
Alarms
Usage [ErrorNumber=]GetPropertyI( "ObjectName.QueryType",TagName); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. TagName Any integer tag
Remarks
This read-only dotfield contains the current query type used by a named Distributed Alarm Display object.
Data Type
Integer (read-only)
Valid Values
1 = Historical 2 = Summary
Example
The following statement returns the current query type of the AlmObj_1 Distributed Alarm Display object to the AlmQueryType tag:
GetPropertyI("AlmObj_1.QueryType",AlmQueryType); See Also
GetPropertyI(), .QueryState
476
.QueryState Dotfield
Shows the current alarm state query filter.
Category
Alarms
Usage [ErrorNumber=]GetPropertyI( "ObjectName.QueryState",TagName); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. TagName Any integer tag
Remarks
This read-only dotfield contains the current query filter used by a named Distributed Alarm Display object.
Data Type
Integer (read-only)
Valid Values
The following statement returns the current query filter of the AlmObj_1 Distributed Alarm Display object to the AlmQueryState tag:
GetPropertyI("AlmObj_1.QueryState", AlmQueryState); See Also
GetPropertyI(), .QueryType
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
477
.Successful Dotfield
Indicates whether the current query is successful or not.
Category
Alarms
Usage [ErrorNumber=]GetPropertyD( "ObjectName.Successful",TagName); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. TagName A discrete tag that holds the property value when the function is processed.
Remarks
This read-only dotfield contains the state of the last query used by a named Distributed Alarm Display object.
Data Type
Discrete (read-only)
Valid Values
The following statement returns the status of the last query of the AlmObj_1 Distributed Alarm Display object to the AlmFlag tag:
GetPropertyD("AlmObj_1.Successful",AlmFlag); See Also
GetPropertyD()
478
.PriFrom Dotfield
Returns the minimum value of an alarm priority range used by the current query.
Category
Alarms
Usage [ErrorNumber=]GetPropertyI("ObjectName.PriFrom", Tagname); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName Any integer tag.
Data Type
Integer (read-only)
Example
The following statement returns the minimum priority value of the query used by Distributed Alarm Display object AlmObj_1to the MinPri integer tag:
GetPropertyI("AlmObj_1.PriFrom",MinPri); See Also
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
479
.PriTo Dotfield
Contains the maximum value of the alarm priority range used by the current query.
Usage [ErrorNumber=]GetPropertyI("ObjectName.PriTo", Tagname); Parameter
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName An integer tag that holds the property value when the function is processed.
The following statement returns the maximum priority value of the query used by AlmObj_1 Distributed Alarm Display object to the MaxPri integer tag:
GetPropertyI("AlmObj_1.PriTo",MaxPri); See Also
480
.ListChanged Dotfield
Indicates whether there are any new alarms or updates for the Distributed Alarm Display object.
Category
Alarms
Usage [ErrorNumber=]GetPropertyD(ObjectName.ListChange d,TagName); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. TagName A discrete tag that holds the property value when the function is processed.
Remarks
This read-only dotfield contains the status about whether there have been any changes that need to be updated in the Distributed Alarm Display object. This property is automatically reset on reading the property.
Data Type
Discrete (read-only)
Valid Values
0 = No new alarms or updates for the display object 1 = New updates for the display object
Example
The following statement returns the status of any new alarms or updates for the AlmObj_1 Distributed Alarm Display object to the AlmDispStat tag:
GetPropertyD(AlmObj_1.ListChanged,AlmDispStat); See Also
GetPropertyD()
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
481
.PendingUpdates Dotfield
Indicates the number of pending updates to the Distributed Alarm Display object. There are pending updates usually when the display is frozen and new alarm records are created. These do not show, but the pending updates count is increased.
Category
Alarms
Usage [ErrorMessage=]GetPropertyI( ObjectName.PendingUpdates, TagName); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. TagName An integer tag that holds the property value when the function is processed.
Remarks
This read-only dotfield contains the number of pending updates for a named Distributed Alarm Display object. Any value greater than zero indicates the Distributed Alarm Display object has new alarm data. This value is reset each time the object is refreshed.
Data Type
Integer (read-only)
Example
The following statement returns an integer 1 or greater if there are any pending updates for the AlmObj_1 Distributed Alarm Display object to the AlarmPendingUpdates tag:
GetPropertyI( AlmObj_1.PendingUpdates,AlarmPendingUpdates); See Also
GetPropertyI()
482
Suppressing Alarms
The Distributed Alarm Display object can suppress one or more alarms at an alarm consumer that match exclusion criteria. If an alarm matches the exclusion criteria, it does not 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
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
483
almSuppressAll() Function
Suppresses the showing of all current and future instances of the alarms in the current query, including those not currently shown in the Distributed Alarm Display object in summary mode.
Syntax [Result=] almSuppressAll(ObjectName); Argument
This function works like almAckAll(), identifying which alarms to suppress by identifying all alarms that you would see if you looked at the display and scrolled up and down to look at them all.
Example almSuppressAll(AlmObj_1); See Also
almSuppressGroup(), almSuppressTag(), almSuppressDisplay(), almSuppressPriority(), almSuppressRetain(), almSuppressSelected(), almSuppressSelectedGroup(), almSuppressSelectedPriority(), almSuppressSelectedTag(), almUnSuppressAll()
484
almUnsuppressAll() Function
Clears all suppressed alarms.
Syntax [Result=] almUnSuppressAll(ObjectName); Argument
almSuppressAll(), almSuppressGroup(), almSuppressTag(), almSuppressDisplay(), almSuppressPriority(), almSuppressRetain(), almSuppressSelected(), almSuppressSelectedGroup(), almSuppressSelectedPriority(), almSuppressSelectedTag()
almSuppressDisplay() Function
Suppresses the showing of current and future occurrences of alarms visible in the Distributed Alarm Display object in summary mode.
Syntax [Result=]almSuppressDisplay(ObjectName); Argument
This function works like the corresponding almAckDisplay() function, identifying which alarms to suppress by identifying all alarms that are currently shown.
Example almSuppressDisplay(AlmObj_1);
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
485
almSuppressGroup() Function
Suppresses the showing of current and future occurrences of any alarm with the specified provider and group name.
Syntax [Result=]almSuppressGroup(ObjectName, ApplicationName,GroupName); Argument
ObjectName The name of the alarm object. For example, AlmObj_1. ApplicationName The name of the application. For example, \\node1\InTouch GroupName The name of the alarm group. For example, $System
Example almSuppressGroup( AlmObj_1,\InTouch,Turbines); See Also
almSuppressAll(), almSuppressTag(), almSuppressDisplay(), almSuppressPriority(), almSuppressRetain(), almSuppressSelected(), almSuppressSelectedGroup(), almSuppressSelectedPriority(), almSuppressSelectedTag(), almUnSuppressAll()
486
almSuppressPriority() Function
Suppresses the showing of current and future occurrences of any alarm of the specified priority range having the same provider name and Group name.
Syntax [Result=]almSuppressPriority(ObjectName, ApplicationName, GroupName, FromPri, ToPri); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. ApplicationName The name of the application. For example, \\node1\InTouch GroupName The name of the Group. For example, $System FromPri Starting priority of alarms. For example, 100 or Integer tag. ToPri Ending priority of alarms. For example, 900 or Integer tag.
Example almSuppressPriority(AlmObj_1,\\node1\Intouch, Turbines,10,100); See Also
almSuppressAll(), almSuppressGroup(), almSuppressTag(), almSuppressDisplay(), almSuppressRetain(), almSuppressSelected(), almSuppressSelectedGroup(), almSuppressSelectedPriority(), almSuppressSelectedTag(), almUnSuppressAll()
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
487
almSuppressTag() Function
Suppresses the showing of current and future occurrences of any alarm that belongs to the specified tagname having the same provider name, group name, and priority range.
Category
Alarms
Syntax [Result=]almSuppressTag(ObjectName, ApplicationName, GroupName, TagName, FromPri, ToPri, AlarmClass, AlarmType); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. ApplicationName The name of the application. For example, \\node1\InTouch GroupName The name of the Group. For example, $System TagName The name of the alarm tag. FromPri Starting priority of alarms. For example, 100 or Integer tag. ToPri Ending priority of alarms. For example, 900 or Integer tag. AlarmClass The class of the alarm. For example, Value. AlarmType The alarm type of the alarm. For example, HiHi.
Example almSuppressTag(AlmObj_1,\\node1\Intouch, Turbines,Valve1,10,100,Value,LoLo); See Also
almSuppressAll(), almSuppressGroup(), almSuppressDisplay(), almSuppressPriority(), almSuppressRetain(), almSuppressSelected(), almSuppressSelectedGroup(), almSuppressSelectedPriority(), almSuppressSelectedTag(), almUnSuppressAll()
488
almSuppressSelected() Function
Suppresses the showing of current and future occurrences of the alarms selected in the Distributed Alarm Display object in summary mode.
Category
Alarms
Syntax [Result=]almSuppressSelected(ObjectName); Arguments
This functions works like the almAckSelect() function, identifying the alarms by the ones selected in the display object.
Example almSuppressSelected(AlmObj_1); See Also
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
489
almSuppressSelectedGroup() Function
Suppresses the showing of current and future occurrences of the alarms that belong to the same groups of one or more selected alarms having the same provider name within the named Distributed Alarm Display object.
Category
Alarms
Syntax [Result=]almSuppressSelectedGroup(ObjectName); Arguments
This functions works like the almAckSelectedGroup() function, identifying the alarms that are selected, then identifying the groups to which they belong, and suppressing future occurrences of the alarms from those groups.
Example almSuppressSelectedGroup(AlmObj_1); See Also
490
almSuppressSelectedPriority() Function
Suppresses the showing of current and future occurrences of the alarms that belong to the same priority of one or more selected alarms having the same provider name and Group tag within the named Distributed Alarm Display object.
Category
Alarms
Syntax [Result=]almSuppressSelectedPriority(ObjectName); Arguments
The priorities are calculated from the minimum and maximum of the selected alarm records. This function works like the almAckSelectedPriority() function, identifying the alarms selected in the display, then identifying the corresponding priorities of those alarms, and suppressing future occurrences of alarms with the same priorities.
Example almSuppressSelectedPriority(AlmObj_1); See Also
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
491
almSuppressSelectedTag() Function
Suppresses the showing of current and future occurrences of any alarm that belongs to the same Tagname name of one or more selected alarms having the same provider name, group name, and priority range.
Category
Alarms
Syntax [Result=]almSuppressSelectedTag(ObjectName); Arguments
492
almSuppressRetain() Function
Suppresses all alarms raised by subsequent queries.
Category
Alarms
Syntax [Result=]almSuppressRetain(ObjectName,Suppression RetainFlag); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. SuppressionRetainFlag Any discrete or analog tag, 0, or non-zero value. TRUE if suppression information is retained for following queries, FALSE otherwise.
Remarks
If the flag is 0 when the alarm query is changed, the suppression filters are removed.
Example almSuppressRetain(AlmObj_1, 0); See Also
almSuppressAll(), almSuppressGroup(), almSuppressTag(), almSuppressDisplay(), almSuppressPriority(), almSuppressSelected(), almSuppressSelectedGroup(), almSuppressSelectedPriority(), almSuppressSelectedTag(), almUnSuppressAll()
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
493
.SuppressRetain Dotfield
Reads/writes the status of the feature that retains the suppression for the Distributed Alarm Display object.
Category
Alarms
Usage [ErrorNumber=]GetPropertyD( ObjectName.SuppressRetain,TagName); [ErrorNumber=]SetPropertyD( ObjectName.SuppressRetain,TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. Tagname A discrete tag that holds the property value when the script is processed.
Data Type
Discrete (read-write)
Valid Values
The following statement sets the status of suppression retainer for the AlmObj_1 from the SupRtn discrete tag:
SetPropertyD(AlmObj_1.SuppressRetain, SupRtn); See Also
GetPropertyD(), SetProperty()
494
almMoveWindow() Function
Scrolls the alarm list of the Distributed Alarm Display object vertically or horizontally.
Category
Alarms
Syntax [Result=]almMoveWindow(ObjectName,Option,Repeat); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. Option The type of scrolling action to perform:
Type Description
LineDn LineUp PageDn PageUp Top Bottom PageRt PageLf Right Left
One 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).
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
495
Example almMoveWindow(AlmObj_1, Bottom, 0); almMoveWindow(AlmObj_1, LineDn, 3); almMoveWindow(AlmObj_1, PageUp, 0);
.Freeze Dotfield
The .Freeze dotfield reads the freeze status or freezes/unfreezes the Distributed Alarm Display object.
Category
Alarms
Usage [ErrorNumber=]GetPropertyD(ObjectName.Freeze, TagName); [ErrorNumber=]SetPropertyD(ObjectName.Freeze, TagName); Arguments
ObjectName The name of the alarm object. For example, AlmObj_1. TagName A discrete tag that holds the property value when the function is processed.
Remarks
A read-write dotfield that contains or changes the freeze status of a Distributed Alarm Display object. When the alarm display object is frozen, the shown alarms cannot be updated nor can new alarms be added. Freeze has no effect on whether the alarms flash or not.
Data Type
Discrete (read-write)
Valid Values
The following statement sets the Freeze property for the AlmObj_1 from the AlmFreeze discrete tag.
SetPropertyD(AlmObj_1.Freeze,AlmFreeze); See Also
GetPropertyD(), SetPropertyD()
496
.PrevPage Dotfield
Scrolls the Distributed Alarm Display object one page (one screen full of alarms) up.
Category
Alarms
Usage [ErrorNumber=]SetPropertyD("ObjectName.PrevPage", 0); Arguments
When this property is set, the Distributed Alarm Display object shows the previous page. After the previous page is shown, the variable is automatically set to 1, unless the top of the list has been reached. In this case, the value remains 0.
Data Type
Discrete (read/write)
See Also
.NextPage dotfield
Scrolls the Distributed Alarm Display object one page (one screen full of alarms) down.
Category
Alarms
Usage [ErrorNumber=]SetPropertyD("ObjectName.NextPage", 0); Arguments
When this property is set, the alarm display object shows the next page.
Data Type
Discrete (read/write)
See Also
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
497
almShowStats() Function .PageNum Dotfield .TotalPages Dotfield .NumAlarms Dotfield .ProvidersReq Dotfield .ProvidersRet Dotfield
almShowStats() Function
Shows the Alarm Statistics dialog box of the specified Distributed Alarm Display object.
Category
Alarms
Syntax [Result=]almShowStats(ObjectName); Argument
498
.PageNum Dotfield
Contains the current page number shown in the alarm object.
Category
Alarms
Syntax [ErrorNumber=]GetPropertyI("ObjectName.PageNum", TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName An integer tag that holds the number of the page currently shown from the Distributed Alarm Display object.
Remarks
This read-only dotfield returns the number of the currently shown page in a named Distributed Alarm Display object.
Data Type
Integer (read-only)
Example
The following statement returns the number of the page currently shown from the AlmObj_1 Distributed Alarm Display object to the AlarmPage integer tag:
GetPropertyI("AlmObj_1.PageNum",AlarmPage); See Also
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
499
.TotalPages Dotfield
Contains the total number of pages in the Distributed Alarm Display object.
Category
Alarms
Syntax [ErrorNum=]GetPropertyI("ObjectName.TotalPages", TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName An integer tag that retrieves the total number of alarm pages contained in the named Distributed Alarm Display object.
Remarks
This dotfield returns the total number of alarm pages contained in a named Distributed Alarm Display object. One page equals to all alarms shown in the object on the screen at any given time.
Data Type
Integer (read-only)
Example
The following statement returns the total number of pages contained in the AlmObj_1 Distributed Alarm Display object to the AlmTotalPages integer tag:
GetPropertyI( "AlmObj_1.TotalPages",AlmTotalPages); See Also
500
.NumAlarms Dotfield
Contains the number of alarms within a Distributed Alarm Display object.
Category
Alarms
Syntax [ErrorNum=]GetPropertyI("ObjectName.NumAlarms, Tagname); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName An integer tag that holds the current number of alarms registered in a named Distributed Alarm Display object. This includes not only those alarms shown, but all alarms registered.
Remarks
This read-only dotfield returns the total number of alarms within a Distributed Alarm Display object.
Data Type
Integer (read-only)
Example
The following statement returns the current number of alarms used by the AlmObj_1 Distributed Alarm Display object to the AlarmCount integer tag:
GetPropertyI("AlmObj_1.NumAlarms",AlarmCount); See Also
GetPropertyI()
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
501
.ProvidersReq Dotfield
Contains the number of alarm providers required by the current query used by a named Distributed Alarm Display object.
Category
Alarms
Syntax [ErrorNumber=]GetPropertyI( "ObjectName.ProvidersReq,TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName An integer tag that holds the current number of alarm providers registered in a named Distributed Alarm Display object. This includes not only those alarms shown, but all alarms registered.
Data Type
Integer (read-only)
Example
The following statement returns the number of alarm providers required by the current query used by Distributed Alarm Display object "AlmObj_1". This value is written to the TotalProv integer tag:
GetPropertyI("AlmObj_1.ProvidersReq",TotalProv); See Also
GetPropertyI(), .ProvidersRet
502
.ProvidersRet Dotfield
Contains the number of alarm providers returned by the current query used by a named Distributed Alarm Display object.
Category
Alarms
Usage [ErrorNumber=]GetPropertyI ("ObjectName.ProvidersRet",TagName); Parameters
ObjectName Name of the Distributed Alarm Display object. For example, AlmObj_1. TagName An integer tag that holds the number of alarm providers that have successfully returned their alarms to the named Distributed Alarm Display object.
Remarks
This read-only dotfield contains the number of alarm providers returned by the current query used by a named Distributed Alarm Display object.
Data Type
Integer (read-only)
Example
The following statement returns the number of alarm providers that have successfully returned their alarms to the AlmObj_1 Distributed Alarm Display object . This value is written to the RetProv integer tag:
GetPropertyI("AlmObj_1.ProvidersRet",RetProv); See Also
GetPropertyI(), .ProvidersReq
Controlling the Distributed Alarm Display Object Using Functions and Dotfields
503
Error Descriptions
The following table describes the error numbers. If a number is returned that is not in this table, the error is an unknown error.
Error Number
Description
0 -1 -2 -3 -4 -5 -6
Success General failure Insufficient memory available Property is read-only Specified item already present Object name unknown Property name unknown
504
505
Appendix B
Migrating from Legacy Alarm Systems
You can migrate your applications built using the Standard Alarm System or AlarmSuite.
Migrating from the Standard Alarm System to the Distributed Alarm System
When you migrate a Standard Alarm system to the Distributed Alarm system, all of the Standard Alarm Displays in the master/slave application are migrated to Distributed Alarm Display objects. Colors, fonts, the expressions, and the alarm query settings are not migrated. The new Distributed Alarm Display object has the following default query, where node name is the name of the master node: \\nodename\intouch!$system The acknowledgement and alarm status dotfields continue to work as before. Depending if the I/O tag was configured for NetDDE or SuiteLink, you may need to enable NetDDE. However, you may decide you no longer need separate controls for issuing acknowledgements, as the alarms can now be acknowledged using the Distributed Alarm Display object.
506
On the Windows Start menu, point to Programs, point to Wonderware, point to InTouch, and then click AlarmSuite History Migration. The AlarmSuite History Migration Utility dialog box appears.
In the Source (AlarmSuite) Database area, configure the connection to the AlarmSuite database. Do the following:
a b c d
In the DSN list, click the data source name for the AlarmSuite database. In the User Name box, type your user name for the data source name. In the Password box, type your user password for the data source name. In the Purge Source Database area, click Yes to purge the source database at the end of data migration. Table creation is part of the transaction, but creation of the database is not. If you select Yes, the transaction with purging is committed after migrating the data from the source database. Click No to not purge the source database after data migration is finished.
507
In the Target Database area, configure the connection to the Distributed Alarm system database. Do the following:
a
In the Server list, click the name of the database server to use. The read-only Database Name box shows the database name. The default is WWALMDB. In the User Name box, type a SQL Server user name. In the Password box, type the password associated with the SQL Server user account. Select the Recreate Tables check box to recreate the tables in the target database. If you recreate the tables, the existing information is deleted. If you do not select this option, the data is appended to existing tables. In the Logging Mode area, click either Detailed to restore the detailed tables only or Consolidated to restores the consolidated tables only.
b c d
4 5 6
Click Test Connection to test your connection to the source and target databases. Click Start to begin migrating the data from the source database to the target database. Click Stop to abort the migration process that is in progress. This rolls back the transaction. (Clicking Close is equivalent to clicking Stop.)
Note Table creation is part of the transaction, but creating the database is not. If you have set the Purge Source Database option to Yes, the transaction with purging is committed after migrating the data from the source database. 7
508
509
Index
Symbols
$NewAlarm system tag 138 $System system tag 138
A
About box Alarm DB View control 352 Alarm Pareto control 377 Alarm Viewer control 104 AboutBox() method 104, 225, 352, 377 .Ack dotfield 116 Ack() function 123 AckAll() method 89 AckAlmBackColor property 316 AckAlmBackColorRange1 property 317 AckAlmBackColorRange2 property 317 AckAlmBackColorRange3 property 318 AckAlmBackColorRange4 property 318 AckAlmForeColor property 319 AckAlmForeColorRange1 property 319 AckAlmForeColorRange2 property 320 AckAlmForeColorRange3 property 320 AckAlmForeColorRange4 property 321 .AckDev dotfield 121 .AckDsc dotfield 120 AckGroup() method 92
acknowledgement alarms 20 automatic 124 acknowledgement comments 126 acknowledgement models alarm 112 checking at run time 115 condition 112 acknowledging alarms 111 Alarm Viewer control 88 alarms or alarm groups 116 automatic acknowledgement 124 deviation alarms 121 discrete alarms 120 Distributed Alarm Display object 440 from WindowViewer 124 rate-of-change alarms 122 redundancy synchronization 412 script functions 123 using dotfields 116 value alarms 118 AckPriority() method 92 .AckROC dotfield 122 AckRtnBackColor property 321 AckRtnForeColor property 322 AckSelected() method 89
510
Index
AckSelectedGroup() method 90 AckSelectedPriority() method 91 AckSelectedTag() method 91 AckTag() method 93 .AckValue dotfield 118 AckVisible() method 90 ActiveX controls, configuring colors for 87 ActiveX events Alarm DB View control 354 Alarm Pareto control 378 Alarm Tree Viewer control 234 ActiveX methods Alarm DB View control 347 Alarm Pareto control 373 Alarm Tree Viewer control 225 Alarm Viewer control 88 ActiveX properties Alarm DB View control 316 Alarm Pareto control 370 Alarm Tree Viewer control 223 Alarm Viewer control 80 alarm and events, global settings 46 alarm buffer size, configuring 47 alarm comments 126 changing for a tag 186 Distributed Alarm Display object 425 alarm conditions alarm groups 137 tags 137 alarm consumer 28 alarm database Alarm DB Logger 275, 280 archiving purged data 382 data to purge 381 database connection 380, 390 files to restore 391 log file settings 384 maintaining 379 manually archiving the database 386 purge or archive settings 380 restoring 389, 393 scheduling automatic purges 388 stored procedures 288 alarm database views, Alarm DB Logger 280
Alarm DB Logger about 273 alarm database views 280 Alarm Event History view 286 Alarm History view 281, 283 alarm logging 275, 280 alarm stored procedures 288 AlarmCounter stored procedure 289 alarms to log 276 AlarmSuite Alarm Log view 287 database connection 275 Event History view 283, 284 EventCounter stored procedure 290 logging interval 278 SQL Server accounts 274 stored procedure 288 using 274 Windows service 279 Alarm DB View control accessing filter favorites 352 ActiveX events 354 ActiveX methods 347 ActiveX properties 316 alarm or event data 296 colors 312 columns 297 configuring 292 database connections 293, 347 error handling 353 filter criteria 308 filter favorites 306 font 295 grid 294 grouping columns 310 query filters 310 retrieving alarm information 350 retrieving records 348 run-time features 300 showing the About box 352 showing the context menu 352 sort order 314 sorting records 315, 351 status bar 316 time format 301 time period 303
Index
511
time zone 301, 305 using at run time 315 values for the state column 311 viewing recorded alarms 291 alarm deadbands, changing 184 .Alarm dotfield 139 Alarm Event History view 286 alarm group list file, creating 50 alarm groups alarm conditions 137 creating 34 deleting 37 modifying 36 alarm groups, inhibitor tag 190 alarm hierarchies Alarm Tree Viewer control 211 defining 33 Alarm History view 281, 283 alarm instance, user-defined information 187 alarm limits changing 176 tag 151 alarm or event data, Alarm DB View control 296 Alarm Pareto control about 355 ActiveX events 378 ActiveX methods 373 ActiveX properties 370 alarms to analyze 362 appearance and colors 357 configuring 355 copying or moving query filters 367 database connection 356, 373 error handling 377 filter criteria 366 filter favorites 364 font 360 grouping columns 367 presentation of the analysis results 368 retrieving information about specific pareto bars 374 retrieving records 374 run-time features 360 selecting alarm or event data 362 showing the About box 377 status bar 369
time period 363 using at run time 369 alarm printer instance starting 249 stopping 249 alarm printer query starting 249 stopping 249 alarm printer, starting 248 alarm printing and logging 236 alarm properties, controlling at run time 127 alarm provider 27 alarm queries 53 alarm query information, printing alarms 252, 267 alarm statistics and counts, Distributed Alarm Display object 497 alarm tag, inhibitor tag 190 Alarm Tree Viewer control ActiveX events 234 ActiveX methods 225 ActiveX properties 223 appearance and colors 212 configuring 212 creating a query string 232 error handling 234 fonts 215 freezing the tree 232 providers and groups 217 query favorites 219, 222 refresh 215 retrieving information 225, 226 running queries 233 run-time features 216 sort order 220 status bar 222 using at run time 221 viewing alarm hierarchies 211 Alarm Viewer control acknowledging alarms 88 ActiveX events 108 ActiveX methods 88 ActiveX properties 80 alarms to show 68 colors 71, 87 columns 62 configuring 58
512
Index
error handling 108 font 62 grid 58 moving and freezing the display 102 query favorites 70, 78 retrieving information about an alarm 99 running a script when a new alarm is detected 109 running queries 99 run-time features 66 selecting specific alarms 105 showing statistics 104 showing the About box 104 showing the context menu 108 sort order 75 sorting alarm records 103 status bar 77 suppressing alarms 94 time format 73 using at run time 76 viewing current alarms 57 .AlarmAccess dotfield 466 .AlarmAckModel dotfield 115 .AlarmClass dotfield 460 .AlarmComment dotfield 186, 470 AlarmCounter stored procedure 289 .AlarmDate dotfield 457 .AlarmDev dotfield 142 .AlarmDevCount dotfield 206 .AlarmDevDeadband 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 465 AlarmHiDisabled dotfield 165 AlarmHiEnabled 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 209 alarms about 17, 18 acknowledgement 20, 116 acknowledgement models 112 analog alarms 23 analyzing 362 audit trail 415 configuring 33 consumers 27 counting 199 deviation alarms 23 disabling 44 discrete alarms 22 enabling or disabling 158 groups 20 inhibiting 44 logging 276 maintaining the database 379 printing 238 priorities 19 providers 27 rate of change alarms 24 redundancy 395
Index
513
redundancy synchronization 412 showing 423 sub-states 19 types 22 value alarms 23 .AlarmState dotfield 462 AlarmSuite Alarm Log view 287 AlarmSuite database, migration 506 .AlarmTime dotfield 456 .AlarmTotalCount dotfield 200 .AlarmType dotfield 461 .AlarmUnAckCount dotfield 201 .AlarmUserDefNumX dotfields 187 .AlarmUserDefStr dotfield 188 .AlarmValDeadband dotfield 184 .AlarmValue dotfield 459 .AlarmValueCount dotfield 202 .AlarmValueUnAckCount dotfield 203 almAckAll() function 441 almAckDisplay() function 442 almAckGroup() function 443 almAckPriority() function 444 almAckRecent() function 444 almAckSelect() function 446 almAckSelectedGroup() function 447 almAckSelectedPriority() function 448 almAckSelectedTag() function 449 almAckTag() function 445 almDefQuery() function 471 almMoveWindow() function 494 almQuery() function 472 AlmRtnBackColor property 322 AlmRtnForeColor property 322 almSelectAll() function 450 almSelectGroup() function 452 almSelectionCount() function 451 almSelectItem() function 452 almSelectPriority() function 453 almSelectTag() function 454 almSetQueryByName() function 473 almShowStats() function 497 almSuppressAll() function 483 almSuppressDisplay() function 484 almSuppressGroup() function 485 almSuppressPriority() function 486 almSuppressRetain() function 492
almSuppressSelected() function 488 almSuppressSelectedGroup() function 489 almSuppressSelectedPriority() function 490 almSuppressSelectedTag() function 491 almSuppressTag() function 487 almUnselectAll() function 451 almUnsuppressAll() function 484 analog alarms 23 analysis results, Alarm Pareto control 368 ApplyDefaultQuery() method 101 ApplyQuery() method 100 APUFindAlarmGroupInstance() function 260 APUFindFileInstance() function 261 APUFindPrinterInstance() function 262 APUGetAlarmGroupText() function 253 APUGetConfigurationFilePath() function 256 APUGetInstanceCount() function 263 APUGetPrinterJobCount() function 257 APUGetPrinterName() function 265 APUGetPrinterStatus() function 266 APUGetQueryAlarmState() function 258 APUGetQueryFromPriority() function 254 APUGetQueryProcessingState() function 259 APUGetQueryToPriority() function 255 APUIsInstanceUsed() function 264 APUSetAlarmGroupText() function 267 APUSetQueryAlarmState() function 268 APUSetQueryFromPriority() function 269 APUSetQueryToPriority() function 270 APUSetTimeoutValues() function 271 APUStartInstance() function 249 APUStartQuery() function 250 APUStopInstance() function 251 APUStopQuery() function 252 APUTranslateErrorCode() function 272 archiving, alarm database 386 audit trail, alarms 415 AutoConnect property 323
514
Index
B
buffer size 47
C
CheckElementMembership() method 226 ColorPriorityRange1 property 323 ColorPriorityRange2 property 324 ColorPriorityRange3 property 324 colors ActiveX controls 87 Alarm DB View control 312 Alarm Pareto control 357 Alarm Tree Viewer control 212 Alarm Viewer control 71 Distributed Alarm Display object 431, 435 ColumnResize property 324 columns Alarm DB View control 297, 310, 311 Alarm Pareto control 367 Alarm Viewer control 62 Distributed Alarm Display object 428, 434 condition, acknowledgement alarm model 112 configuration files, printing alarms 245 Connect() method 347, 373 ConnectStatus property 325 consumers, alarms 27 context menu Alarm DB View control 352 Alarm Viewer control 108 counting, active or unacknowledged alarms 199 current alarms, Alarm Viewer control 57 CustomMessage property 325
D
data storage, distributed alarm system 32 database connections alarm database 380, 390 Alarm DB Logger 275 Alarm DB View control 293, 347 Alarm Pareto control 356, 373 DatabaseName property 325
deviation alarms acknowledging alarms 121 alarms 23 configuring 41 .DevTarget dotfield 182 disablement 30 disabling alarms 158 discrete alarms 168 high alarms 164 HiHi alarms 166 LoLo alarms 160 low alarms 162 major deviation alarms 172 minor deviation alarms 170 rate-of-change alarms 174 Disconnect() method 347 discrete alarms acknowledging alarms 120 alarms 22 configuring 37 enabling or disabling 168 display type, Distributed Alarm Display object 432 DisplayedTimeZone property 326 DisplayMode property 326 Distributed Alarm Display object about 417 acknowledging alarms 440 alarm comment 425 alarm statistics and counts 497 alarms to show 423 checking the current query properties 474 colors 431, 435 columns 428 configuring 419 controlling with scripts 440 creating 419 display columns 434 display type 432 errors 503 font 428 getting or setting properties 440 grid appearance 420 guidelines for use 418
Index
515
monitoring local alarms 433 multiple selection 434 query favorites 437 retrieving alarm record 455 run time features 422 scrolling 494 selecting alarms 450 shortcut menu 436 sort order 428 status bar 435 suppressing alarms 482 time format 426 using at run time 434 distributed alarm group lists 29 distributed alarm system about 25 data storage 32 documentation conventions 15 dotfields, using to acknowledge alarms 116 Duration property 327
events about 17, 21 enabling 48 expanded summary alarms model 112 using 113
F
filter criteria Alarm DB View control 308 Alarm Pareto control 366 filter favorites Alarm DB View control 306, 352 Alarm Pareto control 364 FilterFavoritesFile property 329 FilterMenu property 329 FilterName property 330 font Alarm DB View control 295 Alarm Viewer control 62 fonts Alarm Pareto control 360 Alarm Tree Viewer control 215 Distributed Alarm Display object 428 format, printing alarms 239 .Freeze dotfield 495 Freeze() method 232 FreezeDisplay() method 103 freezing Alarm Tree Viewer control 232 Alarm Viewer control 102 FromPriority property 330
E
enabling alarms 158 discrete alarms 168 events 48 high alarms 164 HiHi alarms 166 LoLo alarms 160 low alarms 162 major deviation alarms 172 minor deviation alarms 170 rate-of-change alarms 174 End Time property 328 errors Alarm DB View control 353 Alarm Pareto control 377 Alarm Tree Viewer control 234 Distributed Alarm Display object 503 printing alarms 272 Event History view 283, 284 event properties, for individual tags 46 EventBackColor property 328 event-based alarm model 114 EventCounter stored procedure 290 EventForeColor property 329
G
GetAlarmQueryFromSelection() method 232 GetElementCount() method 225, 227 GetElementName() method 227 GetElementPath() method 227 GetItem() method 99, 350 GetItemAlarmName() method 375 GetItemAlarmType() method 375 GetItemCount() method 375 GetItemEventType() method 376 GetItemProviderName() method 376 GetItemTotalTime() method 376 GetLastError() method 353
516
Index
GetNext() method 349 GetPrevious() method 348 GetSelectedElementCount() method 228 GetSelectedElementName() method 228 GetSelectedElementPath() method 228 GetSelectedItem() method 350 GetSubElementCount() method 229 GetSubElementName() method 230 GetSubElementPath() method 231 getting or setting properties, Distributed Alarm Display object 440 grid Alarm DB View control 294 Alarm Viewer control 58 Distributed Alarm Display object 420 GroupExactMatch property 331 GroupName property 331 groups, alarms 20
log files, printing alarms 243 logging alarms file settings 384 printing alarms 247 logging information, printing alarms 265 logging interval, alarm database 278 logging, making retentive 49 .LoLimit dotfield 177 LoLo alarms, enabling or disabling 160 .LoLoLimit dotfield 176 .LoLoSet dotfield 151 .LoLoStatus dotfield 145 .LoSet dotfield 152 .LoStatus dotfield 144 low alarms, enabling or disabling 162
M
maintaining, alarm database 379 major deviation alarms, enabling or disabling 172 .MajorDevPct dotfield 181 .MajorDevSet dotfield 156 .MajorDevStatus dotfield 149 mapping file, redundancy 402, 406 MaxRecords property 332 migration AlarmSuite database 506 legacy alarm systems 505 standard alarm system 505 minor deviation alarms, enabling or disabling 170 .MinorDevPct dotfield 180 .MinorDevSet dotfield 155 .MinorDevStatus dotfield 148 monitoring local alarms, Distributed Alarm Display object 433 MoveWindow() method 102
H
high alarms, enabling or disabling 164 HiHi alarms, enabling or disabling 166 .HiHiLimit dotfield 179 .HiHiSet dotfield 154 .HiHiStatus dotfield 147 .HiLimit dotfield 178 .HiSet dotfield 153 .HiStatus dotfield 146 historical alarms 30 hot backup pair example, redundancy 408 hot backup pair, redundancy 397, 398 hot backups, redundancy 396
I
inhibition, alarms 44 inhibitor tag for an alarm group 190 for an alarm tag 190 instance information, printing alarms 260
N
.NextPage dotfield 496 .Normal dotfield 140 .NumAlarms dotfield 500
K
key fields, redundancy 400
P
.PageNum dotfield 498 Password property 332 .PendingUpdates dotfield 481 .PrevPage dotfield 496
L
legacy alarm systems, migration 505 .ListChanged dotfield 480
Index
517
.PriFrom dotfield 478 PrimarySort property 332 printer settings, printing alarms 236 printing alarms alarm printing and logging 236 alarm query information 252, 267 alarms to print 238 controlling using scripting 248 errors 272 format of print and file output 239 instance information 260 logging alarms to a file 243, 247 logging information 265 printer settings 236 printing alarms 235, 246 saving and loading configuration files 245 starting the alarm printer 248 starting the alarm printer instance 249 starting the alarm printer query 249 stopping the alarm printer instance 249 stopping the alarm printer query 249 priorities, alarms 19 .PriTo dotfield 479 ProviderExactMatch property 333 ProviderName property 333 providers Alarm Tree Viewer control 217 alarms 27 .ProvidersReq dotfield 501 .ProvidersRet dotfield 502 purge or archive settings, configuring for alarm database 380 purged data, archiving 382 purging alarm database 381 scheduling automatic 388
query properties, checking for the Distributed Alarm Display object 474 query string, Alarm Tree Viewer control 232 .QueryState dotfield 476 QueryTimeZoneName property 334 .QueryType dotfield 475
R
rate-of-change alarms about 24 acknowledging 122 configuring 43 enabling or disabling 174 recorded alarms, Alarm DB View control 291 redundancy about 395 acknowledgement synchronization 412 alarm synchronization 412 alarms 395 configuring a hot backup pair 397 creating a hot backup pair 398 creating a mapping file 402 hot backup pair example 408 importing a mapping file 406 notes 414 setting alarm key fields 400 troubleshooting map file imports 407 understanding hot backups 396 Refresh() method 349, 374 refresh, Alarm Tree Viewer control 215 RefreshMenu property 334 Requery() method 100 Reset() method 351 ResetMenu property 334 restoring alarm database 389, 393 alarm database files 391 retentive alarm logging 49 retrieving information Alarm DB View control 350 Alarm Pareto control 374 Alarm Tree Viewer control 225 Alarm Viewer control 99
Q
query favorites Alarm Tree Viewer control 219, 222 Alarm Viewer control 70, 78 Distributed Alarm Display object 437 query filters Alarm DB View control 310 Alarm Pareto control 367
518
Index
retrieving records Alarm DB View control 348 Alarm Pareto control 374 Distributed Alarm Display object 455 .ROCPct dotfield 183 .ROCSet dotfield 157 .ROCStatus dotfield 150 RowCount property 335 RowSelection property 335 run time Alarm DB View control 315 Alarm Pareto control 369 alarm properties 127 Alarm Tree Viewer control 221 Alarm Viewer control 76 checking acknowledgement model 115 Distributed Alarm Display object 434 run time features Alarm DB View control 300 Alarm Pareto control 360 Alarm Tree Viewer control 216 Alarm Viewer control 66 Distributed Alarm Display object 422 running queries Alarm Tree Viewer control 233 Alarm Viewer control 99
S
scripting acknowledging alarms 123 Alarm Viewer control 109 Distributed Alarm Display object 440 printing alarms 248 scrolling, Distributed Alarm Display object 494 Secondary Sort property 335 SelectAll() method 107 SelectGroup() method 105 SelectItem() method 107 SelectPriority() method 106 SelectQuery() method 348, 374 SelectTag() method 106 ServerName property 336 SetQueryByName() method 101, 233 SetQueryByString() method 233 SetSort() method 104 shortcut menu, Distributed Alarm Display object 436
ShowContext() method 108, 352 ShowFetch property 336 ShowFilter() method 352 ShowGrid property 336 ShowHeading property 337 ShowMessage property 337 ShowQueryFavorites() method 99 ShowSort() method 103, 351 ShowStatistics() method 104 ShowStatusBar property 337 ShowSuppression() method 94 SilentMode property 338 sort order Alarm DB View control 314 Alarm Tree Viewer control 220 configuring for Alarm Viewer control 75 Distributed Alarm Display object 428 sorting records Alarm DB View control 315, 351 Alarm Viewer control 103 SortMenu property 338 SortOnCol() method 351 SortOrder property 339 SpecificTime property 339 SQL Server accounts, Alarm DB Logger 274 standard alarm system 505 StartTime property 340 statistics, Alarm Viewer control 104 status bar Alarm DB View control 316 Alarm Pareto control 369 Alarm Tree Viewer control 222 Alarm Viewer control 77 Distributed Alarm Display object 435 stored procedure, EventCounter stored procedure 290 stored procedures 288 alarm database 288 AlarmCounter stored procedure 289 EventCounter stored procedure 290 sub-states, alarms 19 .Successful dotfield 477 summary alarm model, expanded 112 summary alarms 30 SuppressAll() method 95 SuppressGroup() method 96
Index
519
suppressing alarms 30 Alarm Viewer control 94 Distributed Alarm Display object 482 suppression, alarms 30 SuppressPriority() method 97 .SuppressRetain dotfield 493 SuppressSelected() method 94 SuppressSelectedGroup() method 95 SuppressSelectedPriority() method 96 SuppressSelectedTag() method 95 SuppressTag() method 98 SuppressVisible() method 95
T
tags alarm conditions 37, 137 alarm limits 151 changing alarm comments 186 event properties 46 technical support, contacting 16 Terminal Services 31 Terminal Services, alarm support 31 time format Alarm DB View control 301 Alarm Viewer control 73 Distributed Alarm Display object 426 time period Alarm DB View control 303 Alarm Pareto control 363 Time property 340 time zones, Alarm DB View control 301, 305 ToPriority property 340 .TotalPages dotfield 499 TotalRowCount property 341 troubleshooting, map file imports 407
UnAckAlmBackColorRange1 property 342 UnAckAlmBackColorRange2 property 342 UnAckAlmBackColorRange3 property 343 UnAckAlmBackColorRange4 property 343 UnAckAlmForeColor property 344 UnAckAlmForeColorRange1 property 344 UnAckAlmForeColorRange2 property 345 UnAckAlmForeColorRange3 property 345 UnAckAlmForeColorRange4 property 346 UnAckOrAlarmDuration property 346 UnSelectAll() method 107 UnSuppressAll() method 96 updates, checking for Distributed Alarm Display object 480 user-defined information, alarm instance 187 UserID property 346
V
value alarms acknowledging alarms 118 alarms 23 configuring 39 views Alarm Event History view 286 Alarm History view 281, 283 AlarmSuite Alarm Log view 287 Event History view 283, 284
W
Windows service 279 WindowViewer, acknowledging alarms 124
U
.UnAck dotfield 117 UnAckAlmBackColor property 341
520
Index