Similar to this post, except I'm not using getConfiguration
. I am creating UDT instances via a script, which works, however one of the UDT tag members is a dataset and I can't seem to write/update while creating the instance. I can write/update other members, like memory strings (Cfg_Desc/Label/Tag).
If myDataset
is a dataset, the UDT data type will show as a document (the definition is dataset).
Using a list gets me the closest, at least there are values in the dataset, but it shows type conversion error.
How do I update a dataset tag using system.tag.configure
baseTagPath = "Motors"
tagName = "Motor 1"
typeId = "Motor"
tagType = "UdtInstance"
props = [
{'name': 'Cfg_Desc', 'value': '1'},
{'name': 'Cfg_Label', 'value': '2'},
{'name': 'Cfg_Tag', 'value': '3'},
{'name': 'Cfg_TagGroup', 'value': myDataset}
]
tag = {
"name": tagName,
"typeId" : typeId,
"tagType" : tagType,
"tags" : props,
"parameters" : {}
}
system.tag.configure(baseTagPath, [tag], 'm')