devices.oxford:MercuryITC

Driver for Mercury ITC.

Usage

Source

devices.oxford:MercuryITC(
    interface,
    **kwargs,
)

dataDict contains the commands (keys) and also the response from the ITC (values)

Methods

Name Description
extractValueFromDict() Extract a numeric value from a dictionary entry string.
getAutoHTR() Get the automatic heater control state.
getAutoPID() Get the automatic PID control state.
getDictValue() Get a value from the working dictionary.
getHeater() Get the current heater output level.
getNV() Get the needle valve opening.
getPID() Get the current PID control parameters.
getTVTI() Get the current temperature.
logAllDicts() Log the contents of all dictionaries for debugging.
queryAllDicts() Query all dictionaries to update their values.
queryDict() Query all entries in a dictionary.
queryHeaterConf() Query the heater configuration.
queryID() Query the device ID.
querySysConf() Query the system configuration.
queryTSensConf() Query the temperature sensor configuration.
queryTSensLoopConf() Query the temperature sensor loop configuration.
queryTSensStatus() Query the temperature sensor status.
queryWorkingDict() Query all entries in the working dictionary.
query_merc() Query a value from the device.
setAutoHTR() Enable or disable automatic heater control.
setAutoPID() Enable or disable automatic PID control.
setHeater() Set the heater output level.
setNV() Set the needle valve opening.
setPID() Set PID control parameters.
setTVTI() Set the temperature setpoint.
setVal() Set a value on the device.

extractValueFromDict()

Extract a numeric value from a dictionary entry string.

Usage

Source

extractValueFromDict(entry)

Parameters

entry: str
Dictionary entry string containing a value

Returns

float or None
Extracted numeric value, or None if conversion fails

getAutoHTR()

Get the automatic heater control state.

Usage

Source

getAutoHTR()

Returns

bool
True if auto heater is enabled, False otherwise

getAutoPID()

Get the automatic PID control state.

Usage

Source

getAutoPID()

Returns

bool
True if auto PID is enabled, False otherwise

getDictValue()

Get a value from the working dictionary.

Usage

Source

getDictValue(key)

Parameters

key: str
Key in the working dictionary

Returns

float or bool
Value from the working dictionary

getHeater()

Get the current heater output level.

Usage

Source

getHeater()

Returns

float
Heater output level (typically 0-100%)

getNV()

Get the needle valve opening.

Usage

Source

getNV()

Returns

float
Needle valve opening percentage (0-100%)

getPID()

Get the current PID control parameters.

Usage

Source

getPID()

Returns

tuple
(P, I, D) values

getTVTI()

Get the current temperature.

Usage

Source

getTVTI(setp=False)

Parameters

setp: bool = False
If True, also return the setpoint, by default False

Returns

float or tuple
Current temperature in Kelvin, or (current_temp, setpoint) if setp=True

logAllDicts()

Log the contents of all dictionaries for debugging.

Usage

Source

logAllDicts()

queryAllDicts()

Query all dictionaries to update their values.

Usage

Source

queryAllDicts()

queryDict()

Query all entries in a dictionary.

Usage

Source

queryDict(
    queryDict,
    address="",
    signal=False,
)

Parameters

queryDict: dict

Dictionary containing commands as keys

address: str = ""

Device address, by default “”

signal: bool = False
Whether to use the signal variant of the command, by default False

queryHeaterConf()

Query the heater configuration.

Usage

Source

queryHeaterConf()

queryID()

Query the device ID.

Usage

Source

queryID()

querySysConf()

Query the system configuration.

Usage

Source

querySysConf()

queryTSensConf()

Query the temperature sensor configuration.

Usage

Source

queryTSensConf()

queryTSensLoopConf()

Query the temperature sensor loop configuration.

Usage

Source

queryTSensLoopConf()

queryTSensStatus()

Query the temperature sensor status.

Usage

Source

queryTSensStatus()

queryWorkingDict()

Query all entries in the working dictionary.

Usage

Source

queryWorkingDict()

Updates the values in the working dictionary with current device values.


query_merc()

Query a value from the device.

Usage

Source

query_merc(
    command,
    address="",
    signal=False,
)

Parameters

command: str

Command to send

address: str = ""

Device address, by default “”

signal: bool = False
Whether to use the signal variant of the command, by default False

Returns

str
Response from the device

setAutoHTR()

Enable or disable automatic heater control.

Usage

Source

setAutoHTR(val=True)

Parameters

val: bool = True
True to enable auto heater, False to disable, by default True

setAutoPID()

Enable or disable automatic PID control.

Usage

Source

setAutoPID(val=True)

Parameters

val: bool = True
True to enable auto PID, False to disable, by default True

setHeater()

Set the heater output level.

Usage

Source

setHeater(val)

Parameters

val: float
Heater output level (typically 0-100%)

setNV()

Set the needle valve opening.

Usage

Source

setNV(val)

Parameters

val: float
Needle valve opening percentage (0-100%)

setPID()

Set PID control parameters.

Usage

Source

setPID(pid)

Parameters

pid: tuple or list
Three-element sequence containing (P, I, D) values. Negative values will be clamped to 0.

setTVTI()

Set the temperature setpoint.

Usage

Source

setTVTI(val)

Parameters

val: float
Temperature setpoint in Kelvin (limited to 0-300K range)

setVal()

Set a value on the device.

Usage

Source

setVal(
    setpoint,
    command,
    address="",
    signal=False,
    integer=False,
)

Parameters

setpoint: float or str

Value to set

command: str

Command to use

address: str = ""

Device address, by default “”

signal: bool = False

Whether to use the signal variant of the command, by default False

integer: bool = False
Whether to format the setpoint as an integer, by default False

Returns

str
Response from the device