Agilent Technologies 8163A Programming Manual page 209

Lightwave multimeter; lightwave measurement system; lightwave multichannel system
Hide thumbs Also See for 8163A:
Table of Contents

Advertisement

How to Log Results
Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition
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 */
/* 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);
VISA Programming Examples
/*continue polling */
209

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

8166a8166b8163b8164a8164b

Table of Contents