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 #209 background imageLoading...
Page #209 background image
How to Log Results VISA Programming Examples
Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition 209
break;
}
/* find the substring "COMPLETE" in the reply of the instrument
*/
replySubStr = replyBuf;
while(*replySubStr)
{
if(!strncmp(replySubStr,"COMPLETE",strlen("COMPLETE")))
break;
replySubStr ++;
}
}while (!*replySubStr); /*substring "COMPLETE" not found */
/*continue polling */
/* The instrument returns the logging result in the following format:
#xyyyffff...; the first digits after the hash denotes the number of ascii
digits following (y) ; y specifies the number of binary data following;
"ffff" represent the 32Bit floats as log result. */
/* get the result */
errStatus =
viPrintf(vi,"SENS%1d:CHAN%1d:FUNC:RES?\n",slot,chan);
/* only query an error, if there is one, else the query will be
interrupted ! */
if(errStatus < VI_SUCCESS)checkError(vi,errStatus);
/* read the binary data */
errStatus = viRead(vi, logBuffer, MAX_LOG_VALUES *
sizeof(ViReal32) + HEADER_SIZE, &retCnt);
checkError(vi,errStatus);
if(logBuffer[0] != '#')
{
printf("invalid format returned from logging\n");
exit(1);
}
else
{
noOfDigits = logBuffer[1] -'0';
memcpy( logResults, &logBuffer[2 + noOfDigits ],
MAX_LOG_VALUES * sizeof(ViReal32));
}
/* stop logging */
viPrintf(vi,"SENS%1d:CHAN%1d:FUNC:STAT
LOGG,STOP\n",slot,chan);
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