Checking For Errors - HP E1340A User Manual

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

Advertisement

HP IBASIC (LRN)
C and QuickBASIC
Programs

Checking for Errors

Note
Chapter 1
1
!RE-SAVE "LRN"
10
!Assign an I/O path between IBASIC and the AFG.
20
ASSIGN @Afg TO 80910
30
!Call the subprogram
40
CALL Lrn_conf(@Afg)
50
END
60
!
70
SUB Lrn_conf(@Afg)
80 Lrn_conf: !subprogram which queries the AFG reset configuration
90
DIM Lrn$[1000],Temp$[40]
100
OUTPUT @Afg;"*LRN?"
110
ENTER @AFG;Lrn$
120
Temp$=""
130
FOR I=1 TO LEN(Lrn$)
140
IF Lrn$[I,I]=";" THEN
150
PRINT Temp$
160
Temp$=""
170
ELSE
180
Temp$=Temp$&Lrn$[I,I] !build Temp$ from *LRN data
190
END IF
200
NEXT I
210
SUBEND
The C and QuickBASIC versions of LRN are on the C language example
programs disk (HP P/N E1340-10036).
The following HP IBASIC program shows the lines and subprogram added
to the HP IBASIC programs to check for errors. Line 140 clears the AFG
standard event status register. Lines 150 and 160 unmask the appropriate
bits in the AFGs status byte register and standard event status register.
When an error occurs, the subprogram " Errmsg" reads the AFG error queue
and displays the code and message. Note that line 310 is used to force an
"end of statement" condition should a syntax error occur in a group of
commands. Otherwise, the
considered as part of the group and be ignored by the AFG SCPI interpreter.
An alternative HP IBASIC error checking program is in the C-Size VXIbus
Systems Installation and Getting Started Guide. Error checking routines for
C language and QuickBASIC programs are found in programs
ARB_GEN.C and ARB_GEN.BAS, listed previously in this chapter.
!print Temp$ when ; is received
command in line 320 could be
ABORT
Getting Started with the HP E1340A
38

Advertisement

Table of Contents
loading

Table of Contents