Controlling Thread Execution with TestStand

Updated Feb 23, 2026

Reported In

Software

  • TestStand

Issue Details

I have several Devices Under Test (DUT), that I need to test in the parallel or batch mode, but I am limited by the available number of measurements devices to perform these tests. I need the threads to run simultaneously to perform tests as fast as possible.

Solution

While operating in the parallel or batch model, use synchronization steps, such as lock steps, to prevent code from calling the instrument handles in more than one instance. Create code modules after the instrument modules to process the data for results and free the instruments to take the next measurement.

The number of threads that can be executed when testing from hardware will always be equal to the number of Devices Under Test (DUTs) / The number of simultaneous channels available on the hardware.

Additional Information

Relevant TestStand Examples can be found here (Note the path will change based on your TestStand version): 

C:\Users\Public\Documents\National Instruments\TestStand 20XX (64-bit)\Examples\Parallel Testing\Comparing Resource Usage Strategies\Comparing Resource Usage Strategies.seq

C:\Users\Public\Documents\National Instruments\TestStand 20XX (64-bit)\Examples\Built-In Step Types\Synchronization Step Types\Synchronization Step Types - Lock.seq