EasyManuals Logo

Agilent Technologies E8267D User Manual

Agilent Technologies E8267D
366 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #135 background imageLoading...
Page #135 background image
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 125
Programming Examples
LAN Programming Interface Examples
char *charBuf = (char *) malloc(INPUT_BUF_SIZE);
/*********************************************/
/* open a socket connection to the instrument*/
/*********************************************/
#ifdef WINSOCK
if (init_winsock() != 0) {
exit(1);
}
#endif /* WINSOCK */
instSock = openSocket("xxxxxx", SCPI_PORT); /* Put your hostname here */
if (instSock == INVALID_SOCKET) {
fprintf(stderr, "Unable to open socket.\n");
return 1;
}
/* fprintf(stderr, "Socket opened.\n"); */
bufBytes = queryInstrument(instSock, "*IDN?\n", charBuf, INPUT_BUF_SIZE);
printf("ID: %s\n",charBuf);
commandInstrument(instSock, "FREQ 2.5 GHz\n");
printf("\n");
bufBytes = queryInstrument(instSock, "FREQ:CW?\n", charBuf, INPUT_BUF_SIZE);
printf("Frequency: %s\n",charBuf);
commandInstrument(instSock, "POW:AMPL -5 dBm\n");
bufBytes = queryInstrument(instSock, "POW:AMPL?\n", charBuf, INPUT_BUF_SIZE);
printf("Power Level: %s\n",charBuf);
printf("\n");
#ifdef WINSOCK
closesocket(instSock);
close_winsock();
#else
close(instSock);
#endif /* WINSOCK */
return 0;
}
/***************************************************************************

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies E8267D and is the answer not in the manual?

Agilent Technologies E8267D Specifications

General IconGeneral
BrandAgilent Technologies
ModelE8267D
CategoryInverter
LanguageEnglish

Related product manuals