I have an application with many valves. I have made a pop up for a valve which accesses a UDT, so far so good. How can I define the UDT used on opening of the pop up for a particular valve.
So on my main page I have many valves and then want to open the valve pop up by clicking on each valve but obviously want the information for THAT valve when it opens. UDT is defined in my View/Params for the pop up, I would like to change it dynamically.
I'm not sure I get it from you saying that the UDT is already defined in your params.
Sounds like you just need for all of your bindings to be Indirect tag bindings, use the params on there and link to your UDT instance and tag.
Sorry, not explained very well ! I have one pop up that I want to open multiple times, but point at a different UDT (relevant to that valve) whenever I open it.
If you're using a button, or
OnClick Event on something you can use the popup event, and write the UDT into the parameters.
This will then make that new UDT path appear in the popups parameters
OK, I went down that road. If I have 10 UDTs , say Valve 1 to Valve 10. What would I have to do here to make it read the correct UDT ?
Say for example you have 10 valve objects on your HMI, I would normally create a custom prop on each, set the path to your UDT insatnce in there. Under your
Value in parameters set the custom prop you made.
Or if you wanted you could write the path straight in there as well.
Went down the custom prop option, worked like a dream
I just found, if you click on the object which opens the pop up and then defines the instance of the UDT, all is good, BUT the pop doesn't update with new values until you close it and re-open it.
Did I miss something ??
Yeah, so this popup will keep its state when its open.
I would normally have this valve open its own popup, so you can control multiple at the same time.
Or I think if you set them to have the same Identifier I think they'll override each other.