EasyManuals Logo

Agilent Technologies N5182A Programming Guide

Agilent Technologies N5182A
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
Page #261 background imageLoading...
Page #261 background image
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 251
Creating and Downloading Waveform Files
Programming Examples
while(!done)
{
i1 = fgetc(infile); // read the first byte
if(i1==EOF) break;
i2 = fgetc(infile); // read the next byte
if(i2==EOF) break;
ivalue=i1+i2*256; // put the two bytes together
// note that the above format is for a little endian
// processor such as Intel. Reverse the order for
// a big endian processor such as Motorola, HP, or Sun
idata[index++]=ivalue;
if(index==MAXSAMPLES) break;
}
fclose(infile);
// Then read Q values
index = 0;
infile = fopen(qfile, “rb”);
if (infile==NULL) perror (“Error opening file to read”);
while(!done)
{
i1 = fgetc(infile); // read the first byte
if(i1==EOF) break;
i2 = fgetc(infile); // read the next byte
if(i2==EOF) break;
ivalue=i1+i2*256; // put the two bytes together
// note that the above format is for a little endian
// processor such as Intel. Reverse the order for
// a big endian processor such as Motorola, HP, or Sun
qdata[index++]=ivalue;
if(index==MAXSAMPLES) break;
}
fclose(infile);
// Remember the number of samples which were read from the file.
numsamples = index;
// Print the I and Q values to a text file. If you are
// having trouble, look in the file and see if your I and
// Q data looks correct. Plot the data from this file if
// that helps you to diagnose the problem.
FILE *outfile = fopen(ofile, “w”);

Table of Contents

Other manuals for Agilent Technologies N5182A

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies N5182A Specifications

General IconGeneral
BrandAgilent Technologies
ModelN5182A
CategoryPortable Generator
LanguageEnglish

Related product manuals