Archived:Automate Measurements from Keysight 34400 Series Digital Multimeter DMM with LabVIEW NXG

Updated Oct 20, 2022

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Environment

Software

  • LabVIEW NXG

Other

Keysight 34400 Series Digital Multimeter

Learn how to download and install the Instrument Driver to automate measurements from Keysight 34400 Series Digital Multimeter, formerly branded as Agilent 34400 Series, using LabVIEW NXG. Models of the Keysight 34400 Series Digital Multimeter Family supported by this tutorial include:

  • Keysight 34401A Meter
  • Keysight 34411A Meter

Install LabVIEW NXG

LabVIEW NXG simplifies hardware integration so that you can rapidly acquire and visualize data from virtually any I/O device, whether from NI or a third-party. Combined with a graphical programming syntax that reduces programming time, LabVIEW NXG streamlines complex system design with tools and IP at the forefront of today’s technology.

Figure 1. LabVIEW NXG provides an intuitive programming environment for automating measurements from both NI and third-party instruments.
 

Install Keysight 34400 Series DMM Instrument Driver

NI develops and supports thousands of instrument drivers for third-party instruments to help you automate measurements. You can find these instrument drivers in the Instrument Driver Network. Download the Keysight 34400 Instrument Driver

 

Figure 2. The NI Instrument Driver Network houses thousands of instrument drivers for automating third- party instruments.
 

Connect and Configure the Keysight 34400 DMM Instrument

You can connect your Keysight 34400 DMM to your host PC using GPIB (IEEE 488.2) or serial (RS232) for the 34401A device or using USB, Ethernet (LXI), or GPIB (IEEE 488.2) for the 34411A device. NI offers GPIB and serial control modules to add to PXI- and PCI-based systems, as well as USB to GPIB, USB to RS232, and USB to RS485 converters (common for adding GPIB and serial ports to laptop computers).
 

Figure 3. The back of the Keysight 34401A device (top image) has GPIB and serial communication ports, and the back of the Keysight 34411A device (bottom image) has Ethernet, USB, and GPIB ports.

 

Configure System With SystemDesigner

SystemDesigner is a graphical tool for discovering, documenting, and configuring your test system and is integrated directly into every LabVIEW NXG project. This tool automatically detects USB hardware connected to your host PC and adds a graphical representation to the window. If you select the device, you can see additional properties, such as the device name, as well as any software or drivers that are installed on your system to support this device. You can also troubleshoot and make manual function calls to your instrument to ensure that it is working as expected before moving into automation.
 

Figure 4. SystemDesigner provides an intuitive, graphical representation of all hardware and software associated with your test and measurement system.
 

Procedure

  1. Locate the communication ports on the back of the Keysight 34400 DMM. The 34401A has a GPIB and serial port. The 34411A has a GPIB, Ethernet, and USB port.

  2. Locate the communications ports on your host PC.

    • If you are using a laptop, you likely have only USB. In this case, you need to use a USB to GPIB or USB to serial converter for the 34401A (mentioned in paragraph above).

    • If you are using a desktop PC or an industrial PC, you likely have serial and GPIB slots. If not, you can use a PCI(e) GPIB/serial device.

  3. Using the right cable for your communication port (GPIB, serial, Ethernet, or USB), connect your Keysight DMM to your host PC.

  4. Power on your Keysight DMM and allow time for initialization.

  5. Launch LabVIEW NXG.

  6. On the LabVIEW NXG Welcome Screen, select Use Your Hardware.

  7. SystemDesigner displays a high level view of your system. The procedure for detecting your device depends on the bus being used.

    • USB – USB devices are automatically detected in Measurement & Automation Explorer (MAX) and SystemDesigner.

    • Ethernet – Select your PC in SystemDesigner. From the Configuration pane on the left, scroll down to the Advanced section to click Launch NI MAX. Within MAX, expand My System»Devices and Interfaces»Network Devices to view instruments that are connected to the same subnet as your PC. To add an instrument that is not on the local subnet, right-click Network Devices, select Create new VISA TCP/IP Resource, and follow the instructions in the wizard.

    • GPIB – Select your GPIB interface in SystemDesigner. From the Configuration pane on the right, scroll down to the Installed drivers section to find and install the NI-488.2 drivers. Then return to the Configuration pane and go to the Advanced section to click Launch NI MAX. Within MAX, select the GPIB interface and click Scan for Instruments. The instrument is then detected. 

    • Serial – The COM port does not show up in SystemDesigner. First ensure you have the NI-Serial driver installed. Select the PC from the SystemDesigner page. Using the Configuration pane on the right, go to the Advanced section to click Launch NI MAX. Within MAX, select the COM port and make sure the port settings match the serial settings on your instrument. Serial instruments are not visible in MAX or SystemDesigner. When writing an instrument control application for a serial instrument, you communicate with a COM port rather than the serial instrument connected to the COM port.

  8. The instrument is now configured.
 

