From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Adjust the Number of Threads While Running Through Batch Model

I am using the Batch Model for my project running in multisite. I want to adjust the number of sites/threads running depending on the program response. For example, currently I'm running 4 sites/threads and at some point of the testing I will adjust it to only 3 or 2 or 1 site/thread running. Which function will I use? Thank you in advance.

0 Kudos
Message 1 of 7
(2,401 Views)

If you only want to modify the number of devices at the beginning, you can use the ModelOptions callback and modify Parameters.NumTestSockets to be your desired number.

 

If you want to adjust after each batch, you can use the PreBatch callback and modify Parameters.ModelData.TestSockets[X].Disabled (replace X with the socket number) to be true when that particular socket won't be used during a run.  

Message 2 of 7
(2,351 Views)

Hey Andres, 

 

Do you meant socket when you mention thread/site? Or are you using TestStand Semiconductor Module? 

 

Take a look at this article that shows how it can programmatically be done - https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P7p7SAC&l=en-US. The ModelOptions callback gives you access to the test socket variable which you can change.

 

Thanks,

Roxy

0 Kudos
Message 3 of 7
(2,347 Views)

I am using the TestStand Semiconductor Module. I was trying to create a sequence that will run all sockets at the start of the test then some sockets will skip some of the remaining test. Is this possible?

0 Kudos
Message 4 of 7
(2,328 Views)

I add a ModelOptions callback and assign the number of test sockets as below.

 

model options.PNG

Stephen

0 Kudos
Message 5 of 7
(2,296 Views)

One option is to make a FileGlobal or a StationGlobal boolean that all of the sockets monitor.  One socket controls the value of that boolean and the other sockets read the boolean value and run or skip the remaining tests as desired.

0 Kudos
Message 6 of 7
(2,290 Views)

@AndresJE wrote:

I am using the TestStand Semiconductor Module. I was trying to create a sequence that will run all sockets at the start of the test then some sockets will skip some of the remaining test. Is this possible?


If you in the middle of a test sequence want to skip the rest of the sequence you can insert a Goto with a Precondition. Or you can use an If+End around the part which you do not want to execute.

In addition to the precondition for the Goto which you can set under "Preconditions" on the Properties Tab you need to set the Destination to goto.

The If statement has a Tab where you can set "If Condition".


0 Kudos
Message 7 of 7
(2,272 Views)