Get path to UDT instance within UDT

Hi all,

I would like to get the path to a UDT instance so that I can bind some parameters to a tag within the same UDT. Basically I have the following structure UDTInstance>Folder1>tag1 and UDTInstance>Folder2>tag2.
I would like to bind the Engineering High Limit of tag1 to the value of tag 2.

1 Like

Since Tag1 and Tag2 is in the same folder you could add Tag2 as an expression tag and use {[.]tag1.EngHigh} in the expression.

1 Like

To add to this, you can also go up and down folders from the UDT instance using:
{[.]../parent folder's tag}
{[.]../../grandparent folder's tag}
{[.]child folder/tag} <- not 100% on this format, it might be {[.]./child folder/tag}

1 Like

Hi Nick, I tried to do what you suggested, however it doesn’t seem to work. This is the tag I have set up:

However when I go and look at the engHigh property for the tag it is blank:

image

You should be using {[.]../Meta/scaleMax} I believe.

Edit: Actually, I’m not sure that you can use dynamic tag bindings in the properties of tags. It would have the potential to severely overload the processor due to so many bindings firing events.

Instead, I would use the scaleMin/Max within the fields’ min/max properties that you’re displaying the process variable in. This is what I do. If you create a template for this, even better.

I’ve attached the template that I use which provides the ability to override the min/max fields with other values. By default it will use the given tag’s fields.
Quick explanation of parameters:
EngHigh/LowOverride: override the min/max of the numeric input field properties
EnLayout: See screenshot.
HideBar: hides the value barchart
HideUnits: hides the tag units
Setpoint: toggle to show value [numeric label]/ setpoint [numeric input field]
TagName: the name of the tag
TagParentPath: the full folder path to the tag, excluding the name
Target*: unused at the moment

Analogue Value W114.proj (10.4 KB)

image

1 Like

Appreciate the response Nick. I do have templates with high and low clamps on them but was hoping to implement something at a lower level. Why would making a tag property dynamic put a high load on the CPU? Might be missing something but it seems like something that should be possible.

Imagine if the tags being bound were constantly changing, and they were used in hundreds/thousands of places, this would cause a constant load on the gateway. I understand that the scale tags probably don’t change all that often, if ever, however it’s probably a limitation to stop people from abusing it. :man_shrugging:

1 Like

Hmm, value is a property of the tag itself which is constantly changing, so it seems like other properties could work in the same way. Can anyone from IA comment on why this isn’t possible?

1 Like

Try not using the {} around the reference. I’ve got some working references in a UDT that are written that way.

image

1 Like