Agilent Technologies 8163A Programming Manual page 142

Lightwave multimeter lightwave measurement system lightwave multichannel system
Hide thumbs Also See for 8163A:
Table of Contents

Advertisement

VISA Programming Examples
averaging time, so that the READ command will not time out.
*/
/* send the read command */
errStatus = viQueryf(vi,"READ1:CHAN1:POW?\n","%t",replyBuf);
checkError(vi,errStatus);
if(i)
{
if(!strcmp(compBuf,replyBuf)) printf("Same:%s",replyBuf);
else printf("New :%s",replyBuf);
}
else printf("\nFirst:%s",replyBuf);
/*copy new value to compare buffer*/
strcpy(compBuf,replyBuf);
}
/* loop, until a key is pressed */
while(!scanf("%c",&c));
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") ;
exit(1);
}
else
{
/* only errors should be displayed */
if(errMsg[0] != '+')
printf("error:%ld --> %s\n", err_status,errMsg) ;
}
142
Agilent 8163A Lightwave Multimeter, Agilent 8164A Lightwave Measurement System,
& Agilent 8166A Lightwave Multichannel System, Third Edition
How to Measure Power using FETCh and READ

Advertisement

Table of Contents
loading

This manual is also suitable for:

8164a8166a

Table of Contents