Agilent Technologies 86100A Manuel de service Page 82

  • 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 81
2-28
Sample Programs
Listings of the Sample Programs
write_IO (":SYSTem:SETup?"); /* request learnstring */
actualcnt = read_IO (setup, MAX_LRNSTR);
fp = fopen ( "learn2","wb");
if ( fp != NULL )
{
fwrite ( setup,sizeof (unsigned char), (int) actualcnt,fp);
printf ("Learn string stored in file Learn2\n");
fclose ( fp );
}
else
printf ("Error in file open\n");
}/* end store_learnstring */
/*
* Function name: change_setup
* Parameters: none
* Return value: none
* Description: This routine places the scope into local mode to allow the customer to change the system setup.
*/
void change_setup ( )
{
printf ("Please adjust setup and press ENTER to continue.\n");
getchar();
} /* end change_setup */
/*
* Function name: get_learnstring
* Parameters: none
* Return value: none
* Description: This routine retrieves the system setup known as a
* learnstring from a disk file called Learn2. It then restores the system setup to the scope.
*/
void get_learnstring ( )
{
FILE *fp;
unsigned char setup[MAX_LRNSTR];
unsigned long count = 0;
fp = fopen ( "learn2","rb");
if ( fp != NULL )
{
count = fread ( setup,sizeof(unsigned char),MAX_LRNSTR,fp);
fclose ( fp );
}
write_lrnstr (setup,count); /* send learnstring */
write_IO (":RUN");
Vue de la page 81
1 2 ... 77 78 79 80 81 82 83 84 85 86 87 ... 363 364

Commentaires sur ces manuels

Pas de commentaire