EasyManua.ls Logo

Keysight 34420A - Page 269

Keysight 34420A
307 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Application Programs 6
Keysight 34420A User’s Guide 265
... continued
/* Use Serial Poll to read the Status Byte and clear all bits */
IOSPOLL(ADDR, &stat_cond);
/* Call the function to check for errors */
check_error("meter_meas");
}
/**************************************************************************/
void command_exe(char *commands[], int length)
{
/* Execute one command string at a time using a loop */
int loop;
for (loop = 0; loop length; loop++)
{
IOOUTPUTS(ADDR, commands[loop], strlen(commands[loop]));
}
}
/**************************************************************************/
void check_error(char *func_name)
{
/* Read error queue to determine if errors have occurred */
char message[80];
int length = 80;
IOOUTPUTS(ADDR, "SYST:ERR?", 9); /* Read the error queue */
IOENTERS(ADDR, message, &length); /* Enter error string */
while (atoi(message) != 0) /* Loop until all errors are read */
{
printf("Error %s in function %s\n\n", message, func_name);
IOOUTPUTS(ADDR, "SYST:ERR?", 9);
IOENTERS(ADDR, message, &length);
}
}
/**************************************************************************/

Table of Contents

Related product manuals