EasyManua.ls Logo

Agilent Technologies 8163A - Page 206

Agilent Technologies 8163A
274 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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) ;
}
}

Table of Contents

Other manuals for Agilent Technologies 8163A

Related product manuals