Agilent Technologies E8663B Portable Generator User Manual


 
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 221
Creating and Downloading Waveform Files
Downloading Waveform Data
Using Advanced Programming Languages
This procedure uses code from the C++ programming example “Importing, Byte Swapping,
Interleaving, and Downloading I and Q Data—Big and Little Endian Order” on page 249.
For information on creating I/Q waveform data, refer to “Creating Waveform Data” on page 212.
There are two steps in the process of downloading an I/Q waveform:
1. Open a connection session.
2. Download the I/Q data.
1. Open a connection session with the signal generator.
The following code establishes a LAN connection with the signal generator or prints an error message
if the session is not opened successfully.
Line Code Description—Download the I/Q data
6 Download the I/Q waveform data to the signal generator by using the function call (agt_waveformload) from
the Agilent Waveform Download Assistant. Some of the arguments are optional as indicated below, but if one
is used, you must use all arguments previous to the one you require.
Notice that with this function, you can perform the following actions:
download complex I/Q data
name the file (optional argument)
set the sample rate (optional argument)
If you do not set a value, the signal generator uses its preset value of 125 MHz (N5182A) or 100 MHz
(E4438C/E8267D), or if a waveform was previously play, the value from that waveform.
start or not start waveform playback after downloading the data (optional argument)
Use either the argument play or the argument no_play.
whether to normalize and scale the I/Q data (optional argument)
If you normalize and scale the data within the body of the code, then use no_normscale, but if you need
to normalize and scale the data, use norm_scale. This normalizes the waveform data to the DAC values
and then scales the data to 70% of the DAC values.
download marker data (optional argument)
If there is no marker data, the signal generator creates a default marker file, all marker set to zero.
To verify the waveform data download, see “Loading, Playing, and Verifying a Downloaded Waveform” on
page 224.
7–9 If the download fails, display an error message.
Line Code Description—Open a Connection Session
1
2
3
4
5
6
7
char* instOpenString ="lan[hostname or IP address]";
//char* instOpenString ="gpib<primary addr>,<secondary addr>";
INST id=iopen(instOpenString);
if (!id)
{
fprintf(stderr, "iopen failed (%s)\n", instOpenString);
return -1;
}