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);
}
Summary of Contents for 53131A
Page 1: ...Programming Guide HP 53131A 132A 225 MHz Universal Counter ...
Page 2: ......
Page 13: ...1 1 Before You Start ...
Page 24: ...Chapter 1 Before You Start Related Documentation 1 12 Programming Guide ...
Page 25: ...2 2 Command Summary A Quick Reference ...
Page 68: ...Chapter 2 Command Summary RST Response 2 44 Programming Guide ...
Page 69: ...3 3 Programming Your Universal Counter for Remote Operation ...
Page 167: ...4 4 Command Reference A Dictionary ...
Page 310: ...Chapter 4 Command Reference WAI Wait to Continue Command 4 144 Programming Guide ...
Page 311: ...5 5 Errors ...
Page 329: ......
Page 330: ...H Manual Part Number 53131 90044 Printed in U S A NOVEMBER 1996 ...