
Using the Form C Switch 43
Chapter 2
Example: Using the
Scan Complete Bit
(BASIC)
This example monitors bit 7 in the Status 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, the GPIB primary
address is 09, and the GPIB secondary address is 15.
10 OUTPUT 70915;"*RST; *CLS"
!Reset and clear the module
20 OUTPUT 70915;"STAT:OPER:ENAB 256"
!Enable Scan Complete Bit
30 OUTPUT 70915; "TRIG:SOUR IMM"
!Set the Form C switch for
continuous triggering
50 OUTPUT 70915; "SCAN (@100:115)"
!Select channels to scan
60 OUTPUT 70915; "*OPC?"
!Wait for operation complete
70 ENTER 70915; A$
80 PRINT "*OPC? = ";A$
90 OUTPUT 70915;"STAT:OPER:ENAB?"
!Query the contents in the
operation status register
100 ENTER 70915; A$
110 PRINT "STAT:OPER:ENAB?=";A$
!Print the contents of the
operation status register
120 OUTPUT 70915; "*STB?"
!Query the contents of the status
byte register
130 ENTER 70915; A$
140 PRINT "Switch Status = ";A$
!Print the contents of the status
byte register
150 OUTPUT 70915; "INIT"
!Start scan cycle
160 I = 0
!Initialize the value of the counter
170 WHILE (I=0)
!Stay in loop until some value is
returned from the SPOLL (70915)
command
180 I = SPOLL(70915)
190 PRINT "Waiting for scan to complete: SPOLL = ";I
200 END WHILE
210 I = SPOLL(70915)
220 PRINT "Scan complete: SPOLL = ";I
230 END
Summary of Contents for E1463A
Page 2: ......
Page 6: ...6 Notes ...
Page 10: ...10 Notes ...
Page 78: ...78 Form C Switch Specifications Appendix A Notes ...
Page 98: ...98 Index Notes ...