Agilent Technologies N5181A/82A Portable Generator User Manual


 
220 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Creating and Downloading Waveform Files
Downloading Waveform Data
2. Download the I/Q data
The following code downloads the generated waveform data to the signal generator, and if the
download fails, displays a message.
Line Code Description—Open a Connection Session with the Signal Generator
1 Sets up a structure (indicated above by io) used by subsequent function calls to establish a LAN connection to
the signal generator.
agt_newconnection() is the function of Agilent Waveform Download Assistant used in MATLAB to build a
connection to the signal generator.
If you are using GPIB to connect to the signal generator, provide the board, primary address, and
secondary address: io = agt_newconnection('gpib',0,19);
Change the GPIB address based on your instrument setting.
2 Send a query to the signal generator to verify the connection.
agt_query() is an Agilent Waveform Download Assistant function that sends a query to the signal
generator.
If signal generator receives the query *idn?, status returns zero and query_result returns the signal
generator’s model number, serial number, and firmware version.
3–5 If the query fails, display a message.
Line Code—Download the I/Q data
6
7
8
9
[status, status_description] = agt_waveformload(io, IQwave,
'waveformfile1', 2000, 'no_play','norm_scale');
if status == -1
display ‘fail to download to the signal generator’;
end;