I'm trying to create a tag with a digital State, two values, 0 and 1. This tag has a PE, which must change the tag value at the first day of every month, this is the PE Expresion:
if day('*')=1 and month(PrevEvent('pr1_prueba','*')) < month('*') then 1 else 0
The problem that I have is about the "else" clause, cause i don't really like to write into the tag in that case.
How can I change the value of a tag, the first day of the month to 1, (just once in the month, cause you can change it again manually, but in this case the automatic value won't be added)?
Thank you in advance