Admin Production ni-theme
Current Publication

Instrument Driver Files

LabWindows/CVI

Instrument Driver Files

A LabWindows/CVI instrument driver typically consists of the following three or four files. Each file has the same base filename, which is typically an abbreviation of the actual instrument name. The instrument driver files must reside in the same directory on your disk, or they must be in the appropriate VXIplug&play directories or in the appropriate IVI directories.

  • The function panels are in a .fp file.
  • For instrument drivers that use an attribute model, such as IVI drivers, there can be an additional .sub file that contains attribute information displayed in the function panels.
  • The function, variable, and defined constant declarations are in a .h include file.
  • The instrument driver program can be in one of several different types of files.
    • A .c source file.
    • A .obj object file that contains one or more compiled C modules or a .lib library file. You must compile these files in LabWindows/CVI or in an external compiler.

For example, the instrument module files for a Fluke 8840A multimeter are fl8840a.fp, fl8840a.c, and fl8840a.h.

You can load an instrument driver into the LabWindows/CVI interactive program whether the instrument program is in the form of a .c, .obj, or .lib file. The presence of the .h file is essential because you must include it in your program to reference functions, global variables, and constants in the instrument driver.

VXIplug&play Instrument Driver Files

When you install a VXIplug&play instrument driver, the installation program does not place the .h file in the same directory as the .fp file. The installation program places the .h file in the VXIPNP\include subdirectory. LabWindows/CVI then can find the include files in this subdirectory.

When you install a VXIplug&play instrument driver, the installation program places the .c file in the same directory as the .fp file. The installation program also installs a dynamic link library (.dll) and an import library (.lib) that is compatible with Microsoft Visual C/C++. These files are not in the same directory as the .fp file. The import libraries are in the VXIPNP\lib\msc subdirectory. The DLL is in the VXIPNP\bin subdirectory. The installation program adds the VXIPNP\bin directory to the PATH environment variable so that the DLL can be found using the standard Windows DLL search algorithm.

If the .fp file is under the VXIplug&play framework directory, LabWindows/CVI can find the appropriate import library. If LabWindows/CVI finds the import library, it gives it precedence over the .c file as the program file for the instrument driver.

IVI Instrument Driver Files

When you install an IVI instrument driver, the installation program does not place the .h file in the same directory as the .fp file. The installation program places the .h file in the IVI\include subdirectory. LabWindows/CVI can then find the include files in this subdirectory.

When you install an IVI instrument driver, the installation program installs a dynamic link library (.dll) and an import library (.lib) that is compatible with Visual C/C++. These files are not in the same directory as the .fp file. The import libraries are in the IVI\Lib\msc subdirectory. The DLL is in the IVI\bin subdirectory. The installation program adds the IVI\bin directory to the PATH environment variable so that the DLL can be found using the standard Windows DLL search algorithm.

If the .fp file is under the IVI Standard Root directory, LabWindows/CVI can find the appropriate import library. If LabWindows/CVI finds the import library, it gives it precedence over the .c file as the program file for the instrument driver.