The First Method
- 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)
- 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.
- Launch the Top-Level VI.
- Add a boolean LED and name it accordingly, for example, Overall UUT Status.
- Go to the Block Diagram, by pressing Ctrl + E, and change the case selector label to Register Event Callbacks case.
- Expand Reg Event Callbacks.
- Right click VI Ref, then select Create Callback VI.
- Double click the Callbacks VI, edit it as below then return back to Top-Level VI.
- 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.
- 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
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.