qmi.instruments.tenma.psu_72

Instrument driver for the Tenma 72-series power supply units.

Two main model groups in this series are the models similar to 2550 (selected as one base class) and models similar to 13350 (selected also as a base class). Both groups work with USB-to-serial communication but the second group has also possibility to use UDP communication. For that IP LAN communication protocol with related functionalities is present, which can be used either through USB or UDP connection.

Some differences are present, even though the basis is the same, as implemented in the Tenma72_Base class: - The group based on 13350 model require an EOL character (` `, ` `) to finish the commands while group

based on 2550 model doesn’t.

  • The group based on 13350 model does not work when providing the channel number to the serial command, while the commands in group based on 2550 model they do.

  • For example, a command “ISET1:3.0” works for 2550 group, while “ISET:3.0

“ works for 13350 group.

Classes

Tenma72_10480(context, name, transport)

Instrument driver for the Tenma 72-10480, child of 72-2550.

Tenma72_13350(context, name, transport)

Instrument driver for the Tenma 72-13350.

Tenma72_13360(context, name, transport)

Instrument driver for the Tenma 72-13360, child of 72-13350.

Tenma72_2535(context, name, transport)

Instrument driver for the Tenma 72-2535, child of 72-2550.

Tenma72_2540(context, name, transport)

Instrument driver for the Tenma 72-2540, child of 72-2550.

Tenma72_2545(context, name, transport)

Instrument driver for the Tenma 72-2545, child of 72-2550.

Tenma72_2550(context, name, transport)

Instrument driver for the Tenma 72-2550.

Tenma72_2925(context, name, transport)

Instrument driver for the Tenma 72-2925, child of 72-2550.

Tenma72_2930(context, name, transport)

Instrument driver for the Tenma 72-2930, child of 72-2550.

Tenma72_2935(context, name, transport)

Instrument driver for the Tenma 72-2935, child of 72-2550.

Tenma72_2940(context, name, transport)

Instrument driver for the Tenma 72-2940, child of 72-2550.

Tenma72_Base(context, name, transport)

The base class for all Tenma model 72 power supply units.

TenmaChannelMode(value[, name])

TrackingState(value)

class qmi.instruments.tenma.psu_72.TenmaChannelMode(value: bool, name: str = 'C.C')
class qmi.instruments.tenma.psu_72.TrackingState(value)
class qmi.instruments.tenma.psu_72.Tenma72_Base(context: QMI_Context, name: str, transport: str)

The base class for all Tenma model 72 power supply units.

BUFFER_SIZE

The default buffer size for ‘read’

DEFAULT_BAUDRATE

The default baudrate in case of serial connection is used (Baud).

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

SEND_SLEEP_TIME

A default sleep time for sending data.

READ_TIMEOUT

A default timeout for reading data.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_status() dict[str, Any]

