EasyManua.ls Logo

Keithley 2002

Keithley 2002
114 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Calibration Programs
B-10
}
int calend(n) /* Check for cal end. */
int n;
{
int stat;
printf("Performing cal step #%d.\n",n+1);
do {
fprintf(ieeeout,"srq?\n");
fscanf(ieeein,"%d",&stat);
}
while (stat==0);
fprintf(ieeeout,"output 16;*esr?\n");
fprintf(ieeeout,"enter 16\n");
fscanf(ieeein,"%d",&stat);
fprintf(ieeeout,"spoll 16\n");
fscanf(ieeein,"%d",&stat);
}
void errcheck() /* Check for error. */
{
char errbuf[100];
fprintf(ieeeout,"output 16;:syst:err?\n");
fprintf(ieeeout,"enter 16\n");
fgets(errbuf,100,ieeein);
if (atoi(errbuf) !=0) printf("\n%s\n",errbuf);
}
void chkswit() /* Check cal switch. */
{
int swit=0;
while (swit==0){
fprintf(ieeeout,"output 16;:cal:prot:swit?\n");
fprintf(ieeeout,"enter 16\n");
fscanf(ieeein,"%d",&swit);
if (swit==0){
printf("Press CAL switch to "
"unlock calibration.\n");
fprintf(ieeeout,"local 16\n");
keypress();
}
}
}
void settle() /* Calibrator settle. */
{
int stat;
do {
fprintf(ieeeout,"output 4;isr?\n");
fprintf(ieeeout,"enter 4\n");
fscanf(ieeein,"%d",&stat);
}
while (!(stat & 0x1000));
}
void endpgm() /* End program. */
{
fprintf(ieeeout,"output 4;stby\n");
fprintf(ieeeout,"output 16;:syst:pres\n");
fprintf(ieeeout,"local 4 16\n");
printf("Calibration aborted.\n");
exit(1);
}

Table of Contents

Other manuals for Keithley 2002

Related product manuals