|Download Help (Windows Only)|
This example demonstrates the use of the Termination Monitor in LabVIEW NXG. The Termination Monitor allows a code module to stop executing if TestStand attempts to terminate or abort the execution.
<TestStand Public>\Examples\Fundamentals\Termination Monitor\LabVIEW NXG\Termination Monitor.seq
To run this example, you must have the LabVIEW NXG development system installed.
|Note The Termination Monitor palette VIs do not require the LabVIEW NXG development system. This requirement applies only to this example.|
This example uses a LabVIEW NXG Action step to call a VI that runs indefinitely. Since this VI uses the Termination Monitor functions, it is able to stop when TestStand attempts to terminate or abort the execution. If the VI did not include the Termination Monitor functions, TestStand would be unable to terminate or abort the execution because the execution must wait for code modules to complete before terminating or aborting.
To review the configuration of the VI, click the edit VI button and observe the block diagram.
Every 100 milliseconds, the TestStand easy termination monitor VI is called to determine whether TestStand is attempting to stop the execution. If so, the VI exits. This VI automatically handles starting and stopping the termination monitor. The easy termination VI returns True if either the TestStand execution is terminated, or if the stop loop input is true. This allows the dialog to stop based on a condition in the code module.
Note that the Termination Monitor VIs require the SequenceContext of the calling sequence which is used to monitor the execution state. The SequenceContext is passed to the code module as a parameter.
Complete the following steps to run the example: