Agilent Technologies E8285A User Manual page 233

Cdma mobile station test set
Hide thumbs Also See for E8285A:
Table of Contents

Advertisement

Chapter 4, Status Reporting
Setting up an SRQ Interrupt
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 E8285A from generating another SRQ.
1500
!
1510
OUTPUT Inst_address;"*ESR?"
1520
ENTER Inst_address;Event_reg
1530
RETURN
1540
!
1550 Srvice_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 E8285A 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
1700
! appropriate action.
1710
! NOTE: Read the Event Register to clear it. If the Event Register is
1720
! not cleared it will NOT latch another event from the Condition
1730
! Register, thereby preventing the E8285A from generating another SRQ.
1740
!
1750
OUTPUT Inst_address;"STAT:HARD1:EVEN?"
1760
ENTER Inst_address;Event_reg
1770
RETURN
1780
!
1790 SUBEND
232
S:\agilent\e8285\USRGUIDE\BOOK\CHAPTERS\hpibstat.fb
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Advertisement

Table of Contents
loading

Table of Contents