HP 132A Manuel d'utilisateur Page 163

  • 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 162
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
Programming Guide 3-95
To Use Limits to Filter Data Before Measuring Statistics (Turbo
C) (Continued)
IOSPOLL(ctr,&status); /* Serial poll counter for status */
puts("Transferring and processing data");
sendhp(":INIT:CONT OFF"); /* Set counter to Run */
sendhp(":CALC3:AVERAGE:TYPE MIN;:CALC3:DATA?");
IOENTERS(ctr,minimum,&length); /* Get the data from the counter */
sendhp(":CALC3:AVERAGE:TYPE MAX;:CALC3:DATA?");
IOENTERS(ctr,maximum,&length); /* Get the data from the counter */
sendhp(":CALC3:AVERAGE:TYPE MEAN;:CALC3:DATA?");
IOENTERS(ctr,mean,&length); /* Get the data from the counter */
sendhp(":CALC3:AVERAGE:TYPE SDEV;:CALC3:DATA?");
IOENTERS(ctr,sdev,&length); /* Get the data from the counter */
printf("Mean frequency = %s",mean);
printf("Minimum frequency = %s",minimum);
printf("Maximum frequency = %s",maximum);
printf("Standard deviation = %s",sdev);
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 162
1 2 ... 158 159 160 161 162 163 164 165 166 167 168 ... 329 330

Commentaires sur ces manuels

Pas de commentaire