Agilent Technologies E8663B Portable Generator User Manual


 
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 269
Creating and Downloading Waveform Files
Programming Examples
20: Sets the number of points in the waveform.
30: Allocates integer data array for I and Q waveform points.
40: Sets HP BASIC to use degrees for cosine and sine functions.
50: Sets up first loop for I waveform points.
60: Calculate and interleave I waveform points.
70: End of loop
80 Sets up second loop for Q waveform points.
90: Calculate and interleave Q waveform points.
100: End of loop.
120: Calculates number of bytes in I/Q waveform.
130: Opens an IO 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 IO path is used to send ASCII data to the signal
generator.
140: Opens an IO path for sending binary data to the signal generator.
150: Creates an ASCII string representation of the number of bytes in the waveform.
160 to 170: Finds the number of digits in Nbytes.
190: Sends the first part of the SCPI command, MEM:DATA along with the name of the file, data_file, that
will receive the waveform data. The name, data_file, will appear in the signal generator’s memory
catalog.
200 to 210: Sends the rest of the ASCII header.
230: Sends the binary data. Note that PSGb is the binary IO path.
240: Sends an End-of-Line to terminate the transmission.
250 to 260: Closes the connections to the signal generator.
290: End the program.
Program Comments (Continued)