Popup window passing value from previous tag

I have a project (in Vision) where the popups are using a UDT as a custom property in their root container for all the objects on the popup to reference. For example, the UDT element CNT_VLV.SP is the setpoint for the control valve. A numeric text field on the popup is then bound to the custom property UDT of the root container to display and allow change to the value.
To call the popup I am using a template with a button that has a script seen below. The template has the same UDT as a custom property in its root container. The template then is placed on level 1 screens with the custom property bound to a UDT in the main tag list.
The system works well and have not had an issue BUT the operator has reported that if they select one valve and change the setpoint that they can open another valve and the setpoint from the first valve gets written to the second valve.
For example, the inlet to the site valve setpoint is 800psi. Then the operator opens a valve later in the process that is controlling flow from 0-5 MMSCFD. The 800 setpoint is set into the setpoint for the flow control valve. I have the numeric entry restricted in the bounds that this example the operator cannot enter a value greater than 30. The out of bounds message should come up if they were entering in that 800 value.
The setpoints are trended and I can verify what the operator is telling me. However, I cannot recreate the issue. I do believe it is happening based on seeing the trended data.
The popup window is anchored to the right of the screen. Part of the script for the popup call button closes all the windows on the right so multiple popups do not stack up. Is there something in this method that can be the cause? It is a rare event that has happened a handful of times. I can't recreate it yet. I have tried creating a couple test valves and running through scenarios with no luck.
The HMI is running edge panel and the PLC is a 5069 AB compact logix.
Is there something that general method of data passing or closing the window that could be a bad practice and causing ignition to write some old data in the previous UDT reference to then new UDT reference?

Popup call Script

Popups.Close_All_East()
param1 = event.source.parent.CTL_VLV
param2 = event.source.parent.PV_Tagname

window = system.nav.openWindow('Pop-ups/pu_CTL_VLV', {'CTL_VLV' : param1, 'PV_Tagname' : param2})
system.nav.centerWindow(window)

The HMI is a touch screen that has the onscreen keyboard set to come up on data entry. Here are settings for the behavior of the numeric entry.

It also has a script that changes the focus from itself to the close button on the popup just try and ensure the data is written right away.

event.source.parent.getComponent('Close Button').requestFocusInWindow()

This sounds similar to a popup problem I was reading about earlier this week:

Unrelated, but I would be moving this into the UDT tags/params instead to centralise this config. It will make it far easier to use where you need to reference it.

You'll find many many references on this forum to UDT Type properties being far from ideal (I have my own fair share of them), which should instead be replaced by passing in the string path to the udt instance and then using indirect tag bindings to reference the tags (don't use the tag(...) function due to performance implications, also referenced throughout the forum)

3 Likes

This will make a huge difference in performance especially on templates on your screen. When I learned about this, I did a test on a example screen with like 10 valves on it. Nothing big, but the valves using a tag path loaded data in a fraction of the time the ones bound to a UDT did. The reason for this is that when using a UDT, all values inside it are subscribed to by the client rather than the 1 or 2 you need for just that graphic. Then you pass that same tag path to the popup and in my case we're using all the values there, so I have a tag on the root container indirectly bound to the tag path that allows me to access all the values in the UDT as properties without indirectly binding them all individually.

3 Likes

@sethtubbs , any luck? I don't have anything concrete, but I seem to remember a similar issue on a project from several years ago where making graphical updates would cause popups to go back to a default tag binding. Any chance that's happening here?

I believe I got around it by setting updates to manual and then forcing popups to close every time they happen.

Thank you all for your responses. I set the Cache to Never. I will also change from the binding to the entire UDT and moving to indirect addressing by passing the path to the screen and templates. Since this has been difficult to recreate and is very infrequent, I am not sure I can say for certainty it is solved without making these changes and giving it some time. If all goes well I will post back in a week or so that no more of these events have been recorded.