
2-13
Sample Programs
C Programming Examples
fprintf (fp,"Error string:%s\n", error_str );
if ( error_str[0] == '0' )
{
/* Clear event registers and queues,except output */
write_IO("*CLS");
more_errors = FALSE;
if ( fp != NULL)
fclose ( fp );
}
for (i=0;i<64;i++)
/* clear string */
error_str[i] = '\0';
} /* end while (more_errors) */
}
else
{
printf (" SRQ not generated by scope.\n ");
/* scope did not cause SRQ */
}
srq_asserted = check_SRQ ( );
/* check for SRQ line status */
}/* end while ( srq_asserted ) */
}/* end srq_handler */
Learn String Example
File: learnstr.c
/* learnstr.c */
/*
* This example program initializes the Agilent 86100 scope, runs autoscale to
* acquire a signal, queries for the learnstring, and stores the learnstring
* to disk. It then allows the user to change the setup, then restores the
* original learnstring. It assumes that a signal is attached to the scope.
*/
#include <stdio.h>
/* location of: printf ( ), fopen ( ), fclose ( ), fwrite ( ),getchar */
#include "hpibdecl.h"
void initialize ( );
void store_learnstring ( );
void change_setup ( );
void get_learnstring ( );
void main ( void )
{
Summary of Contents for 86100A
Page 18: ...1 14 Introduction Status Reporting Figure 1 4 Status Reporting Data Structures...
Page 19: ...1 15 Introduction Status Reporting Status Reporting Data Structures continued...
Page 94: ...2 40 Sample Programs BASIC Programming Examples...
Page 124: ...4 16 Root Level Commands VIEW...
Page 132: ...5 8 System Commands TIME...
Page 140: ...6 8 Acquire Commands SWAVeform RESet...
Page 152: ...7 12 Calibration Commands STATus...
Page 192: ...11 12 Display Commands SSAVer...
Page 202: ...12 10 Function Commands VERTical RANGe...
Page 203: ...13 AREA 13 2 DPRinter 13 2 FACTors 13 3 IMAGe 13 3 PRINters 13 4 Hardcopy Commands...
Page 316: ...21 12 TDR TDT Commands Rev A 05 00 and Below STIMulus...
Page 332: ......