Alarm Label relative reference to a containing UDT property

This might be easy and I'm a moron or impossible but I can't find an answer.

I have two UDTs.

UDT1 definition:
int alarmTag1
int alarmTag2
int alarmTag3

UDT2 definition:
UDT1 instance1
UDT1 instance2
UDT1 instance3

In my tag browser I have an instance of UDT2 myTag1. I set the helpful Documentation property in my tag instance:

myTag1/instance1.Documentation = "some text A"
myTag1/instance2.Documentation = "some text B"
myTag1/instance3.Documentation = "some text C"

(note I could have used a custom property here but I still can't get that to work)

I want to get this text above into my alarm labels by setting the 'Label' property of each alarmTag#'s alarm within the UDT1 definition. I am expecting to do something like

{[.]../.Documentation)} or {[.]../(.Documentation)}

Is my syntax wrong? This not possible for some reason?

Try {[.]instance1.documentation}.

There's no equivalent of {this} in tag bindings.

Be aware that bindings in alarm properties are only evaluated when the alarm becomes active (or the tag restarts completely, IIRC). They are not live subscriptions.

In UDTs, all tag properties can have bindings, too, but the same applies--only parameter changes will cause the tag restart that re-evaluates them.

Try {[.]instance1.documentation}

My alarm tags are in the UDT1 definition as:

  • int alarmTag1
  • int alarmTag2
  • int alarmTag3

From there it wouldn't make sense it would refer to an instance of itself, right?

There's no equivalent of {this} in tag bindings

That's right? I guess I thought [.] was basically doing that.

In other cases I do things like {[.]../tagInContainingUDT} with success. i just want to get to a property.

No, [.] points to the folder containing the subject tag.

So using the folder structure its not possible to reach a property of a UDT instance? I do notice that I don't see those in the tag browser. I do, however, see properties (like .Documentation) for the primitives there.

And I can definitely reach mine with system.tag.readBlocking("[default]myTag1/instance1.Documentation")

Ok so I think I was just being a moron and this

did help me. What I needed was {[.].Documentation)}. Thank you.

1 Like