When you open a reference for a VI that you want to call asynchronously, you must decide whether you want to collect the results of the VI later. This topic describes how to start an asynchronous call-and-forget VI call without tracking when or what values the VI returns. Other programming languages describe this usage model as fork-and-forget. Alternatively, you can call a VI and collect its results later.

What to Use

Use the following block diagram objects to asynchronously call a VI without collecting its results:

What to Do

Create the following block diagram to dynamically start an asynchronous call to a VI without collecting the results.



The following list describes important details about the previous diagram.

Note The LabVIEW Help displays each of the option flags for the Open VI Reference function in hexadecimal representation. Therefore, always change the display format of the Numeric Constant input to hexadecimal to ensure that you are passing the correct value.

Caveats and Recommendations

  • Do not call VIs that never terminate. After you start a call with a call-and-forget VI reference, LabVIEW does not abort the target VI when the calling VI finishes executing. Instead, the target VI executes to completion regardless of whether the calling VI is still running. Therefore, if the target VI contains an infinite loop or otherwise cannot finish executing, it remains in memory until you close LabVIEW and may negatively impact performance.
  • If you call the Abort method on a call-and-forget VI reference, LabVIEW aborts all currently running instances of the VI.

Examples

Refer to the Asynchronous Call and Forget VI in the labview\examples\Application Control\VI Server\Asynchronous Call By Reference directory for an example of asynchronously calling a VI without collecting its results.