I have some Tag ‘Value Change’ event scripts. When the tag goes high, the change script passes its tag name to a shared script that reads a row of data out of a database table and then inserts the line into another table.
This works fine except for one important issue. If two (or more) tag values go high at the same time, all events may or may not be triggered. I have simulated the behavior using 4 tag values and I can repeatedly catch the result being only 3 of the 4 scripts being executed.
Is there a way to put the event scripts (with each tag name) in a FIFO arrangement so that all events are processed?
Or, is there a way to set a flag that pauses the update script if another one is in process? (If tag = high and flag = low, execute script script, if tag = high and flag = high, wait)
Or a way I can step through the tag list and when one tag value is high and has not been processed, process the event then step to the next tag?
Does the alarm subsystem handle events differently? Can I leverage that?
I asked about running the scripts from a Gateway scope, but the answer was that two values going high at the same time = one script execution.