Agilent Technologies 4294A Service Manual Page 76

  • Download
  • Add to my manuals
  • Print
  • Page
    / 518
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 75
76 Chapter 5
Starting a Measurement (Trigger) and Detecting the Completion of a Measurement
(End of Sweeps)
Waiting for the Completion of One or More Sweeps (Detecting the
Completion of a Measurement)
Using the *OPC? command
The “SING” command on page 437 and “NUMG” command on page 364 are overlap
commands whose executions are finished at the completion of one or more sweeps.
Therefore, if you start one or more sweeps with these commands, you can detect their
completion with the following command.
“*OPC?” on page 259
Example 5-2 shows a sample program to detect the completion of a sweep by using the
“*OPC?” command. This program is stored on the sample program disk with the
swp_opc.bas filename.
This program starts a sweep from the “SING” command, waits for the completion of this
command’s execution with the “*OPC?” command (the completion of a single sweep),
displays a message at the completion of the sweep, and then finishes.
Lines 20 to 60 Identifies the external controller and Instrument BASIC and sets the
GPIB address.
Line 80 Sets the trigger source to the internal trigger.
Lines 90 Starts a single sweep.
Lines 110 to 120 Executes the “*OPC?” command and waits for 1 to be returned (the
completion of the sweep).
Line 130 Displays the sweep completion message.
Example 5-2 Detecting the completion of a sweep using the “*OPC? command
10 DIM Buff$[9]
20 IF SYSTEM$("SYSTEM ID")="HP4294A" THEN
30 ASSIGN @Hp4294a TO 800
40 ELSE
50 ASSIGN @Hp4294a TO 717
60 END IF
70 !
80 OUTPUT @Hp4294a;"TRGS INT"
90 OUTPUT @Hp4294a;"SING"
100 PRINT "Waiting..."
110 OUTPUT @Hp4294a;"*OPC?"
120 ENTER @Hp4294a;Buff$
130 PRINT "Sweep Complete"
140 END
Inserting a wait
You can use a setting to make the controller wait for the completion of one or more sweeps
performed by the Agilent 4294A (for example, using the WAIT command of HP
BASIC).
This method is simple, but if you set an inappropriate wait, unexpected errors could occur.
Page view 75
1 2 ... 71 72 73 74 75 76 77 78 79 80 81 ... 517 518

Comments to this Manuals

No comments