Tag Event Tracking

Hi everyone,

I'm looking for the a way to implement an event logging system in Ignition. For those familiar with Aveva System Platform, I’m trying to replicate the "Log Data to Event" functionality where tag state changes are automatically written to a centralized event table. Ideally this would be the audit events table so operator setpoints changes can be tracked as well.

Potential Options:

  • Tag Change Scripts: Use a tag change script to write to the audit events table using system.util.audit. I suspect this is the ideal option as it would keep events in the audit events table. That said i have concerns this could become a performance bottleneck as more and more data is logged.
  • Alarms (Diagnostic Priority): This seems like it would be the most performant and log tag event changes to the alarm history table but it feels like a bit of a hack and would require some work to reconcile with the audit events table to view when setpoint changes were made.
  • Historize the tags: I know this is an option but doesn’t feel like the appropriate way to do what i am looking for but if the community has thoughts / insight into this option i would like to hear it.
  • Transaction groups: I could do this to but it is not event driven meaning the DB inserts wouldn’t happen when the event occurs. If there is a way to create an event driven transaction group per tag i would like to know if its possible.

Desired Output Format (Based on the audit_events table):

Event ID Timestamp Actor Action Value
1 8:00 AM Control System Fill Required
2 8:05 AM Control System Pump Required
3 8:06 AM Control System Pump Running
4 9:30 AM Control System Fill Not Required
5 9:35 AM Control System Pump Stopped

Thanks

You can do it with a transaction group or a gateway tag change event either one.

For the transaction group, under the Trigger tab you can set the "execute this group on a trigger."

For the tag change event, use a script with system.util.audit().

EDIT:
Both transaction groups and audit profiles can auto prune records.

@dkhayes117 Regarding the transaction group. Using the trigger if i had say 50 tags in the group and one changed would it write all 50 to the table?

Are you aware of any performance impacts using system.util.audit if i were to have say have thousands of tag change scripts invoke this method? Mind you this wouldn’t be at a single time depending on when events occur.

For transaction groups, you can set tags as DB targets or not, but in general if the tag is in the group, you want to record it. So, yes, it will log all 50 tags on a trigger.
image

For audit, make sure you use a gateway tag change script and not the value change event on the tags themselves. For the gateway tag change, which is under Scripting→Gateway Events in the designer, you can place more than one tag path to monitor for a change.

Gateway Event Scripts | Ignition User Manual

EDIT: the audit performance should be fine in the gateway change events, IMO

Sounds like the perfect candidate for my toolkit's RePublish Tag Action.