Starting and Shutting Down TestStand from a LabWindows/CVI User Interface
- Updated2025-07-23
- 1 minute(s) read
When you initialize the user interface application, use the TSUI_ApplicationMgrStart driver function to invoke the ApplicationMgr.Start method, which starts the TestStand Engine and logs in a user.
LabWindows/CVI applications typically wait for user input by calling the RunUserInterface() function after loading and displaying the main user interface panel. The RunUserInterface() function handles all events, such as menu selections, control value changes, and ActiveX control events.
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. For user interface events that request the user interface to close, the user interface must call the TSUI_ApplicationMgrShutdown function to unload sequence files, log out, and trigger an OnApplicationCanExit event. When the function determines that the engine can shut down, the canExitNow output parameter returns True. The user interface application then calls the QuitUserInterface() function, which causes the preceding RunUserInterface() call to return. After the application exits the function call to RunUserInterface(), the user interface application must call TSUI_ApplicationMgrShutdown a second time to complete the cleanup process and shut down the engine.