MATLABSoftwre
MATLABSoftwre
MATLABSoftwre
Using the driver in MATLAB Figure 2. The MATLAB Instrument Driver Editor
Now you can access the instrument driver from the MATLAB For example, you can navigate through that list of
command line using the IVI driver functions. First, let’s look at components to Groups/Measurement/Functions and find the
some basic functions you can use to get familiar with the object function called ‘measure’. To access this command, first create a
we created: group (called “Measurement” in the example) by entering:
>> Measurement = get(obj,'Measurement') In this way, MATLAB users can access all the features of an
Then, you can find the help for that function from the instrument through its IVI driver interface.
command line like this:
Note: The MATLAB Instrument Control Toolbox also provides
>> instrhelp(Measurement,'Measure') a graphical tool called Test & Measurement Tool that allows
The Help message for this function reads: Performs a you to configure and control your Keithley instruments without
measurement and returns the last reading taken. writing MATLAB script. In fact, Test & Measurement Tool
To execute the function in MATLAB, use 'invoke': automatically generates MATLAB script as you interact with the
>> meas = invoke(Measurement,'Measure') tool. Visit www.mathworks.com/tmtool for more information on
using Test & Measurement Tool.
Calling this function prints a response like this to the
commands line: meas = 0.0065 Here is an example of a test that shows you how to use many
In this example, this command returned a measurement of the common IVI functions in MATLAB and then returns a
of 6.5mV. series of readings:
***************************************
Conclusion
MATLAB® is a well known software environment and
programming language used to generate waveforms for
instruments, acquire and analyze measurements, and build test
systems. MATLAB supports using IVI instrument drivers with the
MATLAB Instrument Control Toolbox.
Connecting MATLAB to the IVI driver structure for an
instrument offers a quick and easy method of getting your Figure 3. MATLAB plot showing measurement data from example test
A G R E A T E R M E A S U R E O F C O N F I D E N C E
Keithley Instruments, Inc. ■ 28775 Aurora Road ■ Cleveland, Ohio 44139-1891 ■ 440-248-0400 ■ Fax: 440-248-6168 ■ 1-888-KEITHLEY ■ www.keithley.com
© Copyright 2008 Keithley Instruments, Inc. Printed in the U.S.A. No. 2960 05.22.08