Example Code

NI DMM Multiple Measurement Types&Scanning

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • Modular Instrumentation


  • LabVIEW

Code and Documents




This example demonstrates performing multiple DMM measurement types (i.e. 2-Wire Resistance and Capacitance) with DMM/Switch Scanning, in series.



This example is in response to the following Example: Configuring the DMM to Take Multiple Measurement Types in the Same Scan List.


That example unfortunately does not work well with some measurement types.  Specifically with a capacitance measurement, it takes some time for the DMM to configure properly to take accurate capacitance measurements.  We can avoid this problem by having multiple "blocks" of tests.  Each block is dedicated to a measurement type.  In this example, a top-level VI calls into subsequent blocks (Resistance and Capacitance).  Each block opens/closes a new session to the DMM/Switch.  Each block performs hardware-timed DMM/Switch Handshaking.


This example could be made more robust by implementing a for loop around the SubVI and passing an array of clusters (the cluster element has all of the SubVI device and channel information).





  • NI LabVIEW 2012 (or compatible)
  • NI-DMM Driver 
  • NI-Switch Driver


  • NI DMM (4065,4070,4071,4072 and others)
  • NI Switch (compatible with the NI-Switch driver)


Steps to Implement or Execute Code

  1. Open both niSwitch DMM Switch Handshaking copies and configure DMM and Switch parameters in the respective SubVIs
  2. Open Main VI (or NI DMM Multiple Measurement Types&Scanning 2012 NI Verified.vi contained in the .zip file) and execute.
  3. To add more measurement types, simply add more copies of the SubVI to the sequence

Additional Information or References


Main VI Block Diagram




niSwitch DMM Handshaking C SubVI Front Panel



niSwitch DMM Handshaking C SubVI Block Diagram


**This document has been updated to meet the current required format for the NI Code Exchange.**

Rod T.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.