HP 8163A Programming Manual page 163

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

Advertisement

Programming Examples
How to Log Results
ViChar
replyBuf[256]; /* buffer holding answers of the instrument */
ViChar
c;
ViInt32 slot;
/* slot number where the power meter is plugged */
ViInt32 chan;
/* channel to be logged */
ViInt32 i;
/* loop counter */
ViInt32
noOfValues;
ViReal64
averagingTime; /* aveaging time used in a logging cycle */
ViPChar
replySubStr; /* pointer to a substring of the instruments reply */
ViInt32 noOfDigits;
to be read */
ViUInt32 retCnt;
errStatus = InitVisa(&vi);
if(errStatus < VI_SUCCESS)
{
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;
/* log 100 values */
averagingTime = 0.02; /* set averaging time to 20ms */
viPrintf(vi,"SENS%1d:CHAN%1d:FUNC:PAR:LOGG %d,%f\n",
slot,
chan,
noOfValues,
163
/* used in the keyboard wait loop */
/* number of values to be logged*/
/*number of digits, specifing the amount data
/* returns the number of bytes read calling viRead */

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 8164a

Table of Contents