Skip to content

Connecting to PL303QMT-P by Aimtti in Python

Instrument Card

Bench/System Linear Regulated DC Power Supply Triple Ouput, 2 x 30V/3A plus 6V/6A, USB, RS232 & LAN Interfaces

PL303QMT-P

Device Specification: here

Manufacturer card: AIMTTI

AIMTTI

TTi (Thurlby Thandar Instruments) is a leading manufacturer of electronic test and measurement instruments. These products are sold throughout the world via carefully selected distributors and agents in each country. We are located in Huntingdon near to the famous university city of Cambridge, within one of the high technology areas of the United Kingdom.

  • Headquarters: UK
  • Yearly Revenue (millions, USD): 9000
  • Vendor Website: here

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

Connect to the PL303QMT-P in Python

PROTOCOLS > SCPI

Here is a Python script that uses Qcodes to connect to a PL303QMT-P Power Supply:

from qcodes.instrument.visa import VisaInstrument
from qcodes.instrument.channel import ChannelList
class AimTTiChannel(VisaInstrument):
def __init__(self, name, address, **kwargs):
super().__init__(name, address, terminator="\n", **kwargs)
self.add_parameter(
"volt",
get_cmd="V?",
get_parser=float,
set_cmd="V {}",
label="Voltage",
unit="V",
)
self.add_parameter(
"curr",
get_cmd="I?",
get_parser=float,
set_cmd="I {}",
label="Current",
unit="A",
)
class AimTTi(VisaInstrument):
def __init__(self, name, address, **kwargs):
super().__init__(name, address, terminator="\n", **kwargs)
channels = ChannelList(self, "Channels", AimTTiChannel, snapshotable=False)
for i in range(1, 4):
channel = AimTTiChannel(self, f"ch{i}", f"ch{i}")
channels.append(channel)
self.add_submodule(f"ch{i}", channel)
self.add_submodule("channels", channels.to_channel_tuple())
self.connect_message()
aim_tti = AimTTi("aim_tti", "TCPIP0::192.168.1.1::inst0::INSTR")

This script defines two classes: AimTTiChannel and AimTTi. AimTTiChannel represents a single channel of the Aim TTi power supply and AimTTi represents the entire power supply instrument.

In the AimTTiChannel class, two parameters are defined: volt and curr. These parameters allow you to get and set the voltage and current values of the channel.

In the AimTTi class, a ChannelList is created to hold the channels of the power supply. The number of channels is set to 3. Each channel is represented by an instance of AimTTiChannel and added as a submodule to the AimTTi instrument.

Finally, an instance of AimTTi is created with the name β€œaim_tti” and the VISA address of the power supply.