Example: DC Isolation Test

This example performs the DC Isolation Test for Normally Open and Normally Closed channels to both Common and chassis (earth ground).

/* DC Isolation Test

E1364A */

#include <stdio.h>

 

#include <sicl.h>

 

#define ADDR "hpib7,9,15"

/* Address of device */

#define DMM "hpib7,22"

 

void main (void)

 

{

 

INST id, dm;

/* Define id and dm as an instrument */

char reading[256] = {0};

/* Result variable */

int channel, i;

 

#if defined(__BORLANDC__) && !defined(__WIN32__) _InitEasyWin();

#endif

ionerror(I_ERROR_EXIT);

id = iopen (ADDR);

/* Open instrument session */

dm = iopen (DMM);

 

iprintf (dm, "PRESET NORM;TRIG HOLD\n"); iprintf (dm, "FUNC OHM;RANGE 1E9\n");

printf ("\n\nConnect DMM HI and LO to E1364A NO and C lines"); getchar ();

iprintf (id, "*RST\n");

ipromptf (id, "*OPC?\n", "%t", reading); ipromptf (dm, "TRIG SGL\n", "%t", reading);

printf ("\nDC Isolation -- Normally Open Channels to Common"); printf ("\n R = %s", reading);

printf ("\n\nConnect DMM HI and LO to E1364A NC and C lines"); getchar ();

iprintf (id, "CLOS (@100:115)\n"); ipromptf (id, "*OPC?\n", "%t", reading); ipromptf (dm, "TRIG:SGL\n", "%t", reading);

printf ("\nDC Isolation -- Normally Closed Channels to Common"); printf ("\n R = %s", reading);

50 Example C Programs

Appendix A

Page 50
Image 50
Agilent Technologies E1364A service manual Example DC Isolation Test