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.
Learn how to download and install the instrument driver to automate measurements from a Keithley 2400 SourceMeter SMU Instrument using LabVIEW NXG. Models of the Keithley 2400 SourceMeter SMU Instrument Family supported by this tutorial include:
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.
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. Download Keithley 2400 Instrument Driver
Figure 2. The NI Instrument Driver Network houses thousands of instrument drivers for automating 3rd party devices
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
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. The Hardware tab provides an intuitive, graphical representation of all hardware and software associated with your test and measurement system
Locate available communication ports on the back of the Keithley 2400 SourceMeter SMU instrument. All supported models will have a GPIB and Serial port.
Locate available communications ports on your host PC
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)
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
Using the right cable for your communication port (GPIB/Serial), connect your Keithley SourceMeter SMU Instrument to your host PC
Power on your Keithley SourceMeter SMU Instrument and allow time for initialization
Launch LabVIEW NXG
On the LabVIEW NXG Welcome Screen, select Explore Your Hardware or select the Hardware tab in the top right.
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.
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.
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
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.
Open LabVIEW NXG.
Open the Learning tab by selecting Learn to Program tile in the Welcome screen or select the Learning tab from the top right.
Select Examples > Hardware Input and Output > Instrument Drivers to locate all of the examples included with installed LabVIEW Plug and Play Instrument Drivers.
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
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.
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.
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.
Open the "Keithley 24XX Read Multiple.gvi" from the Keithley 24XX.lvproject.
Click Diagram on the View Selector to view the VI's Diagram.
Use the following procedure to add manual inputs for Voltage, Current, and Resistance ranges
Create an "Enable Auto Range" boolean control by right clicking the "Enable Auto Range" boolean constant and selecting Change to control.
Reposition controls on the Diagram for Configure Output and Enable Output nodes to make room for extra controls.
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.
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.
Use the following procedure to add the Auto Zero function for the Keithley 2400 to your VI.
Go back to the Diagram by selecting Diagram in the View Selector.
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.
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.
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.
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.
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".
Open the Diagram of the VI by selecting Diagram in the View Selector.
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
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.
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.
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.
Switch to the Panel of the VI by selecting Panel in the View Selector.
Drop down all of the indicators and controls from the Unplaced Items box onto the Panel.
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.
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.
Save the VI by selecting File then Save Keithley 24XX Read Multiple.gvi.
Select the number of desired bins in the histogram using the number of bins control. The default value is 10.
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.
Open the Diagram of the VI by selecting Diagram in the View Selector.
Create space between the "Enable Output" Node and the "Close" Node. Delete the yellow "Error" wire between the two.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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".
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"
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.
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
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.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.