stoner_measurement.instruments.oxford.temperature_controllers.OxfordMercuryTemperatureController

class stoner_measurement.instruments.oxford.temperature_controllers.OxfordMercuryTemperatureController(transport: BaseTransport, protocol: BaseProtocol | None = None)[source]

Bases: TemperatureController

Mercury iTC native protocol, based on the Issue 05 operator’s manual.

Device UIDs and existing heater associations are discovered on connection. Sensor aliases A onwards follow sorted sensor UIDs; loops enumerate sensors with assigned heaters. Input reassignment is left to the instrument’s configuration, so each loop exposes only its existing sensor. No heater, auxiliary or PID-table association is changed during discovery.

Gas controls are advertised only when exactly one sensor has an auxiliary board assigned. Multiple gas loops need explicit instrument configuration. Existing PID tables may be selected, but their file contents are not edited. Ramp control requires firmware 1.4.40 or newer. Select the desired remote interface on the front panel before connecting.

Parameters:
  • transport (BaseTransport) – Owned instrument transport.

  • protocol (BaseProtocol | None) – Native Mercury framing; defaults to MercuryProtocol. A generic SCPI error-queue protocol is unsuitable.

confirm_identity() → str[source]

Verify model identity and discover native device associations.

disconnect() → None[source]

Close the owned transport and discard discovered device references.

get_capabilities() → ControllerCapabilities[source]

Return capabilities discovered for this connection, not assumed boards.

get_gas_auto() → bool[source]

Read FAUT without inferring heater automatic mode.

get_gas_flow() → float[source]

Read actual valve position from the associated auxiliary board signal.

get_heater_output(loop: int) → float[source]

Read measured heater power as a percentage of its reported maximum power.

get_heater_range(loop: int) → int[source]

Reject the nonexistent Mercury discrete heater-range readback.

get_input_channel(loop: int) → str[source]

Return the sensor whose native control loop is being addressed.

get_loop_input_channels(loop: int) → tuple[str, ...][source]

Return the loop’s existing sensor without reassigning hardware boards.

get_loop_mode(loop: int) → ControlMode[source]

Read heater automatic control and PID table selection independently of gas.

get_needle_valve() → float[source]

Return the actual gas-valve opening percentage.

get_pid(loop: int) → PIDParameters[source]

Read the three native P/I/D settings.

get_ramp_enabled(loop: int) → bool[source]

Read RENA, independently of stored sweep execution.

get_ramp_rate(loop: int) → float[source]

Read the continuous setpoint ramp rate in kelvin per minute.

get_sensor_status(channel: str) → SensorStatus[source]

Return INVALID when the temperature signal is unavailable; propagate I/O failures.

get_setpoint(loop: int) → float[source]

Read the native loop target in kelvin.

get_temperature(channel: str) → float[source]

Read the sensor temperature signal in kelvin.

identify() → str[source]

Read the native Mercury identity using *IDN?.

set_gas_auto(auto: bool) → None[source]

Set FAUT only, preserving heater control.

set_gas_flow(percent: float) → None[source]

Write the configured gas loop’s manual flow demand, 0–100 percent.

set_heater_range(loop: int, range_: int) → None[source]

Reject the nonexistent Mercury discrete heater-range command.

set_input_channel(loop: int, channel: str) → None[source]

Validate the sensor-owned loop; configure board associations on the instrument.

set_loop_mode(loop: int, mode: ControlMode) → None[source]

Select heater control without changing gas mode; OFF also zeros manual output.

set_manual_heater_output(loop: int, output: float) → None[source]

Set the manual heater demand in percent, 0–100.

set_needle_valve(position: float) → None[source]

Set manual gas flow in percent.

set_pid(loop: int, p: float, i: float, d: float) → None[source]

Disable table selection and write native P/I/D terms.

set_ramp_enabled(loop: int, enabled: bool) → None[source]

Enable or disable continuous setpoint ramping without starting a sweep.

set_ramp_rate(loop: int, rate: float) → None[source]

Set a non-negative continuous setpoint ramp rate in kelvin per minute.

set_setpoint(loop: int, value: float) → None[source]

Set a target from 0 to 2000 kelvin, respecting configured hardware limits.

write(command: str, slow: int | None = None) → None[source]

Send a native SET and consume its acknowledgement.

Parameters:

command (str) – Complete native SET command without a terminator.

Keyword Parameters:

slow (int | None) – Optional transport delay in milliseconds.

Raises:
  • ValueError – A non-SET command was supplied; use query for READ.

  • InstrumentError – The command is rejected or incorrectly acknowledged.