Error -1074130544: Session Handle Is Invalid When Using InstrumentStudio Configurations in TestStand

Updated Jun 10, 2022

Reported In

Software

  • TestStand
  • InstrumentStudio

Issue Details

I use exported IO Configurations from InstrumentStudio in Teststand. I pass the session from Create Sessions and Apply Configuration to a VI Call step. 

When running my code, I get the following error in the VI Call step:

IVI: (Hex 0xBFFA1190) The session handle is not valid.
 
Picture1.png
 

Solution

The cause of this error can be a difference in the LabVIEW Run-Time (RTE) versions used by the IO Configuration step and the VI Call step.

Check the LabVIEW adapter settings Configure>>Adapters…>>LabVIEW Adapter Configurations

Picture2.png
 

if Auto detect using VI version is selected, then TestStand uses a specific LabVIEW runtime version.

The default behavior for the IO configuration steps is:
TestStand 2020 uses LabVIEW RTE 2019 for the IO Configuration steps 
TestStand 2021 uses LabVIEW RTE 2020 for the IO Configuration steps 

For example, if you have LabVIEW 2021 and Teststand 2021 this would mean that the IO Configuration Step uses LabVIEW RTE 2020 while the VI Call Step uses LabVIEW RTE 2021. Therefore, the session handle is invalid.

To mitigate the issue, there are two options:

  • If you want to change the default version for the IO Configuration steps, you must change the value for key 'DEFAULT_LV_RTE_VERSION_FOR_IPXI_VI' in IOConfigurationsStrings.ini file to the desired value e.g., '2021'.
  • You can change the adapter setting to use only a specific version of the LabVIEW RTE compatible with your VIs. For example, setting it to only use LabVIEW 21.0.