Skip to main content
Version: 8.1

isAlarmActive

This function is used by Ignition's Expression language.

Description​

Returns whether there are active alarms that match the provided criteria. The alarm name is optional, and both the Tag path and alarm name support wildcards ('*'). For example, if only the Tag path was specified, this function would return whether any alarm on the Tag was active. The pollRate parameter is only applicable in the Vision Client scope.

When calling this from the Gateway or Perspective Session scope, the Tag Provider must be included in the path.

Syntax​

isAlarmActive(tagPath, [alarmName], [pollRate])

  • Parameters

    • String tagPath - The Tag path to search for active alarms. Supports the wildcard '*'.

    • String alarmName - The name of the alarm to search for. Supports the wildcard '*'. [optional]

    • Integer pollRate - The poll rate in milliseconds. Only applicable in Vision Clients. [optional]

  • Returns

    • Boolean - True if an alarm is active, False if no active alarms were found.

Examples​

Code Snippet
isAlarmActive("[default]Tanks/Temp", "[default]Tank_Temp_High")   //when the Tank_Temp_High alarm is active then this expression returns True.