devices.oxford:MercuryITC
Driver for Mercury ITC.
Usage
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
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
getAutoHTR()Returns
bool- True if auto heater is enabled, False otherwise
getAutoPID()
Get the automatic PID control state.
Usage
getAutoPID()Returns
bool- True if auto PID is enabled, False otherwise
getDictValue()
Get a value from the working dictionary.
Usage
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
getHeater()Returns
float- Heater output level (typically 0-100%)
getNV()
Get the needle valve opening.
Usage
getNV()Returns
float- Needle valve opening percentage (0-100%)
getPID()
Get the current PID control parameters.
Usage
getPID()Returns
tuple- (P, I, D) values
getTVTI()
Get the current temperature.
Usage
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
logAllDicts()queryAllDicts()
Query all dictionaries to update their values.
Usage
queryAllDicts()queryDict()
Query all entries in a dictionary.
Usage
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
queryHeaterConf()queryID()
Query the device ID.
Usage
queryID()querySysConf()
Query the system configuration.
Usage
querySysConf()queryTSensConf()
Query the temperature sensor configuration.
Usage
queryTSensConf()queryTSensLoopConf()
Query the temperature sensor loop configuration.
Usage
queryTSensLoopConf()queryTSensStatus()
Query the temperature sensor status.
Usage
queryTSensStatus()queryWorkingDict()
Query all entries in the working dictionary.
Usage
queryWorkingDict()Updates the values in the working dictionary with current device values.
query_merc()
Query a value from the device.
Usage
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
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
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
setHeater(val)Parameters
val: float- Heater output level (typically 0-100%)
setNV()
Set the needle valve opening.
Usage
setNV(val)Parameters
val: float- Needle valve opening percentage (0-100%)
setPID()
Set PID control parameters.
Usage
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
setTVTI(val)Parameters
val: float- Temperature setpoint in Kelvin (limited to 0-300K range)
setVal()
Set a value on the device.
Usage
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