HP E1340A User Manual page 39

Arbitrary function generator
Hide thumbs Also See for E1340A:
Table of Contents

Advertisement

HP IBASIC (ERRORCHK)
39
Getting Started with the HP E1340A
1
!RE-SAVE"ERRORCHK"
2
!This program represents the method used to check for programming
3
!errors in HP IBASIC programs.
10
!Assign I/O path between IBASIC and the E1340A.
20
ASSIGN @Afg TO 80910
30
COM @Afg
40
!Define branch to be taken when an E1340A error occurs.
50
!Enable IBASIC interface to generate interrupt when error occurs.
60
ON INTR 8 CALL Errmsg
70
ENABLE INTR 8;2
80
!Clear all bits in the standard event status register, unmask the
90
!standard event status group summary bit in the E1340A status byte
100
!register (decimal weight 32), unmask the query error, device
110
!dependent error, execution error, and command error bits
120
!(decimal sum 60) in the E1340A standard event status register.
130
OUTPUT @Afg;"*CLS"
140
OUTPUT @Afg;"*SRE 32"
150
OUTPUT @Afg;"*ESE 60"
160
!
170
!Subprogram calls would be here
180
!
190
WAIT .1 !allow error branch to occur before turning intr off
200
OFF INTR 8
210
END
220
!
230
SUB Errmsg
240 Errmsg: !Subprogram which displays E1340 programming errors
250
COM @Afg
260
DIM Message$[256]
270
!Read AFG status byte register and clear service request bit
280
B=SPOLL(@Afg)
290
!End of statement if error occurs among coupled commands
300
OUTPUT @Afg;""
310
OUTPUT @Afg;"ABORT" !abort output waveform
320
REPEAT
330
OUTPUT @Afg;"SYST:ERR?" !read AFG error queue
340
ENTER @Afg;Code,Message$
350
PRINT Code,Message$
360
UNTIL Code=0
370
STOP
380
SUBEND
Chapter 1

Advertisement

Table of Contents
loading

Table of Contents