For the example, use:

an HP-IB select code of 7, primary address of 09, and secondary address of 15 for the Microwave Switch

an HP Series 200/300 Computer with HP BASIC

Execute:

10 !Call computer subprogram “Errmsg” if a Microwave

20!Switch programming error occurs. Enable the computer to respond

30!to an interrupt from the Microwave Switch.

35!

40ON INTR 7 CALL Errmsg

50ENABLE INTR 7:2

60!

70!Unmask the Event Status bit in the Microwave Switch’s Status

80!Register. Unmask the Microwave Switch error conditions in its

90!Standard Event Status Register.

95!

100OUTPUT 70915;"*SRE 32"

110OUTPUT 70915;"*ESE 60"

120!

130!At this point, the Microwave Switch is programmed for the intended

140!application.

145!

150OUTPUT 70915;" . . .

160OUTPUT 70915;" . . .

170ENTER 70915; . . .

180PRINT . . .

190END

200!

210!When an error occurs, clear the Microwave Switch to regain

220!control. Execute a Serial Poll to clear the service request

230!bit in the Status Register. Read all error messages in the

240!Microwave Switch error queue. Clear all bits in the counter

250!Standard Event Status Register.

255!

260SUB Errmsg

270DIM Message$[256]

280CLEAR 70915

290B=SPOLL (70915

300REPEAT

310OUTPUT 70915; “SYST:ERR?”

320ENTER 70915; Code, Message$

330PRINT Code,Message$

340UNTIL Code=0

44 Using the HP E1368A/69A/70A Modules

Chapter 3

Page 44
Image 44
HP E1368A manual Repeat