Question:

How do I generate a frequency sweep using the Agilent 33120A? 

Answer:
Frequency sweep changes the frequency of a waveform in a controlled manner. Getting Started

Carrier Waveform Shape
The shape of the signal. Can be sine (default), square, triangle, ramp, or arbitrary.
Sweep Mode
The Agilent 33120A will allow the frequency change to have either linear (default) or logarithmic spacing. The output frequency of a linear sweep changes linearly during the duration of the sweep. For logarighmic spacing, the ouput frequency changes exponentially during the duration of the sweep.
Start Frequency
The frequency at which the sweep will begin. Also the frequency the Agilent 33120A will output while awaiting a trigger in the triggered sweep. Start frequency can be set from 10 mHz to the maximum frequency of the waveform. Default is 100 Hz. If the start frequency is higher than the stop frequency, you will get a downward sweep. If the start frequency is lower than the stop frequency, you will get an upward sweep.
Stop Frequency
The frequency at which the sweep will end. Stop frequency can be set from 10 mHz to the maximum frequency of the waveform. Default is 1 kHz. If the start frequency is higher than the stop frequency, you will get a downward sweep. If the start frequency is lower than the stop frequency, you will get an upward sweep
Sweep Time
The number of seconds required to sweep from the start frequency to the stop frequency. The sweep time can be set from 1 ms to 500 seconds with the default as 1 second.
Triggered Sweep
In the triggered sweep mode, the function generator outputs a single sweep each time a trigger is received. After one sweep from the start frequency to the stop frequency, the function generator waits for the next trigger while outputting the start frequency.
Sweep Trigger Source
There are three trigger sources in the sweep mode. The internal (default) source will output a continuous sweep at a specified rate (sweep rate). Single triggering will output one waveform with each press of the front-panel [SINGLE] key or with a bus trigger. External triggering will output a single sweep when a trigger signal (rising edge of a TTL pulse) is applied to the rear-panel Ext Trig terminal.
Front Panel Example:

We wish to output a 5 Vpp, swept sine wave with a start frequency of 50 Hz and a stop frequency of 5 kHz with a sweep time of 10 seconds.

Select the waveshape, amplitude fo the waveform and turn on sweep: Press the [SINE] key on the front panel to select the sine wave (this is actually the default). Next, adjust the amplitude to 5 Vpp using the arrow keys, the knob, or the enter number methods. Turn on Sweep. [SHIFT] [SWEEP]. Note that the SWP annunciator turns on. At this point, the carrier is swept with the default sweep parameters (100 Hz to 1 kHz linear sweep in 1 second).

Set the start frequency. Press the [SHIFT] [RECALL MENU] to go directly to the START F command in the menu. Press the down arrow, and adjust the start frequency to 50 Hz using the arrow keys, the knob, or enter the numbers methods. Press the [ENTER] key to change the start frequency and exit the menu.

Set the stop frequency. Press the [SHIFT] [RECALL MENU] to go directly to the last command you used before exiting the menu previously (START F). Press the right arrow. You should see STOP F. Press the down arrow to enter the parameter. Using the arrow keys, the knob, or the enter number methods, adjust the stop frequency to 5 kHz. Press [ENTER] to change the frequency and exit the menu.

Set the sweep time. Press the [SHIFT] [RECALL MENU] to go directly to the last command you used before exiting the menu previously (STOP F). Press the right arrow. You should see SWP TIME. Press the down arrow to enter the parameter. Adjust the sweep time to 10 seconds. Press the [ENTER] key to change the sweep time and exit the menu.

The swept signal is now ready to view on the oscilloscope. You should now see a sine wave changing frequency linearly with time. Programming Example Below is a sample program in HP Basic for the front-panel example. Frequency sweep changes the frequency of a waveform in a controlled manner.
     10 !

     20 CLEAR 7                       ! clear bus interface

     30 ASSIGN @Gen TO 710            ! assign I/O path to default address

     40 OUTPUT @Gen;"*RST"            ! Reset the function generator

     50 !

     60 OUTPUT @Gen;"FUNC:SHAP SIN"   ! carrier waveform shape

     70 OUTPUT @Gen;"VOLT 5"          ! carrier amplitude is 5 Vpp

     80 OUTPUT @Gen;"FREQ:STAR 50"    ! start frequency is 50 Hz

     90 OUTPUT @Gen;"FREQ:STOP 5000"  ! stop frequency is 5 kHz

    100 OUTPUT @Gen;"SWE:TIME 10"     ! sweep time is 10 seconds

    110 OUTPUT @Gen;"SWE:STAT ON"     ! turn on sweep   

    120 !

    130 END
Logarithmic Sweeps The Agilent 33120A is also able to do sweeps with logarithmic spacing. From the front panel, turn on SWEEP and press [SHIFT] [RECALL]. Press the right arrow until SWP MODE appears on the display. Press the down arrow, and use the left or right arrows until LOG appears on the display. Press [ENTER] to change the sweep mode and exit the menu. To return to the linear spacing, repeat and select LINEAR.

From remote interface, the command is SWE:SPAC LOG. To return to the linear spacing, the command is SWE:SPAC LIN. Sweeping Up and Down and Custom Sweeps. Sweeps can be compared to a frequency modulated signal. Linear sweeps can be duplicated using a ramp as the modulating waveform. Similarly, logarithmic sweeps can be duplicated using the exponential waveforms provided in the Agilent 33120A s built-in arbitrary waveforms.

The sweep function in the Agilent 33120A will only sweep up or down, depending upon the frequencies selected for the start and stop frequencies. However, frequency modulation can be used to create more complex sweep patterns. For example, using a triangle waveform as the modulating signal will provide a linear sweep that will sweep up then down. Arbitrary waveforms can be created to generate custom sweep patterns.
    Revision 1.0       22 Mar 99       cld