HP 8163A Series Programming Manual page 143

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

Advertisement

How to Log Results
{
exit(errStatus);
}
/* clear instrument error queue */
errStatus = viPrintf(vi,"*CLS\n");
checkError(vi,errStatus);
/* turn auto range on */
errStatus = viPrintf(vi,"SENS1:CHAN1:POW:RANGE:AUTO 1\n");
checkError(vi,errStatus);
/* send the command sequence for continuous logging */
slot = 1;
chan = 1;
noOfValues = 100;
averagingTime = 0.02; /* set averaging time to 20ms */
viPrintf(vi,"SENS%1d:CHAN%1d:FUNC:PAR:LOGG %d,%f\n",
slot,
chan,
noOfValues,
averagingTime);
checkError(vi,errStatus);
/* start logging */
viPrintf(vi,"SENS%1d:CHAN%1d:FUNC:STAT LOGG,START\n",slot,chan);
checkError(vi,errStatus);
/* to display the results, logging should be completed */
/* the instrument has to be polled about the progress of the logging */
do
{
errStatus = viQueryf(vi,"SENS%1d:CHAN%1d:FUNC:STATE?\n","%t",slot,chan,r
eplyBuf);
/* if an error occurs break the loop */
if (errStatus < VI_SUCCESS)
{
checkError(vi,errStatus);
break;
}
/* find the substring "COMPLETE" in the reply of the instrument */
replySubStr = replyBuf;
{
if(!strncmp(replySubStr,"COMPLETE",strlen("COMPLETE"))) break;
replySubStr ++;
}
}while (!*replySubStr); /*substring "COMPLETE" not found */
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User's Guide, E1299
/* log 100 values */
while(*replySubStr)
/*continue polling */
Programming Examples
143

Advertisement

Table of Contents
loading

This manual is also suitable for:

8164a series8166a series

Table of Contents