I’ve come up with this script to write 1 OPC tag to another OPC tag using system.tag.writeAll() function. I run this script as a Gateway event script on a tag change. when I execute it my gateway script says it was successful but I don’t get the values written to the tags.
tags = ["Write_Test/Test_Read_Tags_0_",
"Write_Test/Test_Read_Tags_1_",
"Write_Test/Test_Read_Tags_2_",
"Write_Test/Test_Read_Tags_3_",
"Write_Test/Test_Read_Tags_4_"]
v1 = "Read_Test/Read_Tags_0_"
v2 = "Read_Test/Read_Tags_1_"
v3 = "Read_Test/Read_Tags_2_"
v4 = "Read_Test/Read_Tags_3_"
v5 = "Read_Test/Read_Tags_4_"
Values = [ v1, v2, v3, v4, v5]
values = system.tag.writeAll(tags,Values)
I have also tried the system.tag.write() function with the same result in the gateway script saying successful.
value = "Write_Test/Test_Read_Tags_0_"
system.tag.write("Read_Test/Read_tag1" ,value)
am I doing something wrong?