Connecting to Keysight 4156C by Agilent in Python
Instrument Card
4156C Precision Semiconductor Parameter Analyzer
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 4156C in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
from pymeasure.instruments.agilent import Agilent4156
# Connect to the instrumentinstrument = Agilent4156("GPIB0::25")
# Reset the instrumentinstrument.reset()
# Configure the instrument using a JSON configuration fileinstrument.configure("configuration_file.json")
# Save the desired data variablesinstrument.save(['VC', 'IC', 'VB', 'IB'])
# Perform a measurementinstrument.measure()
# Get the measured data as a pandas DataFramedata = instrument.get_data()
# Print the dataprint(data)
In this example, you would need to replace "GPIB0::25"
with the appropriate address of your Keysight 4156C Spectrum Analyzer. You would also need to provide a valid JSON configuration file for the configure
method.
The script connects to the instrument, resets it, configures it using the JSON file, saves the desired data variables, performs a measurement, and retrieves the measured data as a pandas DataFrame. Finally, it prints the data.
Note that you may need to install the pandas
library if it’s not already installed. You can do this by running pip install pandas
in your terminal.