Agilent Technologies E1465A Automobile Parts User Manual


 
Using the Matrix Modules 43Chapter 3
When Bit 7 of the Status Byte Register is enabled by *SRE 128 to assert a
GPIB Service Request (SRQ), the computer can be interrupted when the
Scan Complete Bit is set, after the scanning cycle completes. This allows
the controller to do other operations while the scanning cycle is in progress.
Example: Using the
Scan Complete Bit
(BASIC)
This example monitors bit 7 in the Status Byte Register to determine when
the scanning cycle is complete. The computer interfaces with an E1406A
Command Module over GPIB. The GPIB select code is 7, primary address
is 09, and secondary address is 15.
10 OUTPUT 70915;"*RST; *CLS"
! Reset and clear the matrix
module
20 OUTPUT 70915; "STATUS:OPER:ENABLE 256"
! Enable Scan Complete Bit
30 OUTPUT 70915; "TRIG:SOUR IMM"
! Set matrix module for
continuous triggering
40 OUTPUT 70915; "SCAN (@10000:10015)"
! Select channels to scan
50 OUTPUT 70915; "*OPC?"
! Wait for operation complete
60 ENTER 70915; A$
70 PRINT "*OPC? = ";A$
80 OUTPUT 70915; "STAT:OPER:ENAB?"
! Query OPERation Status
register contents
90 ENTER 70915; A$
100 PRINT "STAT:OPER:ENAB? = ";A$
110 OUTPUT 70915; "*STB?"
! Query Status Byte register
contents
120 ENTER 70915; A$
130 PRINT "Switch Status = ";A$
140 OUTPUT 70915; "INIT"
! Start scan cycle
150 I = 0
! Initialize counter value
160 WHILE (I=0)
! Stay in loop until value is
returned from SPOLL (70915)
170 I = SPOLL(70915)
180 PRINT "Waiting for scan to complete: SPOLL = ";I
190 END WHILE
200 I = SPOLL(70915)
210 PRINT "Scan complete: SPOLL = ";I
220 END