3.4 Service Requests and Serial Poll
The ability of the PPM to request service over the GPIB can be enabled or disabled by a GPIB command.
The PPM’s power-on default status enables the SRQ function of the instrument. Usually a service request
is generated to report a significant condition to the controller, and the status byte will not be cleared until
it is read; REN is disasserted; or the instrument is reset. The exception to this is the output-ready
condition which will also be cleared when the data is read. If SRQ is disabled the status bytes are not
saved, but the current condition is available to be read using the STAT command.
All SRQs are buffered in the PPM. If another error condition is detected after the first value has been
read, then the SRQ will remain asserted with the second value in the status byte. Up to 16 status
conditions can be buffered in this way. Once a non-zero condition is read from the PPM, the status byte
should be read until it becomes zero by taking appropriate action. For example, if the error were
over-range power, over-range SRQs will continue until the error is fixed.
When the controller reads the status byte through the GPIB via a serial poll, the 7th bit will always be
high if the PPM was requesting service. Thus, the actual value of the PPM status will be the byte that is
read minus the 7th bit. When the PPM’s status is read by the STAT command (when SRQ is disabled),
the byte that is sent out always has the 7th bit as zero (see 3.2.5). Any status condition that has the sixth
bit high will indicate abnormal device operation. In decimal form, this is the case for any status code of
value greater than or equal to 32.
Sample Program:
10
! THIS PROGRAM USES SERIAL POLL
20
! AND SRQ TO DETERMINE IF THE
30
! PPM SUCCESSFULLY AUTOSCALED
40
! AS INSTRUCTED.
50
!
60
A=0
70
! ENABLE GPIB INTERRUPT
80
ON INTR 7 GOSUB 180
90
ENABLE INTR 7;2
100
!
110
! ENABLE PPM SRQ
120
OUTPUT 704;SRQE
130
! INSTRUCT PPM TO AUTOSCALE
140
OUTPUT 704;AUTO
150
!
160
! SRQ WAIT LOOP
170 GOTO 160
180
! SRQ HANDLING ROUTINE:
190
! CONDUCT SERIAL POLL, AND
200
! PUT STATUS BYTE VALUE IN
210
! VARIABLE A
220
A=SPOLL(704)
230
! SUBTRACT 64 FROM STATUS
240
! BYTE TO GET STATUS CODE
250
! NUMBER CORRECT. AUTOSCALING
260
! RETURNS A CODE OF 27.
270
!
280 A=A-64
290 IF A=27 THEN GOTO 330
300 DISP AUTOSCALING PROBLEM
310 GOTO 340
320 RETURN
330 DISP AUTOSCALING OK
340 BEEP
350 END
Series 8500A Peak Power Meters
3-36
Manual No. 20790, Rev C, November 1998
Summary of Contents for 8501A
Page 12: ...Series 8500A Peak Power Meters x Manual No 20790 Rev C November 1998 ...
Page 16: ...Series 8500A Peak Power Meters xiv Manual No 20790 Rev C November 1998 ...
Page 18: ...Series 8500A Peak Power Meters xvi Manual No 20790 Rev C November 1998 ...
Page 74: ...Series 8500A Peak Power Meters 2 48 Manual No 20790 Rev C November 1998 ...
Page 156: ...Series 8500A Peak Power Meters 4 30 Manual No 20790 Rev C November 1998 ...
Page 180: ...Series 8500A Peak Power Meters 5 24 Manual No 20790 Rev C November 1998 ...
Page 230: ...Series 8500A Peak Power Meters 8 2 Manual No 20790 Rev C November 1998 ...
Page 236: ...Series 8500A Peak Power Meters A 6 Manual No 20790 Rev C November 1998 ...
Page 262: ...Series 8500A Peak Power Meters Index 8 Manual No 20790 Rev C November 1998 ...