
Calibration Programs
B-14
Program B-4
Low-level Calibration Program for Use with Fluke 5700A Calibrator (C Version)
/* Model 2002 low-level calibration program for use with the
Fluke 5700A calibrator. Rev. 1.2, 4/7/94 */
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
FILE *ieeein,*ieeeout;
main()
{
static char *msg[] = {
"Connect low-thermal short, wait 3 minutes",
"out 2 v","out 20 v","out 1 mohm","out 100 kohm",
"out 19kohm","out 1.9 kohm","out 190 ohm",
"out 19 ohm","out 200 ua","out 2 ma","out 20 ma",
"out 200 ma","out 1a",
"Disconnect calibrator from INPUT jacks",
"Performing AC calibration, please wait...",
"out 20 v,1 khz","out 20 v,30 khz","out 200 v,1 khz",
"out 200 v,30 khz","out 1.5v,1 khz","out 0.2 v,1 khz",
"out 5 mv,100 khz","out 0.5 mv,1 khz","out 100 v,0 hz",
"out -20v,0 hz",
"Connect low-thermal short to rear INPUT jacks.",
"out 20 ma,1 khz",
"Apply 2V rms @ 1Hz from synthesizer to INPUT jacks."
};
static char *cmd[] = {
":cal:prot:dc:zero",":cal:prot:dc:v2 2",
":cal:prot:dc:v20 20",":cal:prot:dc:ohm1m ",
":cal:prot:dc:ohm200k ",":cal:prot:dc:ohm20k ",
":cal:prot:dc:ohm2k ",":cal:prot:dc:ohm200 ",
":cal:prot:dc:ohm20 ",":cal:prot:dc:a200u 200e-6",
":cal:prot:dc:a2m 2e-3",":cal:prot:dc:a20m 20e-3",
":cal:prot:dc:a200m 200e-3",":cal:prot:dc:a2 1",
":cal:prot:dc:open",":cal:unpr:acc",
":cal:prot:llev:step 1",":cal:prot:llev:step 2",
":cal:prot:llev:step 3",":cal:prot:llev:step 4",
":cal:prot:llev:step 5",":cal:prot:llev:step 6",
":cal:prot:llev:step 7",":cal:prot:llev:step 8",
":cal:prot:llev:step 9",":cal:prot:llev:step 10",
":cal:prot:llev:step 11",":cal:prot:llev:step 12",
":cal:prot:llev:step 13"
};
void keypress(),errcheck(),chkswit(),settle(),endpgm();
char buf [100],date[10];
int i,j,calend();
if ((ieeein=fopen("IEEE","r"))==NULL) { /* Open input file. */
printf("Cannot open IEEE-488 bus I/O.\n");
exit(1);
}
ieeeout=fopen("IEEE","w"); /* Open output file. */
setbuf(ieeein,NULL); /* Turn off input buffering. */
setbuf(ieeeout,NULL); /* Turn off output buffering. */
fprintf(ieeeout,"interm crlf\n"); /* Set input terminator. */
fprintf(ieeeout,"outterm lf\n"); /* Set output terminator. */
fprintf(ieeeout,"remote 4 16\n"); /* Put 2002,5700A in remote. */
fprintf(ieeeout,"clear\n"); /* Send DCL. */
fprintf(ieeeout,"output 16;:syst:pres;*cls\n");/* Initialize 2002.*/
fprintf(ieeeout,"output 16;*ese 1;*sre 32\n"); /* Enable OPC, SRQ.*/
fprintf(ieeeout,"output 4;*rst;*cls\n"); /* Reset 5700A. */
fprintf(ieeeout,"output 4;cur_post normal\n"); /* Normal current. */