I’m on 8.1.1
I try to dynamically configure tags, I want to create a UDT…
Is there a way to do something like this ?
if tagData == "Integer":
tagDataType = "Int4"
elif tagData == "Long":
tagDataType = "Int8"
elif tagData == "Float":
tagDataType = "Float4"
elif tagData == "Double":
tagDataType = "Float8"
else:
tagDataType = tagData
tag = {
"name": tagName,
"opcItemPath" : {OPCpath}.{TagName},#opc_path,
"opcServer": {OPCserver},#opc_server,
"dataType": tagDataType,
"valueSource": "opc",
"sampleMode" : "tagGroup",
"tagGroup" : "default"
}
collisionPolicy = "o"
system.tag.configure(tagPath, [tag], collisionPolicy)