Agilent Technologies E1563A, E1564A user manual Chapter Configuring the Digitizer Modules

Models: E1563A E1564A

1 173
Download 173 pages 42.87 Kb
Page 31
Image 31

/* Set the timeout value to 10 seconds. */ viSetAttribute (digitizer, VI_ATTR_TMO_VALUE, 10000);

/* Reset the module. */

err = viPrintf(digitizer, “*RST\n”);

if (err<VI_SUCCESS) err_handler (digitizer, err);

/* Query for the module’s identification string. */ err = viPrintf(digitizer, “*IDN?\n”);

if (err<VI_SUCCESS) err_handler (digitizer, err); err = viScanf(digitizer, “%t”, buf);

if (err<VI_SUCCESS) err_handler (digitizer, err); printf (“Module ID = %s\n\n”, buf);

/* Check the module for system errors. */ err = viPrintf(digitizer, “*SYST:ERR?\n”);

if (err<VI_SUCCESS) err_handler (digitizer, err); err = viScanf(digitizer, “%t”, buf);

if (err<VI_SUCCESS) err_handler (digitizer, err); printf (“System error response = %s\n\n”, buf);

viClose (digitizer); /* close the digitizer session */

} /* end of main */

/*** Error handling function ***/

void err_handler (ViSession digitizer, ViStatus err)

{

char buf[1024] = {0};

viStatusDesc (digitizer, err, buf); /* retrieve error description */ printf (“ERROR = %s\n”, buf);

return;

}

Chapter 1

Configuring the Digitizer Modules 31

Page 31
Image 31
Agilent Technologies E1563A, E1564A user manual Chapter Configuring the Digitizer Modules