Agilent Technologies E8257D PSG Instrukcja Użytkownika Strona 141

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 140
Agilent N516xA, N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 129
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. And terminate string. */
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. Print results. $
*
* $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"
Przeglądanie stron 140
1 2 ... 136 137 138 139 140 141 142 143 144 145 146 ... 379 380

Komentarze do niniejszej Instrukcji

Brak uwag