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 Windows Embedded Thin Client Mobile Access
ExecuteAlarmAck Tags Database Synchronous Supported Supported Supported  


  ExecuteAlarmAck( "strTagName", optStrComment, optStrAlarmType )  
Web Studio Help nction tags executealarmack.xml d237573e96 ExecuteAlarmAck

Name of the tag on which the alarm will be acknowledged.
Note: The tag name should be enclosed in quotes, as shown in the syntax diagram, or else the function will try to use the value of the tag.
An optional comment to send to the Alarm task, along with the user name and station.
If more than one alarm is active on the specified tag, you can specify which alarm (e.g., 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.


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.


Acknowledge the active Hi alarm on tag A, with the comment Hi alarm on tag A:
  ExecuteAlarmAck ( "A", "Hi alarm on tag A", "Hi" )