So i am trying to create a counter that increments by one each time a boolean OPC tag equals true. I found several examples, but for some reason cannot get mine to work. Here is what i have…
OPC Tag name: Timer_1_on
Memory Tag name: Counter 1 (set to integer) and value = 0
Gateway Change script:
if newValue.getValue() == 1:
counter = system.tag.readBlocking(["[default]Lab Testers/Counter 1"]).value
counter += 1
Any help would be appreciated.