/* remove line feed which trails the last data byte */

IOENTERS(ADDR_MEM, lf_remove, &length);

/* convert and display the readings; the generator digitizer readings */ /* occur first, followed by the appender digitizer readings */

for (i = 0; i < readings; i++)

{

rdgs[i] /= 16;

if (rdgs[i] >= 2047 rdgs[i] <= -2046) printf("\nReading overrange");

else

printf("\nReading %d = %.6E", i, (rdgs[i] * 0.0025));

}

free(rdgs);

}

/****************************************************************************/ void rst_clr(long address)

{

/* Reset and clear the instruments */

IOOUTPUTS(address, "*RST;*CLS", 9);

}

/****************************************************************************/ void check_error(char *array, long address)

{

char into[161]; intlength = 160;

IOOUTPUTS(address, "SYST:ERR?", 9);

/* Query error register */

IOENTERS(address, into, &length);

 

/* Enter error message */

if (atoi(into) != 0)

/* Determine if error is present */

 

/* If errors present, print and exit */

{

 

 

Continued on Next Page

Chapter 2

Using the Digitizer 91

Page 91
Image 91
HP E1429A manual On Next