User manual

Appendix A
Verification Tests - C Programs
Note
These examples assume a Multiplexer logical address setting of 70914. If
your Multiplexer has a different address, see the Agilent E1460A User’s
Manual to change the logical address or change the program line
#define ADDR "hpib7,9,14" to match your address setting.
Functional
Verification
Test
This example is designed to do the Functional Verification Test found in
Chapter 2 - Verification Tests. The test for the relay multiplexer module
consists of sending the *TST? command and checking the response.
/* Self Test E1460A
This program performs the Self Test found
in the E1460A Service Manual
Program Rev. A.01.00 7/1/96 */
#include <stdio.h>
#include <sicl.h>
#define ADDR "hpib7,9,14" /* Address of device */
void main ()
{
INST id; /* Define id as an instrument */
char a[256] = {0}; /* Result variable */
id = iopen (ADDR); /* Open instrument session */
ipromptf(id, "*RST;*IDN?\n", "%t", a); /* Self test command */
printf("\n %s", a); /* Print result */
ipromptf(id, "SYST:CDES? 1\n", "%t", a); /* Module description */
printf ("\n %s", a);
ipromptf(id, "SYST:CTYP? 1\n", "%t", a); /* Module type */
printf ("\n %s", a);
ipromptf(id, "*TST?\n", "%t", a); /* Self test */
printf ("\n %s", a);
if (a[1] != ’0’)
{
do
{
ipromptf (id, "SYST:ERR?\n", "%t", a);
printf ("\n %s", a);
}
while (a[1] != ’0’);
}
iclose (id); /* Close instrument session */
}
Agilent E1460A Service Manual Example C Programs 57