So if a Gateway tag change script is watching a db tag called Data/test1
using the following sript-
if newValue.getQuality().isGood() and newValue()!="":
system.tag.writeToTag(“Data/test2”,newValue.value)
it won’t work if Data/test1 contains an expression. Data/test2 wil never update. Remove the expression (if test1 is just a value) and it works. Why is this?
What version of Ignition do you have? This worked just fine for me in 7.4.1:[code]value = newValue.value
quality = newValue.quality
isGood = quality.isGood()
if isGood and value != “”:
system.tag.writeToTag(“Test2”, value)[/code]Assuming both tags are strings.
Ok, so I created a duplicate gateway tag change script and now it works. I hadn’t moved any folders or tag paths previously, and had even tried deleting the tag path from the original script and dragging it in “fresh”.