Symmetric Multiprocessing in VIs Executed from TestStand
- Updated2025-07-23
- 2 minute(s) read
Symmetric Multiprocessing in VIs Executed from TestStand
LabVIEW can use multiple execution threads to execute VIs called from TestStand. Executing VIs with multiple threads can improve performance on multi-core and multi-processor systems, particularly when the VIs contain complex data flows, such as parallel loops, branched wires, or asynchronous communication with hardware devices.
When TestStand calls a VI, the number of execution threads LabVIEW uses to run the VI depends on the following factors:
- Whether you enable the Execute ‘Same as caller’ VIs Using Multiple Threads option in the LabVIEW Adapter Configuration dialog box
- The setting of the Preferred Execution System option on the Execution page of the VI Properties dialog box in LabVIEW
- The version of LabVIEW that executes the VI
- By default, in scenarios that do not include TestStand, LabVIEW uses multiple threads to execute VIs if the preferred execution system of the VIs is not set to user interface.
- LabVIEW always uses a single thread to execute VIs for which the preferred execution system is user interface. NI strongly discourages using the user interface preferred execution system for VIs you call from TestStand. The remainder of information in this topic excludes consideration of the user interface preferred execution system.
LabVIEW 2009 or Later
The following table shows how these factors apply when you execute VIs using the LabVIEW 2009 or later development system or Run-Time Engine (RTE).
| LabVIEW Setting:Preferred Execution System | TestStand Option:Execute 'Same as caller' VIs Using Multiple Threads | |
|---|---|---|
| Enabled | Disabled | |
| same as caller | Multiple threads | Single thread |
| Not same as caller | Multiple threads | Multiple threads |
LabVIEW 8.6.1 or Earlier
The following shows how these factors apply when you execute VIs using the LabVIEW 8.6.1 or earlier development system or RTE.
| LabVIEW Setting:Preferred Execution System | TestStand Option:Execute 'Same as caller' VIs Using Multiple Threads | |
|---|---|---|
| Enabled | Disabled | |
| same as caller | Single thread | Single thread |
| Not same as caller | Multiple threads | Multiple threads |
Configuring CPU Affinity and the Number of LabVIEW RTE Execution Threads
Using the LabVIEW Adapter, you can configure the CPU affinity for LabVIEW development system or RTE execution threads, and you can configure and the number of execution threads the LabVIEW RTE uses to execute VIs. You can adjust these settings to optimize performance for a particular system.