5-37
(3) The following is a program example that sets Input1, burst mode, 100 ms sample rate, 100 kHz resolution, 10 GHz
manual frequency, hold, uses a service request to wait for measurement to end, and then reads and displays the carrier
frequency and pulse width value.
1) Program example using N
88–BASIC
10'***SAMPLE PROGRAM3***
20 CMD DELIM=0
30 ADRD=8
40 ISET IFC : Interface clear
50 ISET REN : Remote enable
60 WBYTE &H14; : Device clear
70 PRINT @ADRD;"*RST;CLS;TRM 1" : Specifies presets, status clear, and terminator
80 PRINT @ADRD;"ESE2 1;*SRE 4" : Permits measurement END service request
: and END service request
90 PRINT @ADRD;"ACF 1;AF 1GHZ" :
Sets manual measurement and 1 GHz manual frequency value
100 PRINT @ADRD;"BST 1:BSTMD 1" : Sets burst measurement and width measurement
110 PRINT @ADRD;"SMP 6;RES 8;SH 1" :
Specifies 100 ms sample rate, 100 kHz resolution, and hold
120 ON SRQ GOSUB *SRQMEND : Specifies processing routine during service request
130 '
140 "*** MAIN ROUTINE***
150 SRQ ON : Permits service request
160 ENDFLG=0:CNT=0
170 PRINT @ADRD;"*CLS;*TRG" : Status clear and trigger command
180 ENDFLG=0
190 IF ENDFLG><1 GOTO 190
200 CNT=CNT+1
210 IF CNT<10 GOTO 170
220 END
230 '
240 '*** SRQ ROUTINE*** : SRQ routine
250 *SRQMEND
260 POLL ADRD,S : Serial polling
270 IF (S AND 4)=0 GOTO 350 : Checks that measurement ends
280 PRINT @ADRD;"*CLS" : Status clear
290 PRINT @ADRD;"MBCF?" : Reads burst carrier frequency
300 INPUT @ADRD;FREQ$
310 PRINT @ADRD;"MBWDT?" : Reads burst width measurement
320 INPUT @ADRD;WDT$
330 PRINT FREQ$,WDT$ : Displays measurement result
340 ENDFLG=1
350 SRQ ON
360 RETURN
370 END
5.6 Sample Programs