User`s guide

Table Of Contents
Chapter 5 87
Making a Measurement
Waiting for the End of Measurement
5. Making a Measurement
Using the :TRIG:SING Command
When you trigger the instrument by issuing the :TRIG:SING command on page 484
command, you can use the *OPC? command to wait until the measurement cycle
completes.
Sample Program
Example 5-2 is a sample program that demonstrates how to use the :TRIG:SING
command to wait until the measurement cycle completes. You can find the source file of
this program, named trg_sing.htb, on the sample program disk.
The sample program uses the :TRIG:SING command to start a sweep (measurement)
cycle, uses the *OPC? command to wait until the measurement cycle completes, then
prints a message and exits.
The program is described in detail below:
Line 40 Assigns a GPIB address to the I/O pass.
Lines 60 to 90 These lines store the settings of continuous initiation mode for each
channel (on for channels 1 and 2; off for channels 3 through 4) into the
array variable Cont_mode$(*).
Lines 110 to 130 These lines turn on or off continuous initiation mode for each channel
depending on the value of Cont_mode$(*).
Line 140 Sets the trigger source to “Bus Trigger”.
Line 160 Triggers the instrument to start a sweep cycle.
Lines 170 to 180 These lines execute the *OPC? command and wait until the command
returns 1 (i.e., the measurement cycle completes).
Line 200 Displays a measurement completion message.