Matlab Example 1, Creating And Playing A Waveform - Agilent Technologies N6030A Series User Manual

Arbitrary waveform generators
Table of Contents

Advertisement

Basic Operation
Using the Programmatic Interfaces
click OK, then Close the Set Path window.
MATLAB can now execute all of the N6030A API functions.

MATLAB Example 1, Creating and Playing a Waveform

% N6030 Matlab Interface, Version 1.0
% Copyright (C) 2005 Agilent Technologies, Inc.
%
% A simple example of how to create a waveform,
% open a session to % the Agilent N6030A AWG,
% play the waveform, and close the session.
% Note: the waveform must be configured before
% downloading.
% If settings are changed after downloading the
% waveform, the waveform must be re-downloaded.
% Create a waveform - a sine wave with 2000 pts
% Played at 1250 MHz, this will produce a tone
% of 1.250 MHz
numberOfSamples = 2000;
samples = 1:numberOfSamples;
ch1 = sin( 2 * samples/numberOfSamples * 2*pi);
ch2 = cos( 2 * samples/numberOfSamples * 2*pi);
waveform = [ ch1; ch2 ];
% Open a session
disp('Opening a session to the instrument');
Chapter 2
41
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

N6031aN6032aN6033aN6030-80006

Table of Contents