Using The Scan Complete Bit - HP E1361A 4X4 User Manual

Relay matrix module
Table of Contents

Advertisement

Using the Scan Complete Bit

34 Understanding the HP E1361A Matrix
All manuals and user guides at all-guides.com
You can use the Scan Complete bit (bit 8) in the Operation Status Register
of a switchbox 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]?
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 computer when the Scan Complete bit is set, after a scanning
cycle completes. This allows the computer 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 this example is
an HP 9000 Series 200/300 used with HP BASIC as the programming
language. The computer interfaces with an HP E1300A/E1301A 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 15.
Example: Scan Complete Interrupt
10 OUTPUT 70915;"*CLS"
20 OUTPUT 70915;"STAT:OPER:ENAB 256"! Enable Scan Complete bit to
30 OUTPUT 70915;"*SRE 128"
40 OUTPUT 7915;"TRIG:SOUR EXT"
50 OUTPUT 70915;"SCAN (@100:105)" ! Select channels to be scanned
60 OUTPUT 70915;"INIT"
70 WHILE NOT BIT(SPOLL(70915),7)
80 PRINT "DO OTHER OPERATION HERE"! Enter program lines for
90 END WHILE
100 PRINT "INTERRUPT GENERATED" ! Program goes to this line after
110 END
command. See the
STAT:OPER?
command in Chapter 5 for an example.
command, the Scan Complete
to read the Status
*STB?
! Clear all switchbox status
structure.
set bit 7 in Status register.
! Enable bit 7 of Status
Register to assert SRQ.
! External trigger mode
! Start scanning cycle
! Wait for scan complete
computer to do other operations
interrupt is generated by a
completed scanning cycle
*SRE 128
Chapter 4

Advertisement

Table of Contents
loading

Table of Contents