HP 8921A Programmer's Manual page 301

Cell site test set
Hide thumbs Also See for 8921A:
Table of Contents

Advertisement

Example BASIC Program to Set Up and Service an SRQ Interrupt
The following HP BASIC program was written for an HP 9000 Series 300
Controller and a Test Set. The program assumes that the Test Set is the only
instrument on the bus. The program sets up an interrupt from the Standard Event
Status Register Group, the Calibration Status Register Group, and the Hardware
Status Register #1 Group. For demonstration purposes the program is written to
stay in a dummy loop waiting for an interrupt from the Test Set
10 OPTION BASE 1
20 COM/Io_names/INTEGER Inst_address,Std_event_reg,Calibration_reg
30 COM /Io_names/ INTEGER Hardware1_reg,Srq_enab_reg,Status_byte,Event_reg
40 !
50 ! Define instrument address
60 Inst_address=714
70 !
80 PRINTER IS CRT
90 CLEAR SCREEN
100 !
110 ! Reset the Test Set to bring it to a known state
120 OUTPUT Inst_address;"*RST"
130 !
140 ! Clear the Test Set status reporting system
150 OUTPUT Inst_address;"*CLS"
160 !
170 ! Set up the desired interrupt conditions in the Test Set:
180 !
190 ! 1) Standard Event Status Register Group
200 ! Event register conditions which will set the Summary Message
210 ! TRUE if they occur:
220 ! Bit 5: Command Error
230 ! Bit 4: Execution Error
240 ! Bit 3: Device Dependent Error
250 ! Bit 2: Query Error
260 !
270 Std_event_reg=32+16+8+4
280 !
290 ! Set up the Standard Event Status Enable Register to generate the
300 ! Summary Message
310 !
320 OUTPUT Inst_address;"*ESE";Std_event_reg
330 !
340 ! 2) Calibration Status Register Group
350 ! Condition register conditions which will set the Summary Message
360 ! TRUE if they occur:
370 ! Bit 4: TX Auto-zero failed
380 ! Bit 3: Voltmeter Self-cal failed decimal value = 2^3 = 8
390 ! Bit 2: Counter Self-cal failed
400 ! Bit 1: Sampler Self_cal failed
410 ! Bit 0: Spec Anal Self-cal failed decimal value = 2^0 = 1
420 !
430 Calibration_reg=16+8+4+2+1
440 !
450 ! Set the Transition Filters to allow only positive transitions in
460 ! the assigned condition(s) to pass to the Event Register
470 !
480 OUTPUT Inst_address;"STAT:CAL:PTR";Calibration_reg
490 OUTPUT Inst_address;"STAT:CAL:NTR 0"
decimal value = 2^5 = 32
decimal value = 2^4 = 16
decimal value = 2^3 = 8
decimal value = 2^2 = 4
decimal value = 2^4 = 16
decimal value = 2^2 = 4
decimal value = 2^1 = 2
Chapter 5, Advanced Operations
HP-IB Service Requests
301

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents