I have a customer specified project of auditing HMI machine set point changes, from several different Panel View operator interfaces. The values themselves are in PLC tags, written to/read from the Panel View. I'd rather not modify the Panel View program(s) and keep functionality in Ignition if I can. The deviations are variable, could change, so I can't store as constants in the PanelView program.
The auditing to do: Do not allow setpoint changes beyond a min and max deviation, which could vary per different setpoint value... (min / max both of 10, can't change setpoint of 100 past 110 or below 90)
Currently I am starting using a Client Tag Change Event(s), evaluating which tag it is, reading the deviations allowed, (based on the tag path as a key), and evaluating newValue against previousValue.value and the deviation allowed. If it's not allowed, then I write the OldVal back to the tag (writeBlocking). This obviously fires the tag change event again, so I am looking to combat this by saving the last valid value, comparing and not doing the deviation comparison and tag write infinite times (ending recursion ).
I'm just getting started and looking for the best way programmatically, as I might not be seeing or missing something. Is there a way of stopping or resetting the change in a tag change event, probably not since the change is already done I assume? Thanks much as always.