HP 8163A Series Programming Manual page 136

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

Advertisement

Programming Examples
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 */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:RANGE:AUTO 1\n");
checkError(vi,errStatus);
/* change the power unit of the power meter to dBm */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:UNIT 0\n");
checkError(vi,errStatus);
/*set the averaging time for measuring to 20 ms,
therefore no timeout needs to implemented */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:ATIME 0.02\n");
checkError(vi,errStatus);
/* set the attenuation to zero for maximum power */
errStatus = viPrintf(vi,"SOURCE2:CHAN1:POW:ATT 0.0\n");
checkError(vi,errStatus);
/* set the reference mode to the internal one,
which is now the last displayed value */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:REF:STATE:RATIO TOREF,0\n");
checkError(vi,errStatus);
/* set reference measuremant state to absolute units */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:REF:STAT 1\n");
checkError(vi,errStatus);
/* turn laser on */
errStatus = viPrintf(vi,"SOURCE2:CHAN1:POW:STATE 1\n");
checkError(vi,errStatus);
/*ask for command completion */
do
{
errStatus = viQueryf(vi,"*OPC?\n","%d",&cmdDone);
checkError(vi,errStatus);
} while (!cmdDone);
/* set the power meter reference to the displayed value (display to reference) */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:REF:DISP\n");
136
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User's Guide, E1299
How to Co-ordinate Two Modules

Advertisement

Table of Contents
loading

This manual is also suitable for:

8164a series8166a series

Table of Contents