HP 8920A Programmer's Manual page 221

Rf communications test set
Hide thumbs Also See for 8920A:
Table of Contents

Advertisement

Example BASIC program - Service Request
10
OUTPUT 714;"*SRE 32"
20 !Enable SRQ on events in the Standard Event Status Register
30
OUTPUT 714;"*ESE 1"
40 !Enable Operation Complete bit in Standard Event Status Register
50
ON INTR 7,15 CALL Srvice_interupt
60
ENABLE INTR 7;2
70
OUTPUT
714;"DISP
MHz;*OPC"
80
LOOP
90
DISP "I am in a dummy loop."
100 END LOOP
110 END
120 SUB Srvice_interupt
130 PRINT "All operations complete."
140 ! Note:
150 ! This interrupt service routine is not complete.
160 ! Refer to the
170 ! complete information.
180 SUBEND
The program enables bit 0 in the Standard Event Status Enable Register and also bit 5 in
the Service Request Enable Register so that the Test Set will request service whenever the
OPC event bit becomes true. After the service request is detected the program can take
appropriate action. Refer to
information.
Example BASIC program - Polling the Standard Event Status Register
10 INTEGER Stdevnt_reg_val
20
OUTPUT
714;"DISP
MHz;*OPC"
30 LOOP
40 OUTPUT 714;"*ESR?"
50 ENTER 714;Stdevnt_reg_val
60 EXIT IF BIT(Stdevnt_reg_val,0) ! Exit if Operation Complete bit
set
70 END LOOP
80 PRINT "All operations complete."
90 END
RFG;RFG:OUTP
"HP-IB Service Requests" in chapter 5
"HP-IB Service Requests" on page 297
RFG;RFG:OUTP
! Poll the register
Common Command Descriptions
!Set up interrupt
!Enable SRQ interrupts
'Dupl';AMPL
0
dBm;FREQ
!Dummy loop to do nothing
for
for further
'Dupl';AMPL
0
dBm;FREQ
320
320
221

Advertisement

Table of Contents
loading

Table of Contents