Keysight Technologies X-Series Programming Manual page 147

Signal generators
Hide thumbs Also See for X-Series:
Table of Contents

Advertisement

Programming Examples
LAN Programming Interface Examples
#endif /* WINSOCK */
here */
INPUT_BUF_SIZE);
INPUT_BUF_SIZE);
INPUT_BUF_SIZE);
#ifdef WINSOCK
#else
#endif /* WINSOCK */
}
/******************************************************************
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
instSock = openSocket("xxxxxx", SCPI_PORT); /* Put your hostname
if (instSock == INVALID_SOCKET) {
fprintf(stderr, "Unable to open socket.\n");
return 1;
}
/* fprintf(stderr, "Socket opened.\n"); */
bufBytes = queryInstrument(instSock, "*IDN?\n", charBuf,
printf("ID: %s\n",charBuf);
commandInstrument(instSock, "FREQ 2.5 GHz\n");
printf("\n");
bufBytes = queryInstrument(instSock, "FREQ:CW?\n", charBuf,
printf("Frequency: %s\n",charBuf);
commandInstrument(instSock, "POW:AMPL -5 dBm\n");
bufBytes = queryInstrument(instSock, "POW:AMPL?\n", charBuf,
printf("Power Level: %s\n",charBuf);
printf("\n");
closesocket(instSock);
close_winsock();
close(instSock);
return 0;
147

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents