Updating the Status Bar Using UI Messages - LabVIEW
- Updated2025-07-23
- 2 minute(s) read
Purpose
This example demonstrates how to use LabVIEW to show step execution progress and status in the TestStand Sequence Editor or Execution window.
Example File Location
<TestStand Public>\Examples\Modifying User Interfaces\Updating the Status Bar Using UI Messages\LabVIEW\Updating the Status Bar Using UI Messages.seq
Highlighted Features
- LabVIEW Adapter
- Execution
Major API
- SequenceContext
- Thread
- Thread.PostUIMessage
- UIMessageCodes Enumeration
Prerequisites
You must have the LabVIEW development system installed and you must configure the LabVIEW Adapter to use the LabVIEW development system.
How to Use This Example
Complete the following steps to use this example.
- On the Steps pane, select the Call Long Test step, which is an Action step that uses the LabVIEW Adapter.
- On the Step Settings pane, click the LabVIEW Module tab.
- Click the Edit VI button, located to the right of the VI Path control, to open in LabVIEW the VI the Call Long Test step calls.
- In LabVIEW, switch to the block diagram and select Help»Show Context Help to display the Context Help window for the block diagram. The block diagram specifies the following functionality for the VI:
- The Sequence Context property node obtains a reference to the Thread object and initializes the termination monitor.
- The execution enters the Stacked Sequence Structure and executes frame 0. Select frame 0 of the Stacked Sequence Structure. The Start Time is stored in the sequence local variable.
- Select frame 1 of the Stacked Sequence Structure. The Get Monitor Termination Status VI stops the VI if you terminate or abort the execution. If you do not terminate or abort the execution, the False case of the case structure executes.
- The VI invokes the Thread.PostUIMessage method and posts a ProgressPercent user interface (UI) message that updates the progress bar the sequence displays in TestStand with the percent complete.
- The VI posts a ProgressText UI message to update the progress text on the status bar with the percent finished. This behavior continues in the While loop until the time limit expires or you terminate or abort the execution. If the time limit expires, the execution continues to frame 2 of the Stacked Sequence Structure.
- Select frame 2. In the False case of the case structure, the progress bar updates to 100 percent and the progress text updates to Test Finished.
- The Thread object reference the terminator monitor close.
- Close the VI. Do not save any changes.
- In TestStand, select Execute»Single Pass to run the sequence. Review the progress bar and progress status field on the status bar of the sequence editor.