LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Working with Multithred and Multi UUT

Solved!
Go to solution

Hello ,

 

I have a problem in my software , I working on a Device that checks Serveral UUT's In an Oven .

 

I am useing a Lock to control on each UUT which checked in his own time .

 

My problem is the at start its starts with random nubmber while i want to start from socket number 0 .

 

I know theres an option to control the current socket number , can some one direct me where is it ?

 

and if only Init it to 0 when the program starts will do the job ?

 

Thank U .

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 1 of 10
(4,102 Views)

Hello KobiKal,

 

Could you clairify your request just a little for me please?  Are you saying that you want socket 0 to execute first or is there something else that you are checking and want to be 0?

 



My problem is the at start its starts with random nubmber while i want to start from socket number 0 .

 


 

 When you say"it", is this the socket currently being monitored?  And when you say do the job, I don't really know what you're referring to, so it is hard to offer a good answer. 

ColeR
Field Engineer
0 Kudos
Message 2 of 10
(4,072 Views)

First of all , i am so sorry because this Question was needed to be post at the Test Stand Forum and not hear . 

 

I'l try to explain any way mybe u can help me my device is checking 10 cards at the time , using 10 sockets .

 

The software i'm using is test stand 4.2 and cvi 9.0 

 

i want to start from socket 0 at every check in test stand . 

 

  

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 3 of 10
(4,064 Views)

Hello KobiKal,

 

I think what you are looking for is batch synchronization with serial settings.  What this does, is steps through your test sockets individually with whatever tests you want them to run.  If this is not what you are looking for, please repost with any more pertainent details.  Thanks,

ColeR
Field Engineer
0 Kudos
Message 4 of 10
(4,037 Views)

You are right thats what i'm using , the code ( in macro view ) looks like that :

..... 

Create Lock (Label 1)

Lock (Label 1) 

 

code working on all UUT's 

 

}

Release Lock (Label 1)

........ 

The problem is there are 30 UUT's and when the code starts it starts from a random socket instead of 0 , 1, 2 ,3 ,4 ....... 30

 

I want to keep the order of the sockets so it will always run in that order ( 0 , 1 .... 30 )

 

Maybe there is a Variable that control the current socket ? or something like that ?    

 

  


-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 5 of 10
(4,015 Views)
Solution
Accepted by Kobi_K

Hello KobiKal,

 

TestStand already has built into it the cabability that you are looking for.  You want to make sure that you are using the Batch Process model and are using the "Batch Synchronization Step" instead of the lock function.  You can configure this step to be "Serial" which forces TestStand to step through each thread in turn in the order you specify. An example of this in use can be found in the Example folder and is titled, BatchUUT.seq.  

ColeR
Field Engineer
0 Kudos
Message 6 of 10
(3,990 Views)

@ColeTrain wrote:

 You can configure this step to be "Serial" which forces TestStand to step through each thread in turn in the order you specify.   



I'm trying to learn if there's a way to control the thread order of performing a serial batch sync section.  The above quote seems to imply that you can but I'm not seeing it.  For example, instead of socket 0 always running first in the serial section, I'd like to have socket 1 go first and then socket 0 execute second.  I looked at the BatchUUT.seq example and don't see anything that controls the thread order.

0 Kudos
Message 7 of 10
(3,516 Views)

Hello rreis,

To my knowledge there is no way of changing the order of the socket execution. In the NI TestStand help, it specifies that you can inspect the value of the socket which is running using RunState.TestSockets.MyIndex; however there is not a way of changing the order. The test socket execution will be one at a time in ascending test socket order.You may be able to make some modifications in the Batch Process Model, under the subsequence Initialize TestSocket where you use the expression in the Set Test Socket Index Statement Step. (Parameters.ModelData.TestSockets[ Parameters.TestSocketIndex ].Index = Parameters.TestSocketIndex).

 

I am not completely sure I understand why you would want to change the order since each socket runs the same steps and the sequence must wait for all of the sockets to complete before moving on. The specific order will depend on how you connect your UUTs.

Jacob R. | Applications Engineer | National Instruments

0 Kudos
Message 8 of 10
(3,500 Views)

Ok, thanks for the response.  The reason I was looking for this functionality is that I'm testing two units in a thermal chamber and I have to fit the serial functional test in during a fast ramp of the temperature.  This is repeated for multiple temperature cycles and I thought it would be good to reverse the socket order every other cycle so that they are essentially even in terms of the temperature that they experience.  At this point though, it seems like more of a challenge than it's worth.

0 Kudos
Message 9 of 10
(3,496 Views)

No problem, thanks for sharing the application. I took a look one more time, more specifically to reversing the socket execution order, and was not able to find any way of accomplishing that.

Jacob R. | Applications Engineer | National Instruments

0 Kudos
Message 10 of 10
(3,487 Views)