Keysight Technologies 8163A/B Programming Manual page 251

Table of Contents

Advertisement

8163A/B, 8164A/B & 8166A/B Mainframes Programming Guide
{
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);
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
*/
/* The instrument returns the logging result in the
following format:
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
VISA Programming Examples
while(*replySubStr)
/*continue polling */
#xyyyffff...; the first digits after the
6
251

Advertisement

Table of Contents
loading

This manual is also suitable for:

8164a/b8166a/b

Table of Contents