Auto Data log into Database when value changed

I want to log the machine setting data when ever the operator change the value, with Login username to know who changed the data. I have more then 50 settings data in my program but I just want to log the data which is changed. Kindly suggest me better way to make it done. Thanks.

There are quite a few approaches that would be successful. In order to keep the project easy to support, I like the idea of creating a generic script in your project library that you can accept parameters such as machineID, setpoint, userID, location, etc. Then use those parameters in a query that inserts the information into your database with a timestamp.

Then simply call the generic script from either the input sources' action performed script or a client tag change event script. To ease implementation, and keep the project easier to support, I recommend all input sources that trigger such a script be set up as shared templates. This way, if you need to update, add, or remove parameters at some point in the future, it need only be done in one place.

Ignition has built-in auditing capabilities that will do this for you. Just turn it on.

1 Like

Thanks for your replay actually i want to create a separate table for my settings.

you could perhaps use transaction groups to log changes of such tag to database.

The OP wants to capture when users change values. Only the audit subsystem will do that.

Only Ignition's audit subsystem will capture user inputs. Consider adding triggers to your database to catch audit entries and move/insert them to your desired tables.

Oh I missed that point I thought operators changing setpoint from machine panels which would perhaps be OPC items.

Can tag change scripts not be used to write to DB if its user inputs from clients in that case?

The tag change scripts will fire, but will also fire if the value changes from elsewhere. The tag change script will also not have access to the user identity.

1 Like

Valid point I missed.

Thank you all for your reply