Program SPOLL_2
Purpose
The main purpose of this program is to demonstrate how to service
Important program lines
Comments
Note
7-1 O
Programming Examples
an SRQ directly in the program. It also demonstrates how to:
initialize the interface of the HP 81 12A and set it to the standard
setting
clear the status byte
conduct a serial poll (SPOLL)
return the instrument to local mode
130
CLEAR 712
Initialize the HP 81 12A interface and
set it to the standard setting
170
A=SPOLL (712)
Read the status byte to clear it
210
OUTPUT 712 ; "XXX"
Case a syntax error
270
A=SPOLL (712)
Conduct a serial poll
280
PRINT "SPOLL= " ; A
Print the result
310
LOCAL 712
Return the HP 81 12A back to local
mode
Initialization section
The interface is initialized. The HP 81 12A is set to the Standard
Setting and the status byte is cleared
Main section
In the main section "XXX" is sent over the HP-IB to the instrument
(line 210) but it is not a valid command so it causes a syntax error
Since the instrument needs some time to parse "XXX" , the computer
should wait a sufficient amount of time before conducting the
following SPOLL (line 270). This is done by forcing the computer to
wait
for
0 . 1 seconds (line230).
The HP 81 12A detects a syntax error and therefore sets the syntax
error bit of the Status Byte. As a result, bit 6 of STB is set and a
SRQ is generated. The result of the SPOLL printed in line 160 will
be value 68.
After every SPOLL the complete status byte is cleared. This means
the RQS bit is reset after the first SPOLL.
The status byte is updated after every command received by the
HP 81 12A
Summary of Contents for 8112A
Page 6: ......
Page 24: ......
Page 36: ......
Page 44: ......
Page 70: ......
Page 92: ......
Page 144: ...8 32 Testing Performance ...
Page 176: ......
Page 190: ......
Page 194: ...10 2 4 Servicing the Power Supply ...
Page 196: ......
Page 197: ......
Page 216: ......
Page 240: ...10 4 16 Servicing the Shaper and Output Amplifier ...
Page 242: ...A R l BD RY MR I N 1 2 7 I I IJt 51 CR1 B e i 1 _ _ _ _ 20 ...
Page 244: ......
Page 251: ......
Page 262: ...A B A2 ED RY CONTROL ...
Page 270: ......
Page 290: ...R B c R3 BD RY M I CROPROCESSOR 1 2 3 FIGURE 1 0 7 8 ...
Page 294: ... 8 X2l 2 X2 Figure A 1 Mechanical Parts 1 A 2 Replaceable Parts ...
Page 295: ...MP MP3 MP MP2 MP4 MPS MP 1 2 MPS MP MP I B ElElElEl Replaceable Parts A 3 ...
Page 334: ......
Page 378: ...Figure B 14 Mechanical Parts 1 B 44 Backdating ...
Page 380: ......
Page 382: ......
Page 402: ......