EasyManuals Logo

Agilent Technologies 8163B Programming Guide

Agilent Technologies 8163B
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 #208 background imageLoading...
Page #208 background image
VISA Programming Examples How to Log Results
208 Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition
ViInt32 noOfDigits; /*number of digits, specifing the amount
data
to be read */
ViUInt32 retCnt; /* returns the number of bytes read
calling viRead */
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,
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,replyBuf
);
/* if an error occurs break the loop */
if (errStatus < VI_SUCCESS)
{
checkError(vi,errStatus);

Table of Contents

Other manuals for Agilent Technologies 8163B

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies 8163B Specifications

General IconGeneral
BrandAgilent Technologies
Model8163B
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals