Show TestStand Pass Fail Status in LabVIEW UI

Updated Apr 12, 2023



  • TestStand
  • LabVIEW

I would like to customize my LabVIEW User Interface (UI) to have a LED that shows green when the Test Sequence passes or red when fails. This article provides two methods to get overall pass/fail status from callback function in LabVIEW. The first method uses UIMessage Event by adding a Statement step to MainSequence. But requiring every sequence developer adding extra step is not reasonable. So the second method uses EndExecution Event without modifying sequence files.

The First Method

  1. Add a Statement step to MainSequence at the end of the Main Step Group in TestStand and insert the following expression to the Expression text box.
    • RunState.Thread.PostUIMessageEx(10101, !RunState.SequenceFailed? 1:0 ,"", Nothing, False)
  1. Go to your LabVIEW TestStand UI project.
    • Note: In this example we are using the example LabVIEW Simple UI from <TestStand Public>\UserInterfaces\Simple\LabVIEW\Source Code\Build Script.lvproj. You should implement this in your own custom UI.
  1. Launch the Top-Level VI.
  2. Add a boolean LED and name it accordingly, for example, Overall UUT Status.
  1. Go to the Block Diagram, by pressing Ctrl + E, and change the case selector label to Register Event Callbacks case.
    1. Expand Reg Event Callbacks.
    2. Right click VI Ref, then select Create Callback VI.
  1. Double click the Callbacks VI, edit it as below then return back to Top-Level VI. 
  1. In the Top-Level VI Block Diagram, change the case selector label to Handle Events case and edit it as below.
    • Connect the global variable, Boolean, to Overall UUT Status terminal.

The Second Method

Take <TestStand Public>\Examples\Modifying User Interfaces\Creating a Basic User Interface\LabVIEW\Basic User Interface.lvproj as example.
  1. Create global variable to store overall pass/fail status.
2. Expand Reg Event Callbacks and add EndExecution Event

3. Right-click VI Ref and Create Callback VI for End Execution event

Screenshot 2022-11-03 163336.PNG.jpg
4. Open the callback VI and edit as follow
5. In the Basic User Interface VI block diagram, select the condition selector label as the "Handle Events" condition and edit it as follows.