Expression Tag inside a UDT


I want to add an Expression Tag inside a UDT but the expression I want to write is based in the AlertCurrentSeverity meta property of another OPC Tag inside the same UDT.

It’s something like this:

Pump {
   floatOPCtag      Temp;  //This has analog alerting
   floatOPCtag      Level;  //This also has analog Alerting
   intExpressionTag Status;

//Expression for Status:

Colby gave me some hints using templates here
but I can’t get it done using only UDTs

Is there a way to do this?

That’s considerably easier than the last problem. Here’s the expression you want:

if({[.]Temp.AlertCurrentSeverity}>{[.]Level.AlertCurrentSeverity}, {[.]Temp.AlertCurrentSeverity}, {[.]Level.AlertCurrentSeverity})

Basically, in any expression anywhere, you can refer to a tag through “{tagpath}”. A tag path can be relative or absolute, and the example above simply has the relative root source definition, “[.]”, required for referencing things inside of the UDT (the relative “[~]” would also work).

Anyhow, once you can reference a tag, you can reference a property of that tag through “.prop”.


Ahhhhh That is great!

I always get surprised of the simplicity of your answers!

Thanks a lot!!