I am trying to use a tag event script to write to a client tag when the value changes. I believe my problem is in the tag path. I don’t get any errors for the script but it is not working. Any help would be appreciated.
"""
Fired whenever the current value changes in value or quality.
Arguments:
tag: The source tag object. A read-only wrapper for obtaining tag
properties.
tagPath: The full path to the tag (String)
previousValue: The previous value. This is a "qualified value", so it
has value, quality, and timestamp properties.
currentValue: The current value. This is a "qualified value", so it has
value, quality, and timestamp properties.
initialChange: A boolean flag indicating whether this event is due to
the first execution or initial subscription.
missedEvents: A flag indicating that some events have been skipped due
to event overflow.
"""
prev = previousValue.value
cur = currentValue.value
if prev <> cur:
system.tag.write("[client]Test", cur) ```