Agilent E1330B Digital I/O Module Register Information
123
Appendix B
Reading the
ID, Device
Type, and
Status
Registers
The following examples read the module ID, DEVICE ID, and STATUS registers
from the module.
IBASIC Version
10
!
**********************************************************
20
!
**************
READREG
*********
30
!
**********************************************************
40 !OPTION BASE 0 is default
50 !Set up arrays to store register names and addresses
60 DIM Reg_name$(0:2)[32], Reg_addr(0:2)
70 !
80 !Read register names and addresses into the arrays
90 READ Reg_name$(*)
100 READ Reg_addr(*)
110 !
120 !Set base Address variable
130 Base_addr = DVAL ("1FE400",16)
140 !
150 !Map the A16 address space
160 !
170 !CONTROL 16,25;2 ! used only with V360 Controller
180 !Call the subprogram Read_regs
190 Read_regs(Base_addr, Reg_name$(*),Reg_addr(*))
200 !
210 DATA Identification Register, Device Register, Status Register
220 DATA 00, 02, 04
230 END
This subprogram steps through a loop that reads each register and prints its contents
320 SUB Read_regs(Base_addr, Reg_name$(*),Reg_addr(*))
330 FOR Number = 0 to 2
340 Register = READIO(-9826,Bas Reg_addr(number))
350 PRINT Reg_name$(number);" = "; IVAL$(Register, 16)
360 NEXT Number
370 SUBEND
This program returns:
Identification Register = FFFF
Device Register = FF50
Status Register = (dependent on current status, default is FFBE)
Содержание 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 ...