Specifications

3-8 Programming Guide
Remote Data Transfer ESG Family Signal Generators
ARB Waveform Data Downloads
Waveform Downloading Using HP BASIC for UNIX The following program shows
you how to download waveforms into volatile ARB memory using HP BASIC for UNIX.
First, the I waveform data is put into an array of integers called Iwfm_data and the
Q waveform data is put into an array of integers called Qwfm_data. The variable Nbytes is
set to equal the number of bytes in the I waveform data. This should be twice the number
of integers in Iwfm_data, since an integer is 2 bytes. Input integers must be between 0 and
16383.
Program Comments
5: Sets the number of points in the waveform.
10: Defines arrays for I and Q waveform points. Sets them to be integer arrays.
15: Sets HP BASIC to use degrees for cosine and sine functions.
20: Sets up loop to calculate waveform points.
25: Calculates I waveform points.
30: Calculates Q waveform points.
35: End of loop.
40: Calculates number of bytes in I or Q waveform.
45: Opens an I/O path to the signal generator using GPIB. 7 is the address of the GPIB
card in the computer, and 19 is the address of the signal generator. This I/O path is
used to send ASCII data to the signal generator.
50: Opens an I/O path for sending binary data to the signal generator. FORMAT MSB
FIRST is needed to send the 2 bytes of each integer to the signal generator in the
correct order.
60: Creates an ASCII string representation of the number of bytes in the waveform.
70: Finds the number of digits in Nbytes.
80: Sends the I waveform SCPI download-to-ARBI command and the beginning of the
ASCII header for the data. testfile is the waveform name that will be used in the
signal generator.
90 to 100: Sends the rest of the ASCII header.
110: Sends the binary data. Note that ESGb is the binary I/O path.
120: Sends an End-of-Line to terminate the transmission.
130 to 170: Executes same commands for the Q waveform.
180 to 190: Closes the connections to the signal generator.
200: End the program.