Keysight E4428C ESG RF Programming Manual page 142

Signal generators
Table of Contents

Advertisement

Programming Examples
LAN Programming Interface Examples
}
}
else
{
/* ASCII response (not a binary block) */
*result = (char)ch;
if (recv_line(sock, result+1, maxLength-1) == NULL) return 0;
/* REMOVE trailing newline, if present.
resultBytes = strlen(result);
if (result[resultBytes-1] == '\n') resultBytes -= 1;
result[resultBytes] = '\0';
}
} while (0);
return resultBytes;
}
/*************************************************************************
*
> $Function: showErrors$
*
* $Description: Query the SCPI error queue, until empty.
*
* $Return:
(void)
*
*************************************************************************/
void showErrors(SOCKET sock)
{
const char * command = "SYST:ERR?\n";
char result_str[256];
do {
queryInstrument(sock, command, result_str, sizeof(result_str)-1);
/******************************************************************
* Typical result_str:
*
-221,"Settings conflict; Frequency span reduced."
*
+0,"No error"
134
And terminate string. */
Print results. $
Keysight Signal Generators Programming Guide

Advertisement

Table of Contents
loading

Table of Contents