TestStand 2019 Help
»View Product Info
This example demonstrates how you can create test sequences that can execute in 32-bit TestStand and 64-bit TestStand with no modifications.
The example uses the $(Platform) path macro in the module path to call the correct version of a LabWindows/CVI DLL and a C++ DLL based on the current bitness of TestStand.
The example uses a LabVIEW code module with the Separate Compiled Code from source file option enabled so 32-bit LabVIEW and 64-bit LabVIEW can execute the VI.
The example assembly is built using the Any CPU configuration so that 32-bit TestStand and 64-bit TestStand can call it.
Example File Location
<TestStand Public>\Examples\Fundamentals\Developing Platform Independent Test Systems\Developing Platform Independent Test Systems.seq
How to Use This Example
Complete the following steps to run the example:
- Select the CVI step or the C++ Action step. Observe that the $(Platform) path macro is present in the Module path. This macro evaluates as win32 or x64 in the resolved path based on the current TestStand bitness.
- Select the .NET Action step and click Edit to open the VI. Notice that the same code module path will be used for 32-bit TestStand and 64-bit TestStand. Because the assembly is built using the Any CPU Visual Studio Build Configuration Setting, the module can be called by either bitness of TestStand.
- If the LabVIEW development system is installed, select the LabVIEW Action step and click Edit to open the VI. In LabVIEW, select File»VI Properties. Notice that the Separate Compiled code from source file option is enabled. This setting allows the same VI to execute in 32-bit LabVIEW and 64-bit LabVIEW.
- Observe that the IF statement uses the Engine.Is64Bit property to determine the current bitness of TestStand. This property allows you to define different behavior for 32-bit TestStand and 64-bit the bitness of TestStand.
- Run the example and notice that the executed code module bitness matches TestStand.
- If possible, open the example in the other bitness of TestStand and observe the difference in behavior.
||Note This example uses a LabVIEW NXG code module, which is only supported in 64-bit TestStand. To ensure the sequence file with LabVIEW NXG code modules can be used in 32-bit TestStand, load the LabVIEW NXG code module dynamically and execute the step only if Engine.Is64Bit returns true.