EasyManuals Logo

Agilent Technologies E8267C Programming Guide

Agilent Technologies E8267C
198 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 #168 background imageLoading...
Page #168 background image
162 Chapter 4
Downloading and Using Files
Downloading ARB Waveform Data
Waveform Generation Using C++
The following program (Metrowerks CodeWarrior 3.0) creates an I/Q waveform and writes the data
to a file on your PC. Once the file is created, you can use the file transfer protocol (FTP) to download the
waveform data to the signal generator. Refer to “Using FTP” on page 157 for more information on FTP.
#include <iostream>
#include <fstream>
#include <math.h>
#include <stdlib.h>
using namespace std;
int main ( void )
{
ofstream out_stream; // write the I/Q data to a file
const unsigned int SAMPLES =200; // number of sample pairs in the waveform
const short AMPLITUDE = 32000; // amplitude between 0 and full scale dac value
const double two_pi = 6.2831853;
//allocate buffer for waveform
short* iqData = new short[2*SAMPLES];// need two bytes for each integer
if (!iqData)
{
cout << "Could not allocate data buffer." << endl;
return 1;
}
out_stream.open("IQ_data");// create a data file
if (out_stream.fail())
{
cout << "Input file opening failed" << endl;
exit(1);
}
//generate the sample data for I and Q. The I channel will have a sine

Table of Contents

Other manuals for Agilent Technologies E8267C

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies E8267C and is the answer not in the manual?

Agilent Technologies E8267C Specifications

General IconGeneral
BrandAgilent Technologies
ModelE8267C
CategoryPortable Generator
LanguageEnglish

Related product manuals