I am trying to create a log and need to have a id# increase by one every 9 hours. I have searched the web and forums, and have come up empty. I do not even know where to begin at this point. Any help pointing me in the right direction would be great. Thanks in advance.
If you don’t care what time it occurs, just every 9 hours a gateway event script can do this for you. Otherwise you can create a tag group with a 9 hour scan rate and use a tag event script. If you do want it on certain hours it is trickier, see this post. If you describe how your ID# works (is it an integer tag) we can post a script for you.
Actually it’s pretty easy. Create a new expression tag called “currentHour”
set the expression: getHour24(now(1000)) # Adjust the polling to your liking.
Add a value change script
if not initialValue and currentValue.value in [7,15, 21]: # initialValue evaluation may or may not be required?? I dunno do something
Some thought needs to be given to scope and what, if any, outside function you may need to call.