[SOLVED] What is the best way to run a script after a database table has been updated?

I have a database table as follows:

TableName
RFID1 (varchar)
RFID2 (varchar)
UniquePK (bigint)

Every once in a while this database table will get a new row added to it and that row will always have the largest UniquePK at that time. In Ignition how do I trigger this event happening reliably?

I’m not sure you can get notified on demand by the database but maybe you can use a DB tag that uses MAX() on the UniquePK column and then a tag change script on the DB tag.

2 Likes

I think I understand what needs done. How often can I expect Ignition to check if something in my table has changed? 1 second? 5 seconds? 30 seconds?

If you’re using a DB tag, as often as you want. Make a scan class (<=7.9) or tag group (>=8.0) at whatever polling rate you want.