Using The Scan Complete Bit - HP E1351A User Manual

Fet multiplexer
Table of Contents

Advertisement

Using the Scan Complete Bit

Example: Scan
Complete Monitor
52
Understanding the HP E1351A/53A FET Multiplexer Modules
You can use the Scan Complete Bit (bit 8) in the SCPI Operation Status
Register to determine when a scanning cycle completes (no other bits in the
register apply to the switchbox). Bit 8 has a decimal value of 256 and you
can read it directly with the
STATus:OPERation[:EVENt]?
Note that this is not the same register as the multiplexer Status/Control
Register.
When enabled by the
STAT:OPER:ENAB 256
Bit will be reported as bit 7 of the Status Register. Use the HP-IB Serial
Poll or the IEEE 488.2 Common Command
Register. When bit 7 of the status Register is enabled by the
Common Command to assert an HP-IB Service Request (SRQ), you can
interrupt the controller when the Scan Complete Bit is set, after a scanning
cycle completes. This allows the controller to do other operations while the
scanning cycle is in progress.
The following example monitors bit 7 in the Status Register to determine
when the scanning cycle completes. The computer used in the example is
an HP Series 200/300 used with HP BASIC as the program language. The
computer interfaces with the mainframe over HP-IB. The HP-IB select
code is 7, the HP-IB primary address is 09, and the HP-IB secondary
address is 14.
10 OUTPUT 70914;"*CLS"
20 OUTPUT 70914;"STAT:OPER:ENAB 256"
30 OUTPUT 70914;"*SRE 128"
40 OUTPUT 70914;"TRIG:SOUR EXT" !Set to external trigger mode
50 OUTPUT 70914;"SCAN (@100:115)" !Select channels to be scanned
60 OUTPUT 70914;"INIT"
70 WHILE NOT BIT (SPOLL(70914),7) !Waiting for scan complete
80 PRINT "DO OTHER OPERATION HERE"
90 END WHILE
100 PRINT "INTERRUPT GENERATED" !Program goes to this line after
110 END
STAT:OPER?
command (refer to the
command in Chapter 5 for an example).
command, the Scan Complete
to read the Status
*STB?
!Clear all switchbox status
structure
!Enable Scan Complete Bit to set
bit 7 in Status Register
!Enable bit 7 of Status Register to
assert SRQ
!Start scanning cycle
!Enter program lines for computer
to do other operations
interrupt is generated by a
completed scanning cycle
*SRE 128
Chapter 4

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1353a

Table of Contents