Alarm Tag Value Stuck

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.

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

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.

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

{
  "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"
    }
  ]
}

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!

Set an active delay alarm:

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.