Skip to content

Connecting to Keysight 81110A by Agilent in Python

Instrument Card

Keysight 81110A Pulse Pattern Generator / 165/330 MHz

Keysight 81110A

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 81110A in Python

PROTOCOLS > SCPI

To connect to a Keysight 81110A Function Generator using Instrumental, you can use the following Python script:

from instrumental import instrument, list_resources
# Find available resources
resources = list_resources()
# Connect to the Keysight 81110A Function Generator
func_gen = instrument(resources[0])
# Now you can use the function generator
# For example, to set the frequency:
func_gen.frequency = 1000 # Set frequency to 1 kHz
# Close the connection
func_gen.close()

This script first uses the list_resources() function from Instrumental to find all available resources. It then connects to the first resource found using the instrument() function. You can modify the index 0 in resources[0] to connect to a different resource if multiple function generators are available.

Once connected, you can use the func_gen object to control the function generator. In the example, it sets the frequency to 1 kHz by assigning the desired frequency to the frequency attribute of the func_gen object.

Finally, the close() method is called to close the connection to the function generator.