Connecting to Keysight E8257D by Agilent in Python
Instrument Card
Metrology-grade analog signal generator offering industry-leading output power, level accuracy, and phase noise, with frequency coverage from 100 kHz to 67 GHz (extendable to 500 GHz) for testing advanced RF and microwave radar
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 E8257D in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
To connect to a Keysight E8257D RF Signal Generator using Qcodes, you can use the following Python script:
import qcodes as qcfrom qcodes.instrument_drivers.Keysight.Keysight_E8257D import Keysight_E8257D
# Create an instance of the instrumentsignal_generator = Keysight_E8257D("signal_generator", "TCPIP0::192.168.1.1::INSTR")
# Connect to the instrumentsignal_generator.connect()
# Print the instrument IDprint("Instrument ID:", signal_generator.IDN())
# Set the frequency to 1 GHzsignal_generator.frequency(1e9)
# Set the power to -10 dBmsignal_generator.power(-10)
# Enable the outputsignal_generator.output_enabled(True)
# Disable the output after 1 secondqc.sleep(1)signal_generator.output_enabled(False)
# Disconnect from the instrumentsignal_generator.disconnect()
This script creates an instance of the Keysight_E8257D
instrument class from the Qcodes driver. It then connects to the instrument using the specified address (TCPIP0::192.168.1.1::INSTR
). The instrument ID is printed using the IDN()
method.
The frequency is set to 1 GHz using the frequency()
method, and the power is set to -10 dBm using the power()
method. The output is enabled using the output_enabled()
method.
After a delay of 1 second, the output is disabled by setting output_enabled
to False
.
Finally, the script disconnects from the instrument using the disconnect()
method.