File Exchange

image thumbnail

Agilent's USB Modular Scope U2701A and U2702A MATLAB Programming Example

version 1.0 (22.5 KB) by

Shows how instrument connection is made, fetching of captured data and displaying of data



No License

Models in the family that supports the data acquisition toolbox are the U2701A and U2702A.

This example requires the instrument’s respective IVI-COM instrument driver to be installed in order to operate. This driver can be downloaded for free at:

This example also requires VISA software to be installed in order to connect to the instrument using IVI-COM drivers. The software is included in the Agilent IO Libraries and is available for download at:

Please place AgilentU2701A.mdd which is the MATLAB IVI driver into the install directory of MATLAB {Matlab Installation Directory}\toolbox\instrument\instrument\drivers. For example, C:\MATLAB_R2009a\toolbox\instrument\instrument\drivers

Users would need to change the VISA address in the programming example to start using this to communicate it with the scope. User Interface like the bundled Agilent Measurement Manager (AMM) software is not available and this is in M-code format.

Programming Flow
1. Create an object which connected to device using VISA address
2. Connect to the device
3. Enable Channel 1
4. Read waveform from the device
5. Plot the waveform
6. Disconnect the device and delete the object

Useful MATLAB resources:
1. Summary sheet: Using MATLAB with Agilent Instruments
2. Overview of MATLAB:
3. Overview of MATLAB Data Acquisition Toolbox:
4. Overview of using MATLAB with Agilent Instruments:
5. For more MATLAB program examples and information:

For More Information
1. Receive a trial of MATLAB and MATLAB’s Data Acquisition Toolbox:
2. Learn how to use Instrument ControlToolbox to create MATLAB scripts by reading the user documentation:
3. Learn how to use MATLAB software with other Agilent hardware:

Comments and Ratings (2)

Jerry Trantow

Are you running a 64bit os? Scope doesn't work with 64 yet. (Yes, Agilent is really that far behind the times.)

I'm trying to connect an Agilent U2701A Oscilliscope to MATLAB via UAB, I used the availible driver and example from MATLAB for an Agilent U2701A Oscilliscope. I’m still struggeling to make the connection, is there any steps that I have missed or any additional settings or configurations to be done?

Following is a discription:
1.Firstly I assumed the that the U2701A and U2702A will both work with the same program, due to the fact that they share nearly all of the availible drivers.
2.Secondly, when trying to run [U2701xSampleProgram(Auto).m] or [U2701xSampleProgram(Manual).m] (these are the two example programms),the following error message is recieved from MATLAB:

" ??? The IVI driver could not connect to the instrument using the specified resource name.
If this error is not an instrument error, use MIDEDIT to inspect the driver.

Error in ==> U2701xSampleProgram_Auto at 11
connect(deviceObj); "

Further useful information:

The following programms are installed on the computer:
1) Agilent IO Libraries Suite 15.5
2) Agilent IVI-COM Driver for U2701A
3) OS: XP Professional
4) MATLAB R2006a

As in structed, i followd the following steps:
1) placed AgilentU2701A in C:\Program Files\MATLAB\R2006a\toolbox\instrument\instrument\drivers
2) changed the VISA Adress in M-File to my scope

if you can help me with anything, please let my know.

Rossouw van der Merwe (

Thank you

MATLAB Release
MATLAB 7.8 (R2009a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today

USB Modular Scope MATLAB Programming Example/