This content is not available in your preferred language.
The content is shown in another available language. Your browser may include features that can help translate the text.
You can find instrument drivers for more than 5,000 instruments on the Instrument Driver Network. Look here to find an instrument driver for your particular instrument. If you find one, follow the procedure below to load it into CVI
You can load and unload instrument drivers manually using the Instruments Folder in the Library Tree or using the Instrument menu. Instrument drivers loaded through the Instruments folder or Instrument menu do not have to be listed in the project, and you can load or unload them at any time except during program execution. You also can load instrument drivers by dropping .fp files onto the Library Tree directly.
To incorporate instrument drivers into the project, select File»Add to Project in a Function Panel window or the Function Tree Editor or select Edit»Add Files to Project in the Workspace window. If you drop the .fp file onto a project in the Project Tree, LabWindows/CVI adds the file to the project and loads the instrument driver if the project is the active project. If you drop the .fp file onto an inactive project, LabWindows/CVI adds the .fp to that project, but does not load the .fp. If you drop the .fp file onto the Library Tree, LabWindows/CVI loads the instrument driver but does not add it to any project. The .fp file represents the instrument driver in the project. If the .fp file is in the project when you open the project, LabWindows/CVI automatically loads the instrument driver and removes it when you unload or deactivate the project.
The following figure shows the function tree layout for the Agilent 34401A driver. You can double-click on any of the functions to open that function and edit or run it.
Figure 1. Agilent 34401 Function Tree Layout
For example, if you double-click on the Initialize function, that function panel will open. This function performs the following initialization actions:
Figure 2. Agilent 34401 Initialize Function
The following figure shows the organization of a typical instrument driver.
Figure 3. Instrument Driver Organization
A LabWindows/CVI instrument driver typically consists of the following three or four files. Each file has the same base file name, 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.
You must compile these files in LabWindows/CVI or in a compatible external compiler.
For example, the instrument module files for the Agilent (HP) 34401A multimeter are hp34401a.fp, hp34401a.c, and hp34401a.h. A Word document that describes the functionality of that particular instrument driver is also included when you download an instrument driver. This document is intended to be used as a programming reference manual.
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 refer to functions, global variables, and constants in the instrument driver.
Similar to a LabVIEW instrument driver, a LabWindows/CVI instrument driver is usually composed of the following functions/classes:
Initialize:This function initializes the instrument and sets it to a default configuration.
Configuration Functions: (Class)This class of functions configures the instrument by setting acquisition and system configuration parameters.
Action/Status Functions: (Class)This class of functions begins or terminates an acquisition. It alsoprovides functions which allow the user to determine the current status of the instrument.
Data Functions: (Class)This class of functions transfers data to or from the instrument.
Utility Functions: (Class)This class of functions provides lower level functions to communicate with the instrument, and change instrument parameters.
Close:This function takes the instrument offline.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.