Writing to components' Custom Property from inside a parameterized popup window

Hello everyone,

I will try to explain my problem in a few bulletpoints. I am grateful for any help/insights offered.

Objective: A one-shot button found inside a parameterized popup window should set the value of a custom property of the popup window, that is passed from a template put in the main window. The custom property of the instance of the template in the main window is bound to an OPC tag.

Error: The tag value does not change.

Explanation: I have a circuit breaker (CB) that I have to open/close from the HMI. I created a template which shows the status of the CB, and that has a button to control it as well. The button inside the template opens a parameterized popup window, which contains N. 2 one-shot buttons to send the commands of open/ close.

Flow of tag/property binding: “command signals” boolean tags bound by value to custom property inside the instance of the template in the main window ==> the aforementioned custom properties inside the template are passed to the popup window using the “pass parameters” navigation option ==> the custom properties inside the popup window (received from the aforementioned button) are bound to the “Value” property of the one-shot buttons.

Passed parameters are snapshots. Pass a tag path string instead, and use an indirect tag binding in the popup.

Thank you for your fast reply, as always.

That was already something I’ve been thinking about, passing the tag path string. But I was wondering if there is a way to bind it to the template instance in the main window instead of having to right click > copy path, then pasting it manually inside the template property. Is there a better way?

The template should be passed a tag path, too, instead of binding a UDT property. Then the button in the template just references the tag path in template properties.

FWIW, I don’t ever use UDT properties.

1 Like

I finally tested the solution you proposed, passing the tag path string, and it works. I would like to ask you a general question, hopefully to help me learn better: Is there somewhere I should have looked where I would find that hint about the popup parameter passing? I mean, the fact that it passes snapshots and cannot be used in a bidirectional sense (when I checked the manual I didn’t find any such info).
Thanks again for all the help!

It’s mentioned in the user manual, just probably not as spelt out as perhaps you are expecting. But if you look at it logically, inside of the template/popup, the custom param you pass in is a static value. It will only ever change if you change what you’re passing into it. Bindings are what give properties the ability to subscribe to tag values and the ability to write values bidirectionally. So that’s what you need to use in templates and popups as well.
And for creating the bindings in templates and popups, you can either pass in the tag path to the tag or the parent path of a device (or combination of params to make up some final path), or if it’s a UDT then you can technically also pass in the UDT instance using a UDTType parameter. As Phil said, he never uses these and neither do I. They are too limited in what you can do with them.