NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i force the ExecutionView control to show specific thread

Hello,

I am working with Bath model and simple operator interface with ExecutionView control. I would like to know how can i cause to this control to show the active test socket thread.

Thanks
0 Kudos
Message 1 of 8
(4,480 Views)
Are you using the default OI with the tab control?
If so I think there is a function/subVI for 'show appropriate tab' you could likely latch onto.

Most times that I've seen this done, people have 'borrowed' code out of the "Full OI - DisplayExecution Event.vi" callback where first they set the page view, then they set the tab to match. If you have a reference/pointer to the current execution, you should be able to have the OI flip the screens around to show it without too much grief.

is this what you were looking for?

Cheers,

Elaine R.
www.bloomy.com
Cheers,
Elaine R.
www.bloomy.com
0 Kudos
Message 2 of 8
(4,480 Views)
Thanks Elaine, but you didn't understand the problem.

I am using the little changed Simple Operator Interface supplied with TestStand examples. It developed with CVI.

There are two relevant controls on the GUI: SequenceView and ComboBox, both connected to the ExecutionView Manager.

When the Bath model initializes test sockets, it adds all new threads to the Execution View. If user doesn't select manually some thread, the last added one is shown in the SequenceView control. The problem is that i don't want to show waiting thread, i would like to switch automatically to the running test socket. Maybe there is some UserMessage that i can send from running sequence to the User Interface? Or some another way?

I hope that it explained better now.

Thanks,


Yevgeny
0 Kudos
Message 3 of 8
(4,480 Views)
Hello Yevgeny!

I'm sorry about that, you're right I completely misunderstood the question. The easiest way I can think of, is to make use of1 or more UIMessages in your TestStand sequence.

Thread.PostUIMessageEx() is the function you want in this case. In order to have the 'view' flip to the other thread, put the ActiveX step in to that thread's sequence first thing and have it call the message "UIMsg_RefreshWindows".

Put default values into the string and numeric data parameters, but for the ActiveX parameter, give it "RunState.ThisContext". That ought to make the current thread the one visible in the OI. You can call this API as much as you want, so if you want to flip back to the other sequence, just add an activeX step to the other sequence
at a later point.

Try this and see if it is closer to what you want and let me know?

Cheers,

Elaine R.
www.bloomy.com
Cheers,
Elaine R.
www.bloomy.com
0 Kudos
Message 4 of 8
(4,480 Views)
Hello Elaine,

Regarding the TestStand help, sending the UIMsg_RefreshWindows to the Operator Interface seems to be the right way, but unfortunately it doesn't work. I don't know what is the reason.

Due to the lack of time I used another method: I registered my Operator Interface as an ActiveX server and added the function that receives the Test Socket index. Every time then the Test Socket index passed from the executing sequence to the Operator Interface, the new active index is selected in the ExecutionView combo box (the active index equal to Test Socket index plus one, because the first thread is the Batch model). The sequence view updated automatically. It works OK.

Thanks for your help, Elaine.

Regards,

Yevgeny
0 Kudos
Message 5 of 8
(4,480 Views)
I still need the answer to this question.
0 Kudos
Message 6 of 8
(3,999 Views)

Steve,

 

The ExecutionView control will show the execution specified in its Execution property.  So all you have to do to change the execution shown in the sequence view control is to set this property.  I recommend that you do it in a UIMessage.  There are many UIMessages you could use.  If you would like explicit control over what execution is shown when, you can define your own UI message and handle it appropriately.

 

If you do a search for "UIMessage" you will find many forum posts to help you with this.  There are also many examples, a few of which I've listed below:

 

http://zone.ni.com/devzone/cda/epd/p/id/3608

http://zone.ni.com/devzone/cda/tut/p/id/4532

http://zone.ni.com/devzone/cda/epd/p/id/3879

 

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 7 of 8
(3,972 Views)

What UIMessage can I use? I would like to be able to change the execution view without having to specially customize the testexec since I may have to use a predefined one.

 

Can this be done through activex? I don't see a ExecutionViewMgr object class in the API. Is it accessable under a different object class? 

0 Kudos
Message 8 of 8
(3,965 Views)