StringChangeOfValueAlarmExt provides the ability to alarm upon inclusion or exclusion of a particular string value, or more accurately, “regular expression” (regexp) of a point’s Out slot (string type).
By default, matching is case sensitive, but this is configurable using the “Case Sensitive” property in the extension’s “Offnormal
Algorithm” and “Fault Algorithm” container slots.
By default, other configuration property values under Offnormal Algorithm and Fault Algorithm are:
Expression — a value of: .*
This is the regexp value for “any text”.
Normal On Match — true
Thus, by default status remains ok until an edit is made to one or both properties above.
This alarm extension is available in the “Extensions” folder of the AX-3.6 and later alarm palette.
See the following sections for more StringChangeOfValueAlarmExt related details:
Also see these sections for general alarm extension information:
Example 6. Example
(Simple string) A hospital emergency room desires an alarm created whenever the moon enters a “full moon” phase. A StringWritable is created and given a StringChangeOfValueAlarmExt. In this extension:
In the Offnormal Algorithm’s “Expression” property, the following string is entered: Full Moon
The Offnormal Algorithm’s “Normal On Match” is set to false, and Case Sensitive is left at true.
In the station’s WeatherService, a WeatherProvider has a MoonPosition component, which serves as the link source. A link is made from the MoonPosition’s “Phase” property to the “In16 slot” of the StringWritable. On all phases of the moon but one, the StringWritable has a normal status. When MoonPosition’s phase changes to “Full Moon”, the StringWritable has an alarm status, and remains so until the next moon phase (“Waning Gibbous”).
Note that in this example, if the Expression string entry was simply: Moon, that alarms would occur during both phases that include the string “Moon”, namely “Full Moon” and “New Moon”.
The “Expression” property in both the Offnormal Algorithm and Fault Algorithm containers of a StringChangeOfValueExt can process a simple string value, as in the previous Example 6. The Expression property also processes a value using “regular expression” (regexp) syntax. This provides even more flexibility, such as with use of “or” operators, among others.
Regexp syntax is beyond the scope of this document, but a few regexp examples are listed below:
Contains the word “alarm”:
(.*)(alarm)(.*)
Contains the word “offnormal” or “fault”:
(.*)(offnormal)│(fault)(.*)
Eight “1” or “0” characters, with the fourth and eighth characters being 1:
(1│0){3}(1)(1│0){3}(1)
Empty text:
^$
Any text:
.*
This is the default Expression property value, that is in an extension copied from the alarm palette.
Copyright © 2000-2014 Tridium Inc. All rights reserved.