![Agilent Technologies E1330B Скачать руководство пользователя страница 136](http://html.mh-extra.com/html/agilent-technologies/e1330b/e1330b_users-manual-and-scpi-programming-manual_2867439136.webp)
134 Agilent E1330B Digital I/O Module Register Information
Appendix B
670
END LOOP
680 Main_:SUBEND
690
!
700
SUB Reset_dig
710
COM /Register/ Logical_address
720
COM /Instr/ @Sys,@Dig
730
OUTPUT @Dig;"*RST;*OPC?"
!May use SCPI as reset does not use
interrupts as the IRQ2 jumper is being
used.
740
ENTER @Dig;A
750
SUBEND
760 Reg_dump:SUB Reg_dump
770
!This queries all E1330 registers to help debugging.
780
COM /Instr/ @Sys,@Dig
790
COM /Register/ Logical_address
800
INTEGER Query,Reg
810
Base=49152+(Logical_address*64)
820
FOR Reg=0 TO 35
830
OUTPUT @Sys;"DIAG:PEEK? "&VAL$(Base+Reg)&",8"
!Do 8 Bit reads.
840
ENTER @Sys;Query
850
Query=BINAND(Query,255)
860
Hquery$=IVAL$(Query,16)
870
Bquery$=IVAL$(Query,2)
880
Hreg$=IVAL$(Reg,16)
890
PRINT "REGISTER--#D";Reg;" #H";Hreg$[3,4];
"VALUE--#D";Query;" #H";Hquery$[3,4];" #B";Bquery$[9,16]
900
NEXT Reg
910 Reg_dump_:SUBEND
920 !
930 Int_ser:SUB Intr_ser
!This is the interrupt service routine.
940
COM /Instr/ @Sys,@Dig
950
PRINT "got a interrupt"
960
A=SPOLL(@Sys)
!Must serial poll to clear status byte.
970
PRINT "SERIAL POLL VALUE ";A
980
OUTPUT @Sys;"STAT:OPER:EVEN?"
!Must read Operation Status register
990
ENTER @Sys;Stat_oper
1000
PRINT "STATUS:OPERATION:EVENT ";Stat_oper
1010
OUTPUT @Sys;"DIAG:INT:RESP?"
1020
ENTER @Sys;Int_ack
!Must enter Interrupt Acknowledge
query.
1030
PRINT "INTERRUPT ACKNOWLEDGE ";Int_ack;DVAL$(Int_ack,2);
"
= LADD ";BINAND(Int_ack,255)
!Determine which PIR interrupt
occurred & re-enable it.
1040
!
1050
IF BIT(Int_ack,9)=0 THEN
1060
PRINT "PIR0 OCCURRED"
1070
Enable_pir0
1080
END IF
1090
IF BIT(Int_ack,8)=0 THEN
1100
PRINT "PIR1 OCCURRED"
1110
Enable_pir1
1120
END IF
1130
IF BIT(Int_ack,11)=0 THEN
1140
PRINT "PIR2 OCCURRED"
Содержание E1330B
Страница 2: ......
Страница 10: ...8 Notes ...
Страница 11: ...9 Notes ...
Страница 12: ...10 Notes ...
Страница 25: ...Configuring the Agilent E1330B Digital I O Module 23 Chapter 2 Figure 2 6 J1 and J2 Connector Pinouts ...
Страница 32: ...30 Configuring the Agilent E1330B Digital I O Chapter 2 Notes ...
Страница 42: ...40 Using the Agilent E1330B Digital I O Module Chapter 3 Notes ...
Страница 58: ...56 Understanding the Agilent E1330B Digital I O Module Chapter 4 Notes ...
Страница 104: ...102 Agilent E1330B Digital I O Module Command Reference Chapter 5 Notes ...
Страница 146: ...144 Error Messages Appendix C Notes ...