Source Code Tab - Edit LabWindows/CVI Module Call Dialog Box

Source Code Tab

Use the Source Code tab to generate the source code for the function, edit the source code, and to resolve differences between the parameter list in the source code and the parameter information on the Module tab. You do not have to use the Source Code tab for TestStand to call the code module .

Note National Instruments recommends using DLL files when you develop code modules using the LabWindows/CVI Adapter.

If LabWindows/CVI 2019 or later is the active LabWindows/CVI installation, then the Module Pathname on the Module Tab updates to the .dll that the LabWindows/CVI project builds. If all the build configurations in the LabWindows/CVI project do not create the same .dll file path, a dialog appears, and you can choose which .dll to select as the Module path.

The Source Code tab contains the following options:

  • Source File that Contains Function —The pathname of the source file. If you want to create a new source file, you must enter an absolute pathname. If you are using an existing source file, you can enter an absolute or relative pathname. Relative pathnames are relative to the TestStand search directories .
  • CVI Project File to Open —The pathname of the LabWindows/CVI project file. If the code module is a DLL or static library, you must enter the name of the LabWindows/CVI project used to create the DLL or static library file. If the code module is an object module, you can also specify a project.
  • Create Code —Creates the source code shell for the function.

    If the source file you specify does not already exist, the LabWindows/CVI Adapter creates it. If the file already exists, the LabWindows/CVI Adapter appends the function to the end of the file. If a code template file exists for the step type you are using for the step, the LabWindows/CVI Adapter uses the template to create the shell of the new function. If multiple code templates exist based on the step type and the code template policy settings , TestStand launches the Choose Code Template dialog box, in which you can select the code template to use for the new code module. If the project file you specify does not already exist, the LabWindows/CVI Adapter creates a new project file and adds the source file to it. Enable the Use Prototype from Module Tab option when you want to use the prototype the Module tab specifies.

  • Edit Code —Edits the source code for the function.

    When you click Create Code or Edit Code , the LabWindows/CVI Adapter launches a copy of LabWindows/CVI and opens the source file. When you specify a project file in the Source Code tab, the LabWindows/CVI Adapter also opens the project in LabWindows/CVI. When you click Create Code and the function already exists in the file, a dialog box launches and gives you the choice of replacing the current function or adding the new function shell above the current function.

    Note If LabWindows/CVI returns a warning when you open a project that some TestStand API files were not found, remove the files from the project and then add them again from the <National Instruments>\Shared\CVI\instr\TestStand\API directory. The <National Instruments> directory is located at C:\<Program Files> . The <CVI> directory is located at C:\<Program Files>\National Instruments .
  • Verify Prototype —Checks for any conflicts between the source code and the parameter information on the Module tab.
  • Use Prototype from Module Tab —TestStand ignores the code template prototype and to use the prototype the Module tab specifies.

See Also

Parsing Parameters from Source Code