Manual background

/* Reset the module, and clear status regs. */ err=viPrintf(funcgen, "*RST;*CLS\n");

if(err != VI_SUCCESS) err_handler(funcgen, err);

/* Query the module identification. */ err=viPrintf(funcgen, "*IDN?\n");

if(err != VI_SUCCESS) err_handler(funcgen, err); err=viScanf(funcgen, "%t", &buf);

if(err != VI_SUCCESS) err_handler(funcgen, err); printf("Module ID = %s\n\n", buf);

/* Perform a module self-test. */ err=viQueryf(funcgen, "*TST?\n", "%t", &buf); if(err != VI_SUCCESS) err_handler(funcgen, err); printf("Self-test response (0 passed) = %s\n\n", buf);

/* Check for system errors. */ err=viQueryf(funcgen, "syst:err?\n", "%t", buf); if(err != VI_SUCCESS) err_handler(funcgen, err); printf("System error response = %s\n\n", buf);

/* Close Instrument Session */ err=viClose(funcgen);

if(err != VI_SUCCESS) err_handler(funcgen, err);

} /* end of main */

/*** Error handling function ***/

void err_handler(ViSession funcgen, ViStatus err)

{

char buf[1024] = {0}; viStatusDesc(funcgen, err, buf); printf("ERROR = %s\n", buf); return;

}

Example Programs Several example programs, including a performance verification program and an adjustment program, can be found on the Agilent Universal Instrument Drivers CD. The directory path is <drive>:\examples\hpe1441.

18 Agilent E1441A Function/Arbitrary Waveform Generator Module Setup

Chapter 1

Page 18
Image 18
Agilent Technologies E1441A user service Chapter