Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
What is Developer Zone?
United States

Document TypeTutorial
NI Supported: Yes
Publish Date: Jul 29, 2010


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links -Products and Services

Easily Connect to Any Instrument Using NI LabVIEW Instrument Drivers

4 Ratings | 3.75 out of 5
Read in  |  Print |  PDF

Table of Contents

  1. Types of Instrument Drivers
  2. Finding Instrument Drivers for Your Instrument
  3. Saving Time with Instrument Drivers
  4. Related Links

Every programmable test and measurement instrument has a set of commands that it understands. Typically, a programmer’s manual that comes with the instrument documents these commands, and it is up to you to find the commands you need. Some commands such as the identify command (*IDN?) are the same for most instruments. But for the majority of instruments, the commands and parameters are unique to the instrument model.

Instrument drivers simplify this process by abstracting the low-level commands for each instrument and providing a familiar API for all instruments. By using an instrument driver, you can focus on the application you are developing rather than spend time looking up the correct command, formatting command strings, and parsing returned data. Additionally, NI LabVIEW instrument drivers are based on the Virtual Instrument Software Architecture (VISA) standard, which makes them bus- and platform-independent. For example, instead of trying to port the self-test command string *TST? over an RS232 connection, you just use the LabVIEW Self-Test VI.

Types of Instrument Drivers

LabVIEW supports different instrument driver technologies. Knowing the differences between the most popular types helps you choose the best approach for your application. Both LabVIEW Plug and Play drivers and IVI drivers provide familiar application programming interfaces (APIs) for programming different instruments, and both are based on VISA for bus independence.

LabVIEW Plug and Play

LabVIEW Plug and Play instrument drivers have a standard, straightforward programming model, which makes them easier to use and modify than other types of instrument drivers. These drivers are developed entirely in LabVIEW and comply with a set of programming guidelines to ensure consistency and quality between drivers. NI develops hundreds of LabVIEW Plug and Play drivers every year for popular instruments and certifies drivers created by others according to the development guidelines. All LabVIEW Plug and Play instrument drivers provide source code native to the development environment. With access to source code, you can modify, customize, optimize, debug, and add functionality to the instrument driver. Having source code access means LabVIEW Plug and Play instrument drivers are cross-platform, so you can use them in any operating system that works with LabVIEW. The instrument drivers also include usage examples, so you always have code to start from when beginning a new project, instead of starting from scratch.

In LabVIEW 8.0 or later, project-style LabVIEW Plug and Play drivers take advantage of the LabVIEW project to provide enhanced organization and accessibility. Individual drivers and the VIs they contain maintain backward compatibility with older LabVIEW Plug and Play drivers, ensuring that instrument drivers from 1992 still work today with no modifications needed.

Note: NI recommends project-style LabVIEW Plug and Play drivers for most instrument control applications.

IVI

Interchangeable Virtual Instrument (IVI) drivers feature increased performance and flexibility for more intricate test applications that require interchangeability, state caching, or instrument simulation.

IVI drivers implement state caching to eliminate redundant commands that may be sent to the instruments in your system. This instrument I/O reduction can provide significant performance improvements. You also can configure IVI drivers to run in simulation mode, where the actual instrument and the signal it acquires or generates are simulated in software. To achieve interchangeability, the IVI Foundation defined specifications for the following instrument classes: digital multimeter, oscilloscope, arbitrary waveform/function generator, DC power supply, switch, power meter, spectrum analyzer, RF signal generator, digitizer, counter/timer, upconverter, and downconverter. If you build an application with generic IVI-compliant instrument drivers, you can switch between hardware models or even vendors without making changes to the application.

Because IVI drivers are increasingly complex, they require more work to install and configure than LabVIEW Plug and Play drivers. IVI drivers are not developed in LabVIEW, so, if you need to modify them, you typically need text-based programming knowledge.

Finding Instrument Drivers for Your Instrument

The LabVIEW Instrument Driver Finder (IDFinder) is the easiest way to find, download, and start using the correct instrument driver. With IDFinder, you can scan for connected instruments and search for the appropriate project-style LabVIEW Plug and Play driver available in the instrument driver network (IDNet) based on the model number reported by the instrument.  IDFinder also downloads and installs the driver in the correct directory on your computer, making it available to you in a matter of seconds. After successful installation, you can open the driver palette or any of the included examples from within the IDFinder, which means you can quickly get started on your application.

 

To use the IDFinder, launch LabVIEW and select Tools»Instrumentation»Find Instrument Drivers. You can also launch the IDFinder from the LabVIEW Getting Started window or Help menu. IDFinder searches IDNet at ni.com/idnet to find supported instrument drivers. IDNet is the largest collection of instrument drivers in the industry, covering thousands of instrument models from hundreds of vendors. In addition, IDNet provides helpful documentation related to using and creating instrument drivers.

 

Saving Time with Instrument Drivers

Getting started with a new instrument does not have to be a frustrating and slow experience. LabVIEW instrument drivers save you from having to learn the details of the instrument command set, and the IDFinder helps you quickly find and install drivers.

Related Links

Types of Instrument Drivers

LabVIEW Help: Using Instrument Drivers and Related Topics

4 Ratings | 3.75 out of 5
Read in  |  Print |  PDF

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).