hit counter code

HP E1459A User Manual page 100

64-channel isolated input interrupt module
Table of Contents

Advertisement

100 HP E1459A Register Definitions
510 OUTPUT Vxi_address;"STAT:OPER:ENAB 256"
520 OUTPUT Vxi_address;"DIAG:INT:SET1 ON"
530 OUTPUT Vxi_address;"DIAG:INT:ACT ON"
540 !
550 OUTPUT Vxi_address;"*OPC?"
560 ENTER Vxi_address;Done
570 !
580 ON INTR 7 GOSUB Service
590 ENABLE INTR 7;2
595 ! dav/edge int enable, port 0/1 select
600 OUTPUT Vxi_address;"VXI:WRITE 128,4,96"
610 !
620 LOOP
630
DISABLE INTR 7
635
! get edge int status register
640
OUTPUT Vxi_address;"VXI:READ? 128,6"
650
ENTER Vxi_address;G
660
OUTPUT Vxi_address;"VXI:READ? 128,8" ! get dav status register
670
ENTER Vxi_address;E
680
ENABLE INTR 7;2
690
Istat=BINAND(G,15)
700
Dstat=BINAND(E,15)
710
DISP "DAV Status Reg: ";Dstat,"EInt Status Reg: ";Istat
720 END LOOP
730 !
740 Service: !
750 DISABLE INTR 7
755 ! disable E1459A ints, port 0/1 select
760 OUTPUT Vxi_address;"VXI:WRITE 128,4,0"
770 !
780 A=SPOLL(Vxi_address)
790 OUTPUT Vxi_address;"STAT:OPER:EVEN?"
800 ENTER Vxi_address;S_op
810 OUTPUT Vxi_address;"DIAG:INT:RESP?"
820 ENTER Vxi_address;R
830 !
840 REPEAT
850
OUTPUT Vxi_address;"SYST:ERR?"
860
ENTER Vxi_address;Ec,A$
870 UNTIL Ec=0
880 !
890 N=N+1
900 PRINT "Int #: ";N
910 !
915 ! get dav status register
920 OUTPUT Vxi_address;"VXI:READ? 128,8"
930 ENTER Vxi_address;A
940 !
950 A=BINAND(A,15)
960 PRINT "DAV Status: ";A
970 !
975 ! get dav data register, port 0
980 OUTPUT Vxi_address;"VXI:READ? 128,18"
990 ENTER Vxi_address;A
1000 PRINT "DAV Data Reg Port 0: ";A
1010 !
1015 ! get pos edge register, port 0
1020 OUTPUT Vxi_address;"VXI:READ? 128,20"

Advertisement

Table of Contents
loading

Table of Contents