Using the Agilent 34980A With LabVIEW

Updated Aug 28, 2020



  • LabVIEW


Agilent 34980A

Learn how LabVIEW can help you control and automate your Agilent 34980A. LabVIEW is an industry-standard graphical programming environment that can be used to quickly and easily acquire, analyze, and present data from the 34980A. The free LabVIEW instrument driver for the 34980A gives you programmatic control over the unit from your PC using LabVIEW. This instrument driver will allow you to use your 34980A, while having to do little or no low level VISA programming yourself. This document introduces the instrument driver and discusses additional hardware resources for DMM/switch applications.

Introduction to the 34980A Instrument Driver

An instrument driver is a set of software routines that control a programmable instrument. Thousands of instrument drivers, including the driver for the Agilent 34980A, are available for free download from NI website.

Instrument drivers utilize a set of commands provided by the instrument vendor to communicate with the instrument, often through GPIB, Serial, Ethernet, or USB. Each routine that composes the driver corresponds to a programmatic operation such as configuring, reading from, writing to, or triggering the instrument. Instrument drivers simplify control and reduce test program development time by eliminating the need to learn the unique programming and communication protocol for the instrument.

LabVIEW itself is a graphical development environment for creating flexible and scalable test, measurement, and control applications rapidly and at minimal cost. Unlike other programming environments, all programming in LabVIEW is done graphically through intuitive flowchart-style coding and functional blocks. Hundreds of functional blocks for analysis, signal processing, and mathematics are built-in to the environment, making LabVIEW a smart choice for manipulating raw data collected with the 34980A. With LabVIEW, application development is fast and easy for all users, regardless of experience.

While the LabVIEW instrument driver for the 34980A itself does not include ready-to-run example programs, there are three ready-to-run example programs available from Of course, using the ready-to-run examples requires no LabVIEW coding. The driver includes a full set of functional building blocks that can be used to create a completely custom 34980A application in LabVIEW.

Using the Instrument Driver Examples in LabVIEW

The most straightforward way to take advantage of the LabVIEW instrument driver is to run the example programs, which give the user a basic introduction to the programming flow for the driver. Using these example programs as a starting point, it is possible to begin communicating with the Agilent 34980A very quickly, eliminating the difficulties associated with starting a project from scratch.


Figure 1 - Example 34980A Program for Multiplexing Measurement Channels

Three ready-to-run examples are available from Agilent for the 34980A platform. These are:

  • Mux_example: Demonstrates configuring the 34980A to take measurements from a thermistor, several resistance channels (2-wire and 4-wire), and basic voltage channels multiplexed to the internal digital multimeter (DMM).
  • DAC_example: Demonstrates creating a voltage trace, outputting it through the 34951A analog output module, and reading the output back to the DMM.
  • DigIO_example: Demonstrates reading and writing digital information and configuring the totalizer for event counting.

Though all of these examples are intended to serve as a starting point for the creation of a custom application, they may be used without modification to immediately control the Agilent 34980A.

Creating Custom 34980A LabVIEW Applications

When you wish to extend the capabilities of the examples or wish to start a new custom application, the set of LabVIEW functions installed with the instrument driver provide all the building blocks you will need. In LabVIEW, each of these programmatic building blocks is called a virtual instrument, commonly referred to as a VI. Any custom LabVIEW application you create will be composed of a front panel, which is the graphical user interface, and a block diagram which is the flow chart-style code created with these functional blocks (VIs).

Creating a custom 34980A application in LabVIEW does require a basic familiarity with LabVIEW's graphical programming. For resources that outline the fundamentals of this industry-standard development environment, please refer to the links at the end of this section.

When the LabVIEW instrument driver for the 34980A is installed, palettes containing high-, mid- and low level instrument driver VIs are made available to you in LabVIEW. Each palette represents a distinct category of instrument driver functions for programming the 34980A. Two instrument driver palettes are shown below, in Figure 2.

Figure 2 - Two of the palettes installed with the 34980A LabVIEW Instrument Driver

Use the instrument driver VIs to define your custom application. In Figure 3, we show the block diagram of a sample application created with these VIs. This application initializes communication with the 34980A, configures a switch scanning operation, takes 10 voltage readings from each channel in the scan list, and ends communication (checking for errors). It displays the acquired data on a front panel indicator (not pictured).

Figure 3 - Sample code created with instrument driver functions

A significant advantage of customizing your LabVIEW application is that it enables you to combine the unique functions of the instrument driver with the standard functions built-in to LabVIEW. With these, you can quickly and easily take your application far beyond merely programming the instrument to create a completely user-defined solution.

Let's suppose, for instance, that after acquiring data in the example above, we wish to detect the peak values in the data set and log those to file. Since peak detection is one of the analysis functions available in LabVIEW, we can easily add that functionality to our application. LabVIEW can also be used to interface with a data management system, whether that consists of a simple spreadsheet file or a relational database. The block diagram in Figure 4 extends the functionality of our previously created code to discover the peaks of the dataset and then log those values to a tab-delimited text file compatible with Excel.

Figure 4 - Sample Code Showing Peak Detection and Saving to File

Because creating crisp graphical user interfaces in LabVIEW is easy, we could have also chosen to visualize the data in a chart or graph. We could have even posted the application's user interface to a web page for remote monitoring and control using the built-in LabVIEW web server. For information on the features available in LabVIEW, or to immediately test drive LabVIEW free online, please refer to the links below.

Additional Hardware Resources for DMM/Switch Applications

Instrument drivers offer a compelling method of programming through GPIB, USB, Ethernet, or serial communication ports on stand-alone instruments. NI also provides a wide range of digital multimeter and switch products available in the PXI, SCXI and USB form-factors that use similar instrument driver technologies with dozens of native example programs written for LabVIEW.

Digital Multimeters:

  • Measure up to 1000 VDC/700 Vrms
  • 5½, 6½, and 7½-digit digital multimeter/voltmeters and LCR meters
  • Seamless integration with PXI, SCXI and USB switches
  • NIST-traceable calibration certificates available
  • Measure inductance and capacitance up to 5 H and 10,000 µF
  • 1.8 million samples/s isolated waveform acquisition


  • More than 125 PXI and SCXI switch configurations
  • High-density general-purpose, multiplexer, and matrix modules for large-channel-count applications
  • Switching up to 300 VDC/VAC, 12 A, or 26.5 GHz 
  • Multiple connectivity options for prototyping, test, and switch system development
  • A variety of reliable and safe relays (armature, FET, solid-state, and reed)


The Agilent 34980A is a good instrumentation solution for manual bench top testing or multiple automated test equipment use cases. It can be incorporated into a more powerful and user-defined virtual instrumentation solution by taking advantage of LabVIEW's unique instrument control, analysis, and user interface features. Use the ready-to-run example programs for a simple measurement application with little development effort, or customize them to take advantage of the additional analysis and presentation capability of LabVIEW.