Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 275
Creating and Downloading Waveform Files
Programming Examples
Importing, Byte Swapping, Interleaving, and Downloading I and Q
Data—Big and Little Endian Order
On the documentation CD, this programming example’s name is
“
impD+.txt
.”
This C++ programming example (compiled using Microsoft Visual C++ 6.0)
performs the following functions:
— error checking
— binary file importing (earlier E443xB or current model signal generators)
— byte swapping and interleaving for little endian order data
— data interleaving for big endian order data
— data scaling
— binary file download for earlier E443xB data or current signal generator
formatted data
// This C++ program is an example of loading I and Q
// data into an E443xB, E4438C, E8267C, or E8267D signal
// generator.
//
// It reads the I and Q data from a binary data file
// and then writes the data to the instrument.
// Include the standard headers for SICL programming
#include <sicl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
// Choose a GPIB, LAN, or RS-232 connection
char* instOpenString =”gpib0,19”;
// Pick some maximum number of samples, based on the
// amount of memory in your computer and your waveforms.
const int MAXSAMPLES=50000;
int main(int argc, char* argv[])
Summary of Contents for X-Series
Page 4: ...4 ...
Page 10: ...10 Contents ...