Example: Using The Scan Complete Bit (Basic) - Agilent Technologies E1463A User's Manual And Scpi Programming Manual

32-channel, 5 amp, form c switch scpi programming guide
Hide thumbs Also See for E1463A:
Table of Contents

Advertisement

Example: Using the
Scan Complete Bit
(BASIC)
Chapter 2
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"
20
OUTPUT 70915;"STAT:OPER:ENAB 256"
30
OUTPUT 70915; "TRIG:SOUR IMM" !Set the Form C switch for
50
OUTPUT 70915; "SCAN (@100:115)" !Select channels to scan
60
OUTPUT 70915; "*OPC?"
70
ENTER 70915; A$
80
PRINT "*OPC? = ";A$
90
OUTPUT 70915;"STAT:OPER:ENAB?" !Query the contents in the
100 ENTER 70915; A$
110 PRINT "STAT:OPER:ENAB?=";A$
120 OUTPUT 70915; "*STB?"
130 ENTER 70915; A$
140 PRINT "Switch Status = ";A$
150 OUTPUT 70915; "INIT"
160 I = 0
170 WHILE (I=0)
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
!Reset and clear the module
!Enable Scan Complete Bit
continuous triggering
!Wait for operation complete
operation status register
!Print the contents of the
operation status register
!Query the contents of the status
byte register
!Print the contents of the status
byte register
!Start scan cycle
!Initialize the value of the counter
!Stay in loop until some value is
returned from the SPOLL (70915)
command
Using the Form C Switch 43

Advertisement

Table of Contents
loading

Table of Contents