EasyManua.ls Logo

Agilent Technologies E8257D

Agilent Technologies E8257D
366 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
Loading...
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 237
Creating and Downloading Waveform Files
Programming Examples
for (int i=0; i<SAMPLES; ++i)
{
iqData[2*i] = AMPLITUDE * sin(two_pi*i/(float)SAMPLES);
iqData[2*i+1] = AMPLITUDE * cos(two_pi*i/(float)SAMPLES);
}
// make sure bytes are in the order MSB(most significant byte) first. (PC only).
char* cptr = (char*)iqData;// cast the integer values to characters
for (int i=0; i<(4*SAMPLES); i+=2)// 4*SAMPLES
{
char temp = cptr[i];// swap LSB and MSB bytes
cptr[i]=cptr[i+1];
cptr[i+1]=temp;
}
// now write the buffer to a file
out_stream.write((char*)iqData, 4*SAMPLES);
return 0;
}

Table of Contents

Other manuals for Agilent Technologies E8257D

Related product manuals