Skip to content

Connecting to Keysight M960XA-Series by Keysight in Python

Instrument Card

PXI source/measure units are the source and measurement resources of voltage and current for test applications requiring high accuracy, high resolution, and measurement flexibility

Keysight M960XA-Series

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

Demo: Measure a solar panel IV curve with a Keithley 2400

Connect to the Keysight M960XA-Series in Python

PROTOCOLS > SCPI

Here is a Python script that uses Qcodes to connect to a Keysight M960XA-Series Power Meters:

import qcodes as qc
from qcodes.instrument_drivers.Keysight.KeysightM960x import KeysightM960x
# Create an instance of the instrument
power_meter = KeysightM960x("power_meter", address="TCPIP0::192.168.1.1::inst0::INSTR")
# Connect to the instrument
power_meter.connect()
# Print the instrument ID
print(power_meter.get_idn())
# Set the output voltage level
power_meter.voltage_level(1.0)
# Enable the output
power_meter.output(True)
# Measure the current
current = power_meter.measure_data()[1]
print(f"Current: {current} A")
# Disable the output
power_meter.output(False)
# Disconnect from the instrument
power_meter.disconnect()

Note: Replace "TCPIP0::192.168.1.1::inst0::INSTR" with the actual address of your power meter.