Using Both LabVIEW 32-Bit and 64-Bit in TestStand

Updated Jun 7, 2023

Environment

Software

  • TestStand
  • LabVIEW

Disclaimer: NI strongly recommends using a single bitness when developing applications

This article will walk through how to call both LabVIEW 32-bit and LabVIEW 64-bit codes from a single TestStand sequence. This can be a requirement as the code base could depend on add-ons only available in different bitness.

Requirements:
  • Both LabVIEW 32-bit and LabVIEW 64-bit development environments
  • TestStand either 32-bit or 64-bit

Calling code with mixed bitness in a single OS process is not possible. In order to enable such mixture, you have to spawn two processes of different bitness which run the according components.

Using TestStand, the LabVIEW adapter settings allow you to define how LabVIEW code is called by TestStand.
The recommended setting for deployed test systems is using the LabVIEW Run-Time Engine. This however forces LabVIEW code to have the same bitness as TestStand because the LabVIEW Run-Time Engine is attached to the process of the TestStand User Interface.

Changing the TestStand LabVIEW adapter setting to use the LabVIEW Development Environment will spawn a new OS process for LabVIEW. You can select the bitness of that process and it can be different from TestStand:
 
image.png

The TestStand sequence execution will control the LabVIEW process to load and run LabVIEW code as needed by the test execution.

Using this configuration allows you to call LabVIEW code which is of different bitness than TestStand.
Calling LabVIEW code with the same bitness as TestStand requires either:
  • Compiling that code into a format that doesn't require the LabVIEW adapter -- or --
  • Setting step properties to force the LabVIEW adapter to use the LabVIEW Run-Time Engine.

You can compile LabVIEW code as C/C++ DLL or .NET interop assembly using the LabVIEW Application Builder.
image.png

Use the C/C++ adapter or .NET adapter in TestStand accordingly to call that built LabVIEW code.

Configure the LabVIEW Advanced Settings in the LabVIEW Module tab to Always Run VI in LabVIEW Run-Time Engine if you don't want to recompile the code to C/C++ DLL or .NET assembly.
Advance Settings.jpg

Using TestStand 32-bit, you have to do the following:
  1. Configure the LabVIEW adapter in TestStand to LabVIEW Development Environment 64-bit. This requires the computer to have an activated developer license of LabVIEW 64-bit. Use the LabVIEW adapter for all steps which call LabVIEW code in 64-bit.
  2. Do one or any combination of the following as deemed suitable. Both require installation of the 32-bit LabVIEW Run-Time Engine.
    1. Recompile LabVIEW code which is 32-bit into a DLL (C/C++ or .NET) using LabVIEW Development Environment with Application Builder. This requires a computer to have an activated developer license of LabVIEW 32-bit.
      The computer can be a different one as the computer you are using for TestStand. In that case you have to deploy the DLL file including all dependencies (e.g. configuration files) to the test computer. Use the C/C++ adapter for all steps which call the C/C++ DLL you created with LabVIEW and the .NET adapter for all steps which call the .NET assembly you created with LabVIEW.
    2. Configure steps calling LabVIEW 32-bit code to Always Run VI in LabVIEW Run-Time Engine in the LabVIEW Advanced Setting Dialog
 
Using TestStand 64-bit, you have to do the following:
  1. Configure the LabVIEW adapter in TestStand to LabVIEW Development Environment 32-bit. This requires the computer to have an activated developer license of LabVIEW 32-bit. Use the LabVIEW adapter for all steps which call LabVIEW code in 32-bit.
  2. Do one or any combination of the following as deemed suitable. Both require installation of the 64-bit LabVIEW Run-Time Engine.
    1. Recompile LabVIEW code which is 64-bit into a DLL (C/C++ or .NET) using LabVIEW Development Environment with Application Builder. This requires a computer to have an activated developer license of LabVIEW 64-bit.
      The computer can be a different one as the computer you are using for TestStand. In that case you have to deploy the DLL file including all dependencies (e.g. configuration files) to the test computer. Use the C/C++ adapter for all steps which call the C/C++ DLL you created with LabVIEW and the .NET adapter for all steps which call the .NET assembly you created with LabVIEW.
    2. Configure steps calling LabVIEW 64-bit code to Always Run VI in LabVIEW Run-Time Engine in the LabVIEW Advanced Setting Dialog