Agilent Technologies E1300B User Manual page 125

75000 series b mainframes
Hide thumbs Also See for E1300B:
Table of Contents

Advertisement

Example: Interrupting when an Error Occurs
This program shows how to interrupt an external computer whenever an error
occurs for the instrument being programmed which, in this example, is a
multimeter at secondary address 03.
10 OPTION BASE 1
20 ON INTR 7 CALL Errmsg
!When SRQ occurs on interface 7, call subprogram
30 ENABLE INTR 7;2
!Enable SRQ interrupt, interface 7
40 OUTPUT 70903;"* SRE 32"
!Enable bit 5 (Standard Event Status Bit) in Status Byte
Register
50 OUTPUT 70903;"* ESE 60"
!Enable error bits (bits 2-5) in Standard Event Status Register
to be reflected
! in Status Byte Register
60 OUTPUT 70903;"MEAS:TEMP? TC,T,(@104)"
!Measure temperature with voltmeter
70 WAIT 2
80 ENTER 70903;Tmp_rdg
90 PRINT Tmp_rdg
100 END
110 SUB Errmsg
120 DIM Message$[256]
130 CLEAR 70903
140 B= SPOLL(70903)
!Serial poll multimeter (clears SRQ)
150 REPEAT
!Repeat next 3 lines until error number = 0
160
OUTPUT 70903;"SYST:ERR?"
170
ENTER 70903;Code,Message$
180
PRINT Code,Message$
190 UNTIL Code= 0
200 OUTPUT 70903;"* CLS"
210 STOP
220 SUBEND
!Array numbering starts with 1
!Enter temperature reading
!Print temperature reading
!Create array for error message
!Clear multimeter
!Read error from queue
!Enter error number & message
!Print error number & message
!Clear status structures
Controlling Instruments Using GPIB 6-11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1301b75000 series b

Table of Contents