1-4
Introduction
Starting a Program
Starting a Program
The commands and syntax for initializing the instrument are listed in Chapter 3, “Common
Commands”. Refer to your GPIB manual and programming language reference manual for
information on initializing the interface. To make sure the bus and all appropriate interfaces
are in a known state, begin every program with an initialization statement. For example,
BASIC provides a CLEAR command which clears the interface buffer. When you are using
GPIB, CLEAR also resets the instrument's parser. After clearing the interface, initialize the
instrument to a preset state using the *RST command.
The AUTOSCALE command is very useful on unknown waveforms. It automatically sets up
the vertical channel, time base, and trigger level of the instrument.
A typical instrument setup configures the vertical range and offset voltage, the horizontal
range, delay time, delay reference, trigger mode, trigger level, and slope. An example of the
commands sent to the instrument are:
:CHANNEL1:RANGE 16;OFFSET 1.00<terminator>
:SYSTEM:HEADER OFF<terminator>
:TIMEBASE:RANGE 1E-3;DELAY 100E-6<terminator>
This example sets the time base at 1 ms full-scale (100 μs/div), with delay of 100 μs. Vertical
is set to 16 V full-scale (2 V/div), with center of screen at 1 V, and probe attenuation of 10.
The following program demonstrates the basic command structure used to program the
instrument.
10 CLEAR 707 ! Initialize instrument interface
20 OUTPUT 707;"*RST" !Initialize instrument to preset state
30 OUTPUT 707;":TIMEBASE:RANGE 5E-4"! Time base to 500 us full scale
40 OUTPUT 707;":TIMEBASE:DELAY 25E-9"! Delay to 25 ns
50 OUTPUT 707;":TIMEBASE:REFERENCE CENTER"! Display reference at center
60 OUTPUT 707;":CHANNEL1:RANGE .16"! Vertical range to 160 mV full scale
70 OUTPUT 707;":CHANNEL1:OFFSET -.04"! Offset to -40 mV
80 OUTPUT 707;":TRIGGER:LEVEL,-.4"! Trigger level to -0.4
90 OUTPUT 707;":TRIGGER:SLOPE POSITIVE"! Trigger on positive slope
100 OUTPUT 707;":SYSTEM:HEADER OFF"<terminator>
110 OUTPUT 707;":DISPLAY:GRATICULE FRAME"! Grid off
120 END
• Line 10 initializes the instrument interface to a known state and Line 20 initializes the
instrument to a preset state.
• Lines 30 through 50 set the time base, the horizontal time at 500 μs full scale, and 25 ns of
delay referenced at the center of the graticule.
• Lines 60 through 70 set the vertical range to 160 millivolts full scale and the center screen at