Keysight Technologies X-Series Programming Manual page 143

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

Advertisement

Programming Examples
LAN Programming Interface Examples
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
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
{
commandInstrument(instSock, command);
}
}
else
{
/* read a line from <stdin> */
while ( gets(charBuf) != NULL )
*/
charBuf, INPUT_BUF_SIZE);
143

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents