HP (Hewlett-Packard) B Network Router User Manual


 
140 OUTPUT @A_d;"*CLS"
150 OUTPUT @A_d;"*SRE 32"
160 OUTPUT @A_d;"*ESE 60"
170 !
180 !Subprogram calls would be here
190 !
200 WAIT .1 !allow error branch to occur before turning intr off
210 OFF INTR 7
220 END
230 !
240 SUB Errmsg
250 Errmsg: !Subprogram which displays HP E1429 programming errors
260 COM @A_d
270 DIM Message$[256]
280 !Read digitizer status byte register and clear service request bit
290 B =SPOLL(@A_d)
300 !End of statement if error occurs among coupled commands
310 OUTPUT @A_d;""
320 OUTPUT @A_d;"ABORT" !abort digitizer activity
330 REPEAT
340 OUTPUT @A_d;"SYST:ERR?" !read digitizer error queue
350 ENTER @A_d;Code,Message$
360 PRINT Code,Message$
370 UNTIL Code=0
380 STOP
390 SUBEND
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