Test 2-6: Total
Harmonic Distortion
The purpose of this test is to verify that the AFG meets its specifications for
sine wave total harmonic distortion (THD).
iprintf (id, "INIT:IMM\n");
/*--------------------Perform Test-----------------------------------------*/
printf ("\n\nEnter the counter reading (in MHz) : ");
scanf ("%f", &result);
result = result * 1000000;
if ((result >= 42947500) && (result <= 42951800))
printf ("\n\nTest PASSED Frequency = %e Hz", result);
else
printf ("\n\nTest FAILED Frequency = %e Hz", result);
iprintf (id, "*RST;*CLS\n");
iclose (id);
/* Close instrument session */
}
/* Total Harmonic Distortion Performance Verification Test E1340A */
#include <stdio.h>
#include <sicl.h>
#include <math.h>
#define ADDR "hpib7,9,10"
/* Address of device */
void main (void)
{
INST id;
/* Define id as an instrument */
double baseline, reading, result, sum, thd;
double freq[6] = {100E3, 1E6, 10E6, 100E3, 1E6, 10E6};
int i, dbm_out = 23, harmonic;
#if defined(__BORLANDC__) && !defined(__WIN32__)
_InitEasyWin();
#endif
ionerror(I_ERROR_EXIT);
id = iopen (ADDR);
/* Open instrument session */
/*--------------------Initialize AFG---------------------------------------*/
iprintf (id, "*RST;*CLS\n");
iprintf (id, "VOLT %uDBM", dbm_out);
Appendix A
Verification Tests - C Programs 97
Содержание 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 ...