Agilent Technologies E4406A VSA Programming Examples, Saving Binary Trace Data in an ASCII File

Models: E4406A VSA

1 406
Download 406 pages 63.49 Kb
Page 135
Image 135
Manual background

Programming Examples

Saving Binary Trace Data in an ASCII File

/*set the analyzer to continuous mode for manual use */ viPrintf(viVSA, "INIT:CONT 1\n");

/*save trace data to an ASCII file*/ fTraceFile=fopen("C:\\Trace.txt","w"); fprintf(fTraceFile,"Trace.exe Output\nAgilent Technologies 2001\n\n");

fprintf(fTraceFile,"List of %d points of the averaged spectrum trace:\n\n",lNumberPoints);

for (i=0;i<lNumberPoints;i++)

fprintf(fTraceFile,"\tAmplitude of point[%d] = %.2lf dBm\n",i+1,adTraceArray[i]); fclose(fTraceFile);

/*print message to the standard output*/

printf("The %d trace points were saved to C:\\Trace.txt file\n\n",lNumberPoints); /* Close session */

viClose (viVSA); viClose (defaultRM);

}

Chapter 3

135

Page 135
Image 135
Agilent Technologies E4406A VSA manual Programming Examples, Saving Binary Trace Data in an ASCII File, Chapter