
365 ! dav enable, ext clk, port 2
370OUTPUT Vxi_address;"VXI:WRITE 128,16,6"
375! mask off all 16 pos bits for port 2
380OUTPUT Vxi_address;"VXI:WRITE 128,24,0"
385! mask off all 16 neg bits for port 2
390OUTPUT Vxi_address;"VXI:WRITE 128,26,0"
400!
405! dav enable, ext clk, port 3
410OUTPUT Vxi_address;"VXI:WRITE 128,32,6"
415! mask off all 16 pos bits for port 3
420OUTPUT Vxi_address;"VXI:WRITE 128,36,0"
425! mask off all 16 neg bits for port 3
430OUTPUT Vxi_address;"VXI:WRITE 128,38,0"
440!
445! set debounce to 16 uS (250 KHz) for ports 2/3
450OUTPUT Vxi_address;"VXI:WRITE 128,30,2"
460!
470OUTPUT Vxi_address;"*SRE 128"
480OUTPUT Vxi_address;"STAT:OPER:ENAB 256"
490OUTPUT Vxi_address;"DIAG:INT:SET1 ON"
500OUTPUT Vxi_address;"DIAG:INT:ACT ON"
510!
520OUTPUT Vxi_address;"*OPC?"
530ENTER Vxi_address;Done
540!
550ON INTR 7 GOSUB Service
560ENABLE INTR 7;2
565! dav int enable, port 0/1 select
570OUTPUT Vxi_address;"VXI:WRITE 128,4,64"
580!
590LOOP
600DISABLE INTR 7
610OUTPUT Vxi_address;"VXI:READ? 128,8"! get dav status register
620ENTER Vxi_address;E
630ENABLE INTR 7;2
640Istat=BINAND(E,15)
650DISP "DAV Status Reg: ";Istat
660END LOOP
670!
680Service: !
690DISABLE INTR 7
695! disable E1459A ints, port 0/1 select
700OUTPUT Vxi_address;"VXI:WRITE 128,4,0"
710!
720A=SPOLL(Vxi_address)
730OUTPUT Vxi_address;"STAT:OPER:EVEN?"
740ENTER Vxi_address;S_op
750OUTPUT Vxi_address;"DIAG:INT:RESP?"
760ENTER Vxi_address;R
770!
780REPEAT
790OUTPUT Vxi_address;"SYST:ERR?"
800ENTER Vxi_address;Ec,A$
810UNTIL Ec=0
820!
830N=N+1
840PRINT "Int #: ";N
850!
HP E1459A Register Definitions 97