Register-Based Programming 95
Appendix B
Example: Scanning
Channels (BASIC)
This BASIC programming example scans through the bank 0 channels
(closing one switch at a time) and makes measurements between switch
closures. You must insert your own programming code for the measurement
part of this program. For example, if you are using the E1411B, see the
E1326B/E1411B Multimeter User's Manual
for programming examples.
10
!**************************************************
20
!***** SCANNING *****
30
!**************************************************
40
OPTION BASE 1
50
!
Set up arrays to store register names and addresses
60
DIM Reg_name$(1:1)[32], Reg_addr(1:1)
70
!
80
!
Read register names and addresses into the arrays
90
READ Reg_name$(*)
100
READ Reg_addr(*)
110
!
Set base address variable
120
Base_addr = DVAL("DE00",16)
130
!
140
!
Map the A16 address space in the controller
150
CONTROL 16,25;2
160
!
Call the subprogram Scan_meas
170
Scan_meas(Base_addr, Reg_addr(*))
180
!
190
DATA Bank0 channels register
200
DATA 06
210
END
.
.
.
270
!
This subprogram sets all bits in bank0 open then scans through
280
!
bank 0, closing one channel at a time (waits for the channel to
290
!
be closed) so a measurement can be made.
300
SUB Scan_meas(Base_addr, Reg_addr(*))
310
!
320
WRITEIO -16, Bas Reg_addr(1);0
330
FOR I= 0 to 15
340
WRITEIO -16, Bas Reg_addr(1);2^I
350
REPEAT
360
UNTIL BIT(READIO(-16,Ba4),7)
370
PRINT "Making Measurements"
.
. !
Make Measurements
.
420
NEXT I
430
WRITEIO -16,Bas Reg_addr(1);0
440
SUBEND
Содержание E1465A
Страница 2: ......
Страница 6: ...6 ...
Страница 10: ...10 Notes ...
Страница 12: ...12 Getting Started Chapter 1 Figure 1 1 E1465A 16x16 Relay Matrix Module TERMINAL MODULE MATRIX MODULE A B C D ...
Страница 13: ...Getting Started 13 Chapter 1 Figure 1 2 E1466A 4x64 Relay Matrix Module TERMINAL MODULE MATRIX MODULE A B C D ...
Страница 14: ...14 Getting Started Chapter 1 Figure 1 3 E1467A 8x32 Relay Matrix Module TERMINAL MODULE MATRIX MODULE A B C D ...
Страница 18: ...18 Getting Started Chapter 1 Notes ...
Страница 80: ...80 Matrix Modules Command Reference Chapter 4 Notes ...
Страница 98: ...98 Register Based Programming Appendix B Notes ...