262 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
Creating and Downloading I/Q Data—Big and Little Endian Order
On the documentation CD, this programming example’s name is
“
CreateDwnLd+.txt
.”
This C++ programming example (compiled using Microsoft Visual C++ 6.0)
performs the following functions:
— error checking
— data creation
— data scaling
— text file creation for viewing and debugging data
— byte swapping and interleaving for little endian order data
— interleaving for big endian order data
— data saving to an array (data block)
— data block download to the signal generator
// This C++ program is an example of creating and scaling
// I and Q data, and then downloading the data into the
// signal generator as an interleaved I/Q file.
// This example uses a sine and cosine wave as the I/Q
// data.
//
// Include the standard headers for SICL programming
#include <sicl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
// Choose a GPIB, LAN, or RS-232 connection
char* instOpenString =”lan[galqaDhcp1]”;
//char* instOpenString =”gpib0,19”;
// Pick some maximum number of samples, based on the
// amount of memory in your computer and the signal generator.
const int NUMSAMPLES=500;
int main(int argc, char* argv[])
Summary of Contents for X-Series
Page 4: ...4 ...
Page 10: ...10 Contents ...