Keysight E4428C ESG RF Programming Manual page 146

Signal generators
Table of Contents

Advertisement

Programming Examples
LAN Programming Interface Examples
{
/* no hostname! */
usage(basename);
exit(1);
}
/******************************************************
/* open a socket connection to the instrument
/******************************************************/
#ifdef WINSOCK
if (init_winsock() != 0) {
exit(1);
}
#endif /* WINSOCK */
instSock = openSocket(destination, SCPI_PORT);
if (instSock == INVALID_SOCKET) {
fprintf(stderr, "Unable to open socket.\n");
return 1;
}
/* fprintf(stderr, "Socket opened.\n"); */
if (strlen(command) > 0)
{
/*******************************************************
/* if the command has a '?' in it, use queryInstrument. */
/* otherwise, simply send the command.
/*******************************************************/
if ( isQuery(command) )
{
long bufBytes;
bufBytes = queryInstrument(instSock, command,
if (!quiet)
{
fwrite(charBuf, bufBytes, 1, stdout);
fwrite("\n", 1, 1, stdout) ;
fflush(stdout);
}
}
else
138
*/
charBuf, INPUT_BUF_SIZE);
Keysight Signal Generators Programming Guide

Advertisement

Table of Contents
loading

Table of Contents