NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Choose socket to display in SequenceView control

Solved!
Go to solution

Hi,

 

I have built a custom OI and allow between 1 to 4 UUTs to be selected. Selecting multiple UUTs causes Parallel model to be selected (extensive use of API in this OI) etc etc.

 

I'd like to be able to specify which Socket execution to display in the Sequenceview control. I know I could connect a combo box to the ExecutionViewMgr but the TS combo box does not fit with the visual theme of the rest of my interface. Instead, I'd like to be able to select based on socket index.

 

My thinking was to obtain references to each execution then obtain the socket index of that execution then display that particular execution (which I know how to do).

 

Is this feasible? More suitable alternatives?

 

Cheers folks

Chris

 

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 1 of 8
(700 Views)

The default Execution property object won't contain the socket index.  It only has the following:

Execution.Result

Execution.ErrorReported

Execution.TypeMask

Execution._AdapterInfo

 

and I see no Execution API methods that return it.  You can eventually get to the sequence context if you use Execution.GetThread(..)....and then to the UUT container, you can get the Socket Index but I don't recommend it.

 

It would be better to just pass the Root sequence context and then you can get the Socket Index from UUT container from Locals.

Locals.UUT.TestSocketIndex

 

 

0 Kudos
Message 2 of 8
(652 Views)

And to clarify what your goal is:  Are you trying to update the view to the current execution while it is running or change the view when it is idle?

0 Kudos
Message 3 of 8
(649 Views)

Hi,

 

Thank you for your reply. Firstly my objective is to view different sockets to be viewed during execution.

 

I'm now wondering if sending a UI message from each socket execution might be a better way forward.

 

Cheers

Chris

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 4 of 8
(623 Views)
Solution
Accepted by topic author CRoebuck

If your ApplicationMgr is subscribed to the UIMessageEvent then you can watch for UIMessageCodes.UIMsg_ModelState_BeginTesting or UIMessageCodes.UIMsg_ModelState_Identified

 

When you get either of these messages the e.uiMsg.ActiveXData will be the SequenceContext and the e.uiMsg.NumericData will be the socket index.

0 Kudos
Message 5 of 8
(609 Views)

ok. That part all works as expected however then using the UI MSG ActiveX data to obtain the Execution property and then use that to set the Execution Property of the ExecutionMgr

 

Doesn't throw any error but the SequenceView Ctrl which is connected to the Execution goes blank. Switching Socket using a TS Combo box bound to the Execution list does work.

 

Can an ExecutionMgr Execution property be changed without re-binding the visible controls ?

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 6 of 8
(590 Views)

Are you doing something like this:  

 

 

// show the execution
axExecutionViewMgr.Execution = execution;

 

 Please note that if execution is null then by design the axExecutionViewMgr will show a blank view.

 

I don't use a ConnectExecutionList to a visible control, so perhaps that is the problem.

 

Can you get your desired execution and iterate the combo box list to find the match and if you find the match then programmatically set the combo box item, which in turn will set the view of the axExecutionViewMgr?

0 Kudos
Message 7 of 8
(584 Views)

I'm doing something exactly like this. 

 

I figured out that the part I was missing was to call the ExecutionMgr.Refresh method after registering the execution. Once I do this the Sequence view shows the correct execution.

 

Thanks for your pointers towards the UIMessageEvents, that was the key!

 

Cheers

Chris

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 8 of 8
(565 Views)