# Configuring AlarmActive and AlarmCleared Scripts to Trigger Once Per Event (Above Setpoint Condition)

**URL:** <https://forum.inductiveautomation.com/t/configuring-alarmactive-and-alarmcleared-scripts-to-trigger-once-per-event-above-setpoint-condition/106093>\
**Category:** Ignition\
**Tags:** perspective, ignition81, scripting\
**Created:** [May 9, 2025, 5:45am UTC](https://forum.inductiveautomation.com/t/configuring-alarmactive-and-alarmcleared-scripts-to-trigger-once-per-event-above-setpoint-condition/106093 "2025-05-09T05:45:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ARIFRAHUMAN\_A](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@ARIFRAHUMAN\_A](https://forum.inductiveautomation.com/u/ARIFRAHUMAN_A)\
**Post date:** [May 9, 2025, 5:45am UTC](https://forum.inductiveautomation.com/t/configuring-alarmactive-and-alarmcleared-scripts-to-trigger-once-per-event-above-setpoint-condition/106093/1 "2025-05-09T05:45:03Z")

</div>

hello,

I'm currently working with a tag in Ignition that has an alarm configured with the condition **"Setpoint is 2"**. This alarm is set to trigger when the tag value goes **above the setpoint**.

### 🔹 My Requirement:

- When the value **crosses above** the setpoint, the `alarmActive` script should run **once**.
- When the value **returns to normal** (i.e., below the setpoint), the `alarmCleared` script should run **once**.

### 🔹 The Issue:

If I **enable** the **"Any Change"** option:

- The `alarmActive` script runs **every time** the value changes while remaining above the setpoint — which is **not desired**.
- The `alarmCleared` script **does not run** when the value drops below the setpoint.

If I **disable** the **"Any Change"** option:

- The `alarmActive` script runs **only once** when the value first exceeds the setpoint.
- The `alarmCleared` script works correctly when the value goes back below the setpoint.
- However, if the value goes below the setpoint and then rises above it again, the `alarmActive` script **does not run again**.

### 🔹 My Goal:

- The alarm should **activate every time** the value crosses **above** the setpoint.
- It should **clear** when the value goes **below** the setpoint.
- The `alarmActive` and `alarmCleared` scripts should each run **once per event** , without repeat triggers while the value remains in the same state.

Has anyone successfully configured this behavior? I’d appreciate any guidance or best practices.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [May 11, 2025, 12:30am UTC](https://forum.inductiveautomation.com/t/configuring-alarmactive-and-alarmcleared-scripts-to-trigger-once-per-event-above-setpoint-condition/106093/2 "2025-05-11T00:30:33Z")

</div>

Please show the alarm configuration.

Settings for deadband and delays may affect your desired operation.

Also, edit the topic to reflect the actual version of Ignition you are using.

---

<div class="post-metadata">

**Author:** ![ARIFRAHUMAN\_A](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@ARIFRAHUMAN\_A](https://forum.inductiveautomation.com/u/ARIFRAHUMAN_A)\
**Post date:** [May 11, 2025, 9:43am UTC](https://forum.inductiveautomation.com/t/configuring-alarmactive-and-alarmcleared-scripts-to-trigger-once-per-event-above-setpoint-condition/106093/3 "2025-05-11T09:43:46Z")

</div>

This is my Alarm Settings

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/2/1280948de0954cb4728d32cb3c3d0da5abbd1ff0.png)

I am currently using 8.1.43 version

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [May 12, 2025, 1:01am UTC](https://forum.inductiveautomation.com/t/configuring-alarmactive-and-alarmcleared-scripts-to-trigger-once-per-event-above-setpoint-condition/106093/4 "2025-05-12T01:01:01Z")

</div>

I'm not sure how this works with ignition's concurrency model, but naively I'd have the alarm active and alarm cleared scripts check for the value of a secondary tag that they set while running, and wrap that set in a mutex.
