HP E1340A User Manual page 30

Arbitrary function generator
Hide thumbs Also See for E1340A:
Table of Contents

Advertisement

Chapter 1
/*********************************************************************************/
void rst_clr(void)
{
float into;
/*
Executes the commands that resets the AFG and clears its error register
IOOUTPUTS(ADDR, "*RST;*OPC?", 10);
IOENTER(ADDR, &into);
IOOUTPUTS(ADDR, "*CLS;*OPC?", 10);
IOENTER(ADDR, &into);
}
/*********************************************************************************/
void check_error(char *func_tion)
{
char
into[161];
int
length = 160;
IOOUTPUTS(ADDR, "SYST:ERR?", 9); /* Query error register */
IOENTERS(ADDR, into, &length);
if (atoi(into) != 0)
{
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);
}
}
/* Enter error message */
/* Determine if error is present */
/* If errors present, print and exit */
Getting Started with the HP E1340A
*/
30

Advertisement

Table of Contents
loading

Table of Contents