Creating a dll for a LabWindows/CVI Custom Code Generator
- Updated2025-10-28
- 2 minute(s) read
Creating a dll for a LabWindows/CVI Custom Code Generator
You can create a dll that contains the functions for a LabWindows/CVI custom
code generator and use the dll you create as a starting point for
customizing the code generator behavior.
Note When you create a function in a C
file to implement a custom code generator callback, the function must use the same
name as the LabWindows/CVI or Visual C++ function prototype that implements the same
callback. For example, if you create a function to implement the PreTranslateAction
callback, the function name must be
CodeGenerator_PreTranslateAction(). If you use a function
prototype as a starting point to implement a callback, the manufacturer recommends
that you copy the example source files to another location and modify the copies so
that you do not modify the examples the ATML Toolkit installs.
Complete the following steps to create a new dll and configure the ATML TD
translator to use the dll as a custom code generator:
Note You can also copy the
existing example project and source files from the
<TestStand Public>\Examples\Toolkits\ATMLTDTranslator\Code
Generator\LabVIEW directory and modify the copies.
- Select Project from Template in the New section of the LabWindows/CVI welcome page, or select in LabWindows/CVI to launch the New Project From Template dialog box.
- In the template type control, select Dynamic-Link Library.
- Specify a name, directory, and path for the LabWindows/CVI project in the Project name, Project folder, and Project path controls, respectively.
- Click OK to create the project and source files and close the New Project From Template dialog box. A new Workspace window opens in LabWindows/CVI.
- Use the recommended LabWindows/CVI function prototype or Visual C++ function prototype to
implement the body of the function for the callback. Refer to the LabWindows/CVI
project and source files located in the
<TestStand Public>\Examples\Toolkits\ATMLTDTranslator\Code
Generator\CVI directory for examples of how to implement callbacks in
a LabWindows/CVI dll. Note You must expose the prototype of each callback as __stdcall in the dll.
- Select to build the LabWindows/CVI project.
- Complete the following steps to configure the ATML TD translator to call the
dll you created as a LabWindows/CVI custom code generator:
- In TestStand, select to launch the ATML Test Description Translator Configuration dialog box.
- Click the Code Module Settings tab and enable the LabWindows/CVI option.
- In the Path to Custom Code Generator DLL control, enter or browse to the complete path for the path you specified in Step 3.