Hi All,
I have been trying to work out / locate an easy way to write a value to a PLC tag depending on the current time.
I want to reset a total volume reading at midnight (every day). This reset is done in the PLC hence I am trying to set a Tag (Vol_Reset) to the value 1. This tag is “Bool” so I want to turn it on (make it true / high).
I have created a “memory tag” called ‘CurrentTime’ which is = now() and I have tried creating the scripting below with no success
if {‘CurrentTime’ == 00:00}:
system.tag.write(‘PLC/Vol_Reset’, 1)
else:
system.tag.write(‘PLC/Vol_Reset’, 0)
Is there an easier way to achieve writing to a tag at a set time of day or date?
Thank you
Woolie