To download NI software, including the products shown below, visit ni.com/downloads.
This example demonstrates how to log the results of a sequence call executed in a new thread using a wait step
When calling a subsequence from your TestStand sequence, you can optionally specify that the subsequence is run in a new thread, which allows the top level sequence to continue executing while the subsequence executes in parallel. However, this introduces an issue when collecting the results of the subsequence. For a traditional synchronous sequence call, the results for the sequence steps are propagated to the subsequence call step. With an asynchronous call, however, the subsequence call step has already finished executing when the subsequence completes. To address this, you can use a wait step in your calling sequence to wait for the subsequence to complete, and gather the results of the subsequence.
Follow these steps to configure a wait step to wait on a subsequence executed in a new thread:
The wait step is now configured to wait for the new thread to complete, and will automatically gather the results of the thread.
The attached example demonstrates this concept with a simple subsequence.
Recording Results for a new Thread - TS2016
TestStand 2016 or compatible
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.