ExecuteAlarmAck
- Last UpdatedOct 29, 2026
- 2 minute read
This function acknowledges an active alarm on the specified tag. The advantage of using this function is that if used from the Thin Client, the Alarm task will store the user name and station from which the alarm was acknowledged.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
ExecuteAlarmAck |
Tags Database |
Synchronous |
No |
Supported |
Supported |
Not supported |
Supported |
Executed on Server |
Syntax
ExecuteAlarmAck("strTagName",optStrComment,optStrAlarmType)
ExecuteAlarmAck ( " strTagName " , { | ,optStrComment { | ,optStrAlarmType } } )
strTagName
Name of the tag on which the alarm will be acknowledged.
Note: If this parameter is enclosed in quotes, the string literal will be used. Otherwise, the value of the tag/expression will be used.
optStrComment
An optional comment to send to the Alarm task, along with the user name and station.
optStrAlarmType
If more than one alarm is active on the specified tag, you can specify which alarm (for example, Hi, Lo, HiHi, LoLo) to acknowledge. Otherwise, the function acknowledges the most recently activated alarm.
Returned value
|
Value |
Description |
|---|---|
|
0 |
Successfully executed. |
|
-1 |
Invalid number of parameters. |
|
-2 |
Invalid tag name. |
|
-3 |
Executed, but did not wait for confirmation from Alarms task. See note. |
Notes
When this function is used to acknowledge an alarm, it typically waits for confirmation from the Alarms task before returning a value of 0 to indicate successful execution. In some cases, however, waiting for confirmation might cause the project runtime to hang. When that happens, if the function is properly formed with valid parameters, then it will execute as intended but it will not wait for confirmation.
Examples
Acknowledge the active Hi alarm on tag A, with the comment :
ExecuteAlarmAck ("A","Hi alarm on tag A","Hi")