11-02-2015 11:22 AM
Hi,
I'm buiding a TS Operator interface which can display several distinct execution at the same time (modified // processmodel). Each is displayed in a specific ExecutionView in an independ window. Each ExecutionView is realted to its own ExecView Manager.
I'd like to create a another window (Superivsion window) which lists all running executions (within standard TS ListBar) and when I chose an execution from the ListBar it displays the corresponding execution. So I'll have the same execution displayed into two different ExecutionView (each executionview being related to its own executionView Manager).
The problem is, when I choose an execution from the ListBar it correctly appears in the supervision window, but it disapears from the other ExecutionView.
So I can't see the same execution into two different windows...
Would you have an idea why this is happening ? Any advice on how to achieve this purpose ?
11-05-2015 03:46 AM
Hi,
this is an interesting problem indeed. Can you provide a bit more information, please? In particular when you select an execution from the listbar what happens in the code (callbacks, etc)?
I could imagine that the TS engine doesn't like it when you connect exactly the same reference to two ExecutionView managers. You might be able to get around this by cloning the reference first by using the variant to data node:
be aware that this creates an extra reference that you have to take care off and destroy. Otherwise you will get the "unreleased references" dialogue on shutdown of your OI.
Best Regards
Mathis
11-05-2015 12:40 PM
Hi Mathis,
The problem gets bigger when going further in my developpement.
Indeed, as soon as I act on buttons (associated to an independant ExecViewMgr) to break/stop the execution (method DoClick on button), the current ExecView stops showing the execution also !
However, the 'main' ExecView (kept for supervision purposes) keeps the execution displayed and actions on buttons are taken into account !! (even they are not registered to the same ExecViewMgr )
Cloning the execution as you suggested didn't help. The executionView still stops showing the execution !
To give more details, here is what I see :
I'm a little bit lost !
11-05-2015 12:57 PM
After writing my last reply, I've made a test : I disabled the code in the 'Display Execution' event callback.
=> Magic ! All the problems are resolved !!
So it means that a unique execution cannot be linked to several ExecViewMgr (even if this one is 'cloned'). As soon as this execution is given to an ExecViewMgr, it becomes unusable by other already linked ExecViewMgr !
This is problematic for me because I'd like to keep the 'supervision' functionnality !
Any idea to achieve this ?
11-05-2015 03:14 PM
I don't remember the details any more, but I tried to do this a few years ago, and I believe I got confirmation from NI that an execution can be associated with only one ExecutionView at a time. It's possible that this has changed, but I think it's unlikely. I can imagine that having two different views in different states or having two sources of commands could cause issues with the execution.
11-06-2015 03:07 AM
Issues caused by a bad program are programers problems.
But I'd like to have an official position from NI or a KB link explaining the probelm and consequences.
Anybody from NI could confirm or invalidate this ?
11-06-2015 03:12 AM
In that case the only way would be to have the ExecutionViews of the overview and the individual execution display both connected to the same ExecutionView manager. I've tried that one before and that works. If you connect two executionviews to the same manager they will both show the same execution.
This causes obviously headache as it means that for each execution in the overview you will have to communicate the right reference to the right manager ... you are effectively increasing the coupling between your modules.
An official statement of what the limitations are would definitely be nice!
Best regards
Mathis
11-06-2015 03:44 AM
I don't really see how I can do this in my case.
I've got 4 independant executions (TestSocket). Each execution is displayed in a separate execution view + a common execution view.
If I keep only one ExecutionViewMgr, I won't be able to decouple the TestSocket executions in separate ExecutionViews...
11-06-2015 03:58 AM - edited 11-06-2015 04:02 AM
In your case you would have four execution view managers. One for each socket.
The four execution views you generate in the overview would each need to get connected to the correct execution view manager.
Say you have a module/clone for each socket and a module for the overview. The overview will need to communicate one executionview control reference to each of the socket modules to have it connected to the manager control there.
Best regards
Mathis
edit: that is obviously in addition to the executionview control in the socket modules which need to get connected to the local executionview manager as well.
11-06-2015 04:19 AM
OK, it seems that it could work this way.
However, I'll have to change the way I display testsockets in my overview window. In the scenario you describe I can't see all TestSocket execution in a list bar and jump from one to another using this listbar.
Definitely interesting...
Thank you for your kind help !