Hi All,
Looking for some help on delaying a Gateway event script based off of Tag Change. I am new to scripting in ignition. We are logging test data after the test completes and moves the data block to the completed test in the plc. The scan time on the length of registers takes a few seconds for all the data to populate. without a delay we miss or duplicate data from the previous test. the Code is simple here is a shortened version of what we have.
API = system.tag.read(“Well Test data/API”).value
Gas = system.tag.read(“Well Test data/Gas”).value
Oil = system.tag.read(“Well Test data/OIL”).value
Water = system.tag.read(“Well Test data/Water”).value
TestDuration = system.tag.read(“Well Test data/TestDuration”).value
TestTime = system.tag.read(“Well Test data/TestTime”).value
WellName = system.tag.read(“Well Test data/WellName”).value
system.db.runPrepUpdate(“INSERT INTO Well1 (API,Gas,Oil,Water,TestDuration,TestTime,WellName) values (?,?,?,?,?,?,?)”,
[API,Gas,Oil,Water,TestDuration,TestTime,WellName])
system.util.invokeLater(1000)
I have tried using system.util.invokeLater(1000) but cant seem to get it to work
Here is the error I get
Caused by: org.python.core.PyException: Traceback (most recent call last): File “”, line 12, in AttributeError: ‘com.inductiveautomation.ignition.common.script.Imm’ object has no attribute ‘invokeLater’