Frozen Alarm Ignition

Hi, I need to create an alarm for a tag with a particular issue: sometimes the tag value gets "frozen." For example, it stays at 15, 15, 15, 15… continuously until the PLC is reset. And it’s not always 15; it could be any value, like 0, 0, 0, 0… or 30, 30, 30, 30… So when the PLC disconnects, the tag gets stuck at a specific value. Is there a type of alarm that can identify when a value is frozen? Because from what I see, alarms are usually based only on setpoints. How could I create an alarm of this kind?

I would like that if the tag remains frozen at any value for 30 seconds, it should then trigger an alarm

Thanks very much.

There's no built-in way to do this. The simplest way others have handled this is to use two additional tags:

  • a datetime memory tag to which system.date.now() is written as a timestamp whenever the subject tag changes (using a tag valueChange event script, excluding initial changes).
  • a boolean expression tag that regularly compares now() against the timestamp memory tag plus the desired idle limit, turning true when unchanged too long.

The alarm would then be defined on the expression tag.

2 Likes

Another option:

A single memory tag, same tag group as monitored tag, boolean, with the following expression (where PLC_Heartbeat is intended to be a changing/incrementing tag in the same folder - tweak to suit):

hasChanged({[.]PLC_Heartbeat}, false)

Then, add an alarm on that boolean tag when condition = False, + a delay.

2 Likes