Functional
Verification
Test
Example:Self Test
Appendix B
Verification Tests - C Programs
This program is designed to do the Functional Verification Test found in
Chapter 4 - Verification Tests.
This example performs a multimeter self-test to ensure that the multimeter
is communicating with the mainframe, external controller, and/or external
terminal.
#include <stdio.h>
#include <sicl.h>
#define ADDR "hpib7,9,03"
void main ()
{
INST id;
char a[256] = {0};
id = iopen (ADDR);
ipromptf(id, "*TST?\n", "%t", a);
printf("\n %s", a);
getchar();
iclose (id);
}
Appendix B
/* Address of device */
/* Define id as an instrument */
/* Result variable */
/* Open instrument session */
/* Self test command */
/* Print result */
/* Pause */
/* Close instrument session */
Verification Tests - C Programs 71