Reference other UDT's tags

Hello,

I have an UDT with 5 Tags. I am writing a value change script for one of the tags. How can I access the value of the 4 other tags within that script? The script is a tag event script.

Thanks in advance for your help

Use system.tag.readBlocking(), providing the four tag paths in a list, and extracting the four values from the returned list.

I recommend something like this:

qvList = system.tag.readBlocking(['[.]peerA', '[.]peerB', '[provider]path/to/A', '[provider]path/to/B'])
peerA, peerB, A, B = [qv.value for qv in qvList]

Thanks a lot
I have an another topic regarding my username, could you please change it?

I don't have that permission. I'm not an IA employee.

Ahn okii, thanks

I have no idea what that means. And you did not follow my example. You really should use one call to readBlocking to get all four values.

Meanwhile, please post the rest of your code (not as a screenshot--use the preformatted text button in the comment editor to set up a code block) and post the error you get (also using the preformatted text button).

2 Likes