HP 132A Manuel d'utilisateur Page 160

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 330
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 159
Chapter 3 Programming Your Universal Counter for Remote Operation
Programming Examples
3-92 Programming Guide
To Make a Frequency Measurement (Turbo C) (Continued)
for (i=1; i<=samples ;i++)
{
sendhp("INIT"); /* Start a measurement */
sendhp("FETCH:FREQUENCY?");
IOENTERS(ctr,freq,&length); /* fetch the data */
length=strlen(freq); /* Get length of result so */
freq[length-1]='\0'; /* the linefeed can be removed */
printf ("Frequency %d = %s Hz\n",i,freq);
}
printf("Press a key to continue\n");
getch();
}
/* Function to send command to HP 53131A */
void sendhp(hpib_cmd)
char *hpib_cmd;
{
char hpcmd[80]; /* Variables used by function */
int length;
strcpy(hpcmd,hpib_cmd);
length=strlen(hpcmd);
error=IOOUTPUTS(ctr,hpcmd,length); /* Send command to HP 53131A */
if (error!=0)
printf("Error during HP-IB: %d Command %s\n",error,hpcmd);
}
Vue de la page 159
1 2 ... 155 156 157 158 159 160 161 162 163 164 165 ... 329 330

Commentaires sur ces manuels

Pas de commentaire