Tag Change on Audit Log

Hi,
my customer is asking for a sort of "Daily Journal table / Event List" where he expects to find a table like "Switch x moved from open to close state" or "Machine X started". Consider we have a lot of digital and int/uint variable ( around 60000 ) but most of them are changing only a few times at day. Which is the best way to achive a sort of event list? Is still the only way to add a script to each variable like reported in this post?

Adding a new alarm journal with a filter on "alarm/display/path" for those particular tags and to them a "description state" alarm can be a good idea?
How can then avoid to record this alarm also in the "main" alarm_event and alarm_event_data table? Does this big amount of alarm ( i.e. OnTime calculation and so on ) affect my gateway performance?

Thank in advance, best regards, Andrea.

As far as I know this is the way to do it. Keep in mind that only tags that change from the PLC need to have the script added. The tags changed by Ignition will be tracked by auditing automatically.
You can make a shared script and use the same call on every tag event script definition. This means you can do a mass edit on all of the tags at once and paste in the call to the function. So it is not that big of a deal to add.

Thank you @brandon1! I hoped there was some other way to do it, becauase I’m worried for a CPU overhead with a lot of scripts assigned to those variables and i suppose there was another way to audit this variable changes from field.
Best regards, Andrea

Other options:

  • The gateway event scripts can monitor multiple tags. You can use a single script then. 60000 may be a bit much to manage in one script, but you can always duplicate it. Maybe an IA person can shed light on performance.

  • You could set an alarm on a tag with a level of Diagnostic.

Thank you @JordanCClark.
I’d like to use the alarm “tip” with Diagnostic level, but what about the overhead for each alarm that is maintained Active for example for 1 day or 1 month? The time counter still increase…and I don’t kwon if this can be a good practise. Thanks, Andrea.

You could also use the historian. That just logs the changes to a SQL table, and with a bit of processing, you can get something readable out of it.

the query below f.e. will show the 100 most recent changes in the historian, with their tagpath.
You could alter the query to show a correct time (instead of the milliseconds since 1970), or filter it further on tagpath or only changes on integers.

SELECT TOP(100) tagpath, t_stamp, intvalue, floatvalue, stringvalue 
FROM sqlt_data_{date} 
JOIN sqlth_te on tagid = id
ORDER BY t_stamp DESC

Thank you @Sanderd17.
My reseller suggested also to use a query like your connected to a power table to filter and change the notation from i.e. “intvalue” to “Opened” and “Closed” when a tagpath is “valve” or “Start” “Stop” when is “motor” with a little bit of code. Anyway, if having 60000 alarm processed and Active doesn’t cause a Gateway Overhead, @JordanCClark seems to be the easier way. Wainting for IA team opinion.
Best regards, Andrea

You may want to consider sending an email to support. While they do monitor the forums, some things may fall through the cracks. A support ticket will give you a better response. :slight_smile: