Service manual
Example: DC
Voltage Test
This test performs a DC Voltage test for positive input DC volts and a
power line reference frequency of 60 Hz.
/* DC Voltage Test (DCV Input) E1411A/B */
#include <stdio.h>
#include <sicl.h>
#define ADDR "hpib7,9,03" /* Address of E1326B */
void main ()
{
INST id; /* Define id as an instrument */
float range[5] = {0.113, 0.910, 7.270, 58.10, 300.0};
float volts[5] = {0.1, 0.9, 7.0, 58.0, 300.0};
char measurement[5][256], complete[256]; /* Result variable */
int i;
#if defined(__BORLANDC__) && !defined(__WIN32__)
_InitEasyWin();
#endif
ionerror(I_ERROR_EXIT); /* Exit on error */
id = iopen (ADDR); /* Open instrument session */
iprintf (id, "*RST\n"); /* Resets and set autozero
ON and PLC to 1 */
iprintf (id, "CAL:LFR 60\n"); /* Sets line reference to 60 Hz */
for(i = 0; i < 5; i++) /* Take voltage measurements */
{
printf("\n Set DC Standard to %.1f VDC", volts[i]);
printf("\n press ENTER when ready\n");
getchar ();
iprintf(id, "CONF:VOLT:DC %f\n", range[i]); /* Voltage range */
ipromptf(id, "*OPC?\n", "%s", complete); /* Wait for settling */
ipromptf(id, "READ?\n", "%t", measurement[i]); /* Read voltage */
}
for (i=0; i < 5; i++) /* Print voltage measurements */
printf("\n Voltage on %4f V range = %s ", range[i], measurement[i]);
iclose (id); /* Close instrument session */
}
Agilent E1411A/E1411B Service Manual Example C Programs 71