138
Chapter 3
Programming Examples
Saving and Recalling Instrument State Data
!!!Carefull this will overwrite register 10*/
viPrintf(viVSA, "*SAV 10\n");
/*display message*/
printf("E4406A 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 the again the input port to the internal 50Mhz
reference source*/
viPrintf(viVSA, "INP:PORT 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\n");
/* close session */
viClose (viVSA);
viClose (defaultRM);
}
Summary of Contents for E4406A VSA Series
Page 4: ...4 ...
Page 59: ...59 2 Programming Fundamentals ...
Page 124: ...124 Chapter2 Programming Fundamentals Using the LAN to Control the Analyzer ...
Page 125: ...125 3 Programming Examples ...
Page 164: ...164 Chapter3 Programming Examples Using Java Programming Over Socket LAN ...
Page 165: ...165 4 Programming Command Cross References ...
Page 379: ...379 6 Error Messages ...
Page 412: ...412 Chapter6 Error Messages Error Message Descriptions ...