.AlarmUserDefStr dotfield
- Last UpdatedJun 19, 2024
- 2 minute read
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
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
NULL and any valid string
Examples
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