Connecting to Keysight E8267C by Agilent in Python
Instrument Card
E8267C PSG Vector Signal Generator, up to 20 GHz

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 E8267C in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
To connect to a Keysight E8267C RF Signal Generator using Qcodes, you can use the following Python script:
from qcodes.instrument.visa import VisaInstrument
# Create a class for the Keysight E8267C RF Signal Generatorclass KeysightE8267C(VisaInstrument): def __init__(self, name, address, **kwargs): super().__init__(name, address, terminator="\n", **kwargs) # Add parameters and commands specific to the Keysight E8267C self.add_parameter( name="frequency", label="Frequency", unit="Hz", get_cmd="FREQ?", set_cmd="FREQ {}", get_parser=float, vals=Numbers(min_value=100e3, max_value=40e9), ) # Add other parameters and commands as needed
# Create an instance of the Keysight E8267C RF Signal Generatorsignal_generator = KeysightE8267C("signal_generator", "TCPIP0::192.168.1.1::INSTR")
# Connect to the signal generatorsignal_generator.connect()
# Use the parameters and commands of the signal generatorfrequency = signal_generator.frequency()print(f"Current frequency: {frequency} Hz")
# Disconnect from the signal generatorsignal_generator.disconnect()This script creates a custom class KeysightE8267C that inherits from VisaInstrument provided by Qcodes. It adds parameters and commands specific to the Keysight E8267C RF Signal Generator, such as frequency. The script then creates an instance of the KeysightE8267C class, connects to the signal generator, retrieves the current frequency, and finally disconnects from the signal generator.