Agilent Technologies 8163A Programming Manual page 149

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

Advertisement

How Power Varies with Wavelength
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 */
printf("#%02d power:%s wavelength:%g\n",i,replyBuf,wavelength);
/* increase the wavelength */
wavelength += 10.0e-9;
if(wavelength > wavelength_max) break;
/*set the new wavelength*/
errStatus = viPrintf(vi,"SOURCE2:WAV %g\n",wavelength);
/*
poll the instrument for completion of this command
because adjusting a new wavelength takes some time
*/
do
{
errStatus = viQueryf(vi,"*OPC?\n","%d",&cmdDone);
checkError(vi,errStatus);
} while (!cmdDone);
Agilent 8163A Lightwave Multimeter, Agilent 8164A Lightwave Measurement System, & Agilent 8166A Lightwave Multichannel
System, Third Edition
VISA Programming Examples
149

Advertisement

Table of Contents
loading

This manual is also suitable for:

8164a8166a

Table of Contents