if (rdgs[j] -.5 || rdgs[j] = .5)
printf("\n%f", rdgs[j]);
}
}
}
T2 = time(NULL);
/* get stop time */
/* calculate time for measurements */
printf("\nTime = %f seconds", (difftime(T2,T1)/4));
free(rdgs);
}
/******************************************************************/
void rst_clr(void)
{
/* Reset and clear the scanning multimeter */
IOOUTPUTS(ADDR, "*RST;*CLS", 9);
/* Send (9) characters */
}
/******************************************************************/
void check_error(char *func_tion)
{
char into[161];
int length = 160;
IOOUTPUTS(ADDR, "SYST:ERR?", 9);
/* Query error register */
IOENTERS(ADDR, into, &length);
/* Enter error message */
if (atoi(into) != 0)
/* Determine if error is present
If errors present, print and exit */
{
while (atoi(into) != 0)
{
printf("Error %s in function %s\n\n", into, func_tion);
IOOUTPUTS(ADDR, "SYST:ERR?", 9);
IOENTERS(ADDR, into, &length);
}
exit(1);
}
}
62 Using the HP E1326B/E1411B Multimeter
Chapter 3
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com