EasyManua.ls Logo

HP ESA-E Series - Page 85

HP ESA-E Series
398 pages
Print Icon
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...
Chapter 3 3-21
Programming Examples
Performing Internal Self-alignment
/*Check for the analyzer model number and route the 50
MHz 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 intial 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 Intial Self Alignment is Over \n\n");
if (!lOpc)
{
printf("Program Abort! error ocurred: last command was
not completed!\n");
exit(0);
}
printf ("\n\n\t Press any key to continue to next
program \n");
scanf( "%c",&cEnter);
printf("\t Performing next self alignment ..... " );
/*Query for self-alignment results*/
viPrintf(viESA,"CAL:ALL?; \n");
viScanf(viESA,"%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)
{
printf("Program Abort! error ocurred: last command was
not completed!\n");
exit(0);
}

Table of Contents

Related product manuals