Changing the Location of Configuration Directory of Teststand in a Custom User Interface

Updated Jun 8, 2023

Reported In

Software

  • LabVIEW
  • TestStand

Issue Details

  • I am developing a custom user interface using the TestStand API, and I am interested in change the directory where the TestStand configuration files are saved, it is possible?
  • I am deploying a test system based on TestStand using the Simple User Interface and my deployment computer cannnot load the TestStand configuration files from a custom location, why?

Solution

You should use the TestStand API to indicate TestStand Engine the directory of the configuration files . To modify in the appropiate way the Simple User Interface in LabVIEW, refer to following steps:

1. Open the LabVIEW project that includes the source code of the Simple User Interface, it is located in  <TestStand Public>\UserInterfaces\Simple\LabVIEW\Source Code. The project file si called Build Script.lvproj.

2. Open the Top-Level.VI, and select the "Initialize" case in the case structure:


3. Open the Get Engine Reference.vi to apply the following changes:
  • Use the SetConfigDirectory method to specify the location of configuration directory. For example in this document is used subfolder in the project location called StationConfig:
  • Then, you should call the Shutdown method on the application manager, the application manager will handle the engine shutdown procedure automatically.

Once shut down, you can restart the application manager and continue using the TestStand engine within your user interface. In the Simple user Interface the start of the application manager is handled in "Start Application" case. 
Below you can find the code (LabVIEW 2019) for  Get Engine Reference.vi:



4. After saving these changes, you can rebuild the executable of the Simple User Interface.

Additional Information

Using the Sequence Editor, you can change the directory of the configuration files:

1. Go to Configure>>Station Options...
2. Fromt the Station Options Windows,  select the Preferences Tab and from the Configuration Directory Option you can change the location:



The default location is  <TestStand Application Data>\Cfg.

For additional information about how to customize the Simple User Interface refer to Working with the TestStand Simple User Interface - LabVIEW .