Run LV NXG VI Asynchronously Step Configuration Dialog Box

Select Configure Run LV NXG VI Asynchronously in the context menu for the step to launch the Run LV NXG VI Asynchronously Step Configuration dialog box from a TestStand User Interface . You can also click Configure Run LV NXG VI Asynchronously on the General tab of the Step Properties dialog box.

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 Step Configuration dialog box contains the following options:

  • 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.
  • Port Number —The TCP/IP port number to use to connect to the remote system.
  • Timeout (ms) —The time, in milliseconds, to wait for a connection before timing out. A value of –1 indicates to wait indefinitely.
  • Specified VI —The local path of the LabVIEW NXG project/GLL and VI to run. Click the LabVIEW NXG icon to launch the Edit LabVIEW NXG VI Call dialog box, in which you can specify the prototype and parameters of the VI.
  • 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.

See Also

Edit LabVIEW NXG VI Call dialog box

LabVIEW NXG Utility Step Types

Step Properties dialog box

Wait Step