EasyManua.ls Logo

Keysight Technologies 8163A/B - Page 246

Keysight Technologies 8163A/B
306 pages
Print Icon
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...
246 8163A/B, 8164A/B & 8166A/B Mainframes Programming Guide
6 VISA Programming Examples
wavelength_max = atof(replyBuf);
/* change the power unit of the power meter to dbm */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:UNIT DBM\n");
checkError(vi,errStatus);
/* read the default power from the tunable laser source */
errStatus = viQueryf(vi,"SOURCE2:POW? DEF\
n","%s",replyBuf);
checkError(vi,errStatus);
/* set the default power */
errStatus = viPrintf(vi,"SOURCE2:POW %s\n",replyBuf);
checkError(vi,errStatus);
/* turn auto range on*/
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:RANGE:AUTO 1\
n");
checkError(vi,errStatus);
/*set the averaging time for measuring to 20ms*/
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:ATIME 0.02\n");
checkError(vi,errStatus);
/* turn laser on */
errStatus = viPrintf(vi,"SOURCE2:POW:STATE 1\n");
checkError(vi,errStatus);
/* increase the wavelength of the tunable laser source 10
nm
until the maximum is reached.
read the results from the power meter and display it */
for(i=1;1;i++)
{
/*query the power */
errStatus = viQueryf(vi,"READ1:CHAN1:POW?\
n","%s",replyBuf);
checkError(vi,errStatus);
/* display the power read from power meter and
wavelength */

Table of Contents

Related product manuals