Automate Measurements With LabVIEW NXG

After performing manual/interactive measurements to achieve the results that you need to test your device, the next step is to perform automated measurements to reduce measurement time and increase repeatability.
 

Application Programming Interface  (API)

To help accelerate software development, all instrument drivers follow a consistent programming flow of open, configure, read/write, and close. All drivers for NI hardware (for example, PXI modular instruments) also follow this paradigm as it is a best practice when programming in LabVIEW NXG.
 

Figure 5. The Keysight 34400 instrument driver for LabVIEW NXG uses an intuitive and consistent programming pattern of open, configure, read/write, and close.
 

Start From an Example Program

The Keysight 344XX LabVIEW Plug and Play driver contains a LabVIEW NXG project that includes several example VIs to get started from. Open these examples using the following procedure.

  1. Open LabVIEW NXG. 

  2. Open the Learning tab by selecting the Learn to Program tile in the Welcome screen or select the Learning tab from the top right.

  3. Select Examples»Hardware Input and Output»Instrument Drivers to locate all the examples included with installed LabVIEW Plug and Play instrument drivers.

  4. Click the Keysight 344XX project to create a new copy. 
     


    Figure 6. Every LabVIEW Plug and Play instrument driver includes LabVIEW NXG instrument driver examples.
     

  5. The Keysight 344XX Series.lvproject contains several example VIs that require no extra programming to run. Double-click a VI in the Project Files tab within the Navigation pane to open it.


    Figure 7. The Keysight 344XX Series LabVIEW Plug and Play driver includes multiple example VIs to get started.
     

  6. To run a VI, first select the corresponding VISA resource name and appropriate settings on the panel. Then click the green Run arrow at the top left of the VI. 


    Figure 8. Select the corresponding VISA resource name and appropriate settings on the panel before running the example VI.

 

Customize Measurement Settings

All LabVIEW Plug and Play examples are completely extensible and customizable to fit your measurement needs. For example, start with the "Keysight 344XX Read Multiple Measurements.gvi" included in the Keysight 344XX Series example project. You can add the ability to choose measurement ranges manually as well as configure an AC filter using the Keysight 34400 Plug and Play LabVIEW driver functions.

  1. Open the Keysight 344XX Read Multiple Measurements.gvi from the Keysight 344XX Series.lvproject.

  2. Click Diagram on the View Selector to view the VI's diagram.

  3. Use the following procedure to add manual inputs for voltage ranges. Note that you can move around items on the diagram and panel by clicking the item and moving it to another location. This is helpful when you need to add space for new objects.

    1. Create an Enable Auto Range Boolean control by right-clicking the Enable Auto Range Boolean constant and selecting Change to control.

    2. Reposition controls on the diagram as needed to make room for extra controls.

    3. Create a Manual Range control for the Configure Measurement function by right-clicking the manual range (1) terminal and selecting Create control. Rename the control to match the measurement that's being configured, "Voltage Manual Range" for example. 


      Figure 9. Right-click terminals and choose Create control to create a control wired to that terminal.
       

    4. Go back to the panel by selecting Panel on the View Selector. Place the new controls on the panel by selecting the Unplaced Items box and placing each onto the panel.

      Note: Place multiple items down simultaneously from the Unplaced items box by holding <Ctrl> while selecting multiple items in the box. You can then place items down one by one on the panel.
       

