NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get the TestSocket index in a Custom OI built in labview

Solved!
Go to solution
I am trying to get the testsocket index in my modified "Simple OI".  In the simple operator interface provided by NI there is a callback VI called "Simple OI - DisplayExecution Event Callback.vi" that updates the sequence veiw to display the new execution in the viewer.  If I run a sequence that uses the parallel process model, how do I get the testsocket index for the exectuion that generated this callback.  The event data available is a reference to the execution that generated the event and a reson code.
 
I have tried to use some ActiveX calls to see what is available with that reference but I not that familiar with using ActiveX and I don't know if I can get to the testsocket index.
 
(Basically, how do I get the testsocket index value from a Teststand/ActiveX execution propertyobject?)
0 Kudos
Message 1 of 4
(4,494 Views)
Solution
Accepted by topic author paulmw
Hey Paul,
 
I think you already got an answer from your email but I'm posting here as well for others:
 

I have attached a screenshot of how to do it in LabVIEW. Basically you have to get the Foreground thread from the execution object. From this you can get the sequence context associated with that particular thread. Since this callback always executes right when a new execution starts, we can assume it will start off in one of the test socket entry points within the parallel process model. From here we find that the index of the testsocket is stored in Parameters.Testsocket.Index.

A couple of things to keep in mind are that you might want to add some code to allow for more than two test sockets to still be handled. This would be fairly simple to do with a case structure. You could have two cases, "0, default" and case "1". This way even if someone eventually adds another testsocket it will still allow it to be added to the top execution view.

Another thing you will want to keep in mind is that if someone sets a breakpoint in the Test UUTs execution entry point rather than the Test UUTs Test Socket execution entry point the method I have shown you here might not work. The reason for this is that Parameters.Testsocket.Index wouldn't exist in this context. If you think people might have the ability to do this, then you might want to add some code to check the name of the sequence that you are in. From here you could make sure you were within one of the Test socket execution entry points. You can check the name by getting the sequence property of the SequenceContext, converting it to a property object, and getting the name property from there.

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 4
(4,467 Views)

Hi

 

I am using Test Stand in Parallel mode for testing 2 UUT's. We use Simple Operator interface to run teststand sequence.

 

Requirement is to get the report of indivdual Test Socket 0( UUT 1) and Test Socket 1 ( UUT2) in in report viewer window of Simple OI.

 

Can someone please suggest what changes in Simple OI code are needed to achieve this.

 

 

Regards Vikki

 

 

0 Kudos
Message 3 of 4
(3,878 Views)

vki,

 

You are more likely to get assistance if you start a new thread.  Especially if your content isn't really related to the existing thread.

 

If you are new to the NI forums read here: http://forums.ni.com/t5/Feedback-on-NI-Discussion-Forums/Quick-Introduction-to-the-Forums-for-New-Us...

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 4
(3,865 Views)