Agilent Technologies 86100A Manuel de service Page 80

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 364
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 79
2-26
Sample Programs
Listings of the Sample Programs
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 */
learnstr.c Sample Program
/* 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 )
{
init_IO ( ); /* initialize device and interface */
/* Note: routine found in sicl_IO.c or natl_IO.c */
initialize ( ); /* initialize the scope and interface, and set up SRQ */
store_learnstring ( ); /* request learnstring and store */
Vue de la page 79
1 2 ... 75 76 77 78 79 80 81 82 83 84 85 ... 363 364

Commentaires sur ces manuels

Pas de commentaire