"No change" alarming

Hello!
In the tag properties Alarming -> Mode we have “Any change” mode. Can you add “No change” alarm, which go to active when value no changing some time? For this mode make property “Time” in seconds.
Thanks.

Hi,

Yes, this could likely be added. Currently, you can approximate this with the “any change” mode and the time deadband. By setting the time deadband to a high value, the alarm will only occur when a new event hasn’t been triggered for that amount of time.

A direct mode would, of course, be easier to understand.

Regards,

Thanks :slight_smile:

Hi, I’m currently trying to achieve the same thing. I have a pulse from the PLC wich I want to alert if the pulse haven’t changed in 10 seconds. Is this possible to do by using “Any Change”? I have tried following the example above, but I only get an “cleared” alarm each time, which spams the alarmlist more than neccessary…

“No Change” option would be great though :slight_smile:

I have this set up on an ignition 8 system. The no change alarm comes in, but it will only clear from the live event limit.

How might I get it to clear?

Any updates to this topic? Setting the deadband does not work for us, it fills the alarm list with cleared alarms as Mr. Kleppe states.

Hi,

I think the problem (or at least what you’re seeing) is that “one-shot” events like any change are automatically considered “clear” when they’re generated. So when you set up an any-change alarm with a time deadband, it simply doesn’t publish the event as long as new events are occurring. When the time is surpassed, the event is sent. However, the event is both “active and clear” at the same time, because on “any change”, there’s no concept of a state that clears a previously generated event.

I definitely see how this isn’t exactly ideal, because these events don’t seem as “important” in the alarm status tables and such. It may just be a display issue, when we generate the event, we can mark it as one of these, and display it differently.

As it stands, if we implemented a “no change” mode (which frankly I’m embarrassed we haven’t already done), it would probably act the exact same way, as a “one-shot” event (though I suppose there could be a mode that would have the no-change event stay active and then clear when a new change occurs?)

Hi,

I made a new expression tag in my UDT, and configured with alarm if above setpoint 30. 1000ms cyclic.

If my heartbeat stops for more than 30 seconds, it triggers.

“secondsBetween({[.]Hearthbeat.timestamp},now())”

1 Like

SBL_MC - thanks for the tip - used this for some PLC watchdog logic as well and works great.

Only minor comment is case on the timestamp property - tried to use your syntax verbatim and it gave an error - I believe the property is .Timestamp

-Greg

Hello, I also have a similar issue where I would like a alarm to trigger when a value hasn’t changed for some time. The problem is, were are bringing these values from a totalflow and therefore we must create the alarm in ignition. Have there been any updates to this?

I'd like to share my approach to that issue with you.
I've set up a value change tag event script on the tag which value changes I'd like to monitor:

valueTimestamp = system.date.toMillis(currentValue.timestamp)
system.tag.write("[~]Alarm Tag", valueTimestamp)

I take the current value's date and time, convert it to timestamp in milliseconds and write it to an auxiliary memory tag "Alarm Tag".

"Alarm Tag" has a below setpoint alarm configured with setpoint bound to a following expression:

dateArithmetic(toMillis(now(1000)), -30, "sec")

The time offset could be anything - I use 30 s in the example.

Whenever my tag changes its value the script updates "Alarm Tag" value. If no value change occurs for the given time - an alarm fires and stays active until a value chnge occurs.

Piotr you saved me some time though it still took a bit to get this to work to my liking. Here is my slightly modified version of your solution:

Here is the on change event script inside the desired tag.

	# make sure this change wasn't caused by ignition restarting
	if initialChange == False: 
		# detect change with the built in currentValue and previousValue provided by the Value Changed event handler 
		if currentValue > previousValue or currentValue < previousValue:
			# write current time to a memory tag to alarm on later
			valueTimestamp = system.date.toMillis(currentValue.timestamp)
            system.tag.write("[.]casing_pressure_no_change", int(valueTimestamp))

And here is the expression used in the memory tag’s alarm setpoint. It executes every 30 seconds and subtracts 15 minutes from current time. The alarm is configured to go off if the timestamp in the memory tag is less than this value i.e. 15 minutes old.

toMillis(now(30000)) - 900000

Oh, and why I didn’t use the tags timestamp and compared current value to previous value is this data is received from an external MQTT Sparkplug publisher (outside of my control) and when the data flatlines on the other side it still publishes the same exact value i.e. the timestamp changes but the data doesn’t…

2 Likes

Pardon the bumping of an old thread...
My solution is to create a dedicated boolean tag which contains a value of TRUE when another tag value has changed since last execution. Of course, tag group (poll times) matter. In general:
[default]Folder/PLC_Heartbeat = OPC tag. No alarms configured. Poll rate=x sec.
[default]Folder/PLC_Heartbeat_OK = Expression tag, boolean, alarm configured on "Equal 0" with active delay, tag group poll rate >= x sec (no faster than reference tag poll rate).

hasChanged({[.]PLC_Heartbeat}, false)

Also use this for remote gateway monitoring / alarming on Gateway DateTime stale values.

Yes, please!