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 #210 background imageLoading...
Page #210 background image
VISA Programming Examples How to Log Results
210 Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Fifth Edition
/* display the values using %g, a float format specifier, you may
also use %e or %f */
for ( i = 0; i < noOfValues; i++)
printf("\t%g\n",logResults[i]);
/* loop, until a key is pressed */
while(!scanf("%c",&c));
/* close the session */
viClose(vi);
}
void checkError(ViStatus session, ViStatus err_status )
{
ViStatus error;
ViChar errMsg[256];
error = viQueryf(session,"SYST:ERR?\n","%t",errMsg);
if (error == VI_ERROR_TMO)
{
printf("System Error!\n") ;
exit(1);
}
else
{
/* only errors should be displayed */
if(errMsg[0] != '+')
{
printf("error:%ld --> %s\n", err_status,errMsg) ;
if
((!strncmp(errMsg,
"- 303,\"Module slot empty or slot / channel invalid\"",
strlen("- 303,\"Module slot empty or slot / channel invalid\"")))
||
(!strncmp(errMsg,
"- 301,\"Module doesn't support this command
(StatCmdUnknown)\"",
strlen(
"- 301,\"Module doesn't support this command
(StatCmdUnknown)\""))))
{
printf("No power meter in slot 1 so exiting\n\n");
exit(1);
}
}
}
}
ViStatus InitVisa ( ViSession *iHandle)

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