140OUTPUT @A_d;"*CLS"

150OUTPUT @A_d;"*SRE 32"

160OUTPUT @A_d;"*ESE 60"

170!

180!Subprogram calls would be here

190!

200WAIT .1 !allow error branch to occur before turning intr off

210OFF INTR 7

220END

230!

240SUB Errmsg

250Errmsg: !Subprogram which displays HP E1429 programming errors

260COM @A_d

270DIM Message$[256]

280!Read digitizer status byte register and clear service request bit

290B =SPOLL(@A_d)

300!End of statement if error occurs among coupled commands

310OUTPUT @A_d;""

320OUTPUT @A_d;"ABORT" !abort digitizer activity

330REPEAT

340

OUTPUT @A_d;"SYST:ERR?" !read digitizer error queue

350

ENTER @A_d;Code,Message$

360PRINT Code,Message$

370UNTIL Code=0

380STOP

390SUBEND

ERRORCHK.C

/* ERRORCHK.C - This program contains the C function used by the example */ /* programs to check for digitizer configuration errors. When an error */

/* occurs, the function reads the digitizer’s error buffer and prints the */ /* error messages until all of the errors have been read. */

/* Include the following header files */

#include

<stdio.h>

#include

<cfunc.h> /* This file is from the HP-IB Command Library Disk */

#define ADDR 70905L /* I/O path from PC to the digitizer, via the HP E1406 */

/* Function Prototype */

void check_error(void);

Continued on Next Page

46 Getting Started

Chapter 1

Page 46
Image 46
HP E1429A manual Errorchk.C