HP 8920B Programmer's Manual page 319

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

Advertisement

1100 !
1110 ! Start of the dummy loop:
1120 !
1130 LOOP
1140
DISP "I am sitting in a dummy loop."
1150
END LOOP
1160
!
1170 END
1180 !
1190 Srvice_interupt:SUB Srvice_interupt
1200 !
1210 OPTION BASE 1
1220 COM /Io_names/ INTEGER Inst_address,Std_event_reg,Calibration_reg
1230 COM / Io_names/ INTEGER Hardware1_reg,Srq_enab_reg,Status_byte,Event_reg
1240 !
1250 !Turn off interrupts while processing the current interrupt.
1260 OFF INTR 7
1270 !
1280 !Conduct a SERIAL POLL to read the Status Byte and clear the SRQ:
1290 !
1300 Status_byte=SPOLL(Inst_address)
1310 !
1320 ! Determine which Register Group(s) caused the interrupt. Since three
1330 ! were enabled, all three must be checked:
1340 !
1350 IF BIT(Status_byte,5) THEN GOSUB Srvice_std_evnt
1360 IF BIT(Status_byte,3) THEN GOSUB Srvice_calib
1370 IF BIT(Status_byte,0) THEN GOSUB Srvice_hard1
1380 !
1390 ! Re-enable the interrupt before leaving the service routine
1400 !
1410
ENABLE INTR 7;2
1420
SUBEXIT
1430
!
1440 Srvice_std_evnt:!
1450 ! This routine would determine which bit(s) in the Standard Event
1460 ! Status Register are TRUE, logic 1, and take appropriate action.
1470 ! NOTE: Read the Event Register to clear it. If the Event Register is
1480 ! not cleared it will NOT latch another event, thereby preventing
1490 ! the Test Set from generating another SRQ.
1500 !
1510
OUTPUT Inst_address;"*ESR?"
1520
ENTER Inst_address;Event_reg
1530
RETURN
1540
!
1550 Service_calib:!
1560
! This routine would determine which bit(s) in the Calibration Status
1570
! Register Group Event Register are TRUE, logic 1, and take
1580
! appropriate action.
1590
! NOTE: Read the Event Register to clear it. If the Event Register is
1600
! not cleared it will NOT latch another event from the Condition
1610
! Register, thereby preventing the Test Set from generating another SRQ.
1620
!
1630
OUTPUT Inst_address;"STAT:CAL:EVEN?"
1640
ENTER Inst_address;Event_reg
1650
RETURN
1660
!1670 Srvice_hard1:!
1680 ! This routine would determine which bit(s) in the Hardware Status
1690 ! Register #1 Group Event Register are TRUE, logic 1, and take
Chapter 5, Advanced Operations
HP-IB Service Requests
319

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents