Relative Referencing between Child Tags of UDT

I’m attempting to configure a tag property using relative referencing. I’m testing a design method for UDTs where I would dynamically configure a property of one child tag in my UDT with the value of another child tag by using relative referencing. I setup a basic UDT for testing proof of concept. It is defined with two memory tags: one is configured with a static string value, one is configured with the Value property referencing the former mentioned tag. So far I’m unable to get the reference to bind properly. I’m unsure if its an issue with syntax, or if the functionality I’m attempting isn’t supported by the way I’m implementing the relative reference. Here are two screenshots for reference, each are the same except they show two expression formats for the reference I’ve tried to use:

Could someone help me troubleshoot the issue? Thank you.

The way your setting up the binding only works to bind to Parameters.
If you want to bind another tag, use an expression tag and just reference the other tag.

If you want to be able to set some other property (like EngUnit) to the value of another tag, make a UDT parameter "EngUnit" and bind it it. Then on the tag that you want to have be the actual source, add an on-Change event to it that writes its value into the EngUnit UDT parameter.

Thanks for the response! Appreciate the explanation. My goal was ultimately geared towards setting a tag property as you explained in the second part of response. I did not realize that the method I attempted only works to bind parameters. I had attempted references without the use of Parameters as a way to simplify the overall design of the UDT. In previous software platforms I’ve worked on to implement SCADA solutions, limiting the “overhead” or overall size of UDTs/templates helped with runtime performance for systems that use a large quantity (tens of thousands) of tags derived from UDTs/templates.

1 Like

The issue is you’re trying to use a value binding for this in a memory tag. This will work in an expression tag though. But probably better it use a reference tag or derived tag instead to reference another tag's value.

For your application though, @tgarrison ‘s onChange is likely more relevant

Yeah, the issue is you need to use an expression tag. There's no problems reading other tags into child tags or from other tags all together. For example below is the structure I use to pass a string from one UDT to another that is up a folder level.

folderA/metadata
folderA/folderB/metadata

This pathing will make each tag in the second one equal the first one because you use relative [.] then up a folder (metadata) then up a folder (folderA) then down into metadata then down into the same tag.