LabVIEW 2018 Help
View Product Info
DOWNLOAD (Windows Only)
Before you build an instrument driver, check that no driver exists for the instrument you are using. You can use the NI Instrument Driver Finder to find, download, and install LabVIEW Plug and Play drivers for an instrument. You also can check the manufacturer's Web site, and the Instrument Driver Network and NI Drivers and Updates on the National Instruments Web site for drivers. You also can search for and install existing LabVIEW instrument drivers.
Use the Create New Instrument Driver Project wizard to create a LabVIEW Plug and Play instrument driver project that conforms to the Instrument Driver Guidelines. The generated instrument driver project includes instrument driver VIs and function palette files (.mnu).
Complete the following steps to create an instrument driver project using the Create New Instrument Driver Project wizard.
- Select Tools»Instrumentation»Create Instrument Driver Project to display the wizard.
- Select New driver from template or New driver, copy existing driver from the Project type pull-down menu, depending on whether you want to create the instrument driver project from a template driver or an existing project-style driver.
|Note If you want to create a new instrument driver project from an existing instrument driver, you must install the existing driver in the labview\instr.lib directory before you launch the Create New Instrument Driver Project wizard. You can search for and install existing instrument driver projects using the NI Instrument Driver Finder.|
- If you selected New driver, copy existing driver from the Project type menu, select an available instrument driver from the Source driver pull-down menu and click the Next button. If you selected New driver from template from the Project type menu, select a template type from the Source driver pull-down menu and click the Next button.
The following table lists the templates that the Create New Instrument Driver Project wizard uses. Select a template that best matches the capabilities of your instrument. All the templates except the General Purpose template create the core driver architecture with VIs and palette files (.mnu) for a particular type of instrument or device. The General Purpose template creates a basic driver that includes only the VIs and palette files common to most instrument drivers, regardless of instrument type.
|DC Power Supply||Controls basic operations such as outputting DC power and configuring the over-voltage and over-current protection. The template also includes features such as monitoring the output voltage and current.|
|Digital Multimeter||Controls basic operations such as setting the measurement function, range, and resolution. The template also includes advanced features such as configuring the trigger count and sample count and taking multipoint measurements.|
|Function Generator||Controls basic operations such as outputting standard waveforms. The template also includes the ability to configure frequency and amplitude modulation.|
|Oscilloscope||Controls basic operations such as acquiring waveforms using edge triggering and transferring waveform data from the instrument.|
|General Purpose (message-based)||Use for message-based instruments for which there is no class-specific template. Common message-based instruments include: GPIB, USBTMC, VXI-11, and serial.|
|General Purpose (register-based)||Use for register-based instruments for which there is no class-specific template. Common register-based instruments include: VXI and PXI.|
|Spectrum Analyzer||Controls basic operations such as setting the frequency range and sweep properties. The template also includes advanced features such as configuring and querying the marker.|
|Counter||Controls basic operations such as configuring the measurement type and trigger level. This template also includes the ability to configure the start and stop arming conditions.|
|Power Meter||Controls basic operations such as configuring the measurement function, range, and offset. This template also includes the ability to configure the averaging and correction frequency.|
- Enter a driver identifier for the new instrument driver project in the Driver Identifier text box, such as Agilent 34401 or Tektronix 2000 Series.
The wizard uses the driver identifier you enter as the base name and path for the instrument driver project (.lvproj) and project library (.lvlib). Include the instrument manufacturer name and model in the name to help users quickly identify a driver when viewing files on disk or within the LabVIEW environment. Each instrument driver VI includes the project library name as part of the VI name. Because the name is used to create a folder structure for the driver, and drivers can be used on a variety of platforms, the name cannot include any special characters, such as #, $, and &. The name cannot conflict with other installed driver names, and the Create New Instrument Driver Project wizard checks for name conflicts.
- Enter a description for the instrument driver project in the Driver Description text box and click the Next button. This description appears in the Context Help window if you move the cursor over the project library.
- Create a VI icon banner by clicking the upper Edit button to open the Icon Editor and edit the top 8 rows of pixels of the VI icon. LabVIEW clears any edits made below the top 8 rows after you exit the Icon Editor.
The wizard uses this banner as the icon banner for each driver VI in the instrument driver project. Include an abbreviated name for the driver in the banner to help users quickly identify a VI belonging to the driver.
- Create a top-level palette icon by clicking the lower Edit button and editing the VI icon, and click the Next button.
The wizard uses the top-level palette icon as the icon visible on the Instrument Driver palette. Design the icon to represent the driver and instrument type to help users quickly identify the driver on the palette.
- Review the path to the installed driver in the New Project Location box and click the Finish button to create the instrument driver and open a new Project Explorer window with the newly created driver.
The wizard generates all the required files for an instrument driver project, generates a warnings report if you have errors or warnings, and opens the Instrument Driver Modification Instructions. Possible warnings include modifications in the new driver that differed from the existing driver. For example, if the existing driver included a VI that was not saved within the driver directory, the wizard creates a copy of the VI but places the VI within the new driver hierarchy.
- Follow the Instrument Driver Modification Instructions to complete the driver. You can use the Instrument Driver VI Wizard to create instrument driver VIs for the project.
After you complete the instrument driver project, consider submitting the driver to the Instrument Driver Network at ni.com/idnet to make the instrument driver accessible to others.