Automating Measurements From a Keithley 2400 SourceMeter SMU Instrument With LabVIEW NXG

Publish Date: Jan 03, 2018 | 1 Ratings | 5.00 out of 5 | Print | Submit your review

Overview

Learn how to download and install the Instrument Driver to automate measurements from Keithley 2400 SourceMeter SMU Instrument using LabVIEW NXG. Models of the Keithley 2400 SourceMeter SMU Instrument Family supported by this tutorial include:

  • Keithley 2400 SourceMeter SMU
  • Keithley 2410 SourceMeter SMU
  • Keithley 2420 SourceMeter SMU
  • Keithley 2430 SourceMeter SMU
  • Keithley 2440 SourceMeter SMU

Table of Contents

  1. Install LabVIEW NXG
  2. Install Keithley 2400 Series Instrument Driver
  3. Connect and Configure Keithley 2400 SourceMeter SMU Instrument
  4. Automate Measurements with LabVIEW NXG
  5. Sequencing and Database Reporting with TestStand Test Management Software
  6. PXI Source Measure Units
  7. Next Steps

1. Install LabVIEW NXG

LabVIEW NXG simplifies hardware integration so that you can rapidly acquire and visualize data from virtually any I/O device, whether by 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 3rd party instruments.

 

 

Back to Top

2. Install Keithley 2400 Series Instrument Driver

NI develops and supports thousands of Instrument Drivers for 3rd party instruments to help engineers and scientists automate measurements. These instrument drivers are made available in the Instrument Driver Network.

 

Figure 2. The NI Instrument Driver Network houses thousands of instrument drivers for automating 3rd party devices

 

Back to Top

3. Connect and Configure Keithley 2400 SourceMeter SMU Instrument

You can connect your Keithley 2400 SourceMeter SMU to your host PC using GPIB (IEEE 488.2) or Serial (RS232)—USB and Ethernet (LXI) interfaces are not currently available on the instrument models covered in this tutorial. 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. There are GPIB and Serial communication ports on the back of the Keithley 2400 SourceMeter SMU Instrument

 

Configure the Instrument with the Hardware tab in LabVIEW NXG

In LabVIEW NXG hardware connected to the system can be see in the Hardware tab. 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. The Hardware tab provides an intuitive, graphical representation of all hardware and software associated with your test and measurement system

 

Procedure

  1. Locate available communication ports on the back of the Keithley 2400 SourceMeter SMU instrument. All supported models will have a GPIB and Serial port.
  2. Locate available communications ports on your host PC
    1. If you are using a laptop, you will likely only have USB. In this case, you will need to use a USB to GPIB or USB to Serial converter (mentioned in paragraph above)
    2. If you are using a desktop or industrial PC, you will 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), connect your Keithley SourceMeter SMU Instrument to your host PC
  4. Power on your Keithley SourceMeter SMU Instrument and allow time for initialization
  5. Launch LabVIEW NXG
  6. On the LabVIEW NXG Welcome Screen, select Explore Your Hardware or select the Hardware tab in the top right.
  7. The Hardware tab will open with all hardware currently connected to your system. The procedure for detecting your device depends on the bus being used.
    • GPIB: Select your GPIB Interface. From the Configuration pop-up look at the Installed drivers section to find and install the NI-488.2 drivers. After the NI-488.2 driver is installed return to the Configuration pop-up and go to the Advanced section to click Launch NI MAX. Within NI MAX select the GPIB Interface and click Scan for Instruments. The instrument will then be detected. 
    • Serial: The COM port will not show up in the Hardware tab. First ensure you have the NI-Serial driver installed. Select the PC from the Hardware tab. Go to the Advanced section to click Launch NI MAX. Within NI 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 the Hardware tab. When writing an instrument control application for a serial instrument, you will communicate with a COM port rather than the serial instrument connected to the COM port.

The instrument is now configured.

 

Back to Top

4. 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.

 

API

To help accelerate software development, all instrument drivers follow a consistent programming flow of: Open, Configure, Read/Write, Close. All drivers for NI hardware (for example, PXI Modular Instrumentation) also follow this paradigm as it is a best practice when programming in LabVIEW NXG.

 

Figure 5. The Keithley 2400 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 Keithley 24XX LabVIEW Plug and Play driver includes 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 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 of the examples included with installed LabVIEW Plug and Play Instrument Drivers.
  4. Click the Keithley 24XX project to create a new copy. 

     

    Figure 6. LabVIEW NXG Instrument Driver Examples included with every LabVIEW Plug and Play Instrument Driver

     

     

  5.     The Keithley 24XX.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 Keithley 24XX 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 "Keithley 24XX Read Multiple.gvi" included in the Keithley 24XX example project. We will add the ability to choose measurement ranges manually as well as enabling Auto Zero using the Keithley 2400 Plug and Play LabVIEW Driver functions.

  1. Open the "Keithley 24XX Read Multiple.gvi" from the Keithley 24XX.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, Current, and Resistance ranges
    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 for Configure Output and Enable Output nodes to make room for extra controls.
    3. Create a Manual Range control for each Configure Measurement by right clicking each "manual range (1)" terminal and selecting Create control. Rename each 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 all 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.

 

