qmi.instruments.stanford_research_systems.dc205

Instrument driver for the Stanford Research Systems DC205 voltage source.

Classes

SRS_DC205(context, name, transport)

Instrument driver for the Stanford Research Systems DC205 voltage source.

class qmi.instruments.stanford_research_systems.dc205.SRS_DC205(context: QMI_Context, name: str, transport: str)

Instrument driver for the Stanford Research Systems DC205 voltage source.

This driver implements most basic features of the instrument. Linear voltage scanning is not supported by this driver.

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.

reset() None

Reset the instrument, returning (most) settings to their defaults.

get_idn() QMI_InstrumentIdentification

Read instrument type and version and return QMI_InstrumentIdentification instance.

get_range() int

Read the output voltage range.

The output range is always bipolar. Thus, range setting 1 means -1 .. +1 Volt; range setting 10 means -10 .. +10 Volt, etc.

Returns:

Output range in Volt. Possible return values are 1, 10 and 100.

set_range(volt_range: int) None

Set the output voltage range.

This command may not be used while the output is enabled.

Parameters:

volt_range – Output range in Volt. Allowed values are 1, 10 and 100.

get_output_enabled() bool

Return True if the output is enabled, False if the output is disabled.

set_output_enabled(enable: bool) None

Enable or disable the output.

get_voltage() float

Return the DC voltage setting in Volt.

Note that this returns the voltage setting of the instrument. The instrument does not measure the actual voltage on its output.

set_voltage(voltage: float) None

Set the DC voltage setting in Volt.

get_output_floating() bool

Return True if floating output is enabled, False if output is ground-referenced.

set_output_floating(enable: bool) None

Enable or disable floating output.

get_sensing_enabled() bool

Return True if remote sensing is enabled, otherwise return False.

When sensing is enabled, the instrument operates in 4-wire mode, using the SENSE input terminals. When sensing is disabled, the instrument operates in 2-wire mode and the SENSE inputs are ignored.

set_sensing_enabled(enable: bool) None

Enable or disable remote sensing mode.

get_interlock_status() bool

Return True if the safety interlock is closed, False if the interlock is open.

The interlock needs to be closed to operate the instrument in the 100V range.

get_overloaded() bool

Return True if the instrument is in overload condition, otherwise return 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.