Multiple tag change events report initialChange

In a Value Changed tag event script I have the following:

def valueChanged(tag, tagPath, previousValue, currentValue, initialChange, missedEvents):
	qual = currentValue.quality
	print '_' * 50
	print 'tag value changed: %s' % tagPath
	print 'tag quality:', qual
	if initialChange:
		print 'Initial change'

The output in wrapper.log is:

INFO   | jvm 1    | 2020/12/08 09:39:35 | __________________________________________________
INFO   | jvm 1    | 2020/12/08 09:39:35 | tag value changed: [Dev2]Health
INFO   | jvm 1    | 2020/12/08 09:39:35 | tag quality: Uncertain_InitialValue
INFO   | jvm 1    | 2020/12/08 09:39:35 | Initial change
INFO   | jvm 1    | 2020/12/08 09:39:35 | __________________________________________________
INFO   | jvm 1    | 2020/12/08 09:39:35 | tag value changed: [Dev2]Health
INFO   | jvm 1    | 2020/12/08 09:39:35 | tag quality: Error_Configuration
INFO   | jvm 1    | 2020/12/08 09:39:35 | Initial change

Why do both events report they are InitialChange? Shouldn’t only the first one be?

What version of Ignition are you using? How are you triggering this?

Ignition 8.1
By restarting the gateway in Windows services

Okay, and is that a memory tag? Expression tag? I’m just trying to get a quick reproduction set up so I can create a ticket.

OPC tag

Also I have the following in the quality changed event on the same tag:

	print '-' * 50
	print 'My quality changed: %s' % (tagPath)
	if initialChange:
		print 'Initial change'
	pv = previousValue.value
	pq = previousValue.quality
	print 'previous val:', pv
	print 'previous qual:', pq
	cv = currentValue.value
	cq = currentValue.quality
	print 'current val:', cv
	print 'current qual:', cq

and the output in this case is:

INFO   | jvm 1    | 2020/12/08 10:51:47 | --------------------------------------------------
INFO   | jvm 1    | 2020/12/08 10:51:47 | My quality changed: [Dev2]Health
INFO   | jvm 1    | 2020/12/08 10:51:47 | previous val: None
INFO   | jvm 1    | 2020/12/08 10:51:47 | previous qual: Uncertain_InitialValue
INFO   | jvm 1    | 2020/12/08 10:51:47 | current val: None
INFO   | jvm 1    | 2020/12/08 10:51:47 | current qual: Error_Configuration

Here it’s not indicating initial change but should be. Shouldn’t it?

Also on 8.1 and restarting gateway.

Yes, something seems broken to me. I’m writing this up.

Can I subscribe to be notified on updates to this somehow?

This thread is linked to in our ticket, I’ll leave a note to come back and update once something is found/fixed.

Hello iamthebull, quality changed events have been updated to properly show the initial change flag after gateway restart. This fix will be in 8.1.3.

The value changed tag event issue is still being looked at. We’ll reply again when it is addressed.

Any update on the change tag event issue? How can the functionality be expected to operate in the current stable version?