Does anyone know how I would go about modifying the parameters of a nested UDT. For Example, Let’s say I have a UDT with the following layers.
Discrete (UDT)
—{Parameter:motorNum}
—OpcTag
—OpcTag
—OpcTag
—DiscreteAlarm (NestedUDT)
------{Parameter:someParameter}
------OpcTag
------OpcTag
In this example, I am trying to create the parent tag while also modifying the parameter of the nested UDT “DiscreteAlarm” titled “someParameter”. The example code below is straight from the manual and works just fine for creating the parentUDT.
Any help would be much appriciated.
Thanks!
# The provider and folder the tag will be placed at.
baseTagPath = "[SWRF]aaSCRATCHPAD"
# Properties that will be configured on that tag.
tagName = "Test"
typeId = "Alarm/Discrete"
tagType = "UdtInstance"
# Parameters to pass in.
motorNum = "C1245"
# Configure the tag.
tag = {
"name": tagName,
"typeId" : typeId,
"tagType" : tagType,
"parameters" : {
"tag_Alarm" : motorNum
}
}
collisionPolicy = "a"
# Create the tag.
system.tag.configure(baseTagPath, [tag], collisionPolicy)
tag = system.tag.getConfiguration("[SWRF]_types_/Alarm/DiscreteAlarm")
print tag