Tag Value Change Event Issue

I've recently ran into an issue where a tag script (value changed) is triggering when I didn't expect. I have a simple script that stores the value of the tag, along with a couple other pieces of relevant info, into a database for a report. It seems that the script is running when the quality of the tag changes from 192 to 202 but the value has remained the same. I had assumed the quality changes would only activate under the quality change script and wouldn't effect the value change script. Or is there something else I'm missing?

I am trying to figure out why I'm getting the 202 value at all. I looked it up and it says it represents good data that is being sampled slower than requested due to a resource limitation. However I don't have access to the PLC another team handles that.

I think you should be able to check the tag's quality and exit the script if isGood is false.

The issue is that the value is 0 and I'm getting a tag event for quality when it changes to 202 then another when it changes back to 192. I don't want either of these events because the value still hasn't changed from 0. I know I can check the previousValue.value vs currentValue.value, but I'm more wondering if this is working as intended as the value isn't changing or if I'm missing something else.

In version 8.1.31 it explicitly states that the script triggers on value or quality. Seems like this is the intended behavior.

image

2 Likes

I didn't notice that. I was going off Tag Event Scripts - Ignition User Manual 8.1 - Ignition Documentation where it states just the value. I'll update my scripts to include a check if the previous value doesn't equal the current. Thanks.

2 Likes