HP E1340A Service Manual page 102

Function generator
Hide thumbs Also See for E1340A:
Table of Contents

Advertisement

104 Verification Tests - C Programs
iprintf (id, "*RST;*CLS\n");
/*--------------------Setup AFG--------------------------------------------*/
iprintf (id, "CAL:AC:BEGIN\n");
iprintf (id, "*OPC?\n");
iscanf (id, "%t", cr);
cal_point = 1;
/*--------------------CAL Loop---------------------------------------------*/
printf ("\n\nCAL POINT
printf ("\n---------
iprintf (dm, "ACBAND %lf,%lf\n", .9E3, 1.1E3);
iprintf (dm, "TRIG SGL\n");
iscanf (dm, "%lf", &reading);
iscanf (dm, "%t", cr);
reference = reading * sqrt(2);
iprintf (id, "CAL:AC:POINT? %lf\n", reading);
iscanf (id, "%u,%u%t", &this_point, &err_num, cr);
printf ("\n %2u
if (err_num != 0) goto ERROR;
printf ("Connect Power Meter to AFG output and press ENTER");
getchar ();
iprintf (pm, "IP\n");
iprintf (pm, "AU M4 WT\n");
do
{
cal_point = this_point;
freq = freq_step * this_point;
iprintf (pm, "%lfMHZ\n", freq/1E6);
iprintf (pm, "T3\n");
iscanf (dm, "%lf", &reading);
reading = sqrt (abs (reading) * 50);
reading = reading * corr_factor;
reading = reading * sqrt(2);
error_db = 20 * log10(reading/reference);
iprintf (id, "CAL:AC:POINT? %lf\n", reading);
iscanf (id, "%u,%u%t", &this_point, &err_num, cr);
printf ("\n %2u
error_db);
}
while ((err_num == 0) && (this_point != 0) && (this_point <= 16));
ERROR:
iprintf (id, "SYST:ERR?\n");
ERR CODE
READING (V)
--------
-----------
----------\n");
/* Get reference reading from DMM */
/* Convert to peak volts */
%2u
%.4lf",cal_point, err_num, reading);
/* Convert to volts */
/* Calculate corrected reading */
/* Convert to peak volts */
%2u
%.4lf
%.4lf",cal_point, err_num, reading,
ERROR (DB)");
Appendix A

Advertisement

Table of Contents
loading

Table of Contents