This method needs to be implemented in the inheriting classes.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_2550(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-2550. The driver is tested with this model, but the respective manual is also for models 72-2535, 72-2540, 72-2545, 72-2925, 72-2930, 72-2935, 72-2940 & 72-10480.

This driver can be used only with (USB-to-)serial communications.

DEFAULT_BAUDRATE

The default baudrate in case of serial connection is used (Baud).

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

Ch1Mode: “C.V” | “C.C” Ch2Mode: “C.V” | “C.C” Tracking: xx, where xx is byte

  • 00 = Independent

  • 01 = Tracking series

  • 10 = Tracking parallel

OutputEnabled: True | False

Returns:

Dictionary of status values.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_2535(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-2535, child of 72-2550.

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

Ch1Mode: “C.V” | “C.C” Ch2Mode: “C.V” | “C.C” Tracking: xx, where xx is byte

  • 00 = Independent

  • 01 = Tracking series

  • 10 = Tracking parallel

OutputEnabled: True | False

Returns:

Dictionary of status values.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_2540(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-2540, child of 72-2550.

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

Ch1Mode: “C.V” | “C.C” Ch2Mode: “C.V” | “C.C” Tracking: xx, where xx is byte

  • 00 = Independent

  • 01 = Tracking series

  • 10 = Tracking parallel

OutputEnabled: True | False

Returns:

Dictionary of status values.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_2545(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-2545, child of 72-2550.

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

Ch1Mode: “C.V” | “C.C” Ch2Mode: “C.V” | “C.C” Tracking: xx, where xx is byte

  • 00 = Independent

  • 01 = Tracking series

  • 10 = Tracking parallel

OutputEnabled: True | False

Returns:

Dictionary of status values.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_2925(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-2925, child of 72-2550.

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

Ch1Mode: “C.V” | “C.C” Ch2Mode: “C.V” | “C.C” Tracking: xx, where xx is byte

  • 00 = Independent

  • 01 = Tracking series

  • 10 = Tracking parallel

OutputEnabled: True | False

Returns:

Dictionary of status values.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_2930(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-2930, child of 72-2550.

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

Ch1Mode: “C.V” | “C.C” Ch2Mode: “C.V” | “C.C” Tracking: xx, where xx is byte

  • 00 = Independent

  • 01 = Tracking series

  • 10 = Tracking parallel

OutputEnabled: True | False

Returns:

Dictionary of status values.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_2935(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-2935, child of 72-2550.

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

Ch1Mode: “C.V” | “C.C” Ch2Mode: “C.V” | “C.C” Tracking: xx, where xx is byte

  • 00 = Independent

  • 01 = Tracking series

  • 10 = Tracking parallel

OutputEnabled: True | False

Returns:

Dictionary of status values.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_2940(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-2940, child of 72-2550.

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

Ch1Mode: “C.V” | “C.C” Ch2Mode: “C.V” | “C.C” Tracking: xx, where xx is byte

  • 00 = Independent

  • 01 = Tracking series

  • 10 = Tracking parallel

OutputEnabled: True | False

Returns:

Dictionary of status values.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_10480(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-10480, child of 72-2550.

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

Ch1Mode: “C.V” | “C.C” Ch2Mode: “C.V” | “C.C” Tracking: xx, where xx is byte

  • 00 = Independent

  • 01 = Tracking series

  • 10 = Tracking parallel

OutputEnabled: True | False

Returns:

Dictionary of status values.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_13350(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-13350. The driver is tested with this model, but manual is also for the model 72-13360.

This driver can be used with (USB-to-)serial and UDP communications.

Note that this model has extra functionalities related to the IP LAN Communication Protocol. Also note that this model does not work with channel number input, like 2550 model-based PSUs.

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

“ChannelMode “: “C.V” | “C.C” “OutputEnabled”: True | False “V/C priority “: “Current priority” | “Voltage priority” “Beep”: True | False “Lock”: True | False

Returns:

Dictionary of status values.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

get_dhcp() int

Use the IP LAN command to see if DHCP is enabled.

Returns:

The current DHCP enabled state.

Return type:

dhcp

set_dhcp(dhcp: int) None

Use the IP LAN command to set a DHCP enabled state.

Parameters:

dhcp – New DHCP state. 0 is disabled, 1 is enabled.

get_ip_address() str

Use the IP LAN command to get the current IP address of the device.

Returns:

The current IP address of the device.

Return type:

ip_address

set_ip_address(ip_address) None

Use the IP LAN command to set a new IP address for the device.

Parameters:

ip_address – A new static IP address for the device.

get_subnet_mask() str

Use the IP LAN command to get the current subnet mask address of the device.

Returns:

The current subnet mask address of the device.

Return type:

subnet_mask

set_subnet_mask(subnet_mask) None

Use the IP LAN command to set a new subnet mask address for the device.

Parameters:

subnet_mask – A new subnet mask address for the device.

get_gateway_address() str

Use the IP LAN command to get the current gateway address of the device.

Returns:

The current static gateway address of the device.

Return type:

gateway

set_gateway_address(gateway) None

Use the IP LAN command to set a new gateway address for the device.

Parameters:

gateway – A new static gateway address for the device.

get_ip_port() int

Use the IP LAN command to get the current IP port number of the device.

Returns:

The current IP port number of the device.

Return type:

ip_port

set_ip_port(ip_port: int) None

Use the IP LAN command to set a new IP port number for the device.

Parameters:

ip_port – A new static IP port number for the device.

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.tenma.psu_72.Tenma72_13360(context: QMI_Context, name: str, transport: str)

Instrument driver for the Tenma 72-13360, child of 72-13350.

MAX_VOLTAGE

The maximum voltage that can be set with the PSU (Volts).

MAX_CURRENT

The maximum current that can be set with the PSU (Amperes).

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

enable_output(output: bool) None

Enable or disable output from the PSU.

Parameters:

output – Boolean value to either set output ON (True) or OFF (False).

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current(output_channel: int | None = None) float

Get the current setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Current setting of the channel in Amperes.

get_dhcp() int

Use the IP LAN command to see if DHCP is enabled.

Returns:

The current DHCP enabled state.

Return type:

dhcp

get_gateway_address() str

Use the IP LAN command to get the current gateway address of the device.

Returns:

The current static gateway address of the device.

Return type:

gateway

get_idn() QMI_InstrumentIdentification

Get instrument identification info.

Returns:

NamedTuple with vendor, model, serial number and SW version info.

Return type:

QMI_InstrumentIdentification

get_ip_address() str

Use the IP LAN command to get the current IP address of the device.

Returns:

The current IP address of the device.

Return type:

ip_address

get_ip_port() int

Use the IP LAN command to get the current IP port number of the device.

Returns:

The current IP port number of the device.

Return type:

ip_port

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_status() dict[str, Any]

Get the power supply status as a dictionary of status values.

Dictionary composition is:

“ChannelMode “: “C.V” | “C.C” “OutputEnabled”: True | False “V/C priority “: “Current priority” | “Voltage priority” “Beep”: True | False “Lock”: True | False

Returns:

Dictionary of status values.

get_subnet_mask() str

Use the IP LAN command to get the current subnet mask address of the device.

Returns:

The current subnet mask address of the device.

Return type:

subnet_mask

get_voltage(output_channel: int | None = None) float

Get the voltage setting.

Parameters:

output_channel – The channel to send the inquiry to.

Returns:

Voltage setting of the channel in Volts.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

set_current(current: float, output_channel: int | None = None) None

Set the current setting.

Parameters:
  • current – Current for the channel in Amperes.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the current setting is not between 0 and self.MAX_CURRENT.

set_dhcp(dhcp: int) None

Use the IP LAN command to set a DHCP enabled state.

Parameters:

dhcp – New DHCP state. 0 is disabled, 1 is enabled.

set_gateway_address(gateway) None

Use the IP LAN command to set a new gateway address for the device.

Parameters:

gateway – A new static gateway address for the device.

set_ip_address(ip_address) None

Use the IP LAN command to set a new IP address for the device.

Parameters:

ip_address – A new static IP address for the device.

set_ip_port(ip_port: int) None

Use the IP LAN command to set a new IP port number for the device.

Parameters:

ip_port – A new static IP port number for the device.

set_subnet_mask(subnet_mask) None

Use the IP LAN command to set a new subnet mask address for the device.

Parameters:

subnet_mask – A new subnet mask address for the device.

set_voltage(voltage: float, output_channel: int | None = None) None

Set the voltage setting.

Parameters:
  • voltage – Voltage setting for the channel in Volts.

  • output_channel – The channel to send the inquiry to.

Raises:

ValueError – If the input voltage setting is not between 0 and self.MAX_VOLTAGE.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.