#define ADDR "hpib7,9,10"
/* Address of device */
#define DMM "hpib7,22"
/* Address of multimeter */
#define PM "hpib7,14"
/* Address of power meter */
void main (void)
{
INST id, dm, pm;
/* Define id as an instrument */
char cr[256] = {0};
double reading, freq_step = 1342177.28, corr_factor, freq, dmm_rdg, pm_rdg;
double error_db, reference;
int cal_point = 0, this_point, err_num = 0;
#if defined(__BORLANDC__) && !defined(__WIN32__)
_InitEasyWin();
#endif
ionerror(I_ERROR_EXIT);
id = iopen (ADDR);
/* Open instrument session */
dm = iopen (DMM);
pm = iopen (PM);
/*--------------------Initialize AFG---------------------------------------*/
iprintf (id, "*RST;*CLS\n");
/*--------------------Get Power Meter correction factor--------------------*/
freq = 1.0E5;
iprintf (id, "VOLT 1VPK;\n");
/* Set AFG to 1 V peak, 100 kHz sine */
iprintf (id, ":FREQ %lf\n", freq);
iprintf (id, "INIT:IMM\n");
printf ("\n\nConnect Power Meter to AFG output and press ENTER");
getchar ();
/* Measure output with power meter */
iprintf (pm, "IP\n");
iprintf (pm, "AU M4 WT\n");
iprintf (pm, "%lfMHZ\n", freq/1E6);
iprintf (pm, "T3\n");
iscanf (pm, "%lf", &pm_rdg);
pm_rdg = sqrt (abs (pm_rdg) * 50);
/* Convert from watts to volts */
printf ("\n\nConnect DMM to AFG output and press ENTER");
getchar ();
/* Measure output with DMM */
iprintf (dm, "PRESET NORM;FUNC ACV;SETACV SYNC;TRIG HOLD\n");
iprintf (dm, "END ALWAYS\n");
iprintf (dm, "RANGE 10;DELAY .1\n");
iprintf (dm, "ACBAND %lf,%lf\n", freq*.9, freq*1.1);
iprintf (dm, "TRIG SGL\n");
iscanf (dm, "%lf", &dmm_rdg);
iscanf (dm, "%t", cr);
corr_factor = dmm_rdg/pm_rdg;
Appendix A
Verification Tests - C Programs 103
Содержание E1340A
Страница 6: ...Notes 6 HP E1340A Arbitrary Function Generator Service Manual ...
Страница 8: ......
Страница 10: ...Notes 12 What s in this Manual HP E1340A Service Manual ...
Страница 18: ...Notes 20 General Information Chapter 1 ...
Страница 74: ...Notes 76 Adjustments Chapter 3 ...
Страница 78: ...Notes 80 Replaceable Parts Chapter 4 ...
Страница 104: ...Notes 106 Verification Tests C Programs Appendix A ...