I am running a very simple gateway script that triggers on the tag change of ‘G_Timer’.
The purpose of the script is to simply continuously increment the ‘G_Counter_1’ tag value.
if system.tag.read("[default]G_Timer").value == 1: GC1value = system.tag.read("[default]G_Counter_1").value GC1value = GC1value + 1 if GC1value > 9999: GC1value = 0 system.tag.writeBlocking(["[default]G_Counter_1"],[GC1value])
The part I am having issues with is the’ if GC1value > 9999:’ evaluation. It simply does not seem to work. I am rather new to Ignition and Python. I did run a Python script with the same ‘if’ statement nesting, and it works as expected. Any thoughts?