GetAlarmObject

(Alarm Manager module)

Description: Returns an alarm object value given an alarm name.
Returns: Object reference.
Usage: Script Only.
Function Groups: Alarm
Related to:  
Format: \AlarmManager\GetAlarmObject(AlarmName[, ptrRoot])
Parameters:  
AlarmName
Required text.

Unique name for the alarm. Typically the unique ID.
If there are multiple built-in alarms in a tag, the convention is to concatenate the UniqueID with a separator and a unique integer per alarm. For example, Concat(Root\UniqueID, \AlarmSeparatorString, 0).

ptrRoot
Optional pointer. If valid, and if the alarm is a tag or a submodule of a tag, that tag's object value will be returned in this parameter.
Comments:

This function can also provide the alarm's Root tag value, returned through the optional second parameter.

Example:

 { Given an array of alarm records, get the tag object from the alarm name whenever the array index, SelRecord, changes.  }
If Watch(1, Records[SelRecord]\GUID);
[
  \AlarmManager\GetAlarmObject(Records[SelRecord]\Name, &Root);
  ShortName = \AlarmManager\GetNameOfRecord(Records[SelRecord]);
]