A SERVICE OF

logo

Appendix A
Verification Tests - C Programs
Functional Verification Test
This program is designed to do the Functional Verification Test found in
Chapter 2, "Verification Tests."
Example This example sends a *IDN? command to the switch. This test can be used
to verify that the switch is connected properly and is responding to a basic
command.
#include <stdio.h>
#include <sicl.h>
#define ADDR "hpib7,9,15" /* Address of device */
main ()
{
INST id; /* Define id as an instrument */
char a[256] = {0}; /* Result variable */
id = iopen (ADDR); /* Open instrument session */
ipromptf(id, "*IDN?\n", "%t", a); /* Self test command */
printf("\n %s", a); /* Print result */
getchar(); /* Pause */
iclose (id); /* Close instrument session */
}
Appendix A Example C Programs 47