HP IBASIC (LRN)
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$ !print Temp$ when ; is received
160
Temp$=""
170
ELSE
180
Temp$=Temp$&Lrn$[I,I] !build Temp$ from *LRN data
190
END IF
200
NEXT I
210
SUBEND
C and QuickBASIC
Programs
The C and QuickBASIC versions of LRN are on the C language example
programs disk (HP P/N E1340-10036).
Checking for Errors
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
ABORT
command in line 320 could be
considered as part of the group and be ignored by the AFG SCPI interpreter.
Note
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.
Chapter 1
Getting Started with the HP E1340A 38
Содержание E1340A
Страница 12: ...Notes 12 HP E1340A Arbitrary Function Generator Module User s Manual ...
Страница 14: ...14 HP E1340A Arbitrary Function Generator Module User s Manual ...
Страница 42: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 42 ...
Страница 54: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 54 ...
Страница 57: ...Figure 3 1 Generating Arbitrary Waveforms 57 Generating Arbitrary Waveforms with the HP E1340A Chapter 3 ...
Страница 58: ...Chapter 3 Generating Arbitrary Waveforms with the HP E1340A 58 ...
Страница 84: ...Chapter 4 HP E1340A Sweeping and Frequency Shift Keying 84 ...
Страница 130: ...Chapter 6 HP E1340A High Speed Operation 130 ...
Страница 202: ...202 HP E1340A SCPI Conformance Information Chapter 7 ...
Страница 204: ...Figure 8 1 HP E1340A Status Groups and Associated Registers Chapter 8 HP E1340A AFG Status 204 ...
Страница 218: ...218 HP E1340A Specifications Appendix A ...
Страница 284: ...284 HP E1340A Register Based Programming Appendix C ...
Страница 295: ...Index HP E1340A Arbitrary Function Generator User s Manual 295 ...