Can you use an Expression Tag's name to get the value of an OPC tag with a similar name?

I'm using an expression tag to read the value of another OPC tag. Everything works but I'd like to use the expression tags name to help build the expression.

Expression tag is "Tag1"
OPC tag is "Tag1 OPC"

In the expression of "Tag1" this will read the value.
{[.]Tag1 OPC}

I can use the tag function and it works but I've read that it should be avoided as it adds more overhead.
tag("[.]"+{TagName}+" OPC")

Not sure if a custom property can help. It needs to use the name/path of the expression tag "Tag1" to read the value of the custom property and so far I've just been able to pass the correct OPC tag name and I'd just need to use the tag() function again.

The tag() function is fine in expression tags. (It's the only place it's appropriate--there's no other way to do indirection in expression tags.)

1 Like

Thanks for the info. I'm a little paranoid as every tag has a partner expression tag. I'm worried that I'll run into a processing issue once more systems are added.

What is your reasoning for using the expression tags? An indirect tag binding might be a better fit for what you're doing.

Also, if you're working in perspective you can do a lot with transforms.