Adding Extra Functions

  1. Use the following procedure to add the Auto Zero function for the Keithley 2400 to your VI.

    1. Go back to the Diagram by selecting Diagram in the View Selector.
    2. Find the section of the Diagram between the third Configure Measurement node and the Configure Output 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 Output node by selecting both wires and pressing the Delete key.
    3. Select the Auto Zero node by clicking Hardware Interfaces > Keithley 24XX > 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 Output node.
    4. To create a user selectable Auto Zero control on the Panel create a Control at the Autozero terminal on the Auto Zero node. To create a constant input for the Auto Zero node so that the Auto Zero is always enabled, create a Constant at the Autozero terminal on the Auto Zero node. We want users to be able to choose to have the Auto Zero enabled, disabled, or run immediately so we will create a Control at the Autozero terminal. Right Click the Autozero terminal and select Create control

       

      Figure 11. Add a Control to the Auto Zero function so users can choose to turn Auto Zero On, Off , or run Once 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. Once changes are complete, save your changes by selecting File then Save Keithley 24XX Read Multiple

 

 

Add Signal Processing

LabVIEW includes hundreds of built-in functions we can take advantage of to implement things like Signal Processing and Analysis. Follow the procedure below to add a Histogram to the "Keithley 24XX Read Multiple.gvi".

  1. Open the Diagram of the VI by selecting Diagram in the View Selector.  
  2. We'll be focusing on the section containing the "Read (Multiple Points)" Node. Drop down the Histogram Node above the voltage indicator by selecting it inside the Palette on the left hand side of the Diagram in Math > Statistics.

     

    Figure 13. Hundreds of built-in functions are included with LabVIEW

  3. When placing down the Histogram Node a dialog box will ask which configuration the Node will use. Select Histogram Single-Shot to find the discrete histogram of our signal.
  4. Connect the Signal terminal at the top left of the Histogram Node and connect it to the voltage wire.

     

    Figure 14. Wire together the Voltage values so that they feed into the Signal terminal of the Histogram Node.

     

  5. The Histogram Node can be configured 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 of 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 Keithley 24XX Read Multiple.gvi.
  12. Select the number of desired 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 Technical Data Management Streaming (TDMS), Text, Binary, and CSV. Add logging to a CSV file to the "Keithley 24XX Read Multiple.gvi" with the following procedure.

  1. Open the Diagram of the VI by selecting Diagram in the View Selector.
  2. Create space between the "Enable Output" Node and the "Close" Node. Delete the yellow "Error" wire between the two.
  3. Place a Build Array Node from the Data Types > Array palette down where space was just created. Expand the Build Array Node to add an extra terminal by dragging down with the mouse after seeing the expansion cursor appear on the bottom of the Node.
  4. On the Build Array Node connect the first terminal Element 1 to the voltage indicator wire, Element 2 to the current indicator wire, and Element 3 to the resistance indicator wire.

     

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

     

  5. 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.
  6. Create a constant for the delimiter (/t) terminal on the Write Delimited Spreadsheet Node. Put "," 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.

     

  7. Drop down to the left of the Write Delimited Spreadsheet Node a Get System Directory, Build Path, and Replace File Extension Nodes found in the Storage > Path palette in that order right to left. 
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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".
  14. 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" 

     

  15. Wire together the error out terminal on the Enable Output 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.
  16. 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.

     

  17. Save the VI by selecting File then Save Keithley 24XX Read Multiple.gvi.
  18. Before running the VI type in the desired file name. The file will be saved in the default LabVIEW directory and the new file path can be seen in the "New File Path" indicator.

 

 

Back to Top

5. Sequencing and Database Reporting with TestStand Test Management Software

TestStand is a ready-to-run test management software that is designed to help you develop, execute, and deploy automated test and validation systems faster. While 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 (e.g. NI TestStand) is at the top of a properly architected test system

 

 

Back to Top

6. PXI Source Measure Units

NI system SMUs combine power, precision, and speed into a single instrument. The combination of power and precision allows you to use the same instrument for both high power sweeps and low current measurements; while the addition of a high-speed update rate and sampling rate allow you to use the instrument in non-traditional ways, such as generating and measuring a waveform. These modules also include traditional SMU features such as output disconnect relays to isolate the instrument from your circuit, remote sense to compensate for lead drop, and guard to minimize leakage current in small signals. This combination of features allows you to use NI system SMUs in a wide range of applications; from materials research and parametric test to high volume production test of RF and mixed signal ICs.

 

 

Figure 21. The NI PXIe‑4138 system source measure unit (SMU) delivers high power, precision, and speed.

 

 

 

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit