EasyManuals Logo

Keysight Technologies N5166B CXG Programming Guide

Keysight Technologies N5166B CXG
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #310 background imageLoading...
Page #310 background image
310 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
Creating and Downloading Waveform Data Using HP BASIC for UNIX
On the documentation CD, this programming example’s name is
hpbasicUx.txt.”
The following program shows you how to download waveforms using HP Basic
for UNIX. The code is similar to that shown for HP BASIC for Windows, but
there is a formatting difference in line 130 and line 140.
To download into non–volatile memory, replace line 190 with:
190 OUTPUT @PSG USING "#,K";":MMEM:DATA ""NVWFM:testfile"", #"
As discussed at the beginning of this section, I and Q waveform data is
interleaved into one file in 2’s compliment form and a marker file is associated
with this I/Q waveform file.
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)

Table of Contents

Other manuals for Keysight Technologies N5166B CXG

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies N5166B CXG and is the answer not in the manual?

Keysight Technologies N5166B CXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5166B CXG
CategoryPortable Generator
LanguageEnglish

Related product manuals