HP 53131A/132A 225 MHz Programming Manual page 160

225 mhz universal counter
Table of Contents

Advertisement

for (i=1; i<=samples ;i++)
{
sendhp("INIT");
sendhp("FETCH:FREQUENCY?");
IOENTERS(ctr,freq,&length);
length=strlen(freq);
freq[length-1]='\0';
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];
int length;
strcpy(hpcmd,hpib_cmd);
length=strlen(hpcmd);
error=IOOUTPUTS(ctr,hpcmd,length);
if (error!=0)
printf("Error during HP-IB: %d Command %s\n",error,hpcmd);
}
Chapter 3 Programming Your Universal Counter for Remote Operation
Programming Examples
To Make a Frequency Measurement (Turbo C) (Continued)
/* Variables used by function */
/* Send command to HP 53131A */
3-92
/* Start a measurement */
/* fetch the data */
/* Get length of result so */
/* the linefeed can be removed */
Programming Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents