Dynamic OPC Path referencing an internal Query Tag within UDT

Hi everyone,

I’m looking for a way to streamline my UDT definition and I’ve hit a bit of a roadblock regarding tag referencing.

Inside my UDT, I have a folder named Position_ID which contains a Query Tag named Extruder. This query automatically retrieves the correct identifier from a database based on the {RootInstanceName} of the UDT.

I have an OPC Tag within the same UDT that requires a dynamic OPC Path. This path needs to be built using the value returned by the Extruder Query Tag.

How can I reference the value of the internal Extruder tag directly within the OPC Path configuration?

I want to avoid adding a manual UDT Parameter just to duplicate a value that is already being fetched by the Query Tag. I've tried a few syntax variations, but the OPC Path doesn't seem to resolve when pointing to a tag value instead of a parameter.

Thanks!

You cannot. Tag properties within UDTs only support parameter binding. The closest you can come would be to place a valueChange script on the query tag that writes the parameter.

I would encourage you to avoid query tags in UDTs, though. When needed for configuration, you should simply arrange for the tag configuration to get the right parameters through some design automation, not runtime. When used at runtime for message lookups or other truly dynamic purpose, they tend to blow up ones database.

Thank you for the answer and the suggestion, I will treasure it.