HP 8163A Programming Manual page 153

Lightwave measurement system
Hide thumbs Also See for HP 8163A:
Table of Contents

Advertisement

Programming Examples
How to Co-ordinate Two Modules
errStatus = viOpenDefaultRM (&defaultRM);
if(errStatus < VI_SUCCESS)
{
printf("Failed to open VISA Resource manager\n");
exit(errStatus);
}
/* Open session to HPIB device at address 20; */
errStatus = viOpen (defaultRM, "GPIB::20::INSTR", VI_NULL,VI_NULL,&vi);
if(errStatus < VI_SUCCESS)
{
printf("Failed to open instrument\n");
exit(errStatus);
}
/* set timeout to 20 sec; this should work for all commands except zeroing */
errStatus = viSetAttribute(vi,VI_ATTR_TMO_VALUE,20000);
if (errStatus < VI_SUCCESS) checkError(vi,errStatus);
/* clear error queue */
errStatus = viPrintf(vi,"*CLS\n");
checkError(vi,errStatus);
/* read the wavelength from the laser source */
errStatus = viQueryf(vi,"SOURCE2:CHAN1:WAV?\n","%s",replyBuf);
checkError(vi,errStatus);
/* feed the source wavelength into the power meter making
sure to measure the maximum power of the source */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:WAV %s\n",replyBuf);
checkError(vi,errStatus);
/* turn auto range on */
153

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 8164a

Table of Contents