HP 8163A Programming Manual page 155

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

Advertisement

Programming Examples
How to Co-ordinate Two Modules
/* set the power meter reference to the displayed value (display to reference) */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:REF:DISP\n");
checkError(vi,errStatus);
/*
read 30 values and display the result; after ten measurements
the source output will be halved by making use of the attenuation;
after an other ten measurements the source output will be halved
a second time;
because of the display to reference command and using the
reference, the value printed should be more or less equal to the
adjusted source attenuation */
for (i = 1; i <= 30; i++)
{
errStatus = viQueryf(vi,"READ1:CHAN1:POW?\n","%s",replyBuf);
checkError(vi,errStatus);
if(errStatus ==VI_SUCCESS)printf("power #%02d:%s\n",i,replyBuf);
if(i == 10)
{
/* reduce the output power for 3.0 dB */
errStatus = viPrintf(vi,"SOURCE2:CHAN1:POW:ATT 3.0\n");
checkError(vi,errStatus);
}
if(i == 20)
{
/* reduce the output power for 6.0 dB */
errStatus = viPrintf(vi,"SOURCE2:CHAN1:POW:ATT 6.0\n");
checkError(vi,errStatus);
}
}
155

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 8164a

Table of Contents