Virtual sql tag to auto increment on OPC tag change

I am looking for a way to create a virtual sql tag and have that tag auto increment any time a select OPC tag value transitions from 0 to 1.

Is this possible? Can you point me to this documentation if already available? I know I could do this inside the PLC, but I would like to be able to create this tag in ignition without having to modify any OEM settings on our equipment.

Thanks in advance.

That’s what the “event meter” option of OPC items in a transaction group does.

Another approach would be to use a script that increments your counter on a value change.

Thank you. I used your meter and it works.

In my head I felt like I could create an integer tag/variable and increment that as the other tag changed. Using the historian and alerting if that tag began to increment at a high rate.

could you explain the other in detail if you have time.

Sure - you could create another tag and increment that one on value change of the first. Determining the rate of change of this is also possible, but applying that to this approach does not strike me as clean. I would approximate the rate by (total change/time slice). You can alert/record this as well.

I’m curious what other people recommend for this.

Me too. Is there a way to create a virtual tag, that doesn’t really update from anywhere but inside ignition. A tag with the same functions as all other tags?

Is there a way to do this while keeping the comm read only?

I am sure I didn’t word this correctly.

Well you can create memory tags which are only used within Ignition.