Skip to content

Connecting to Keysight 33220A by Agilent in Python

Instrument Card

The Keysight 33220A is a 20 MHz synthesized function generator with built-in arbitrary waveform and pulse capabilities. Itscombination of bench-top and system features makes this function generator a versatile solution for your testing requirements now and in the future.

Keysight 33220A

Device Specification: here

Manufacturer card: AGILENT

AGILENT

Keysight Technologies, or Keysight, is an American company that manufactures electronics test and measurement equipment and software

  • Headquarters: USA
  • Yearly Revenue (millions, USD): 5420
  • Vendor Website: here

Connect to the Keysight 33220A in Python

PROTOCOLS > SCPI

from instrumentkit import Instrument, SCPIInstrument
# Define the SCPI commands for the Keysight 33220A RF Signal Generator
class Keysight33220A(SCPIInstrument):
def __init__(self, resource_name):
super().__init__(resource_name)
def set_frequency(self, frequency):
self.send_command(f"FREQ {frequency}")
def set_amplitude(self, amplitude):
self.send_command(f"VOLT {amplitude}")
def enable_output(self):
self.send_command("OUTP ON")
def disable_output(self):
self.send_command("OUTP OFF")
# Connect to the Keysight 33220A RF Signal Generator
signal_generator = Keysight33220A("TCPIP0::192.168.1.1::INSTR")
# Set the frequency to 1 MHz
signal_generator.set_frequency(1e6)
# Set the amplitude to 1 Vpp
signal_generator.set_amplitude(1)
# Enable the output
signal_generator.enable_output()
# Disable the output after 5 seconds
time.sleep(5)
signal_generator.disable_output()
# Disconnect from the signal generator
signal_generator.disconnect()

Make sure to replace "TCPIP0::192.168.1.1::INSTR" with the actual resource name or address of your Keysight 33220A RF Signal Generator.