EasyManuals Logo

Agilent Technologies 8164B Programming Guide

Agilent Technologies 8164B
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
Page #206 background imageLoading...
Page #206 background image
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 8164B

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 8164B and is the answer not in the manual?

Agilent Technologies 8164B Specifications

General IconGeneral
BrandAgilent Technologies
Model8164B
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals