Agilent Technologies 8566B Operating And Programming Manual page 511

Spectrum analyzer 100 hz - 2.5 ghz/2 - 22 ghz
Table of Contents

Advertisement

APPENDIX D
Lines 130 to 200:
Line 130:
Line 140:
Lines 150 to 160:
Line 180:
Line 190:
Line 200:
In the following program, the analyzer sweeps to measure a signal. The controller continues to run its main
program while the analyzer sweeps. An end-of-sweep service request tells the controller when the sweep is
completed. The controller then re-addresses the analyzer and records the measurement data. This procedure
ensures that test data is complete, and improves program execution speed when slow sweeps are used.
10
OPTION BASE 1
ON INTR 7 GOSUB Record-data
ENABLE INTR 7;2
40
50
OUTPUT 718;"IP;S2;FA1MZ;FB150MZ;"
60
OUTPUT 718;"ST3SC:R2;TSn:
BEEP
80
90
Idle: REPEAT
1 0 0
PRINT "WORKING! "
110
1 2 0
WAIT 1
UNTIL
140
PRINT "DONE"
150
BEEP
160
STOP
170
180
Record-data:OFF INTR 7
OUTPUT 718;"Rl;"
200
210
IF BIT(Is_data_ready,2)=1 THEN
220
OUTPUT 718;"E1;03:MF;"
ENTER 718;Freq
240
OUTPUT 7 18 "MA "
250
ENTER 718;Ampl
260
PRINT "FREQUENCY = *I ;Freq:'*Hz**
PRINT "AMPLITUDE = *I ;Ampl; **dBm**
270
280
ELSE
PRINT *I Illegal analyzer command?**
290
BEEP
END IF
320
RETURN
330
!
340
END
The "InterpreLsrq" subroutine.
Turns off further interrupts from the HP-IB. This prevents the cascading of interrupts
generated by another service request from the analyzer.
Assigns the status byte to the variable "Status- byte". This clears the analyzer's SRQ
(i.e., the status byte is reset).
Compares the status byte to two analyzer SRQ codes, and prints the name of the SRQ.
Turns on the controller interrupt capability.
Re-enables the units-key-pressed SRQ.
Returns program execution to the main program.
Idle=7
SERVICE REQUESTS
A p p e n d i x 3 7

Advertisement

Table of Contents
loading

Table of Contents