Using the Scan Complete Bit
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 STAT:OPER? command. Refer to STATus:OPERation[:EVENt]? command in Chapter 5 for an example.
When enabled by the STAT:OPER:ENAB 256 command, the Scan Complete Bit will be reported as bit 7 of the Status register. Use the
When bit 7 of the Status register is enabled by the *SRE 128 Common Command to assert an
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
Example: Scan
Complete Interrupt
10 OUTPUT 70915;"*CLS" | ! Clear all switchbox status structure |
20OUTPUT 70915;"STAT:OPER:ENAB 256" ! Enable Scan Complete Bit to set bit 7 in Status register
30 | OUTPUT 70915;"*SRE 128" | ! Enable bit 7 of Status register to |
|
| assert SRQ |
40 | OUTPUT 70915;"TRIG:SOUR EXT" | ! External trigger mode |
50 | OUTPUT 70915;"SCAN (@100:105)" | ! Select channels to be scanned |
60 | OUTPUT 70915;"INIT" | ! Start scanning cycle |
70 | WHILE NOT BIT(SPOLL(70915),7) | ! Waiting for scan complete |
80PRINT "DO OTHER OPERATION HERE" ! Enter program lines for computer to do other operations
90 END WHILE
100PRINT "INTERRUPT GENERATED" ! Program goes to this line after interrupt generated by a completed scanning cycle
110 END
36 Understanding the HP E1366A/E1367A RF Multiplexers | Chapter 4 |