Agilent Technologies Agilent 8166A Instrukcja Obsługi Strona 206

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 274
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 205
VISA Programming Examples How Power Varies with Wavelength
206 Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition
*/
do
{
errStatus = viQueryf(vi,"*OPC?\n","%d",&cmdDone);
checkError(vi,errStatus);
} while (!cmdDone);
}
/* loop, until a key is pressed */
while(!scanf("%c",&c));
/* turn laser off */
errStatus = viPrintf(vi,"SOURCE2:CHAN1:POW:STATE 0\n");
checkError(vi,errStatus);
/* close the session */
viClose(vi);
}
void checkError(ViSession session, ViStatus err_status )
{
ViStatus error;
ViChar errMsg[256];
error = viQueryf(session,"SYST:ERR?\n","%t",errMsg);
if (error == VI_ERROR_TMO) printf("System Error!\n") ;
else
{
/* only errors should be displayed */
if(errMsg[0] != '+')
printf("error:%ld --> %s\n", err_status,errMsg) ;
}
}
Przeglądanie stron 205
1 2 ... 201 202 203 204 205 206 207 208 209 210 211 ... 273 274

Komentarze do niniejszej Instrukcji

Brak uwag