Agilent Technologies Agilent 8166A Instrukcja Obsługi Strona 231

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 274
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 230
Error Handling The Agilent 816x VXIplug&play Instrument Driver
Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition 231
void check (ViSession instrumentHandle, ViStatus errStatus)
{
/* variables for error code and message */
ViInt32 inst_err;
ViChar err_message[256];
/* VI_SUCCESS is 0 and is defined in VISATYPE.h */
if(VI_SUCCESS > errStatus)
{
/* hp816x_INSTR_ERROR_DETECTED defined in hp816x.h */
if(hp816x_INSTR_ERROR_DETECTED == errStatus)
{
/* query the instrument for the error */
hp816x_error_query(instrumentHandle, &inst_err, err_message);
/* display the error */
printf("Instrument Error : %ld, %s\n", inst_err, err_message);
}
else /* driver error */
{
/* get the driver error message */
hp816x_error_message(instrumentHandle, errStatus,
err_message);
/* display the error */
printf("Driver Error : %ld, %s\n", errStatus, err_message);
}
/* optionally reset the instrument, close the instrument handle
*/
hp816x_reset(instrumentHandle);
hp816x_close(instrumentHandle);
exit(1);
}
return;
Przeglądanie stron 230
1 2 ... 226 227 228 229 230 231 232 233 234 235 236 ... 273 274

Komentarze do niniejszej Instrukcji

Brak uwag