EasyManua.ls Logo

Agilent Technologies E7401A

Agilent Technologies E7401A
349 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
Loading...
114 Chapter 3
Programming Examples
Performing Internal Self-alignment
if(viStatus)
{
printf("Could not open a session to GPIB device at address 18!\n");
exit(0);
}
/*Clear the instrument*/
viClear(viESA);
/*Reset the instrument*/
viPrintf(viESA,"*RST\n");
/*Display the program heading */
printf("\n\t\t Internal Self-Alignment Program \n\n" );
/*Check for the instrument model number and route the 50MHz-signal accordingly*/
Route50MHzSignal();
/*VISA function sets the time out to infinite for this specified session*/
viSetAttribute(viESA, VI_ATTR_TMO_VALUE, VI_TMO_INFINITE);
printf("\t Performing first self alignment ..... " );
/*Initiate a self-alignment */
viPrintf(viESA,"CAL:ALL\n");
/*Query for operation complete*/
viQueryf(viESA, "*OPC?\n", "%d", &lOpc);
printf ("\n\n\t First Self Alignment is Done \n\n");
if (!lOpc)
{
printf("Program Abort! error ocurred: last command was not completed!\n");
exit(0);
}
printf ("\n\n\t Press Return to continue with next alignment \n\n");
scanf( "%c",&cEnter);
printf("\t Performing next self alignment ..... " );
/* Query for self-alignment results*/
viQueryf(viESA,"CAL:ALL?\n","%d",&lResult);
if (lResult)
printf ("\n\n\t Self-alignment Failed \n");
else
printf ("\n\n\t Self-alignment Passed \n");
/* Query for operation complete*/
viQueryf(viESA, "*OPC?\n", "%d", &lOpc);
if (!lOpc)

Table of Contents

Other manuals for Agilent Technologies E7401A

Related product manuals