Connecting to Keysight 81110A by Agilent in Python
Instrument Card
Keysight 81110A Pulse Pattern Generator / 165/330 MHz
Device Specification: here
Manufacturer card: 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
Read our guide for turning Python scripts into Flojoy nodes.
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 resourcesresources = list_resources()
# Connect to the Keysight 81110A Function Generatorfunc_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 connectionfunc_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.