TagName in UDT

I don’t think it’s possible to access tag properties within a UDT. Try creating a string parameter in the UDT and you can reference that in the other tag members of the UDT.

What I ended up doing is creating a UDT called Common_UDT and added parameters Name, ShortName, TagPath, OPCPath and used this Common_UDT as the Parent for all my UDTs. All my UDTs require those parameters so using Common_UDT as a parent for all my other UDTs prevented me from having to add the same parameters over and over. Then there’s the added benefit of if I have an additional parameter I need to add to all my UDTs I only have to add it to Common_UDT and then it becomes available to all my UDTs.

One thing about UDT parameters, they are not accessible outside the UDT. This was a bummer because in the application I need to reference those parameter values, so what I did was create Memory SQLTags (Name, ShortName, TagPath, OPCPath) in Common_UDT and then set their values to the parameters. This only works for String values though.