Example Code

Adding a Progress Bar to a LabVIEW Built TestStand User Interface

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW
  • Teststand

Code and Documents

Attachment

Overview

This example demonstrates how to add a status bar control to a TestStand User Interface.  The example is based on the Simple User interface which ships with TestStand.

 

Description

It can be useful to add a status bar to a TestStand User interface to display information about the current state which is visible at all times.  You can configure a status bar control in any TestStand User Interface through the following steps:

 

  1. Add a status bar control from the TestStand Palette to the front panel of the User Interface UI.
  2. Right-click the control and select StatusBar » Properties to add panes within the status bar.
  3. Add a pane for each piece of data you want to display to the user in the Panes tab of the options dialog.
  4. Click OK to close the dialog.

Once the control is created, you will need to create connections for each pane to a TestStand manager control in order to define the information which will be shown in each pane.  In this example, two panes are created to display the progress percentage and progress text, which can be updated from a running sequence file using UI messages.  Use the ConnectCaption method to set the text for each pane in the status bar.  The example implements this as shown:

 

 

paneConnections.PNG

Once the connection is established, no further action is needed; the values of the panes will be managed by the manager controls.

 

Hardware and Software Requirements

TestStand 2016 or compatible

LabVIEW 2016 or compatible

 

Steps to Implement or Execute Code

 

  1. Extract the attached archive, and open TestExec.exe
  2. Open the status bar shipping example, located in <TestStand Public>\Examples\Modifying User Interfaces\Updating the Status Bar Using UI Messages\LabVIEW\Updating the Status Bar Using UI Messages.seq.  This example posts UI messages to update the status bar text and the progress percentage fields
  3. Run the example sequence.  Observe that the status bar fields update

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.