TagsDBGetAlarm
- Last UpdatedOct 29, 2026
- 2 minute read
TagsDBGetAlarm is a built-in function that gets the current value of a property of an alarm condition during run time.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
TagsDBGetAlarm |
Tags Database |
Synchronous |
Yes |
Supported (see Notes below) |
Not supported |
Not supported |
Not supported |
Not supported |
Syntax
TagsDBGetAlarm(strTagName,numAlarmType,numProperty)
TagsDBGetAlarm ( strTagName , { numAlarmType | -1 | 1 | 2 | 4 | 8 | 16 | 32 | 64 } , { numProperty | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 } )
strTagName
The name of the project tag on which the alarm property is set.
Tip: To get other properties on project tags, use the function TagsDBGetTagProperty.
numAlarmType
The type of alarm on the specified project tag, identified by one of the following values:
|
Value |
Alarm Type |
|---|---|
|
-1 |
General properties that apply to all alarm types on the specified project tag |
|
1 |
HiHi |
|
2 |
Hi |
|
4 |
Lo |
|
8 |
LoLo |
|
16 |
Rate |
|
32 |
DeviationP |
|
64 |
DeviationM |
numProperty
The alarm property that you want to get.
When getting a property of a specific alarm type (that is, if numAlarmType is greater than 0), the property is identified by one of the following values:
|
Value |
Property |
Data Type |
|---|---|---|
|
0 |
Limit value |
Real |
|
1 |
Message |
String |
|
2 |
Alarm group (or worksheet) number |
Integer |
|
3 |
Priority |
Integer |
|
4 |
Selection |
String |
|
5 |
Custom field 1 |
String |
|
6 |
Custom field 2 |
String |
|
7 |
Custom field 3 |
String |
|
8 |
Custom field 4 |
String |
|
9 |
Custom field 5 |
String |
|
10 |
Custom field 6 |
String |
|
11 |
Custom field 7 |
String |
|
12 |
Custom field 8 |
String |
|
13 |
Custom field 9 |
String |
|
14 |
Custom field 10 |
String |
When getting a property that applies to all alarm types on the specified project tag (that is, if numAlarmType is -1), the property is identified by one of the following values:
|
Value |
Property |
Data Type |
|---|---|---|
|
0 |
Alarms Enabled |
Boolean |
|
1 |
Remote Ack tag |
String (tag name) |
|
2 |
Translation Enabled |
Boolean |
|
3 |
Dead Band Value |
Real |
|
4 |
Off |
String |
|
5 |
On |
String |
|
6 |
Ack |
String |
|
7 |
Deviation Setpoint |
String (tag name) |
|
8 |
Deviation Dead Band |
Real |
For more information about all of these alarm properties, see Tag Properties.
Returned value
If this function is executed successfully, it returns the value of the specified property. Otherwise, it returns one of the following possible values:
|
Value |
Description |
|---|---|
|
-4 |
The specified project tag (strTagName) or alarm type (numAlarmType) does not exist. |
|
-3 |
Wrong parameter type or inconsistent value. |
|
-2 |
Invalid number of parameters. |
Notes
This function can be executed only on the project runtime server — it cannot be called by a Graphics Script, Screen Script, or Command animation running on a thin client.
For more information about the Tags Database functions and examples of how to use them, see Using TagsDB functions to edit the tags database during run time.