Example: AC
Voltage Test
This example performs an AC voltage test for a power line reference
frequency of 60 Hz.
/* AC Voltage Test E1411A/B */
#include <stdio.h>
#include <sicl.h>
#define ADDR "hpib7,9,03" /* Address of HP E1326B */
void main ()
{
INST id; /* Define id as an instrument */
float source_volts[5] = {0.07, 0.07, 0.07, 0.07, 300.0};
float source_freq[5] = {20, 60, 5000, 10000, 5000};
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 1. Set AC Standard output to %.2f VAC",
source_volts[i]);
printf("\n 2. Set AC Standard frequency to %.1f
Hz",source_freq[i]);
printf("\n 3. Press ENTER when ready\n");
getchar ();
iprintf(id, "CONF:VOLT:AC %f\n", source_volts[i]);
/* Set voltage range */
ipromptf(id, "*OPC?\n", "%s", complete);
ipromptf(id, "READ?\n", "%t", measurement[i]);
/* Read voltage */
}
for (i=0; i < 5; i++) /* Print voltage measurements */
printf("\n Voltage for %4f V range at %.1f Hz = %s ", source_volts[i],
source_freq[i], measurement[i]);
iclose (id); /* Close instrument session */
}
74 Verification Tests - C Programs
Appendix B
Содержание E1411A
Страница 4: ...Notes ...
Страница 8: ...Notes 8 HP E1411A B Service Manual ...
Страница 10: ...10 HP E1411A E1411B Service Manual ...
Страница 36: ...Notes 36 Verification Tests Chapter 4 ...
Страница 48: ...Notes 48 Adjustments Chapter 5 ...
Страница 51: ...Figure 6 1 HP E1411A Replaceable Parts Chapter 6 Replaceable Parts 51 ...
Страница 53: ...Figure 6 2 HP E1411B Replaceable Parts Chapter 6 Replaceable Parts 53 ...
Страница 56: ...56 Manual Changes Chapter 7 ...