qmi.instruments.thorlabs.tc200

Instrument driver for Thorlabs TC200 temperature controller.

Classes

CycleState(value)

Cycle state.

DisplayUnit(value)

Front panel display units.

Mode(value)

Control mode (constant temperature/cycling).

OutputState(value)

Output state (enabled/disabled).

SensorAlarmState(value)

Sensor alarm state.

SensorType(value)

Sensor type enumeration.

Tc200Status(output_state, mode, sensor_type, ...)

TC 200 status.

Thorlabs_TC200(context, name, transport)

Instrument driver for the Thorlabs TC200 temperature controller.

class qmi.instruments.thorlabs.tc200.OutputState(value)

Output state (enabled/disabled).

class qmi.instruments.thorlabs.tc200.Mode(value)

Control mode (constant temperature/cycling).

class qmi.instruments.thorlabs.tc200.SensorType(value)

Sensor type enumeration.

class qmi.instruments.thorlabs.tc200.DisplayUnit(value)

Front panel display units.

class qmi.instruments.thorlabs.tc200.SensorAlarmState(value)

Sensor alarm state.

class qmi.instruments.thorlabs.tc200.CycleState(value)

Cycle state.

class qmi.instruments.thorlabs.tc200.Tc200Status(output_state: OutputState, mode: Mode, sensor_type: SensorType, unit: DisplayUnit, alarm: SensorAlarmState, cycle_state: CycleState)

TC 200 status.

output_state

Output state (enabled/disabled).

Type:

qmi.instruments.thorlabs.tc200.OutputState

mode

Output mode (normal/cycle).

Type:

qmi.instruments.thorlabs.tc200.Mode

sensor_type

Sensor type.

Type:

qmi.instruments.thorlabs.tc200.SensorType

unit

Display unit (C/F/K).

Type:

qmi.instruments.thorlabs.tc200.DisplayUnit

alarm

Sensor alarm state (alarm/no alarm).

Type:

qmi.instruments.thorlabs.tc200.SensorAlarmState

cycle_state

Cycle state (paused/not paused).

Type:

qmi.instruments.thorlabs.tc200.CycleState

output_state: OutputState

Alias for field number 0

mode: Mode

Alias for field number 1

sensor_type: SensorType

Alias for field number 2

unit: DisplayUnit

Alias for field number 3

alarm: SensorAlarmState

Alias for field number 4

cycle_state: CycleState

Alias for field number 5

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

class qmi.instruments.thorlabs.tc200.Thorlabs_TC200(context: QMI_Context, name: str, transport: str)

Instrument driver for the Thorlabs TC200 temperature controller.

open() None

Open the device interface.

close() None

Close the device interface.

get_idn() QMI_InstrumentIdentification

Retrieve the device identification.

get_status() Tc200Status

Retrieve and parse device status.

is_enabled() bool

Determine if the heater output is enabled.

has_alarm() bool

Determine if sensor alarm is set.

is_tuned() bool

Determine if the offset calibration has been performed.

enable() None

Enable the heater output.

disable() None

Disable the heater output.

set_temperature(setpoint: float) None

Set the temperature.

If setpoint exceeds the TMAX limit or 200.0 deg Celsius, whichever is lower, the setpoint will be refused by the device. Minimum temperature setting is 20.0 deg Celsius. Resolution is 0.1 deg.

Parameters:

setpoint – temperature setpoint in degrees Celsius.

get_temperature_setpoint() float

Get the current temperature setpoint in degrees Celsius.

get_temperature_actual() float

Get the actual temperature in degrees Celsius.

set_temperature_limit(limit: float) None

Set the upper temperature setpoint limit.

Parameters:

limit – upper temperature limit in degrees Celsius.

get_temperature_limit() float

Get the upper temperature setpoint limit in degrees Celsius.

set_power_limit(limit: float) None

Set the upper power limit.

Parameters:

limit – upper power limit in Watt.

get_power_limit() float

Get the upper power limit in Watt.

set_pid_gains(p_gain: int | None = None, i_gain: int | None = None, d_gain: int | None = None) None

Set P, I, D gains for the control loop.

Parameters:
  • p_gain – proportional gain between 1 and 250 inclusive.

  • i_gain – integral gain between 0 and 250 inclusive.

  • d_gain – differential gain between 0 and 250 inclusive.

get_pid_gains() Tuple[int, int, int]

Get P, I, D gains for the control loop.

tune() None

Tune the temperature offset.

The device can automatically tune the temperature offset. This works best if the P-gain is set to a moderate value (around 100-125) and the I-gain and D-gain are both zero. Tuning should only be performed when the temperature has reached a steady state, otherwise the results are unpredictable (note that as a result you cannot just detune() immediately followed by tune(), you need to wait for stead state after the detune).

The heater output must be enabled and the device must not be already tuned.

Tuning takes some time and the temperature may overshoot the setpoint a bit, depending on he P-gain. Typical time scale is about a minute or more. The final temperature should be within 0.1 degree Celsius.

The offset is stored in persistent memory and loaded automatically on device startup.

detune() None

Detune (remove) the temperature offset.

Allow the temperature to settle before re-tuning!

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.