Hi everyone,
I am working with nested UDT and I have a lot of UDTs which implement another UDT instaces. I some cases, I have to override the nested UDT’s parameters. Then, since the UDT editor does not have an overriden indicator as the tag editor has, I find the next drawbacks:
- You do not know when a nasted UDT’s parameter is overriden or not.
- If you want to remove a parameter’s override you can’t do it. The only way is to edit the json removing the parameter asignment in the nested UDT instance or to delete and reinstanciate the nested UDT.
- Since you do not know when a nested UDT’s parameter is overriden, when you change a parameter value in the UDT definition there is no way of knowing if it will affect the nested UDTs, depending on whether their parameters are overriden.
I have built a json example to support the explanation, with two very simple UDT definitions called “UDTA” and “UDTB”.
In this case, the “UDTA” has two parameters (“ParameterA” and “ParameterB”). The “UDTB” has two instances of “UDTA” called “UDTA_1” and “UDTA_2”. Parameters in “UDTA_2” will take their values 100 and 1000 respectively from the “UDTA” definition while “UDTA_1” only will take “ParameterB” value from the definition since “ParameterA” has assigned with the value 50 in its declaration which overrides the value.
{
"name": "NESTED_UDT",
"tagType": "Folder",
"tags": [
{
"name": "UDTA",
"parameters": {
"ParameterB": {
"dataType": "Integer",
"value": 1000
},
"ParameterA": {
"dataType": "Integer",
"value": 100
}
},
"tagType": "UdtType"
},
{
"name": "UDTB",
"tagType": "UdtType",
"tags": [
{
"name": "UDTA_1",
"typeId": "NESTED_UDT/UDTA",
"parameters": {
"ParameterA": {
"dataType": "Integer",
"value": 50
}
},
"tagType": "UdtInstance"
},
{
"name": "UDTA_2",
"typeId": "NESTED_UDT/UDTA",
"tagType": "UdtInstance"
}
]
}
]
}
It may be improved by IA in the designer or there is something I am overlooking?