HP VXI E1476A User's Manual And Programming Manual page 53

64-channel, 3-wire multiplexer module
Table of Contents

Advertisement

Example: Using the Scan
Complete Bit
52 HP E1476A Switchbox Application Examples
The scan complete bit (bit 8) can be used in the Operation Status Register of
the "SWITCHBOX" driver to determine when a scanning cycle completes.
Bit 8 has a decimal value of 256 and you can read it directly with the
command (refer to the
STAT:OPER?
command on page 77 for an example).
The scan complete bit will be reported as bit 7 of the Status Register when
it is enabled by the
STAT:OPER:ENAB 256
Serial Poll or the IEEE 488.2 Common Command
Register.
The following example monitors bit 7 in the Status Register to determine
when the scanning cycle completes. The example uses:
an HP-IB select code of 7, primary address of 09, and secondary
address of 14 for the Multiplexer.
an HP Series 200/300 Computer with HP BASIC.
10
!Clear to talk to the switch.
20
OUTPUT70914;"*CLS"
30
!Set so scan complete causes an event.
40
OUTPUT70914;"STAT:OPER:ENAB256"
50
!Set to external trigger mode.
60
OUTPUT70914;"TRIG:SOUREXT"
70
!Set scan list for 64 channels.
80
OUTPUT70914;"SCAN(@100:163)"
90
!Start scanning cycle.
100
OUTPUT70914;"INIT"
110
!Loop unit bit 7 is set.
120
WHILE NOT BIT(SPOLL(70914),7)
130
!Do other things until bit 7 is set.
140
PRINT ©DO OTHER OPERATION HEREª
150
ENDWHILE
160
END
You can interrupt the computer after a scanning cycle is finished and the
scan complete bit is set if you enable bit 7 of the Status Byte Register with
the
*SRE 128
command. This allows the computer to do other operations
while the scanning cycle is in progress.
STATus:OPERation[:EVENt]?
command. Use the HP-IB
to read the Status
*STB?
Chapter 2

Advertisement

Table of Contents
loading

Table of Contents