EasyManuals Logo

Agilent Technologies 8166B Programming Guide

Agilent Technologies 8166B
274 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #204 background imageLoading...
Page #204 background image
VISA Programming Examples How Power Varies with Wavelength
204 Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition
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);
/* set the power meter to same wavelength like the tunable laser
source */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:WAV %s\n",replyBuf);
checkError(vi,errStatus);
/* read the maximum wavelength from the tunable laser source */
errStatus = viQueryf(vi,"SOURCE2:WAV? MAX\n","%s",replyBuf);
checkError(vi,errStatus);
/*save this wavelength */
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);

Table of Contents

Other manuals for Agilent Technologies 8166B

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 8166B and is the answer not in the manual?

Agilent Technologies 8166B Specifications

General IconGeneral
BrandAgilent Technologies
Model8166B
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals