Use the OPC Data Bar to Access Alarm Count Information
You can use an item's Status display to ascertain the number of alarms that have been raised on that item since it's current Alarm Count started (see Alarm Count in the ClearSCADA Guide to ViewX and WebX Clients). The Alarm Count status attribute shows the number of alarms raised for a particular database item, regardless of alarm condition. An alarm condition identifies the particular abnormal occurrence that triggered an alarm. For example, an alarm on an analog point might be triggered by a change in point state, or by the fact that no change has been detected in point value over a defined period. Each type of alarm is identified by a different alarm condition to identify its cause (in this particular case, 'Point State', or 'No Change').
If your User Account permissions allow, you can use the OPC Data Bar to determine the number of alarms raised for a particular alarm condition on a database item. To do this:
- Display the OPC Data Bar (see Display an Explorer Bar in ViewX in the ClearSCADA Guide to ViewX and WebX Clients).
- Expand the relevant Root Group branch.
- Expand the hierarchy to locate the required database item.
- If the database item supports several alarm conditions, expand the branch for the relevant alarm condition.
(Be aware that some alarm conditions might be located on aggregates.) - Scroll down the list of OPC tags to locate the required tags. Right-click on each tag and select the Display Value option to view information about the tag.
The following tags are associated with the current Alarm Count for a particular alarm condition:
- RaiseCount—The number of alarms raised for the particular alarm condition since the Alarm Count started.
- RaiseCountTime—The date and time that the current Alarm Count started for this particular alarm condition. (You can use the ResetAlarmRaiseCount method to reset the alarm count.)
If the ResetAlarmRaiseCount method has been used to reset the alarm count, additional OPC tags might be available:
- PrevRaiseCount—The number of alarms raised for the alarm condition prior to the last time that the Alarm Count was reset.
- PrevRaiseCountTime—The date and time that from which the previous Alarm Count ran (up until the count ended when the ResetAlarmRaiseCount method was last executed).
The PrevRaiseCount... tags are only included in the OPC Data Bar for a particular alarm condition if an alarm associated with that alarm condition existed before the ResetAlarmRaiseCount method was used to reset the alarm count.
For each alarm condition, you might choose to compare the value of the PrevRaiseCountTime with that of the RaiseCountTIme to determine the period for which the previous Alarm Count ran.
As with other OPC tags, you can use the tags in Mimics, expressions, Logic programs, and so on.
Further Information
Working with the OPC Data Bar in the ClearSCADA Guide to Core Configuration.
For more information about the OPC tags that are available from the OPC Data Bar's Root Group branch, see the database Schema.
Using the Schema: see Working with the Database Schema in the ClearSCADA Guide to Database.
The OPC tags that are associated with an item's alarm conditions exist in the CAlarmObject class in the Schema.
For information about the Alarm Conditions that a type of database item can support, see the Alarm Conditions section of the class for that particular database item in the Schema.