Termination Monitor - LabVIEW NXG

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Purpose

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.

Example File Location


Open Example

<TestStand Public>\Examples\Fundamentals\Termination Monitor\LabVIEW NXG\Termination Monitor.seq

Highlighted Features

Major API

None

Prerequisites

To run this example, you must have the LabVIEW NXG development system installed.

Note Note  The Termination Monitor palette VIs do not require the LabVIEW NXG development system. This requirement applies only to this example.

How to Use 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:

  1. Select Execute»Single Pass to run the sequence.
  2. When the TerminationMonitorExample VI front panel appears, the sequence will execute indefinitely.
  3. On the Debug toolbar in TestStand, click the red Terminate button to terminate the execution. Observe that the execution terminates successfully and the dialog is closed.

WAS THIS ARTICLE HELPFUL?

Not Helpful