3.0

3.0 | 1 rating Rate this file 26 Downloads (last 30 days) File Size: 2.5 KB File ID: #24048

Generating Waveforms on Agilent MXG, ESG, PSG Signal Sources using MATLAB

by Vinod Cherian

 

08 May 2009 (Updated 30 Sep 2009)

MATLAB® example to download arbitrary waveform data on Agilent MXG, ESG, or PSG signal sources.

| Watch this File

File Information
Description

MATLAB is a software environment and programming language with over 1,000,000 users and is used to generate arbitrary and standard waveforms, configure and control instruments, build automated test applications, and analyze and visualize data from other instruments. MATLAB only supports instrument communication when you use MATLAB with its Instrument Control Toolbox™.

This example uses MATLAB to generate an arbitrary waveform (IQ data), configure the instrument, download the waveform to the Agilent source, and instruct the instrument when to source the waveform.

To execute this example, type ‘Generate_Waveform_Agilent’ in the MATLAB command window. [Note: Change the IP address in the generate_agilent_waveform.m file to the IP address of the signal source.]

This MATLAB example has been tested on an N5182A MXG but should work on other Agilent signal sources including these MXG, ESG, and PSG models: E4428C,E4438C,N5181A,N5182A,N5183A,E8241A,E8244A,E8251A,E8254A,E8247C,E8257C, E8267C,E8257D,E8267D,E8663B,N8211A,N8212A.

To learn more about using MATLAB and Instrument Control Toolbox™ for configuring and controlling instruments, visit:
http://www.mathworks.com/products/instrument

To request a trial of MATLAB and/or Instrument Control Toolbox, visit http://www.mathworks.com/agilent/instrument/tryit.html

For additional information on using MATLAB with Agilent instruments, including MATLAB examples, demos, drivers, and videos, visit:
http://www.mathworks.com/agilent

Required Products Instrument Control Toolbox
MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
14 Sep 2009 Marco

Hi
I have tried this program in an Agilent Signal Generator E8267D.

However, the instrument displays an error message -275 wrong file name after the line 59:
binblockwrite(deviceObject,wave,'uint16',[':MEM:DATA "WFM1:' ArbFileName '",']);

20 Jan 2010 Nikola Stanchev

Hi,

Thank you for this script. It is very useful except a bug that should be corrected.
I have formatted/scaled waveform by using this script. I was successful to download it to Agilent Signal generator PSG E8267D.

Unfortunately, the PSG output signal (with ARB waveform modulation) was not as suppose to be. I expected to see burst spread spectrum signal but I've got flat signal with a few dB variations.

After a few hours investigation of the problem I found that the cause is the use of Two's complement formatting in the Matlab code.

wave = uint16(mod(modval + wave, modval));

I've got the correct PSG's output signal without 2's complement formatting.

If you go to the Agilent PSG programming guide (E8251-90255) you can see the following sentence "...Data must be in signed, 2’s complement (binary) format..." (very interesting combination, isn't it?)
There is no use of 2's complement formatting in the attached examples script in C/C++.

Best regards,
Nikola

18 May 2011 Cheah Wei Leow

MATLAB_WFM is it a file?

Please login to add a comment or rating.
Updates
08 May 2009

Minor update

14 May 2009

Update to include VISA and basic interface functionality in example.

19 May 2009

Minor update.

21 Aug 2009

Updated description

21 Aug 2009

Updated description

30 Sep 2009

Change in copyright.

Tag Activity for this File
Tag Applied By Date/Time
agilent Vinod Cherian 08 May 2009 16:24:28
signal generation Vinod Cherian 08 May 2009 16:24:28
instrument control Vinod Cherian 08 May 2009 16:24:29
iqdata Vinod Cherian 08 May 2009 16:24:29
communications Vinod Cherian 08 May 2009 16:24:29
data export Vinod Cherian 08 May 2009 16:24:29
wireless Vinod Cherian 08 May 2009 16:24:29
mxg Vinod Cherian 08 May 2009 18:10:10
esg Vinod Cherian 08 May 2009 18:10:10
psg Vinod Cherian 08 May 2009 18:10:10
matlab example Vinod Cherian 08 May 2009 18:10:10
arbitrary waveform generator Vinod Cherian 08 May 2009 18:10:10
signal generator Vinod Cherian 08 May 2009 18:10:10
arbitrary waveform Vinod Cherian 08 May 2009 18:10:10
agilent Sandy S 27 Aug 2009 10:41:19
signal generator amit davidson 08 Apr 2010 07:35:40
arbitrary waveform Chris Torres 25 Jun 2010 17:53:53
arbitrary waveform generator Chris Torres 25 Jun 2010 17:53:57
agilent eli 28 Jun 2011 08:47:59
iqdata colin 21 Oct 2011 03:07:44
arbitrary waveform generator Cheng Huang 23 Dec 2011 20:48:14

Contact us at files@mathworks.com