Hi all,
We have some standard display objects which take their DPEs as dollar parameters. For example, digital displays, analogue displays, etc.
We have a situation where we need to change which DPE they are looking at in run time, or to fake something visually equivalent for the user.
This is because we have a redundant setup, where each server has its own driver status datapoints. We need to look at some DPEs in the driver status datapoint from the active server only. The active server could change at any time. In this case presenting both DPEs to the user is not appropriate.
I'm hoping to do one of the following:
1. Re-assign the $-parameters in runtime in a function called from a DPConnect. - I understand this is not possible.
2. Make two copies of the display object, one for each DPE, then set the Visibility of each object depending on the active server. - I've tried this but cannot figure out how to set the visibility of a panelRef. I've tried to set "visible" and "windowVisible" of the panelref but this doesn't seem to work. Is this possible somehow?
3. ? If neither of the above are possible I'm at a loss and would sincerely appreciate any suggestions.
Kind regards,
Angus Heyworth
How to re-assign $parameter to panel reference in runtime, or set visibility of a panel reference?
Search
Re: How to re-assign $parameter to panel reference in runtime, or set visibility of a panel reference?
I think I've thought of a way to do this, which is to place the panel references in separate layers, then toggle the layer visibility. Not in a position to test right now.
Regardless, is there considered to be any neater or more flexible solution to this type of problem?
Regardless, is there considered to be any neater or more flexible solution to this type of problem?
Re: How to re-assign $parameter to panel reference in runtime, or set visibility of a panel reference?
You could remove/add them with removeSymbol/ addSymbol at runtime and not place it on the panel in the Gedi, so you can change it when you need to connect to a different dp.
-
dbindernagel
- Posts: 161
- Joined: Mon Feb 23, 2015 1:34 pm
Re: How to re-assign $parameter to panel reference in runtime, or set visibility of a panel reference?
You could just add _ReduManager.Status.Active and the elements of both DPs to the dpConnect and select which values to display in your callback.
Re: How to re-assign $parameter to panel reference in runtime, or set visibility of a panel reference?
With the attribute "visible" and the reference name you can change the visibility of a reference.
In case of a redundant system reading only the information for _ReduManager.Status.Active is not the best approach.
E.g. if redundant server 1 is active and the redundant servers loose the connection. A UI which is only connected to server 2 (due to the network failure) is reading the dp-element _ReduManager.Status.Active which is possibly still showing that server 1 is active.
You always have to read both datapoints _ReduManager/_ReduManager_2 and also the information if the servers are connected and if the UI has the connection to a specific server.
Best Regards
Leopold Knipp
Senior Support Specialist
In case of a redundant system reading only the information for _ReduManager.Status.Active is not the best approach.
E.g. if redundant server 1 is active and the redundant servers loose the connection. A UI which is only connected to server 2 (due to the network failure) is reading the dp-element _ReduManager.Status.Active which is possibly still showing that server 1 is active.
You always have to read both datapoints _ReduManager/_ReduManager_2 and also the information if the servers are connected and if the UI has the connection to a specific server.
Best Regards
Leopold Knipp
Senior Support Specialist