Choose the Right Interface to Control Instruments in LabVIEW

Updated Jul 26, 2023

Environment

Software

  • LabVIEW

Driver

  • Instrument Drivers
  • NI-VISA
  • NI-Serial
  • NI-488.2

Other

Third-party instrument

This document guides you through choosing the right connectivity interface to control and communicate with your instrument in LabVIEW.

NI provides a wide array of instrument connectivity interfaces designed for different needs. Therefore, it is important to choose the proper one for your application. First, refer to the following flowchart to determine the correct method to control your instrument. Then, refer to the section corresponding to the flowchart number to learn more about the interface.

Connectivity Interfaces for Instrument Control Flowchart


When getting started, NI recommends using an instrument driver. Instrument drivers save you development time and cost because you do not need to learn the programming protocol for each instrument. The two types of instrument drivers are described further in this document.

 

1. Use Plug and Play Instrument Driver

LabVIEW Plug and Play instrument drivers are sets of functions used to control and communicate with programmable instruments. Each VI corresponds to a programmatic operation, such as configuring, reading from, writing to, or triggering an instrument. Because LabVIEW Plug and Play drivers maintain a common architecture and interface, you can quickly connect to and communicate with an instrument with very little or no code development.

 

2. Use IVI Instrument Driver

IVI drivers are DLL-based drivers developed in LabWindows/CVI that allow for simulation and instrument interchangeability. To achieve interchangeability, the IVI Foundation defines specifications for the following instrument classes: DMM, oscilloscope, arbitrary waveform/function generator, DC power supply, switch, power meter, spectrum analyzer, and RF signal generator. IVI drivers also provide additional benefits like instrument state caching for improved performance, multithread safety, and instrument attribute access.

 

3. Use Instrument I/O Assistant

The Instrument I/O Assistant is a high level Express VI that allows you to easily set up communication with serial, Ethernet, or GPIB instruments. Instrument I/O Assistant provides steps to guide you through configuring your instrument and then automatically generates the code from your configurations.  

  • Note: The Instrument I/O Assistant (IIOA) has been deprecated as of LabVIEW 2021 and is not recommended to be used in new projects. If using LabVIEW 2021 or later, use the Instrument Driver that is supported by your device.
  • Learn more about Instrument I/O Assistant

 

4. Modify Existing Instrument Driver

If an instrument driver doesn’t exist for your instrument but a similar driver exists, you can modify the existing driver to fit your application needs.

 

5. Create Instrument Driver

If an instrument driver doesn’t exist for your instrument and there aren’t any similar drivers, you can create an instrument driver from the Instrument Driver Project Wizard.

 

6. Use NI-VISA API

NI-VISA is the NI standard I/O API for instrumentation programming. NI-VISA can control GPIB, serial, USB, Ethernet, PXI, or VXI instruments, making the appropriate driver calls based on the instrument type so you do not have to learn instrument-specific communication protocol.

 

7. Use NI-488.2 API

Use NI-4882 to develop and debug an application program for GPIB instruments. The NI-488.2 driver has high-level commands that automatically handle all bus management. Low-level commands are also available.

 

8. Use NI Device Driver

For NI modular instruments, use the device drivers provided by NI found in NI Driver Downloads .

 

9. Submit Instrument Driver Request

If the Instrument Driver Network does not have the driver you need, you can submit an instrument driver request. These requests are monitored by the NI Instrument Driver group and are developed based on popular demand.