Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 255
Creating and Downloading Waveform Files
Programming Examples
#include <stdio.h>
#include <string.h>
#include <math.h>
const int POINTS = 1000; // Size of waveform
const char *computer = “PCWIN”;
int main(int argc, char* argv[])
{
// 1.) Create Simple IQ Signal ***********************************
// This signal is a single tone on the upper
// side of the carrier and is usually refered to as
// a Single Side Band Suppressed Carrier (SSBSC) signal.
// It is nothing more than a cosine wavefomm in I
// and a sine waveform in Q.
int points = POINTS; // Number of points in the waveform
int cycles = 101; // Determines the frequency offset from the
carrier
double Iwave[POINTS]; // I waveform
double Qwave[POINTS]; // Q waveform
short int waveform[2*POINTS]; // Holds interleaved I/Q data
double maxAmp = 0; // Used to Normalize waveform data
double minAmp = 0; // Used to Normalize waveform data
double scale = 1;
char buf; // Used for byte swapping
char *pChar; // Used for byte swapping
bool PC = true; // Set flag as appropriate
double phaseInc = 2.0 * 3.141592654 * cycles / points;
double phase = 0;
int i = 0;
Summary of Contents for X-Series
Page 4: ...4 ...
Page 10: ...10 Contents ...