1650 OUTPUT Vxi_address;"DIAG:INT:ACT ON"

1660 OUTPUT Vxi_address;"*OPC?"

1670 ENTER Vxi_address;Done

1680 !

1690 ENABLE INTR 7;2

1695 ! int enabled, select port 0

1700 OUTPUT Vxi_address;"VXI:WRITE 128,4,32"

1710 !

1720 RETURN

1730 END

DAV Interrupt Example This example is coded in HP RMB for a System 9000 (Series 300) linked to a E1406 Command Module via HPIB. The example enables all four channel ports to capture channel data (and generate an interrupt) on the occurrance of an external capture clock at a corresponding port. When idle, the program will loop and continuously display the DAV STATUS REGISTER. On interrupt, the DAV STATUS REGISTER and all four port DATA REGISTERS are displayed.

70CLEAR SCREEN

80DIM A$[40]

90Vxi_address=70900

100!

110CLEAR 7

120OUTPUT Vxi_address;"*RST;*CLS" ! reset E1406

130!

140REPEAT

150OUTPUT Vxi_address;"SYST:ERR?"

160ENTER Vxi_address;Error

170PRINT "E1406 Reports Error: ";Error

180UNTIL (Error=0)

190!

200OUTPUT Vxi_address;"VXI:WRITE 128,4,1"! reset E1459A

210WAIT .1

220OUTPUT Vxi_address;"VXI:WRITE 128,4,0"! un-reset E1459A

230WAIT .1

240!

245! dav enable, ext clk, port 0

250OUTPUT Vxi_address;"VXI:WRITE 128,16,6"

255! mask off all 16 pos bits for port 0

260OUTPUT Vxi_address;"VXI:WRITE 128,24,0"

265! mask off all 16 neg bits for port 0

270OUTPUT Vxi_address;"VXI:WRITE 128,26,0"

280!

285! dav enable, ext clk, port 1

290OUTPUT Vxi_address;"VXI:WRITE 128,32,6"

295! mask off all 16 pos bits for port 1

300OUTPUT Vxi_address;"VXI:WRITE 128,36,0"

305! mask off all 16 neg bits for port 1

310OUTPUT Vxi_address;"VXI:WRITE 128,38,0"

320!

325! set debounce to 16 uS (250 KHz) for ports 0/1

330OUTPUT Vxi_address;"VXI:WRITE 128,30,2"

340!

345! E1459A ints disabled, port 2/3 select

350OUTPUT Vxi_address;"VXI:WRITE 128,4,16"

360!

96 HP E1459A Register Definitions