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

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.

:small_blue_diamond: 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.

:small_blue_diamond: 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.

:small_blue_diamond: 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.