Figure 10. Place controls onto the panel using the Unplaced Items box.
 

  1. Use the following procedure to add an AC filter for the Keysight 34400 to your VI. Note that the default measurement type is DC voltage. You can change the measurement type by going to the panel and changing the function control to match your measurement.

    1. Go back to the diagram by selecting Diagram in the View Selector.

    2. Find the section of the diagram between the Configure Measurement node and the Configure Autozero node. Create some extra space here by holding <Ctrl> while clicking and dragging your mouse to the right on the diagram. Delete the purple instrument and yellow error wire connecting the Configure Measurement node and Configure Autozero node by selecting both wires and pressing <Delete>.

    3. Select the Configure AC Filter node by clicking Hardware Interfaces»Keysight 344XX Series»Configure inside the palette on the left-hand side of the diagram and then clicking once more to drop down the node onto the diagram. Connect the purple instrument and yellow error wires between the Configure Measurement node and Configure Autozero node.

    4. To create a user-selectable AC filter bandwidth control on the panel, create a control at the AC filter bandwidth terminal on the Configure AC Filter node. To create a constant input for the Configure AC Filter node so that the filter bandwidth is always the same, create a constant at the AC filter bandwidth terminal on the Configure AC Filter node. You want users to be able to choose the filter bandwidth value, so you can create a control at the AC filter bandwidth terminal. Right-click the AC filter bandwidth terminal and select Create control
       

      Figure 11. Add a control to the Configure AC Filter function so users can choose a filter bandwidth immediately from the panel.
       

    5. Go back to the panel by selecting Panel on the View Selector. Place the new control on the panel by selecting the Unplaced Items box and placing it onto the panel.


      Figure 12. Place controls onto the panel using the Unplaced Items box.
       

  2. When changes are complete, save your changes by selecting File then Save Keysight 344XX Read Multiple Measurements.gvi

 

Add Signal Processing

LabVIEW includes hundreds of built-in functions you can take advantage of to implement things like signal processing and analysis. Follow the procedure below to add a histogram to the Keysight 344XX Read Multiple Measurements.gvi.

  1. Open the diagram of the VI by selecting Diagram in the View Selector.  

  2. Focus on the section containing the Read (Multiple Points) node. Drop down the Histogram node above the measurements indicator by selecting it inside the palette on the left-hand side of the diagram in Math»Statistics.


    Figure 13. LabVIEW includes hundreds of built-in functions.
     

  3. When placing the Histogram node, a dialog box prompts you to select the configuration the node will use. Select Histogram Single-Shot to find the discrete histogram of your signal.

  4. Connect the Signal terminal at the top left of the Histogram node and connect it to the measurements wire.
     

    Figure 14. Wire together the voltage values so that they feed into the signal terminal of the Histogram node.
     

  5. You can configure the Histogram node with several inputs. Add an input for the number of bins to create by right-clicking the number of bins (10) terminal on the left-hand side of the Histogram node and selecting Create control.

  6. Create the histogram graph by right-clicking the histogram terminal on the top right-hand side of the Histogram node and selecting Create indicator. Do the same for actual maximum and actual minimum terminals on the right-hand side of the Histogram node.

  7. Switch to the panel of the VI by selecting Panel in the View Selector.

  8. Drop down all the indicators and controls from the Unplaced Items box onto the panel.

  9. Rename the X and Y axis of the Histogram graph to correspond with the values being measured by clicking on axis label and replacing the text or by clicking on the axis label and changing the Name text at the top of the Configuration pane on the right.

  10. Select the center of the graph and change the plot type by selecting Bar in the Plots section of the Configuration pane.


    Figure 15. Customize the panel of the VI to fit the application's needs.
     

  11. Save the VI by selecting File then Save Keysight 344XX Read Multiple Measurements.gvi.

  12. Select the number of wanted bins in the histogram using the number of bins control. The default value is 10. 

 

Add File I/O

