Lake Shore Temperature Controller

v0.1.3
io.github.K-Dense-AI/labmcp-lakeshore Checked 1 day ago Published 2 months ago

MCP server for Lake Shore Cryotronics 335/336/350 temperature controllers.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_connection_info Get Connection Info

Report which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first.

get_command_log Get Command Log

Return the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done.

ParameterTypeDescription
limitinteger

reconnect Reconnect

Close and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).

read_temperatures Read Temperatures

Read every (or the selected) sensor input: kelvin, raw sensor units, sensor type, input name and decoded reading status (invalid, under/overrange). Disabled inputs are listed with null readings.

ParameterTypeDescription
inputsInputs to read (default: all inputs of the model)

get_heater_status Get Heater Status

Report each output's control mode and input, heater range, output %, setpoint (and in kelvin), ramp state, PID values and heater errors (open/short). Reading a heater error clears it on the controller.

ParameterTypeDescription
outputOne output (default: all)

set_setpoint Set Setpoint

Set the control setpoint of an output's loop in kelvin. If setpoint ramping is on, the setpoint moves toward the new value at the ramp rate. Heating only happens if the output is in closed-loop mode and its heater range is not off. Refused above `max_setpoint_k`.

ParameterTypeDescription
output *integerOutput / control loop number
setpoint_k *numberTarget temperature in kelvin

set_ramp Set Ramp

Turn setpoint ramping on or off for an output's control loop and set the rate. With ramping on, the next setpoint change moves the setpoint gradually - gentler on samples and wiring.

ParameterTypeDescription
enabled *booleanRamp the setpoint instead of stepping it
output *integerOutput / control loop number
rate_k_per_minnumberRamp rate in K/min (0.1-100; 350: 0.001-100)

set_heater_range Set Heater Range

Set an output's heater range (each step is ~10x more power). Anything above 0 lets the output heat: in closed loop as the PID demands, in open loop at the front-panel manual output. Refused above `max_heater_range`, or if the setpoint already programmed on a closed-loop, zone or warm-up output is above `max_setpoint_k`. Start with the lowest range that can reach the setpoint.

ParameterTypeDescription
heater_range *integer0 = off; 335/336: 1 low, 2 medium, 3 high; 350: 1-5; outputs 3/4: 1 = on
output *integerOutput number

set_pid Set Pid

Set the P, I and D values of an output's control loop (Lake Shore conventions).

ParameterTypeDescription
d *numberDerivative (rate) setting, 0-200
i *numberIntegral (reset) setting = 1000 / integral seconds
output *integerOutput / control loop number
p *numberProportional gain

wait_for_stable_temperature Wait For Stable Temperature

Wait until the control input of `output` has stayed within `tolerance_k` of the setpoint (and the setpoint is no longer ramping) for `stable_for_s`, or until `timeout_s`. Returns whether it stabilised, the final temperature and a downsampled trace. Changes nothing.

ParameterTypeDescription
output *integerControl loop whose setpoint and input are used
poll_interval_snumberSeconds between readings
stable_for_snumberHow long T must stay within tolerance
timeout_snumberGive up after this long
tolerance_knumberAllowed |T - setpoint|

all_heaters_off All Heaters Off

Turn every output off (heater range 0 on outputs 1-4), like the front-panel All Off key, and stop any running wait. Reports the read-back range of each output and `all_off`.