Agilent Technologies 8560E User Manual page 336

Agilent technologies 8560 e-series and ec-series spectrum analyzers
Table of Contents

Advertisement

Programming
Monitoring System Operation
Lines 50 and 60 sends the take-sweep command; during the 10 video
averages that will now occur, the computer remains on line 60. When
the video averaging is complete, TS is complete and the "command
complete" condition is satisfied. The computer then branches to the
subroutine Srq.
Lines 70 and 80 causes the computer to read the decimal equivalent of
the generated service request into the variable Sbyte. The computer
then prints the value, alerting you that the interrupt has occurred.
Line 100 returns the status register to its initial state (that is, no
conditions are masked).
Reading Service Request Data
In the above example, you used the serial-poll statement (SPOLL) to
read the service request data into a variable. The STB (status byte
query) command also reads service request data. Example 2 shows how.
E
2
XAMPLE
10
OUTPUT 718;"IP;SNGLS;CF 300MHZ;SP 20MHZ;TS;"
20
OUTPUT 718;"VAVG 10;RQS 16;"
30
ON INTR 7 GOSUB Srq
40
ENABLE INTR 7;2
50
Done=0
60
OUTPUT 718;"TS;"
70
Idle:
IF Done=0 GOTO Idle
80
STOP
90
Srq:OUTPUT 718;"STB?;";
100
ENTER 718;Sbyte
110
PRINT Sbyte
120
PRINT "VIDEO AVERAGING IS COMPLETE"
130
OUTPUT 718;"RQS 0;"
140
Done=1
150
RETURN
160
END
Line 20 sets the bit mask so that only the "command complete"
condition is set. On Line 70, once the "command complete" condition is
satisfied (in this case, after ten video averages), the STB command
queries the spectrum analyzer for the service-request data. The data is
then entered into variable Sbyte and printed. The value returned is the
decimal equivalent of the generated service request.
Reading Service Requests From More Than One Instrument
Most instruments that can be controlled remotely have service request
capability similar to that in the 8560 E-Series and EC-Series. You may
want to take advantage of this capability in other instruments as well
as in the spectrum analyzer. If you have more than one instrument on a
bus that can generate a service request, you need to modify the above
program to look for interrupts from more than one instrument.
336
Chapter 5

Advertisement

Table of Contents
loading

Table of Contents