# Alarm Tag Value Stuck

**URL:** <https://forum.inductiveautomation.com/t/alarm-tag-value-stuck/46887>\
**Category:** Ignition\
**Created:** [May 19, 2021, 1:20pm UTC](https://forum.inductiveautomation.com/t/alarm-tag-value-stuck/46887 "2021-05-19T13:20:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin.jones](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@kevin.jones](https://forum.inductiveautomation.com/u/kevin.jones)\
**Post date:** [May 19, 2021, 1:20pm UTC](https://forum.inductiveautomation.com/t/alarm-tag-value-stuck/46887/1 "2021-05-19T13:20:40Z")

</div>

Hi, we just setup a new system for monitoring silo fill levels and looking to add some alarms to some of the process values. Most things one of the standard alarm mode settings takes care of it, but I wanted to set an alarm should a tag value be stuck at the same value for a given amount of time (eg 6hrs). I didn’t see a clean way to do this so anyone for any suggestions before I come up with some over complex way to do something potentially basic!

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [May 19, 2021, 1:32pm UTC](https://forum.inductiveautomation.com/t/alarm-tag-value-stuck/46887/2 "2021-05-19T13:32:53Z")

</div>

Not tested it, but could you set the alarm mode to equal, with itself as the setpoint, and an active delay of 6 hours?

If this does not work, I think I would create second tag that will refer to the first one with a delay, with an expression tag, or an on change script to use as the setpoint

---

<div class="post-metadata">

**Author:** ![kevin.jones](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@kevin.jones](https://forum.inductiveautomation.com/u/kevin.jones)\
**Post date:** [May 19, 2021, 5:48pm UTC](https://forum.inductiveautomation.com/t/alarm-tag-value-stuck/46887/3 "2021-05-19T17:48:33Z")

</div>

Thanks. I tested the “easy” suggestion with the alarm mode equal and using itself as the setpoint and unfortunately that didn’t work.

I’ll try some messier options and see how get on.

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [May 19, 2021, 6:10pm UTC](https://forum.inductiveautomation.com/t/alarm-tag-value-stuck/46887/4 "2021-05-19T18:10:42Z")

</div>

I did a simple test that seems to work for me

I have a tag with the value from the equipment (memory in my case for testing)  
A script on this tag, on valueChanged, that set a delayedValue  
I then add an alarm with an equal to setpoint with the delayedValue with a delay of 10 seconds, and it works for me

If you want to try

```auto
{
  "tags": [
    {
      "valueSource": "memory",
      "name": "DelayedValue",
      "value": 654,
      "tagType": "AtomicTag"
    },
    {
      "valueSource": "memory",
      "eventScripts": [
        {
          "eventid": "valueChanged",
          "script": "\tsystem.tag.writeAsync([\"[.]DelayedValue\"], [currentValue])"
        }
      ],
      "alarms": [
        {
          "timeOnDelaySeconds": 10.0,
          "name": "Alarm",
          "setpointA": {
            "bindType": "Tag",
            "value": "[.]DelayedValue"
          }
        }
      ],
      "name": "EquipmentValue",
      "value": 654,
      "tagType": "AtomicTag"
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![kevin.jones](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@kevin.jones](https://forum.inductiveautomation.com/u/kevin.jones)\
**Post date:** [May 24, 2021, 9:48pm UTC](https://forum.inductiveautomation.com/t/alarm-tag-value-stuck/46887/5 "2021-05-24T21:48:19Z")

</div>

Thanks for the example - I went to test it out and realized I need v8.0 for the system.tag.writeAsync function and I’m working with v7.9 at the moment. I plan to upgrade soon so will put this on the back burner until then, but the suggestion makes sense. Thanks!

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [May 25, 2021, 12:00am UTC](https://forum.inductiveautomation.com/t/alarm-tag-value-stuck/46887/6 "2021-05-25T00:00:58Z")

</div>

Set an active delay alarm:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/6/2614b4e85dabb2a4d09219b3ee1b7d69c8434d81.png)

---

<div class="post-metadata">

**Author:** ![tmahaf](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaf/32/23492_2.png) [@tmahaf](https://forum.inductiveautomation.com/u/tmahaf)\
**Post date:** [March 5, 2024, 7:32pm UTC](https://forum.inductiveautomation.com/t/alarm-tag-value-stuck/46887/7 "2024-03-05T19:32:02Z")

</div>

I have some expression tags that go True when meeting certain conditions, I found the alarms on them staying True even after the tag value went False.

I found that setting the alarm mode to alarm if the tag value \<\> 0 in place of alarming when the tag value == 1 was the option that worked to solve the problem.
