What Is an Instrument Driver?

National Instruments IVI Driver

Instrument Driver Overview

What Is an Instrument Driver?

Programmers used to drive computer–controlled instrumentation systems with BASIC I/O statements in their application programs to send and receive command and data strings to and from the various instruments connected to their computer through GPIB. Each instrument responded to particular ASCII strings as documented in each vendor's instrument user manual. Programmers were responsible for learning each command set and writing the control program.

Now programmers use high–level routines that hide the low–level commands. Also, by using routines that are generic and modular, programmers can reuse them in future applications that use the same instrument. These reusable routines are known as instrument drivers.

An instrument driver is a high–level function library that you use to control a specific GPIB, VXI, or serial instrument or other device. With an instrument driver, you can easily control an instrument without knowing the low–level command syntax or I/O protocol.

Historical Evolution of Instrument Drivers

Early instrument driver implementations had serious limitations. Some approaches were too closely linked to proprietary development tools. Other approaches were too difficult to develop or modify. Users wanted open, modifiable drivers built around standards that allowed instruments from a variety of vendors to easily coexist in one application.

The VXIplug&play Systems Alliance improved existing instrument driver standards and enabled system interoperability. Users could install VXIplug&play instrument drivers from a variety of vendors on the same system without encountering system conflicts. In addition, these standards used VISA–defined data types to define parameters of all instrument driver functions. These data types promoted the portability of instrument drivers to new operating systems and programming languages. Although the VXIplug&play model continues to represent a powerful instrument driver solution, it lacks several crucial features such as instrument interchangeability, execution performance (specifically, state caching), and test development flexibility (specifically, range checking and simulation).

The IVI Foundation

The IVI Foundation is an organization of end–users, instrument vendors, and system integrators who share a common commitment to promote the success of test system developers through open, powerful, instrument control technology. The IVI Foundation has extended the VXIplug&play instrument driver standards to incorporate features such as instrument interchangeability, execution performance, and test development flexibility. The Interchangeable Virtual Instruments (IVI) model achieves these advances without introducing additional complexity or performance overhead. Although IVI instrument drivers comply with the VXIplug&play standard, they have many additional features. Some of the most important features are as follows:

  • Hardware Independence—IVI class instrument drivers allow developers to build systems that reuse existing test programs with different instruments. The benefits of instrument interchangeability extend to a wide variety of applications, including the following examples:
    • Test system developers in the military and aerospace industries, who must maintain test systems and code for many years, can easily reuse test code on new equipment as instruments improve or become obsolete.
    • Manufacturers in competitive, high–volume industries, such as telecommunications and consumer electronics, can keep their production lines running when instruments malfunction or must be recalibrated.
    • Large companies can easily reuse and share test code between departments and remote sites without being required to use the same instrumentation hardware.
  • Instrument State Caching—Standard VXIplug&play drivers do not keep track of the instrument state. Therefore, each measurement function sets up the instrument for the measurement even if the instrument is already configured correctly. IVI drivers automatically cache the current state of the instrument. An IVI instrument driver function performs instrument I/O only when the instrument settings are different from what the function requires. This difference seems minor in approach, but it can lead to reductions in test time and cost.
  • Instrument Simulation—IVI drivers can simulate the operation of an instrument when that instrument is not available. Developers can enable simulation in IVI drivers to create simulated data for output parameters. With simulated data, developers can develop stable code for instruments even when the instruments are not available.

The IVI Foundation identifies instrument classes based on common functionality in test equipment. That common functionality is used to define flexible Application Programming Interfaces (APIs) to meet the needs of test system developers. Each API is referred to as a class, and its implementation a class driver.

For example, the IviScope class contains functionality that is common to most oscilloscopes, such as vertical range, offset, timebase, trigger mode, waveform acquisition, and so on. The class uses functions and attributes to provide access to all of the included features. Test system developers use the class drivers to write software that works with any oscilloscope, regardless of communication bus or manufacturer.

The IVI Foundation also defines a common driver architecture and other requirements to further benefit test system developers. All NI class drivers conform to IVI architecture and class specifications.

For more information about the IVI Foundation, visit ivifoundation.org.