Appendix A. Verification Tests - C Programs; Functional Verification Test; Example - HP E1330A Service Manual

Digital i/o module
Table of Contents

Advertisement

Functional
Verification
Test

Example

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

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1330b

Table of Contents