Starting and Shutting Down TestStand from a LabVIEW User Interface
- Updated2025-07-23
- 2 minute(s) read
Invoke the ApplicationMgr.Start method to start TestStand, as shown in the Simple OI - Top-Level VI and in the Full UI - Top-Level VI example user interface VIs.
User interface applications wait in a main event loop after starting TestStand. The main event loop must handle the events that stop the user interface application. The main event loop can also handle other events, such as menu selections and LabVIEW control changes.
Typically, you click the Close box or execute the Exit command through a TestStand menu or a Button control to stop a user interface application.
When you click the Close box, the Event structure in the main event loop handles the Panel Close? event. The block diagram that handles the event invokes the ApplicationMgr.Shutdown method and discards the event. When the ApplicationMgr.Shutdown method returns True to indicate TestStand is ready to shut down, the main event loop stops. When the ApplicationMgr.Shutdown method returns False, the main event loop waits because TestStand cannot shut down until the executions complete or you unload sequence files. When TestStand is ready, the Application Manager control generates the ApplicationMgr.ExitApplication event.
The callback VI for the ApplicationMgr.ExitApplication event generates a LabVIEW Quit Application user event, which the example user interface VIs handle, to inform the main event loop to stop.
Refer to the following example user interface VIs for examples of the main event loop and how to shut down TestStand. These VIs also provide examples of creating, generating, and handling the Quit Application event.
- Simple OI - Top-Level VI
- Simple OI - ExitApplication Event Callback
- Full UI - Top-Level VI
- Full UI - Create LabVIEW Application Events
- Full UI - ExitApplication Event Callback