![HP HP 8924C Application Manual Download Page 329](http://html.mh-extra.com/html/hp/hp-8924c/hp-8924c_application-manual_166201329.webp)
329
N:\mkt\MANUALS\HP8924C\APPMOD\BOOK\chapters\amsrq.fb
Chapter 10, Controlling Program Flow
Controlling Program Flow Procedure
Cha
p
te
r 1
0
Contro
lling
Program
Flo
w
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 HP 8920B instrument address
60
Inst_address=714
70
!
80
PRINTER IS CRT
90
CLEAR SCREEN
100
!
110
! Reset the HP 8920B to bring it to a known state
120
OUTPUT Inst_address;"*RST"
130
!
140
! Clear the HP 8920B status reporting system
150
OUTPUT Inst_address;"*CLS"
160
!
170
! Set up the desired interrupt conditions in the HP 8920B:
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 decimal value = 2^5 = 32
230
! Bit 4: Execution Error decimal value = 2^4 = 16
240
! Bit 3: Device Dependent Error decimal value = 2^3 = 8
250
! Bit 2: Query Error decimal value = 2^2 = 4
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 decimal value = 2^4 = 16
380
! Bit 3: Voltmeter Self-cal failed decimal value = 2^3 = 8
390
! Bit 2: Counter Self-cal failed decimal value = 2^2 = 4
400
! Bit 1: Sampler Self_cal failed decimal value = 2^1 = 2
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"500!
510
! Set up the Calibration Status Register Group Enable Register to
520
! generate the Summary Message.
530
!
540
OUTPUT Inst_address;"STAT:CAL:ENAB";Calibration_reg
550
!
560
! The Calibration Status Register Group Summary Message is passed to
570
! the Status Byte Register through Bit 8 in the Questionable
580
! Data/Signal Register Group Condition Register. The Questionable
590
! Data/Signal Register Group must be configured to set its Summary
600
! Message TRUE if the Summary Message from the Calibration Status
610
! Register Group is TRUE. Therefore Bit 8 (2^8=256) in the Questionable