HP 8360 User Manual

Page 127

Advertising
background image

190 NEXT I

200 PRINT “Finished sending commands to source.
2 1 0 P R I N T “ N o t e t h a t e x e c u t i o n i s c o n t i n u i n g f o r f o u r c y c l e s . ”
220 END

Run the program.

Program Comments

10: Assign the source’s HP-IB address to a variable.

20 to 50: Abort any HP-IB activity and initialize the HP-IB

interface.

60: Clear the computer’s display.

70: Set the source to its initial state for programming.

80: Set the source up for a sweep, from 4

to 5

90: Set the sweep time to 2 second. In SCPI, suffixes are optional

if you program in fundamental units (for sweep time, that would
be seconds).

100: Send an

to the source.

110: Enter the query response to the *OPC? into a variable “X”.

The program execution will halt here until the source has finished
processing all the commands up to this point. Once complete, the
source will respond to the *OPC? with a “1”.

120: Begin a FOR/NEXT loop that is repeated four times.

130: Initiate a sweep on the source.

140: Send a

command to the source. This command

causes the source to stop executing new commands until all prior
commands and operations have completed execution. In this case,
there is a sweep in progress, so no further commands will be
executed until the sweep finishes.

150: Turn the RF output of the source ON.

160: Initiate a sweep on the source.

170: Send another

to the source. Although the

command causes EXECUTION of commands to be held off, it
has no effect on the transfer of commands over the HP-IB. The
commands continue to be accepted by the source and are buffered
until they can be executed.

180: Toggle the RF STATE to OFF.

190: Repeat the sample exercise.

200 and 210: Print messages on the computer display.

Getting Started Programming 1-97

Advertising