Executing LabWindows/CVI Code Modules In-Process

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

When executing code modules in the same process as the sequence editor or user interface, the LabWindows/CVI Adapter loads and runs code modules directly without using the LabWindows/CVI development environment.

Object and Library Code Modules

When the LabWindows/CVI Adapter loads an object or static library file, the LabWindows/CVI Run-Time Engine resolves all external references in the file. When running code modules in-process, the adapter must load the support libraries on which the object file or static library file depends before loading the code module file.

To configure a list of support libraries for the LabWindows/CVI Adapter to load, manually copy the support libraries to the <TestStand Public>\AdapterSupport\CVI\AutoLoadLibs directory.

Source Code Modules

When TestStand executes code modules in-process, the LabWindows/CVI Adapter cannot directly execute code modules that exist in C source files. Instead, the adapter attempts to find an object file with the same name. When the adapter finds the object file, it executes the code in the object file. When the adapter cannot find the object file, it prompts you to create the object file in an external instance of LabWindows/CVI. When you decline to create the object file, the adapter reports a run-time error.

Debugging DLL Code Modules

You can debug in-process code modules, but the code modules must exist in DLLs enabled for debugging in LabWindows/CVI at the time they were built. To debug a DLL in-process, you must launch the sequence editor or user interface from LabWindows/CVI. Select Run»Specify External Process in the LabWindows/CVI project window to identify the executable you want to launch. Select Run»Debug Project to launch the executable and begin debugging.

When you click Step Into in the sequence editor while the execution is suspended on a step that calls into a LabWindows/CVI DLL you are debugging, LabWindows/CVI suspends on the first statement in the DLL function.

In TestStand 2016 and later, the LabWindows/CVI debugger automatically attaches to a TestStand process when you perform a step into operation on a LabWindows/CVI Adapter step. If the LabWindows/CVI DLL is debuggable and the source code is available, LabWindows/CVI suspends the process in the called DLL function; otherwise, TestStand performs a step over operation. You do not need to launch the Sequence Editor from LabWindows/CVI to access the debugger or choose to attach the debugger to an existing process.

Note Note  You must be using LabWindows/CVI 2015 SP1 or later for the debugger to automatically attach to a TestStand process.

Refer to the LabWindows/CVI documentation for more information about debugging DLLs.


See Also

Executing Code Modules in an External Instance of LabWindows/CVI

WAS THIS ARTICLE HELPFUL?

Not Helpful