Appendix B. Verification Tests - C Programs; Functional Verification Test; Example: Self Test - HP E1328A Service Manual

4-channel d/a converter
Hide thumbs Also See for E1328A:
Table of Contents

Advertisement

Functional
Verification
Test

Example: Self Test

Appendix B
Verification Tests - C Programs
These programs are designed to do the Functional Verification Tests found
in Chapter 4 - Verification Tests.
This example performs a DAC self test (*TST? command) to ensure that the
DAC is communicating with the mainframe, external controller, and/or
external terminal.
#include <stdio.h>
#include <sicl.h>
#define ADDR "hpib7,9,9"
void main ()
{
INST id;
char a[256] = {0};
id = iopen (ADDR);
itimeout (id, 10000);
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 */
/* Set 10 sec timeout */
/* Self test command */
/* Print result */
/* Pause */
/* Close instrument session */
Verification Tests - C Programs 61

Advertisement

Table of Contents
loading

Table of Contents