Example:
Resistance Test
This example performs a 4-wire ohms resistance test. The program also
calculates the Upper and Lower Limit values for the ACTUAL resistance
values. Use these values in Table 4-1 if they differ from the given values.
/* Resistance Test (4-wire Ohms) E1411A/B */
#include <sdtio.h>
#include <sicl.h>
#define ADDR "hpib7,9,03" /* Address of HP E1326B */
void main ()
{
INST id; /* Define id as an instrument */
float range[3] = {1861, 119156, 1048576};
float source[3] = {1000, 100000, 1000000};
char measurement[3][256], complete[256];
float limit[3], actual[3];
int i;
#if defined(__BORLANDC__) && !defined(__WIN32__)
_InitEasyWin();
#endif
ionerror(I_ERROR_EXIT); /* Exit on error */
id = iopen (ADDR); /* Open instrument session */
iprintf (id, "*RST\n"); /* Resets and set autozero
ON and PLC to 1 */
iprintf (id, "CAL:LFR 60\n"); /* Sets line reference to 60 Hz */
for(i = 0; i < 3; i++) /* Take measurements */
{
printf("\n 1. Set Resistance Standard to %.1f Ohms", source[i]);
printf("\n 2. Measure ACTUAL resistance standard value (in
Ohms)");
printf("\n 3. Enter ACTUAL resistance standard (in Ohms): ");
scanf("%f", &actual[i]);
iprintf(id, "CONF:FRES %f\n", range[i]);
/* Set resistance range */
ipromptf(id, "*OPC?\n", "%s", complete); /* Wait for settling */
ipromptf(id, "READ?\n", "%t", measurement[i]);
/* Read resistance */
if (i == 0)
limit[i] = .00025*actual[i] + 0.02; /* 2kOhm limits */
if (i == 1)
limit[i] = .00025*actual[i] + 1.0; /* 131 kOhm limits */
if (i == 2)
limit[i] = .00025*actual[i] + 10; /* 1 MOhm limits */
}
printf("\nMeasured Source Low Limit High Limit");
printf("\nResistance Resistance (Ohms) (Ohms)\n");
for (i=0; i < 3; i++) /* Print measurements and limits */
printf("\n%s %10.2f %10.2f %10.2f",
measurement[i],actual[i], actual[i]-limit[i], actual[i]+limit[i]);
iclose (id); /* Close instrument session */
}
Appendix B
Verification Tests - C Programs 75
Содержание E1411A
Страница 4: ...Notes ...
Страница 8: ...Notes 8 HP E1411A B Service Manual ...
Страница 10: ...10 HP E1411A E1411B Service Manual ...
Страница 36: ...Notes 36 Verification Tests Chapter 4 ...
Страница 48: ...Notes 48 Adjustments Chapter 5 ...
Страница 51: ...Figure 6 1 HP E1411A Replaceable Parts Chapter 6 Replaceable Parts 51 ...
Страница 53: ...Figure 6 2 HP E1411B Replaceable Parts Chapter 6 Replaceable Parts 53 ...
Страница 56: ...56 Manual Changes Chapter 7 ...