Agilent Technologies E4438C Instrukcja Obsługi Strona 102

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 101
Programming Examples
RS-232 Programming Examples
Chapter 296
if(viStatus){ // If operation fails, prompt user
printf("Could not open ViSession!\n");
printf("Check instruments and connections\n");
printf("\n");
exit(0);}
// initialize device
viStatus=viEnableEvent(vi, VI_EVENT_IO_COMPLETION, VI_QUEUE,VI_NULL);
viClear(vi); // Sends device clear command
// Set attributes for the session
viSetAttribute(vi,VI_ATTR_ASRL_BAUD,baud);
viSetAttribute(vi,VI_ATTR_ASRL_DATA_BITS,8);
viPrintf(vi, "*RST\n"); // Resets the signal generator
printf("The signal generator has been reset\n");
printf("Power level should be -135 dBm\n");
printf("\n"); // Prints new line character to the display
viClose(vi); // Closes session
viClose(defaultRM); // Closes default session
}
Przeglądanie stron 101
1 2 ... 97 98 99 100 101 102 103 104 105 106 107 ... 207 208

Komentarze do niniejszej Instrukcji

Brak uwag