Connecting to KtMAwg IVI-C by Keysight in Python
Instrument Card
Device Specification: here
Manufacturer card: KEYSIGHT
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 KtMAwg IVI-C in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
To connect to a KtMAwg IVI-C RF Signal Generator using Qcodes, you can use the following Python script:
from qcodes.instrument_drivers.Keysight.KtMAwg import KtMAwg
# Create an instance of the KtMAwg instrumentawg = KtMAwg('awg', 'TCPIP0::192.168.1.1::inst0::INSTR')
# Connect to the instrumentawg.connect()
# Print the instrument IDNprint(awg.get_idn())
# Set the output terminal configuration of channel 1 to differentialawg.ch1.output_term_config('differential')
# Enable the output of channel 1awg.ch1.output(True)
# Load a waveform file to channel 1awg.ch1.load_waveform('waveform.dat')
# Play the waveform on channel 1awg.ch1.play_waveform()
# Stop the waveform on channel 1awg.ch1.stop_waveform()
# Disconnect from the instrumentawg.disconnect()
This script creates an instance of the KtMAwg
instrument with the name ‘awg’ and the specified address (‘TCPIP0::192.168.1.1::inst0::INSTR’). It then connects to the instrument using the connect()
method.
The script demonstrates various operations on the instrument, such as getting the instrument IDN using the get_idn()
method, setting the output terminal configuration and enabling the output of channel 1, loading a waveform file to channel 1, playing the waveform, and stopping the waveform.
Finally, the script disconnects from the instrument using the disconnect()
method.