Skip to content

Connecting to KtMAwg IVI-C by Keysight in Python

Instrument Card

KtMAwg IVI-C

Device Specification: here

Manufacturer card: KEYSIGHT

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

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 instrument
awg = KtMAwg('awg', 'TCPIP0::192.168.1.1::inst0::INSTR')
# Connect to the instrument
awg.connect()
# Print the instrument IDN
print(awg.get_idn())
# Set the output terminal configuration of channel 1 to differential
awg.ch1.output_term_config('differential')
# Enable the output of channel 1
awg.ch1.output(True)
# Load a waveform file to channel 1
awg.ch1.load_waveform('waveform.dat')
# Play the waveform on channel 1
awg.ch1.play_waveform()
# Stop the waveform on channel 1
awg.ch1.stop_waveform()
# Disconnect from the instrument
awg.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.