Log the results of each test by adding file I/O to your application. LabVIEW NXG can log to TDMS, text, binary, and CSV. Add logging to a CSV file to the Keysight 344XX Read Multiple Measurements.gvi with the following procedure.

  1. Open the diagram of the VI by selecting Diagram in the View Selector.

  2. Create space between the Read (Multiple Points) node and the Close node. Delete the yellow error wire between the two.

  3. Place a Cluster Properties node from the Data Types»Cluster palette down where the space was just created. Expand the Cluster Properties node to add an extra terminal by dragging down the mouse after seeing the expansion cursor appear on the bottom of the node.

  4. Wire the histogram output from the Histogram node into the Cluster Properties node. This allows you to unbundle the x values and the histogram h(x) arrays from that output.

  5. Next, place a Build Array node from the Data Types»Array palette down after the Cluster Properties node.

  6. On the Build Array node, connect the first terminal Element 1 to the x values indicator wire and Element 2 to the histogram h(x) indicator wire. This combines the two 1D arrays into a single 2D array that you can log to a CSV file.
     

    Figure 16. Expand the Build Array node to include multiple elements.
     

  7. Drop down next to the Build Array node a Write Delimited Spreadsheet node from the Storage palette. Connect the appended array terminal on the Build Array node to the 2D data terminal on the Write Delimited Spreadsheet node.

  8. Create a constant for the delimiter (/t) terminal on the Write Delimited Spreadsheet node. Place “,” into the constant to make the file comma delimited. Then create an indicator for the new file terminal on the top right of the Write Delimiter Spreadsheet node. Rename this indicator New File Path.


    Figure 17. Write to CSV files using the Write Delimited Spreadsheet node.
     

  9. Drop down to the left of the Write Delimited Spreadsheet node Get System Directory, Build Path, and Replace File Extension nodes found in the Storage»Path palette in that order right to left. Feel free to move objects around to add space for these new nodes. 

  10. Wire together the path with new extension terminal on the top right of the Replace File Extension node to the file terminal on the top left of the Write Delimited Spreadsheet node.

  11. On the Write Delimited Spreadsheet node create a constant for the top format terminal. View how to create a Format Specifier by selecting the Write Delimited Spreadsheet node and selecting Online manual in the Configuration pane on the right.

  12. Wire together the appended path terminal on the top right of the Build Path node to the path terminal on the top left of the Write Delimited Spreadsheet node.

  13. Create a constant for the new extension terminal on the left side of the Replace File Extension node. Place .csv into the constant to ensure the file is saved with the .csv extension.

  14. Wire together the system directory terminal on the top right of the Get System Directory node to the base path terminal on the top left of the Build Path node.

  15. Create a control for the name or relative path terminal on the left-hand side of the Build Path node. Rename the control "File Name".

  16. Create a constant for the type terminal on the top left side of the Get System Directory node. Select the Default Data Directory to save the file to the default LabVIEW directory.
     

    Figure 18. The File Name control enables users to name the new .csv file being created and "new file." 
     

  17. Wire together the error out terminal on the Read (Multiple Points) node to the error in terminal on the Write Delimited Spreadsheet node. Then wire together the error out terminal of the Write Delimited Spreadsheet node to the error in terminal of the Close node.

  18. Open the panel by selecting Panel in the View Selector. Place the unplaced controls and indicators down onto the panel.


    Figure 19. The File Name control enables users to name the new .csv file being created.

  19. Save the VI by selecting File then Save Keysight 344XX Read Multiple Measurements.gvi.

  20. Before running the VI, type in the wanted file name. The file is saved in the default LabVIEW directory and the new file path can be seen in the New File Path indicator.
     

Sequencing and Database Reporting With TestStand Test Management Software

TestStand ready-to-run test management software is designed to help you develop, execute, and deploy automated test and validation systems faster. Whereas LabVIEW NXG is ideal for developing individual code modules, you can use TestStand to call multiple code modules that you have developed in LabVIEW NXG, along with other programming languages, to build a sequence. Finally, you can specify execution flow, reporting, database logging, and connectivity to other enterprise systems for your test system.

Figure 20. Test management software (for example, NI TestStand) is at the top of a properly architected test system.
 

PXI Digital Multimeters

PXI DMMs perform high-precision voltage, current, resistance, temperature, inductance, capacitance, and frequency/period measurements as well as diode tests. NI DMMs range from low-cost 6½-digit devices to high-performance 7½-digit models, including the most accurate 7½-digit DMM on the market, the PXIe-4081. Some models include specialized features such as extended measurement ranges, an isolated digitizer mode with sample rates up to 1.8 MS/s, extended calibration cycles, and basic inductance and capacitance measurements. Combined in a single instrument, these features provide a solution to the measurement challenges inherent in traditional precision instruments: limited measurement throughput and flexibility. These DMMs deliver a smarter way to tackle difficult applications in industries ranging from consumer electronics to aerospace and defense.

Figure 21. The PXIe-4081 DMM delivers 7½-digit readings with high precision, speed, and accuracy.


LabWindows™ is used under a license from Microsoft Corporation. Windows is a registered trademark of Microsoft Corporation in the United States and other countries.