Agilent Technologies E4406A VSA Satellite Radio User Manual


 
Chapter 3 141
Programming Examples
Saving and Recalling Instrument State Data
viPrintf(viVSA, "INIT:IMM;*WAI\n");
/*save this state in register 10.
!!!Carefull this will overwrite register 10*/
viPrintf(viVSA, "*SAV 10\n");
/*display message*/
printf("HPE4406A Programming example showing *SAV,*RCL SCPI commands\n");
printf("used to save instrument state\n\t\t------------------------");
printf("\n\nThe instrument state has been saved to an internal register\n");
printf("Please observe the display and notice the signal shape\n");
printf("Then press any key to reset the
instrument\a\n\t\t------------------------");
/*wait for any key to be pressed*/
getch();
/*reset the instrument */
viPrintf(viVSA, "*RST\n");
/*set again the input port to the internal 50Mhz reference source*/
viPrintf(viVSA, "SENS:FEED AREF\n");
/*display message*/
printf("\n\nThe instrument was reset to the factory default setting\n");
printf("Notice the abscence of the signal on the display\n");
printf("Press any key to recall the saved
state\a\n\t\t------------------------");
/*wait for any key to be pressed*/
getch();
/*recall the state saved in register 10*/
viPrintf(viVSA, "*RCL 10\n");
/*zoom the spectrum display*/
viPrintf(viVSA, "DISP:FORM:ZOOM1\n");
/*display message*/
printf("\n\nNotice the previous saved instrument settings were restored\n");
printf("Press any key to terminate the
program\a\n\t\t------------------------\n\n");
/*wait for any key to be pressed*/
getch();
/*reset the instrument */
viPrintf(viVSA, "*RST;*wai\n");
/*Set the instrument to continuous sweep */