Keithley Model 3390 Arbitrary Waveform Generator
The Keithley Model 3390 Arbitrary Waveform Generator has five standard waveforms (sine, square, ramp, pulse, and noise) and you can program it to produce any waveform with a 14-bit resolution and a 125 MSamples/second sampling rate.
To get acquainted with the function generator, attach the output to an oscilloscope and try to the different wavefunctions by pressing the buttons on the front panel. The 'Output' lights up when the output is enabled. Refer to the Keithley Model 3390 Arbitrary Waveform Generator User's Manual if it is not clear how to specify the waveforms. The figure below shows an oscilloscope trace for a square wave.
If you look at the Fourier transform of this signal, it shows only the odd harmonics as we expect for a square wave.
This spectrum was measured with a picoscope 2000 in Spectrum Mode. If your oscilloscpoe does not have a specrum mode, you can take a single shot and calculate the Fourier transform numerically. We can get a better idea of quality of the square wave by look at the logarithm of the Fourier transform.
In the logarithm we see there are also some even harmonics present and there is a noise background. To investigate if the noise is coming from the waveform generator or the oscilloscope, we disconnect function generator and short the input of the oscilloscope with a 50 Ω resistor. The output impedance of the waveform generator is also 50 Ω so this loads the oscilloscope with the same impedance. The result of this measurement is shown below.
The noise is much lower with the resistor so the noise originated from the waveform generator.
Communication with a computer
Connect the instrument to the computer by LAN, USB, or GPIB and use the Establishing communication with PyVISA script to determine the string that the Resource Manager uses to identify the 3390.
If the instrument is connected via USB, the string that the Resource Manager uses is, 'USB::0x05E6::0x3390::1421720::INSTR'. The python code that opens communication to Keithley 3390 is,
Once communication has been established, you can use the commands Keithley_3390.write(), Keithley_3390.read(), Keithley_3390.query(), and Keithley_3390.close() to communicate with the waveform generator. For instance,
To output a 6 kHz sine wave with a 2 V peak-to-peak amplitude and a dc offset of -2.5 V, give the command
Keithley_3390.write('APPL:SIN 6 KHZ, 2.0 VPP, -2.5 V')
This command enables the output immediately. Another way to program a sine wave is to first set the output function and then enable the output like this:
The brief command to output a square wave and to enable the output is
Keithley_3390.write('APPL:SQU 3 MHZ, 1.0 VRMS, 25 mV')
Another way to program a square wave is to first set the output function and then enable the output like this: