View License

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

» Watch video

Highlights from
Tektronix AFG3000 Series - MATLAB Driver and Example

3.2 | 4 ratings Rate this file 29 Downloads (last 30 days) File Size: 10.2 KB File ID: #24088 Version:

Tektronix AFG3000 Series - MATLAB Driver and Example



12 May 2009 (Updated )

Create a frequency sweep and source the signal to a Tek AFG3000 series - all from within MATLAB®.

| Watch this File

File Information

MATLAB® is a software environment and programming language with over 1,000,000 users and supports Tektronix® arbitrary/function generators only through its Instrument Control Toolbox™.
MATLAB is used with Tektronix signal generators to generate arbitrary and standard waveforms, configure and control the instruments, build automated test applications, and analyze and visualize data from other instruments.

The ‘frequencysweep’ script connects to the Tektronix AFG and sets up a frequency sweep (enable the channel, sets start and stop frequencies, spacing, and sweep time). This ‘frequencysweep’ script was generated by Test & Measurement Tool, a graphical tool provided by Instrument Control Toolbox to allow users to configure and control instruments in MATLAB.
To execute this example, extract the files from the zip file and type ‘frequencysweep’ in the MATLAB command window. (Note: Change the VISA address in the frequencysweep.m file to the corresponding VISA address of the AFG.)

This driver was created with the MATLAB Instrument Driver Editor (midedit), a graphical tool provided by the Instrument Control Toolbox that allows users to create and customize their own instrument drivers. The syntax and commands were taken from the ‘AFG3000 Series Arbitrary/Function Generators 071-0639-00 Reference Manual.’ Most, but not all, functionalities were tested. You are welcome to extend the application and driver to your specific needs.

Note: This example was created and tested with a Tektronix AFG3252 Arbitrary Function Generator but should work for other Tektronix AFG 3000-series generators.

To download a Getting Started Guide for using MATLAB with your Tektronix instruments in 15 minutes, visit:

Information on using MATLAB and Instrument Control Toolbox for configuring and controlling instruments is available at:
For additional information on using MATLAB with Tektronix instruments, including MATLAB examples, demos, drivers, and videos, visit:

Required Products Instrument Control Toolbox
MATLAB release MATLAB 7.8 (R2009a)
Other requirements TekVISA 3.3 (or newer) –Available for download at:
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
21 Dec 2016 Burak Mert Gonultas

Use the inspect function for additional capabilities, it lists all the variables you can alter via matlab.

add inspect(devicevariable) to your code


Comment only
24 Mar 2016 Mathieu

10 Mar 2016 zhou wang

I want more information about how to send data to AFG2000.

30 Aug 2014 san

san (view profile)

06 Jul 2012 andrey

andrey (view profile)

12 May 2009 1.1

Moved prerequisite from description to Other Requirements. Added two new keywords. Updated model number (AFG7252 to AFG3252 in the Description).

02 Mar 2010 1.3

Copyright date and BSD

01 Sep 2016

Updated license

Contact us