Implement Multithreading for a Trigger-Based Application in TestStand

Updated May 21, 2019

Reported In


  • TestStand
  • LabVIEW


  • NI-DAQmx

Issue Details

  • I want to execute a step in my sequence that starts a VI which writes a boolean output at the start of a physical trigger. I'm running into errors when I try to call this VI dynamically within another VI. Is there a way to do multithreading for a trigger-based application in TestStand?


Whenever a trigger is in use, it is best practice to implement some sort of "Master-Slave" architecture. Therefore, when applying triggerable VI's in TestStand, multithreading is an effective method to launch the "Slave" VI and the "Master" VI one after another. This allows the primary test sequence thread to continue executing onto the second action step without having to wait for the first action step to be completed.

Parallelizing a test sequence can allow two steps to run asynchronously, ultimately enabling the first DAQ VI to wait for a trigger from the second VI.
Figure 1. Multithreading within a Sequence Call in TestStand

In Figure 1, the Audio Test sequence is executed in a separate thread when the Sequence Call step is executed in the main thread. Consequently, the "slave" module can now execute in parallel and wait for a trigger to be received in the next step of the main thread.
  • Depending on the code modules, a Wait step after the initial Parallel Sequence Call may be beneficial to ensure the "Master" module is not executed before the "slave" module is ready for it's trigger.

Additional Information

TestStand is installed with some very effective examples programs that provide great insight to implementing this multithreading concept.
  1. Executing Sequences in Parallel
  2. Executing Code Modules in Parallel