Run LV NXG VI Asynchronously Edit Tab

Insert a Run VI Asynchronously step and select Edit Run LV NXG VI Asynchronously or Step Settings from the context menu to display the Run LV NXG VI Asynchronously edit tab in the TestStand Sequence Editor .

Use the Run LV NXG VI Asynchronously edit tab to specify the VI to run. When TestStand executes the Run LV NXG VI Asynchronously step, TestStand launches a dynamically-generated sequence in a new thread which executes the VI.

The Run LV NXG VI Asynchronously edit tab contains the following options:

  • Specified VI —The name of the project/GLL and VI to run in the step. Click Specify VI to launch the Edit LabVIEW NXG VI Call dialog box, in which you can specify the prototype and parameters of the VI. When you select multiple Run LV NXG VI Asynchronously steps, TestStand dims the Specify VI button.
  • Store an Object Reference to the New Thread in (optional) —The location to store the reference to the new Thread object the step creates. You can use this reference in subsequent calls to the TestStand API. You can also use this reference in a Wait step to wait for the thread to complete.
  • Automatically Wait for the Thread to Complete at the End of the Current Sequence —Specifies whether the calling sequence does not complete execution until the thread this step launches completes execution.
  • Context to Pass as ThisContext for VI Arguments —The context the step uses when you pass ThisContext as a parameter. Select from the following options:
    • Use Context of Calling Thread (Accessing the context of the calling thread requires additional synchronization for thread safety.) —When you specify ThisContext as an argument for a parameter of a VI, TestStand uses the context of the calling thread. If you enable this option, also enable the Automatically Wait for the Thread to Complete at the End of the Current Sequence option to ensure that TestStand does not clean up the context of the calling thread before the asynchronous VI completes.
      Notice Using the context of the calling thread in the newly created thread can lead to race conditions and crashes because the calling thread continues to execute in parallel, and TestStand might create or remove variables in the context of the calling thread while the sequence is running or when the sequence completes. TestStand does not automatically ensure thread safety for structural changes to variables, such as adding or removing subproperties.
    • Use Context of New Thread (National Instruments recommends using this option if you do not need direct access to data from the calling sequence.) —When you specify ThisContext as an argument for a parameter of a VI, TestStand uses the context of the new thread. If you need to access variables from the context of the calling thread, pass the variables as parameters to the VI instead.
Note The LabVIEW NXG Utility step types are only available in 64-bit TestStand since they call LabVIEW NXG code modules and LabVIEW NXG is a 64-bit application. If you try to use LabVIEW NXG Utility step types in a 32-bit version of TestStand, you will get an error and the step’s settings will be disabled.

See Also

LabVIEW NXG Utility Step Types

Step Properties dialog box

Wait Step