This widget could not be displayed.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

I am looking to use multithreading in order to run multiple tests in parallel on one UUT.

Solved!
Go to solution

I am looking to multithread multiple tests in paralllel on one UUT.  I looked in the main site and all examples are on zip files that I seem to not be able to successfully download from the site.  Does anyone have any file examples or white papers on this subject that I can view???

Message 1 of 6
(3,787 Views)
Solution
Accepted by mcfrenzy36

put one test in a sub sequence.  then call that subsequence using New Thread as the Execution Options:

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 6
(3,782 Views)
I'd just add, use wait steps at the end of your main sequence to collect the results and use synchronizations steps as needed to synchronize things.

-Doug
Message 3 of 6
(3,764 Views)

By synchronization, for example, you mean that if I want two sequences to run simultaneously, I would create a rendezvous just before those two, use the method of new threads, then place a rendevuous right after them?

0 Kudos
Message 4 of 6
(3,759 Views)

That is one approach to it.

 

Doug was talking about using the wait step.  When you create the thread from you sequence call you can store that thread handle to an object reference (that's in the button next to the dropdown from the picture I put in here, the button has a hammer and stuff on it).  The wait function can wait for a thread to return instead of waiting for a specific time.

 

However, if you want them to start at the same time a rondezvous is the correct option.  You can also rondezvous to stop too.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 5 of 6
(3,754 Views)

You also should use Lock steps or the lock setting on a step whenever you need to access any resources or data shared between the threads if access to such resources and data aren't already protected in some way.

 

-Doug

0 Kudos
Message 6 of 6
(3,742 Views)