Specifications

2-102 Programming Guide
Programming Commands and Examples ESG Family Signal Generators
End of Sweep Service Request, Example Program 11
390 WHILE Sweep=1
400 PRINT " .";
410 WAIT 1
420 END WHILE
430 GOTO End
440 !
450 !*********************************************************************
460 Service_routine: !
470 Ser_poll=SPOLL(Sig_gen)
480 IF BIT(Ser_poll,7) THEN
490 PRINT "The Sig Gen has completed a sweep"
500 Sweep=0
510 ELSE
520 PRINT "A Service Request was received for unknown reasons"
530 END IF
540 ENABLE INTR 7
550 RETURN
560 !**********************************************************************
570 End: !
580 END
Program Comments
10 to 50: Program title
60: Assigns the signal generator’s GPIB address to a variable.
70: Resets the signal generator’s parser and clears any pending output from the source.
80: Clears the computer’s display.
90: Sets the signal generator to a defined state for programming.
100: Clears the Status Byte; resets all registers to 0.
110: Program border
130 to 140:
Sets variables
Gpib and Mask so that BASIC will cause an interrupt when there is a service
request on the GPIB Interface. Refer to the HP BASIC Interface Reference for details.
150: Configures the Operation Status Group Negative Transition Filter so that a negative
transition in Bit 3 (Sweeping) of the Operation Status Group initiates a corresponding event
in the Operation Event Register. This event occurs at the end of a sweep.
160: Configures the Operation Status Group Positive Transition Filter so that no positive
transitions in the Operation Status Group initiate a corresponding event in the Operation
Event Register. In other words, a start of sweep does not initiate an event.
170: Enables Operation Status Event Bit 3 (Sweeping) to report its event to the Summary Bit 7 of
the Status Byte Register.
180: Enables Summary Bit 7 of the Status Byte Register to generate a Service Request (SRQ) on
GPIB.