HP 8163A Programming Manual page 158

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

Advertisement

Programming Examples
How Power Varies with Wavelength
ViInt32 cmdDone;
errStatus = viOpenDefaultRM (&defaultRM);
if(errStatus < VI_SUCCESS)
{
printf("Failed to open VISA Resource manager\n");
exit(errStatus);
}
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);
checkError(vi,errStatus);
errStatus = viPrintf(vi,"*CLS\n");
checkError(vi,errStatus);
/* read the minimum wavelength from the tunable laser source*/
errStatus = viQueryf(vi,"SOURCE2:WAV? MIN\n","%s",replyBuf);
checkError(vi,errStatus);
/* save this wavelength */
wavelength = atof(replyBuf);
/* set the minimum wavelength as initial wavelength in the tunable laser source */
errStatus = viPrintf(vi,"SOURCE2:WAV %s\n",replyBuf);
checkError(vi,errStatus);
158
/* return value for OPC command */

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 8164a

Table of Contents