Continually Update a Message Pop-up with the Latest Value of a Variable in TestStand

Updated Apr 11, 2019

Reported In

Software

  • TestStand
  • LabVIEW
  • LabVIEW NXG

Issue Details

I have a File Global Variable updating in a separate thread of my TestStand Execution. In the main sequence, a message popup displays showing the value of this variable. How can I get the value shown in the message popup to update as the File Global does?

Solution

When TestStand reaches a Message Popup step, the string in the Message Expression box of the step settings is displayed to the user. Changes to any variables entered in the message expression will not update in the popup display.
If the user needs to see the latest value of the variable, there are a number of ways of doing this. This article details two of these.

1. Using a Timeout with the Message Popup Step

The simplest and quickest way of achieving this functionality is to set a timeout on the message popup.

  • In the Step Settings, in the Text and Buttons tab, set the Timeout Button to any visible button, and then specify the Time to Wait(sec) as the amount of time between the variable refreshes its value.

 
 
  • In the Properties tab of the Step Settings, go to Post Actions. 

  • Check the Use Custom Condition Box and specify the condition as: 

Step.Result.ButtonHit == <Timeout Button>
  • Configure On Condition True as Goto step then specify this Message Popup Step.

  • Configure On Condition False as Goto Next Step.

 

The Message Popup will now refresh itself with the new value of the variable every time the dialoge times out.
 

2. Using a a LabVIEW VI to Display the Variable

 In the above method, the message popup will noticeably refresh when updating the variable. A cleaner method of showing a changing variable to the user would be to use a LabVIEW VI to display it.

  • Use the TestStand - Get Property Value.vi to pass a variable into a LabVIEW VI. 

    • Create a Control from the Sequence Context In input of the function and, on the front panel, add this to the connector pane.

    • Pass the name of the variable that you need to access into the Lookup String input, for example: FileGlobals.Numeric.
    • Pass the output of the function to an indicator on the front panel for displaying the value.

Here is a very simple example that takes a numeric File Global from TestStand and Displays it in a LabVIEW VI. This VI will always show the current value of a TestStand Variable.


Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project.
To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.

 

  • Configure an Action Step that calls the VI.

    • In the Module tab of the Step Settings, enter the file path of the VI created in the previous steps.

    • Pass the Sequence Context into the VI by setting the Sequence Context in parameter to RunState.ThisContext.

    • Enable the Show VI Front Panel Option (This is grouped with the Browse for a VI... button).

An Example Configuration is shown below: