EasyManua.ls Logo

Agilent Technologies EMC Series - Page 184

Agilent Technologies EMC Series
349 pages
Print Icon
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...
184 Chapter 3
Programming Examples
Making Faster Measurements (multiple measurements)
printf("Could not open a session to GPIB device at address 18!\n");
exit(0);
}
/*Clear the Instrument */
viClear(viESA);
/* go to known instrument state with cleared status byte */
viPrintf(viESA, ":SYST:PRES:TYPE FACT;*RST\n");
/* measure, transfer and calculate power average of multiple traces */
average();
/* convert average power array back to integer array */
for (iLoop = 0; iLoop < iNumPoints; iLoop++) {
dPower = 10.0 * log10( dPwrAvgArray[iLoop]);
iAvgArray[iLoop] = (int) (1000.0 * dPower);
}
/* build ’TRAC:DATA TRACE2,#nyyy’ header and write the result to Trace 2 */
sprintf(cCommand,":TRAC:DATA TRACE2,#%i%i", HeaderLength(iArrayLength)-2,
iArrayLength);
write_binary_trace(cCommand, iAvgArray);
/* enable the trace, local display and return to continuous sweep */
viPrintf(viESA,":TRACE2:MODE VIEW;:DISP:ENAB ON;:INIT:CONT ON\n");
/* Close session */
viClose(viESA);
viClose(defaultRM);
} /***************************** End of Main *******************************/

Table of Contents

Other manuals for Agilent Technologies EMC Series

Related product manuals