prog.book : chapter1.fm 76 Mon Feb 15 09:24:37 1999
Power Meter Remote Operation
Status Reporting
1-76
HP E4418B/E4419B Programming Guide
The SRQ Method
When a bit of the Status Register is set and has been enabled to assert
SRQ (
*SRE
command), the power meter sets the HP-IB SRQ line true.
This interrupt can be used to interrupt your program to suspend its
current operation and find out what service the power meter requires.
(Refer to your computer and language manuals for information on how to
program the computer to respond to the interrupt).
To allow any of the Status Register bits to set the SRQ line true, you have
to enable the appropriate bit(s) with the
*SRE
command. For example,
suppose your application requires an interrupt whenever a message is
available in the output queue (Status Register bit 4, decimal weight 16).
To enable bit 4 to assert SRQ, you use the following command:
*SRE 16
Note
You can determine which bits are enabled in the Status Register
using
*SRE?
. This command returns the decimal weighted sum of
all the bits.
Procedure
•
Send a bus device clear message.
•
Clear the event registers with the
*CLS
(clear status) command.
•
Set the
*ESE
(standard event register) and
*SRE
(status byte
register) enable masks.
•
Enable your bus controller’s IEEE-488 SRQ interrupt.
Examples
The following two examples are written in HP BASIC and illustrate
possible uses for SRQ. In both cases , it is assumed that the meter has
been zeroed and calibrated.
Example 1:
10 ! Program to generate an SRQ when a channel A sensor
20 ! connect or disconnect occurs
30 !
40 ASSIGN @Pm TO 713
! Power meter HPIB address
50
ON ON INTR 7 GOTO Srq_i! Define service request handler
60 CLEAR @Pm
! Selective device clear
70 OUTPUT @Pm;”*CLS;*RST” ! Clear registers and reset meter
80 !
Содержание E4418B
Страница 22: ...prog book progLOF doc 12 Mon Feb 15 09 24 37 1999 Contents 12 HP E4418B E4419B Programming Guide ...
Страница 24: ...prog book progLOT doc 14 Mon Feb 15 09 24 37 1999 Contents 14 HP E4418B E4419B Programming Guide ...
Страница 25: ...prog book chapter1 fm 1 Mon Feb 15 09 24 37 1999 1 Power Meter Remote Operation ...
Страница 138: ...prog book ch2meas fm 1 Mon Feb 15 09 24 37 1999 2 MEASurement Instructions ...
Страница 200: ...prog book ch3calc fm 1 Mon Feb 15 09 24 37 1999 3 CALCulate Subsystem ...
Страница 228: ...prog book ch4cal fm 1 Mon Feb 15 09 24 37 1999 4 CALibration Subsystem ...
Страница 242: ...prog book ch5disp fm 1 Mon Feb 15 09 24 37 1999 5 DISPlay Subsystem ...
Страница 260: ...prog book ch6form fm 1 Mon Feb 15 09 24 37 1999 6 FORMat Subsystem ...
Страница 264: ...prog book ch7mem fm 1 Mon Feb 15 09 24 37 1999 7 MEMory Subsystem ...
Страница 294: ...prog book ch8out fm 1 Mon Feb 15 09 24 37 1999 8 OUTput Subsystem ...
Страница 302: ...prog book ch9sens fm 1 Mon Feb 15 09 24 37 1999 9 SENSe Subsystem ...
Страница 360: ...prog book ch10stat fm 1 Mon Feb 15 09 24 37 1999 10 STATus Subsystem ...
Страница 384: ...prog book ch11syst fm 1 Mon Feb 15 09 24 37 1999 11 SYSTem Subsystem ...
Страница 420: ...prog book ch12trig fm 1 Mon Feb 15 09 24 37 1999 12 TRIGger Subsystem ...
Страница 434: ...prog book ch13unit fm 1 Mon Feb 15 09 24 37 1999 13 UNIT Subsystem ...
Страница 442: ...prog book ch14serv fm 1 Mon Feb 15 09 24 37 1999 14 SERVice Subsystem ...
Страница 452: ...prog book ch15ieee fm 1 Mon Feb 15 09 24 37 1999 15 IEEE488 2 Command Reference ...
Страница 481: ...prog book progIX doc 6 Mon Feb 15 09 24 37 1999 Index 6 HP E4418B E4419B Programming Guide ...