NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Viewing the same execution in two distinct ExecutionView

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 ?

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
Message 1 of 11
(6,675 Views)

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:

 

clone activeX reference.png

 

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

0 Kudos
Message 2 of 11
(6,623 Views)

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 Smiley Frustrated ) 

 

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 :

  • The 'supervision' ExecView is related to an ExecViewMgr which receives the Execution ref from the AppMgr callback 'Display Execution' (this callback hasn't been modified)
  • Each execViewMgr related to each independant test socket gets its execution ref from a UIMessage (33 ; UIMsg_ModelState_BeginTesting)

I'm a little bit lost ! Smiley Surprised

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 3 of 11
(6,610 Views)

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 ?

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 4 of 11
(6,606 Views)

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.

0 Kudos
Message 5 of 11
(6,594 Views)

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 ?

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 6 of 11
(6,583 Views)

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

0 Kudos
Message 7 of 11
(6,581 Views)

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...

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 8 of 11
(6,578 Views)

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.

0 Kudos
Message 9 of 11
(6,573 Views)

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 !

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 10 of 11
(6,566 Views)