Solution
Yes, you can use INI tokens with VIs called in TestStand. In short, you will need to modify or create an INI file associated with the executable (EXE) that will be used to launch the VI. This could be LabVIEW.ini associated with LabVIEW.exe (when the LabVIEW Adapter is configured to use the LabVIEW Development Environment) or SeqEdit.ini associated with SeqEdit.exe (when the LabVIEW Adapter is configured to use the LabVIEW Run-Time Engine). For more information, read below.
The way to use INI tokens with VIs called from TestStand will differ depending on two factors:
- Is the LabVIEW Adapter configured to use the LabVIEW Development Environment or Run-Time Engine?
You can check this setting in TestStand by selecting Configure»Adapters, and clicking Configure when LabVIEW is selected. - Which TestStand UI are you using?
Case 1 - Calling a VI in the LabVIEW Development Environment
In this case, the TestStand UI will not make a difference. The LabVIEW Adapter is configured to use the LabVIEW Development Environment, so LabVIEW.exe will be used to launch the VI, and therefore you will need to modify the associated INI file. In order to use INI tokens successfully for VIs called in this scenario, you must add the INI tokens to the labview\LabVIEW.ini file located next to labview\LabVIEW.exe. The section name for the LabVIEW.ini file is by default [LabVIEW].
Case 2 - Calling a VI in the LabVIEW Run-Time Engine
In this case, implementation will depend on which TestStand UI you are using. A TestStand UI can be built either in LabVIEW or other programming languages (e.g. CVI UI, C# UI, etc.):
TestStand UI is built in LabVIEW
In this case, the LabVIEW Adapter is configured to use the LabVIEW Run-Time Engine. In order to use LabVIEW INI tokens successfully for VIs called in this scenario, you must add them to the INI file that is auto-generated the first time the EXE runs (you could also manually create this INI file prior to running the EXE for the first time). The INI file will have the name executable_name.ini and should be placed in the same directory next to executable_name.exe. The section name for the executable_name.ini file should be and is by default [executable_name]. For example, the following files fall under this category:
TestStand\UserInterfaces\Simple\LabVIEW\TestExec.exe
TestStand\UserInterfaces\Simple\LabVIEW\TestExec.ini
TestStand UI is not built in LabVIEW or you are using the TestStand Sequence Editor
Again, the LabVIEW Adapter is configured to use the LabVIEW Run-Time Engine. In order to use LabVIEW INI tokens successfully for VIs called in this scenario, you must manually create an INI file with the name executable_name.ini and place it in the same directory next to executable_name.exe. The TestStand Sequence Editor (full TestStand software) falls into this category. In this case, the EXE is SeqEdit.exe so you would create an INI file called SeqEdit.ini. The section name in the INI file should be [LVRT].