Disabling an alarm based on the value of another tag

I’m not a scripter. I’m learning. So I will need a more detailed response. Sorry

I have false alarms throwing because of comms problems at the client site.

So Pump 1 will alarm when it shouldn’t

But I found that the Pump Start value is always negative during the false alarm

So I figure I need a script in the Alarm Active tag event that says “If pump start < 0 cancel Pump alarm”

From the digging I’ve done I guessed I’ll need system.alarm.cancel. Then I have to put an alarm ID after it [fkjh3loj2hlkjfnlkj3h3lerkjj] a long string. I have no clue how to address the alarm I need to cancel, or find the alarm ID if that is the case.

Any help would be appreciated. Thanks!

system.alarm.queryStatus might be what you’re looking for. Check the example in the linked documentation for how to get AlarmEvent info from a specific source, then you’ll use getId() to get the ID


It may be more effective to try to prevent the false alarm in the first place. On the alarm definition, you can bind the “enabled” property to a condition. So, you could end up with an expression binding something like this:

That way, the alarm eval would only be enabled when that condition was true.


That’s a much easier way to go about it. I’ll give it a try. Thanks!

This did it! Thanks again!