276 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
{
// These are the I and Q input files.
// Some compilers will allow ‘/’ in the directory
// names. Older compilers might need ‘\\’ in the
// directory names. It depends on your operating system
// and compiler.
char *ifile = “c:\\SignalGenerator\\data\\BurstA1I.bin”;
char *qfile = “c:\\SignalGenerator\\data\\BurstA1Q.bin”;
// This is a text file to which we will write the
// I and Q data just for debugging purposes. It is
// a good programming practice to check your data
// in this way before attempting to write it to
// the instrument.
char *ofile = “c:\\SignalGenerator\\data\\iq.txt”;
// Create arrays to hold the I and Q data
int idata[MAXSAMPLES];
int qdata[MAXSAMPLES];
// Often we must modify, scale, or offset the data
// before loading it into the instrument. These
// buffers are used for that purpose. Since each
// sample is 16 bits, and a character only holds
// 8 bits, we must make these arrays twice as long
// as the I and Q data arrays.
char ibuffer[MAXSAMPLES*2];
char qbuffer[MAXSAMPLES*2];
// For the E4438C or E8267C/67D, we might also need to interleave
// the I and Q data. This buffer is used for that
// purpose. In this case, this buffer must hold
// both I and Q data so it needs to be four times
// as big as the data arrays.
Summary of Contents for X-Series
Page 4: ...4 ...
Page 10: ...10 Contents ...