Making a tag dynamic

Hello All,
Hope you are doing well.
Can anybody support me to get solution how I can make PRD_POP2_Index integer tag dynamic for different instances to read value. Tanks in advance.

system.tag.readBlocking([’[Plant_Model]PDM/SiteName/AreaName/LotName/LotNo/InternalTags/PopUp/PRD_POP2_Index’])[0].value

Hi,
I think you’ll need to be a bit clearer, I have no idea what you mean.

What do you have, and what do you want to achieve ?

Hi Pascal,

i have created a UDT memory tag named- (PRD_POP2_Index)
now i want to make this tag dynamic for different instances to read the value by using
system.tag.readBlocking

What do you mean by “dynamic” ?
Each instance will be a new tag, with its own name, its own value, etc.
Reading a specific instance will return this instance’s qualified value, regardless of other instances.

Can you give an example of what you mean ?

I agree that this is very unclear, but assuming that in the tag name “Index” is not literal and is a placeholder for a number index, @Atanu_Sanyal should use indirect binding

You can’t make a tag dynamic in the sense that it switches between connecting two or more tags in a PLC or other device. What you can do is create tags for each item you might want to monitor and then access those tags by making an indirect binding in Vision or an indirect binding in Perspective

thank you, actually i got the solution.

It would be good etiquette to share what the solution is so that others may benefit too.

2 Likes