HP ESA-E Series Programmer's Manual page 94

Esa spectrum analyzers
Table of Contents

Advertisement

Programming Examples
Reading Trace Data Using 32-bit Real Format (HP-IB)
viRead (viESA,(ViBuf)cResult,iSize,&lRetCount);
/*Extract the trace data*/
memcpy(dTraceArray,cResult+6,(size_t)lNumberBytes);
/*Save trace data to an ASCII file*/
fTraceFile=fopen("C:\\temp\\ReadTrace32Hpib.txt","w");
fprintf(fTraceFile,"ReadTrace32Hpib.exe
Output\nHewlett-Packard 1999\n\n");
fprintf(fTraceFile,"The %d trace data points of the
spectrum:\n\n",(lNumberBytes/4));
for ( long i=0;i<lNumberBytes/4;i++)
fprintf(fTraceFile,"\tAmplitude of point[%d] = %.2lf
dBm\n",i+1,dTraceArray[i]);
fclose(fTraceFile);
/*Close the session*/
viClose(viESA);
viClose(defaultRM);
}
3-30
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents