Agilent Technologies 54503A User's Guide Page 337

  • Download
  • Add to my manuals
  • Print
  • Page
    / 716
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 336
Chapter 5 337
Programming
Monitoring System Operation
See Example 3.
E
XAMPLE 3
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: Sbyte_1=SPOLL(718)
100 Sbyte_2=SPOLL(705)
110 IF BIT (Sbyte_1,6)=1 THEN
120 PRINT "SERVICE REQUEST",Sbyte_1,"ON ADDRESS 18
"
130 OUTPUT 718;"RQS 0;"
140 STOP
150 END IF
160 IF BIT(Sbyte_2,6)=1 THEN
170 PRINT "SERVICE REQUEST",Sbyte_2,"ON ADDRESS 5"
180 END IF
190 ENABLE INTR 7;2
200 Done=1
210 RETURN
220 END
In this example, you execute the SPOLL command for each instrument
that can cause a service request interrupt; in this case, the analyzer or
an instrument that is set to address 5. Once the instruments are
queried for interrupts, the IF…THEN statements provide a way to
branch to the appropriate routine.
Testing Service Request Routines
In the previous programming examples, you knew that a service
request would be generated when the VAVG command was completed.
You could easily test the program and make sure that it worked.
However, service requests may not always be so predictable; this can
make a program difficult to test. The spectrum analyzer SRQ command
automatically triggers any service request you choose. Of course, as
with other service requests, you must set the bit mask before executing
the SRQ command. See Example 4.
Page view 336
1 ... 336 337 338 ... 716

Comments to this Manuals

No comments