HP ESA-E Series Programmer's Manual page 123

Esa spectrum analyzers
Table of Contents

Advertisement

iSrqOccurred
return VI_SUCCESS;
}
/* Main Program*/
void main()
{
/*Program Variables*/
ViStatus viStatus
long
lOpc=0;
/* Open an HP-IB session at address 18*/
viStatus=viOpenDefaultRM(&defaultRM);
int address =18;
viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,&
viESA);
if(viStatus)
{
printf("Could not open a session to HP-IB device at
address 18!\n");
exit(0);
}
/*Clear the analyzer*/
viClear(viESA);
/*Reset the analyzer*/
viPrintf(viESA,"*RST\n");
/*Clear the status byte of the analyzer*/
viPrintf(viESA,"*CLS\n");
/*Display the program heading */
printf("\n\t\t Status Register Program \n\n" );
/*Put the analyzer in a single sweep*/
viPrintf(viESA,"INIT:CONT 0 \n");
/* Check for the analyzer model number and route the 50
MHz signal accordingly*/
Route50MHzSignal();
/*Set the analyzer to 50 MHz center frequency*/
viPrintf(viESA,"SENS:FREQ:CENT 50 MHz\n");
Chapter 3
Status Register–Determine When a Measurement is Done
=1;
= 0;
Programming Examples
3-59

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents