I have the need to modify tag properties via scripting (override UDT definition), I have noticed that I can do it 2 different ways, one with system.tag.writeblocking and also with system.tag.configure.
For example, I want to change a tag to be expresion type and set the expression, I can use any of the options below.
system.tag.configure
tag = {
"name": "Valve_Open_DI",
"valueSource": "expr",
"expression": "{[.]Close_Valve_DO}"
}
system.tag.configure("[default]TestValve", [tag], "o")
system.tag.writeblocking
system.tag.writeBlocking("[default]TestValve/Valve_Open_DI.valueSource", "expr")
system.tag.writeBlocking("[default]TestValve/Valve_Open_DI.expression", "{[.]Close_Valve_DO}")
Is there any advantage or disadvantage between them?
Would the answer be different if I apply this to the UDT itself ("[default]types/SomeUDT")
Thanks in advance!
Greg