Software Required for Instrument Control (GPIB, Serial, VISA, USB, etc)

Updated Jul 26, 2023

Reported In

Hardware

  • Serial Cable
  • VXI (Legacy)
  • Ethernet Cable
  • GPIB Cable
  • USB Cable

Software

  • LabVIEW
  • LabWindows/CVI

Driver

  • NI-VISA
  • Instrument Drivers
  • IVI Compliance Package
  • NI-488.2
  • NI-Serial
  • NI-VXI

Issue Details

  • What are the layers of the software stack for instrument control in LabVIEW or LabWindows™/CVI?
  • I am starting a project with LabVIEW and I would like to send commands to a third-party instrument. What software will I need to communicate with my instrument?
  • I am experiencing technical difficulties with my LabVIEW program while trying to connect to a third-party instrument. Do I have all of the necessary software to communicate with this instrument?
  • What does the software stack look like when using LabVIEW with various kinds of communication protocols?

Solution

Instrument control with LabVIEW or LabWindows™/CVI can be broken into four separate layers with interchangeable parts in each layer. Each of these drivers or software packages offers a different functionality or option for instrument control projects.


 

Hardware Layer (White)

The hardware layer defines which protocol/standard you are going to use to communicate with your instrument. From GPIB to TCP/IP LAN, the Hardware Layer you use will dictate the Driver Layer you need.
  

Driver Layer (Orange)

  • VISA is installed with the NI-VISA distribution, and is also installed with various other drivers such as NI-488.2. The LabVIEW VISA VIs are installed to LabVIEW, so that another company’s implementation of VISA (such as Agilent VISA) can be used with the application development environment. Read more about NI-VISA here: NI-VISA Overview.
  • NI-488.2: Install this driver if you are using NI's GPIB cards, modules, and adapters.
  • NI-Serial: Install to communicate using the NI's serial cards, modules, and adapters. If your serial port is not NI-branded, you do not need NI-Serial (for example: a desktop computer's RS-232 port).
  • NI-VXI: Used to communicate with instruments that use the VXI bus, and NI cards that are designed to work in the VXI platform.
 
You can talk directly with the low level drivers (488.2, Serial, VXI) without NI-VISA, nevertheless it is not recommended since NI-VISA provides an abstraction layer that allows your application to be more hardware independent.
 

Instrument Driver Layer (Green)

An instrument driver is optional. NI has made available a large amount of instrument drivers through the Instrument Driver Network (IDNet) . Some of them will be as LabVIEW or LabWindows™/CVI Plug and Play instruments, and others will be in the IVI form factor. If using IVI, you need to have the IVI Compliance Package installed.
  • The Instrument Driver Network (IDNet): Instrument drivers simplify instrument control and reduce test program development time by eliminating the need to learn the programming protocol for each instrument. NI and its partners have made available a large set of functions for different instruments in the market. Learn more here: Using Plug-and-Play Instrument Drivers in LabVIEW
  • IVI Compliance Package: The NI IVI Compliance Package is a software package that contains IVI-class drivers and support libraries necessary for the development and use of applications that use IVI instrument interchangeability. The IVI Compliance Package is based on and compliant with the latest version of the instrument programming specifications defined by the IVI Foundation.
  • Modular Instruments (NI-DMM, NI-SCOPE, etc.): These are pre-programmed IVI drivers that allow you to connect to the main types of instruments that support the IVI standard.
 

Application Software Layer (Yellow)

You can use different Application Development Environments (ADEs) to program your instrument:  
Other drivers (hardware and instrument) will not be accessible by all the ADEs. Refer to the specific documentation and readme file of each one to know its compatibility.
 
*Note: PyVISA  used for programming in Python is not developed nor supported by NI.

Additional Information

While you may not need software from each layer for your project to be successful, each layer of abstraction will provide you with existing code and functions to make programming your application easier. For example, instrument drivers can provide a higher-level API that leverages multiple NI-VISA function calls to perform more complex actions in a single function that you can use in your program.