/****************************************************************************/

void main(void)/* Run the program */

{

char

message[256], diagnostic[80];

 

intlength = 256;

 

float

tst;

 

IOOUTPUTS(ADDR, "*TST?", 5);

/* send the self-test command */

IOENTER(ADDR, &tst);

/* enter the code */

printf("%d\n\n", (int) tst);

/* display the code */

if (tst != 0)

 

{

 

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

/* query error register */

IOENTERS(ADDR, message, &length);

/* enter error message */

printf("Error: %s\n\n", message);

/* print error message */

IOOUTPUTS(ADDR, "DIAG:TEST?", 10);

/* get diagnostic information */

IOENTERS(ADDR, diagnostic, &length);

/* on self-test error */

printf("Diagnostic information: %s\n", diagnostic);

}

}

Resetting and

Clearing the

Digitizer

The commands used to reset and clear the digitizer are:

*RST

*CLS

*OPC? (OPeration Complete) is often executed after *RST and *CLS to allow the reset and clear to complete before program execution continues.

Resetting the digitizer sets it to its power-on configuration, and clearing the digitizer clears its status registers. Additional information on the status registers is located in Chapter 3.

Chapter 1

Getting Started 23

Page 23
Image 23
HP E1429A Resetting Clearing Digitizer, Iooutputsaddr, *Tst?, Iooutputsaddr, Systerr?, Iooutputsaddr, Diagtest?, Rst Cls