13.11.2014 Views

Manual - 8500A Series Peak Power Meter - Giga-tronics

Manual - 8500A Series Peak Power Meter - Giga-tronics

Manual - 8500A Series Peak Power Meter - Giga-tronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Series</strong> <strong>8500A</strong> <strong>Peak</strong> <strong>Power</strong> <strong>Meter</strong>s<br />

3.4 Service Requests and Serial Poll<br />

The ability of the PPM to request service over the GPIB can be enabled or disabled by a GPIB command.<br />

The PPM’s power-on default status enables the SRQ function of the instrument. Usually a service request<br />

is generated to report a significant condition to the controller, and the status byte will not be cleared until<br />

it is read; REN is disasserted; or the instrument is reset. The exception to this is the output-ready<br />

condition which will also be cleared when the data is read. If SRQ is disabled the status bytes are not<br />

saved, but the current condition is available to be read using the STAT command.<br />

All SRQs are buffered in the PPM. If another error condition is detected after the first value has been<br />

read, then the SRQ will remain asserted with the second value in the status byte. Up to 16 status<br />

conditions can be buffered in this way. Once a non-zero condition is read from the PPM, the status byte<br />

should be read until it becomes zero by taking appropriate action. For example, if the error were<br />

over-range power, over-range SRQs will continue until the error is fixed.<br />

When the controller reads the status byte through the GPIB via a serial poll, the 7th bit will always be<br />

high if the PPM was requesting service. Thus, the actual value of the PPM status will be the byte that is<br />

read minus the 7th bit. When the PPM’s status is read by the STAT command (when SRQ is disabled),<br />

the byte that is sent out always has the 7th bit as zero (see 3.2.5). Any status condition that has the sixth<br />

bit high will indicate abnormal device operation. In decimal form, this is the case for any status code of<br />

value greater than or equal to 32.<br />

Sample Program:<br />

10 ! THIS PROGRAM USES SERIAL POLL<br />

20 ! AND SRQ TO DETERMINE IF THE<br />

30 ! PPM SUCCESSFULLY AUTOSCALED<br />

40 ! AS INSTRUCTED.<br />

50 !<br />

60 A=0<br />

70 ! ENABLE GPIB INTERRUPT<br />

80 ON INTR 7 GOSUB 180<br />

90 ENABLE INTR 7;2<br />

100 !<br />

110 ! ENABLE PPM SRQ<br />

120 OUTPUT 704;SRQE<br />

130 ! INSTRUCT PPM TO AUTOSCALE<br />

140 OUTPUT 704;AUTO<br />

150 !<br />

160 ! SRQ WAIT LOOP<br />

170 GOTO 160<br />

180 ! SRQ HANDLING ROUTINE:<br />

190 ! CONDUCT SERIAL POLL, AND<br />

200 ! PUT STATUS BYTE VALUE IN<br />

210 ! VARIABLE A<br />

220 A=SPOLL(704)<br />

230 ! SUBTRACT 64 FROM STATUS<br />

240 ! BYTE TO GET STATUS CODE<br />

250 ! NUMBER CORRECT. AUTOSCALING<br />

260 ! RETURNS A CODE OF 27.<br />

270 !<br />

280 A=A-64<br />

290 IF A=27 THEN GOTO 330<br />

300 DISP AUTOSCALING PROBLEM<br />

310 GOTO 340<br />

320 RETURN<br />

330 DISP AUTOSCALING OK<br />

340 BEEP<br />

350 END<br />

3-36 <strong>Manual</strong> No. 20790, Rev C, November 1998<br />

Superceded by Revision D, March 2009

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!