Model 335 Cryogenic Temperature Controller
The Model 335 measures and controls cryogenic temperature environments.
More information about the instrument can be found on our website including the manual which has a list of all commands and queries.
Example Scripts
Setting a temperature curve
import matplotlib.pyplot as plt
from lakeshore import Model224, Model224CurveHeader
# Connect to a temperature instrument (the Model 224 in this case) over USB
myinstrument = Model224()
# Configure a curve by first setting its header parameters. First, set the name and serial number of the curve.
# Then, select the units used to set map the sensor units to temperature units. Set a temperature limit, and
# then specify whether the coefficients are positive or negative.
curve_header_25 = Model224CurveHeader("My_Curve", "ABC123", myinstrument.CurveFormat.VOLTS_PER_KELVIN, 300.0,
myinstrument.CurveTemperatureCoefficients.POSITIVE)
myinstrument.set_curve_header(25, curve_header_25)
# Edit individual data points of the curve. In this case, a sensor value of 1.23 is set to equal a Kelvin value of
# 276.0
myinstrument.set_curve_data_point(25, 1, 1.23, 276.0)
# You can create a softcal curve by inputting 1-3 calibration sensor/temperature points. The instrument generates
# a new curve using your entered data points and the selected standard curve
myinstrument.generate_and_apply_soft_cal_curve(myinstrument.SoftCalSensorTypes.DT_400, 30, "SN123", (276, 10),
(300, 5), (310, 2))
# Use the get_curve method to get all the data points for a curve as a list. This can then be used to create a plot
# of the calibration curve.
data_points_list = myinstrument.get_curve(30)
x_list = [item[0] for item in data_points_list]
y_list = [item[1] for item in data_points_list]
plt.plot(x_list, y_list)
# Finally, a curve can be deleted if you would like to reset the data points for that curve. Only user curves
# can be deleted.
myinstrument.delete_curve(25)
Recording data with the Model 335
from lakeshore import Model335, Model335InputSensorSettings
# Connect to the first available Model 335 temperature controller over USB using a baud rate of 57600
my_model_335 = Model335(57600)
# Create a new instance of the input sensor settings class
sensor_settings = Model335InputSensorSettings(my_model_335.InputSensorType.DIODE, True, False,
my_model_335.InputSensorUnits.KELVIN,
my_model_335.DiodeRange.TWO_POINT_FIVE_VOLTS)
# Apply these settings to input A of the instrument
my_model_335.set_input_sensor("A", sensor_settings)
# Set diode excitation current on channel A to 10uA
my_model_335.set_diode_excitation_current("A", my_model_335.DiodeCurrent.TEN_MICROAMPS)
# Collect instrument data
heater_output_1 = my_model_335.get_heater_output(1)
heater_output_2 = my_model_335.get_heater_output(2)
temperature_reading = my_model_335.get_all_kelvin_reading()
# Open a csv file to write
file = open("335_record_data.csv", "w")
# Write the data to the file
file.write("Data retrieved from the Lake Shore Model 335\n")
file.write("Temperature Reading A: " + str(temperature_reading[0]) + "\n")
file.write("Temperature Reading B: " + str(temperature_reading[1]) + "\n")
file.write("Heater Output 1: " + str(heater_output_1) + "\n")
file.write("Heater Output 2: " + str(heater_output_2) + "\n")
file.close()
Setting up autotune on the Model 335
from lakeshore import Model335
from time import sleep
# Connect to the first available Model 335 temperature controller over USB using a baud rate of 57600
my_model_335 = Model335(57600)
# It is assumed that the instrument is configured properly with a control input sensor curve
# and heater output, capable of closed loop control
# Configure the display mode
my_model_335.set_display_setup(my_model_335.DisplaySetup.TWO_INPUT_A)
# Configure heater output 1 using the HeaterSetup class and set_heater_setup method
my_model_335.set_heater_setup_one(my_model_335.HeaterResistance.HEATER_50_OHM, 1.0, my_model_335.HeaterOutputDisplay.POWER)
# Configure heater output 1 to a setpoint of 310 kelvin (units correspond to the configured output units)
set_point = 325
my_model_335.set_control_setpoint(1, set_point)
# Turn on the heater by setting the range
my_model_335.set_heater_range(1, my_model_335.HeaterRange.HIGH)
# Check to see if there are any heater related errors
heater_error = my_model_335.get_heater_status(1)
if heater_error is not my_model_335.HeaterError.NO_ERROR:
raise Exception(heater_error.name)
# Allow the heater some time to turn on and start maintaining a setpoint
sleep(10)
# Ensure that the temperature is within 5 degrees kelvin of the setpoint
kelvin_reading = my_model_335.get_kelvin_reading(1)
if (kelvin_reading < (set_point - 5)) or (kelvin_reading > (set_point + 5)):
raise Exception("Temperature reading is not within 5k of the setpoint")
# Initiate autotune in PI mode, initial conditions will not be met if the system is not
# maintaining a temperature within 5 K of the setpoint
my_model_335.set_autotune(1, my_model_335.AutotuneMode.P_I)
# Poll the instrument until the autotune process completes
autotune_status = my_model_335.get_tuning_control_status()
while autotune_status["active_tuning_enable"] and not autotune_status["tuning_error"]:
autotune_status = my_model_335.get_tuning_control_status()
# Print the status to the console every 5 seconds
print("Active tuning: " + str(autotune_status["active_tuning_enable"]))
print("Stage status: " + str(autotune_status["stage_status"]) + "/10")
sleep(5)
if autotune_status["tuning_error"]:
raise Exception("An error occurred while running autotune")
Instrument class methods
- class lakeshore.model_335.Model335(baud_rate, serial_number=None, com_port=None, timeout=2.0, ip_address=None, tcp_port=None, **kwargs)
A class object representing the Lake Shore Model 335 cryogenic temperature controller.
- get_analog_output_percentage(output)
Returns the output percentage of the analog voltage output.
- Args:
- output (int):
Specifies which analog voltage output to query.
- Returns:
- (float):
Analog voltage heater output percentage.
- set_autotune(output, mode)
Initiates auto-tuning of the heater control loop.
- Args:
- output (int):
Specifies the output associated with the loop to be Auto-tuned.
- mode (IntEnum):
Specifies the Autotune mode. Member of instrument’s AutoTuneMode IntEnum class.
- set_brightness(brightness)
Method to set the front display brightness.
- Args:
- brightness (IntEnum):
A member of the instrument’s BrightnessLevel IntEnum class.
- get_brightness()
Method to query the front display brightness.
- Returns:
- (IntEnum):
A member of the instrument’s BrightnessLevel IntEnum class.
- get_operation_condition()
Returns the names of the operation condition register bits and their values.
- get_operation_event_enable()
Returns the names of the operation event enable register and their values.
These values determine which bits propagate to the operation condition register.
- set_operation_event_enable(register_mask)
Configures values of the operation event enable register bits.
These values determine which bits propagate to the standard event register.
- Args:
- register_mask (OperationEvent):
An OperationEvent class object with all bits configured true or false.
- get_operation_event()
Returns the names of the operation event register bits and their values.
- get_thermocouple_junction_temp()
Returns the temperature of the ceramic thermocouple block from the room temperature compensation calculation.
- Returns:
- (float):
Temperature of the ceramic thermocouple block (kelvin).
- set_soft_cal_curve_dt_470(curve_number, serial_number, calibration_point_1=(4.2, 1.62622), calibration_point_2=(77.35, 1.02032), calibration_point_3=(305, 0.50691))
Creates a SoftCal curve from any 1-3 temperature/sensor points using the preconfigured DT-470 curve.
When a calibration point other than one or more the default value(s) is entered a SoftCal curve is generated.
- Args:
- curve_number (int):
The curve number to save the generated curve to. Options are: 21 - 59.
- serial_number (str):
Specifies the curve serial number. Limited to 10 characters.
- calibration_point_1 (tuple):
Tuple of two floats in the form (temperature_value, sensor_value). Optional parameter.
- calibration_point_2 (tuple):
Tuple of two floats in the form (temperature_value, sensor_value). Optional Parameter.
- calibration_point_3 (tuple):
Tuple of two floats in the form (temperature_value, sensor_value). Optional Parameter.
- set_soft_cal_curve_pt_100(curve_number, serial_number, calibration_point_1=(77.35, 20.234), calibration_point_2=(305, 112.384), calibration_point_3=(480, 178.353))
Creates a SoftCal curve from any 1-3 temperature/sensor points using the preconfigured PT-100 curve.
When a calibration point other than one or more the default value(s) is entered a SoftCal curve is generated.
- Args:
- curve_number (int):
The curve number to save the generated curve to. Options are: 21 - 59.
- serial_number (str):
Specifies the curve serial number. Limited to 10 characters.
- calibration_point_1 (tuple):
Tuple of two floats in the form (temperature_value, sensor_value). Optional Parameter.
- calibration_point_2 (tuple):
Tuple of two floats in the form (temperature_value, sensor_value). Optional Parameter.
- calibration_point_3 (tuple):
Tuple of two floats in the form (temperature_value, sensor_value). Optional Parameter.
- set_soft_cal_curve_pt_1000(curve_number, serial_number, calibration_point_1=(77.35, 202.34), calibration_point_2=(305, 1123.84), calibration_point_3=(480, 1783.53))
Creates a SoftCal curve from any 1-3 temperature/sensor points using the preconfigured PT-1000 curve.
When a calibration point other than one or more the default value(s) is entered a SoftCal curve is generated.
- Args:
- curve_number (int):
The curve number to save the generated curve to. Options are: 21 - 59.
- serial_number (str):
Specifies the curve serial number. Limited to 10 characters.
- calibration_point_1 (tuple):
Tuple of two floats in the form (temperature_value, sensor_value). Optional Parameter.
- calibration_point_2 (tuple):
Tuple of two floats in the form (temperature_value, sensor_value). Optional Parameter.
- calibration_point_3 (tuple):
Tuple of two floats in the form (temperature_value, sensor_value). Optional Parameter.
- set_diode_excitation_current(channel, excitation_current)
Sets the excitation current of a specific channel.
The 10 uA excitation current is the only calibrated excitation current, and is used in almost all applications. The Model 336 will default the 10 uA current setting any time the input sensor type is changed.
- Args:
- channel (str):
Specifies which sensor input to configure: “A” - “D”.
- excitation_current (IntEnum):
A member of the instrument’s DiodeCurrent IntEnum class.
- get_diode_excitation_current(channel)
Returns the diode excitation current setting as a string.
- Args:
- channel (str):
Specifies which input to return: “A” - “D”.
- Returns:
- (IntEnum):
A member of the instrument’s DiodeCurrent IntEnum class. Diode excitation current.
- get_tuning_control_status()
Returns dictionary of tuning control status values.
If initial conditions are not met when starting the autotune procedure, causing the auto-tuning process to never actually begin, then the error status will be set to 1 and the stage status will be stage 00.
- Returns:
- (dict):
- {“active_tuning_enable”: bool, “output”: int, “tuning_error”: bool, “stage_status”: int}
active_tuning_enable: False = no active tuning, True = active tuning. output: Heater output of the control loop being tuned. tuning_error: False = no tuning error, True = tuning error. stage_status: Specifies the current stage in the Autotune process. If tuning error occurred, stage status represents stage that failed.
- set_filter(input_channel, filter_enable, data_points, reset_threshold)
Configures the input_channel filter parameter.
- Args:
- input_channel (int or str):
Specifies which input channel to configure.
- filter_enable (bool):
Specified whether the filtering function is enabled or not.
- data_points (int):
Specifies how many points the filter function uses: 2 - 64.
- reset_threshold (int):
Specifies what percent of full scale reading limits the filtering function. When a raw reading differs from a filtered value by more than this threshold, the filter averaging resets. Options are: 1% - 10%.
- get_filter(input_channel)
Returns the input_channel filter configuration.
- Args:
- input_channel (int or str):
Specifies which input channel to configure.
- Returns:
- (dict)
- {“filter_enable”: bool, “data_points”: int, “reset_threshold”: int}
filter_enable: Specified whether the filtering function is enabled or not. data_points: Specifies how many points the filter function uses. reset_threshold: Specifies what percent of full scale reading limits the filtering function. When a raw reading differs from a filtered value by more than this threshold, the filter averaging resets (1% - 10%).
- set_monitor_output_heater(channel, high_value, low_value, units=MonitorOutUnits.KELVIN, polarity=Polarity.UNIPOLAR)
Configures output 2. Use the set_heater_output_mode command to set the output mode to Monitor Out.
- Args:
- channel (self.InputSensor):
Specifies which sensor input to monitor.
- high_value (float):
Represents the data at which the Monitor Out reaches +100% output. Entered in the units designated by the <units> argument.
- low_value (float):
Represents the data at which the analog output reaches -100% output if bipolar, or 0% output if unipolar. Entered in the units designated by the <units> argument.
- units (self.MonitorOutUnits):
Specifies the units on which to base the output voltage.
- polarity (self.Polarity):
Specifies output voltage is unipolar or bipolar.
- get_monitor_output_heater()
Used to obtain all monitor out parameters for output 2.
- Returns:
- (dict):
{“channel”: self.InputSensor, “units”: self.MonitorOutUnits, “high_value”: float, “low_value”: float, “polarity”: self.Polarity}
See set_monitor_output_heater method arguments
- get_celsius_reading(channel)
Returns the temperature value in Celsius of either channel.
- Args:
- channel (str):
Selects the sensor input to query (“A” or “B”),
- set_display_setup(mode)
Sets the display mode.
- Args:
- mode (self.DisplaySetup):
Specifies the front panel display mode. See self.DisplaySetup IntEnum class.
- get_display_setup()
Returns the display mode.
- Return:
- (self.DisplaySetup):
Specifies the front panel display mode. See self.DisplaySetup IntEnum class.
- set_heater_setup_one(heater_resistance, max_current, output_display_mode)
Method to configure heater output one.
- Args:
- heater_resistance (self.HeaterResistance):
See self.HeaterResistance IntEnum class.
- max_current (float):
Specifies the maximum current for the heater.
- output_display_mode (self.HeaterOutputDisplay):
Specifies how the heater output is displayed. See self.HeaterOutType IntEnum class.
- set_heater_setup_two(output_type, heater_resistance, max_current, display_mode)
Method to configure the heater output 2.
- Args:
- output_type (self.HeaterOutType):
Specifies whether the heater output is in constant current or voltage mode. See self.HeaterOutType IntEnum class.
- heater_resistance (self.HeaterResistance):
See self.HeaterResistance IntEnum class.
- max_current (float):
Specifies the maximum current for the heater.
- display_mode (self.HeaterOutType):
Specifies how the heater output is displayed. Required only if output_type is set to CURRENT. See self.HeaterOutType IntEnum class.
- get_heater_setup(heater_output)
Returns the heater configuration status.
- Args:
- heater_output (int):
Selects which heater output to query:
- Return:
- (dict):
See set_heater_setup_one/set_heater_setup_two method arguments. {“output_type”: self.HeaterOutType, “heater_resistance”: self.HeaterResistance, “max_current”: float, “output_display_mode”: self.HeaterOutputDisplay}
- set_input_sensor(channel, sensor_parameters)
Sets the sensor type and associated parameters.
- Args:
- channel (str):
Specifies input to configure (“A” or “B”).
- sensor_parameters (self.InputSensorSettings):
See self.InputSensorSettings class.
- get_input_sensor(channel)
Returns the sensor type and associated parameters.
- Args:
- channel (str):
Specifies sensor input to configure (“A” or “B”).
- Return:
- (self.InputSensorSettings):
See self.InputSensor IntEnum class.
- get_all_kelvin_reading()
Returns the temperature value in kelvin of all channels.
- Return:
- (list: float)
[channel_A, channel_B]
- set_heater_output_mode(output, mode, channel, powerup_enable=False)
Configures the heater output mode.
- Args:
- output (int):
Specifies which output to configure (1 or 2).
- mode (self.HeaterOutputMode):
Member of self.HeaterOutputMode IntEnum class. Specifies the control mode.
- channel (self.InputSensor):
Specifies which input to use for control.
- powerup_enable (bool):
Specifies whether the output remains on (True) or shuts off after power cycle (False).
- get_heater_output_mode(output)
Returns the heater output mode for a given output and whether powerup is enabled.
- Args:
- output (int):
Specifies which output to query (1 or 2).
- Return:
(dict): {“mode”: self.HeaterOutputMode, “channel”: self.InputSensor, “powerup_enable”: bool}
- set_output_two_polarity(output_polarity)
Sets polarity of output 2 to either unipolar or bipolar.
Only applicable when output 2 is in voltage mode.
- Args:
- output_polarity (self.Polarity):
Specifies whether output voltage is UNIPOLAR or BIPOLAR.
- get_output_2_polarity()
Returns the polarity of output 2.
- Return:
- (self.Polarity):
Specifies whether output is UNIPOLAR or BIPOLAR.
- set_heater_range(output, heater_range)
Sets the heater range for a particular output.
The range setting has no effect if an output is in the off mode, and does not apply to an output in Monitor Out mode. An output in Monitor Out mode is always on.
- Args:
- output (int):
Specifies which output to configure (1 or 2).
- heater_range (IntEnum):
For Outputs 1 and 2 in Current mode: self.HeaterRange IntEnum member. For Output 2 in Voltage mode: self.HeaterVoltageRange IntEnum member.
- get_heater_range(output)
Returns the heater range for a particular output.
- Args:
- output (int):
Specifies which output to configure (1 or 2).
- Return:
- heater_range (IntEnum):
For Outputs 1 and 2 in Current mode: self.HeaterRange IntEnum member. For Output 2 in Voltage mode: self.HeaterVoltageRange IntEnum member.
- all_heaters_off()
Recreates the front panel safety feature of shutting off all heaters.
- get_input_reading_status(channel)
Returns the state of the input status flag bits.
- Args:
- channel (str):
Specifies which channel to query (“A” or “B”).
- Return:
- (InputReadingStatus):
Boolean representation of each bit of the input status flag register.
- set_warmup_supply(control, percentage)
Warmup mode applies only to Output 2 in Voltage mode.
The Output Type parameter must be configured using the set_heater_setup() method, and the Output mode and Control Input parameters must be configured using the set_monitor_out_parameters() method.
- Args:
- control (self.WarmupControl):
Specifies the type of control used.
- percentage (float):
Specifies the percentage of full scale (10 V) Monitor Out voltage to apply.
- get_warmup_supply()
Returns the output 2 warmup supply configuration.
- Return:
- (dict):
{“control”: self.WarmupControl, “percentage”: float}
- set_control_loop_zone_table(output, zone, control_loop_zone)
Configures the output zone parameters.
- Args:
- output (int):
Specifies which heater output to configure (1 or 2).
- zone (int):
Specifies which zone in the table to configure (1 to 10).
- control_loop_zone (ControlLoopZone):
See ControlLoopZone class.
- get_control_loop_zone_table(output, zone)
Returns a list of zone control parameters for a selected output and zone.
- Args:
- output (int):
Specifies which heater output to query (1 or 2).
- zone (int):
Specifies which zone in the table to query (1 to 10).
- Return:
- (self.ControlLoopZone):
See self.ControlLoopZone class.
- clear_interface_command()
Clears the bits in the SBR, SESR, OER, and terminates all operations.
Clears the bits in the Status Byte Register, Standard Event Status Register, and Operation Event Register. Terminates all pending operations. Clears the interface, but not the controller.
- command(*commands, check_errors=True)
Sends an SCPI command or multiple commands to the instrument.
- Args:
- commands (str):
A serial command.
- Kwargs:
- check_errors (bool):
Chooses whether to check for and raise errors after sending a command. True by default.
- connect_tcp(ip_address, tcp_port, timeout)
Establishes a TCP connection with the instrument on the specified IP address.
- connect_usb(serial_number=None, com_port=None, baud_rate=None, data_bits=None, stop_bits=None, parity=None, timeout=None, handshaking=None, flow_control=None)
Establish a serial USB connection.
- delete_curve(curve)
Deletes the user curve.
- Args:
- curve (int):
Specifies a user curve to delete.
- disconnect_tcp()
Disconnect the TCP connection.
- disconnect_usb()
Disconnect the USB connection.
- get_alarm_parameters(input_channel)
Returns the present state of all alarm parameters.
- Args:
- input_channel (str):
Specifies which input to configure.
- Returns:
- alarm_settings (AlarmSettings):
See AlarmSettings class.
- get_alarm_status(channel)
Returns the high state and low state of the alarm for the specified channel.
- Args:
- channel (str or int)
Specifies which input channel to read from.
- Return:
- (dict):
{“high_state”: bool, “low_state” bool}
- get_control_setpoint(output)
Returns the value for a given control output.
- Args:
- output (int):
Specifies which output’s control loop to query (1 or 2).
- Returns:
- value (float):
The value for the set-point (in the preferred units of the control loop sensor).
- get_curve(curve)
Returns a list of all the data points in a particular curve.
- Args:
- curve (int):
Specifies which curve to set.
- Returns:
- data_points (list: tuple):
A list containing every point in the curve represented as a tuple. (sensor_units: float, temp_value: float, curvature_value: float (optional)).
- get_curve_data_point(curve, index)
Returns a standard or user curve data point.
- Args:
- curve (int):
Specifies which curve to query.
- index (int):
Specifies the points index in the curve.
- Returns:
- curve_point (tuple):
(sensor_units: float, temp_value: float, curvature_value: float (optional)).
- get_curve_header(curve_number)
Returns parameters set on a particular user curve header.
- Args:
- curve_number (int):
Specifies a curve to retrieve.
- Returns:
- (CurveHeader):
A CurveHeader class object containing the curve information.
- get_display_field_settings(field)
Returns the settings of the specified display field when display is in Custom mode.
- Args:
- field (int)
Defines which field of the display to retrieve settings from.
- Returns:
- (dict):
See set_display_field_settings method. {“input_channel”: IntEnum, “display_units”: IntEnum}
- get_heater_output(output)
Sample heater output in percent, scale is dependent upon the instrument used and heater configuration.
- Args:
- output (int):
Heater output to query.
- Returns:
- (float):
percent of full scale current/voltage/power.
- get_heater_pid(output)
Returns the closed loop control parameters of the heater output.
- Args:
- output (int):
Specifies which output’s control loop to query.
- Returns:
- (dict):
- {“gain”: float, “integral”: float, “ramp_rate”: float}
gain: Proportional term in PID control. integral: Integral term in PID control. ramp_rate: Derivative term in PID control.
- get_heater_status(output)
Returns the heater error code state, error is cleared upon querying the heater status.
- Args:
- output (int):
Specifies which heater output to query (1 or 2).
- Returns:
- (IntEnum):
Object of instrument’s HeaterError type.
- get_ieee_488()
Returns the IEEE address set.
- Returns:
- address (int):
1-30 (0 and 31 reserved).
- get_input_curve(input_channel)
Returns the curve number being used for a given input.
- Args:
- input_channel (str or int):
Specifies which input to query.
- Returns:
- curve_number (int):
0-59.
- get_kelvin_reading(input_channel)
Returns the temperature value in kelvin of the given channel.
- Args:
- input_channel:
Selects the channel to retrieve measurement.
- get_keypad_lock()
Returns the state of the keypad lock and the lock-out code.
- Returns:
- (dict):
{“state”: bool, “code”: int}
- get_led_state()
Returns whether front panel LEDs are enabled.
- Returns:
- (bool):
Specifies whether front panel LEDs are functional. False if disabled, True enabled.
- get_manual_output(output)
Returns the manual output value in percent.
- Args:
- output (int):
Specifies output to query.
- Returns:
- (float):
Manual output percent.
- get_min_max_data(input_channel)
Returns the minimum and maximum data from an input.
- Args:
- input_channel (str):
Specifies which input to query.
- Returns:
- (dict):
{“minimum”: float, “maximum”: float}
- get_relay_alarm_control_parameters(relay_number)
Returns the relay alarm configuration for either of the two configurable relays.
Relay must be configured for alarm mode to retrieve parameters.
- Args:
- relay_number (int)
Specifies which relay to query. Options are: 1 or 2.
- Returns:
- (dict):
{“activating_input_channel”: str, “alarm_relay_trigger_type”: RelayControlAlarm}
- get_relay_control_mode(relay_number)
Returns the configured mode of the specified relay.
- Args:
- relay_number (int):
Specifies which relay to query. Options are: 1 or 2.
- Returns:
- (IntEnum):
The configured mode of the relay. Represented as a member of the instrument’s RelayControlMode IntEnum class.
- get_relay_status(relay_channel)
Returns whether the relay at the specified channel is On or Off.
- Args:
- relay_channel (int):
The relay channel to query.
- Returns:
- (bool):
True if relay is on, False if relay is off.
- get_remote_interface_mode()
Returns the state of the interface mode.
- Returns:
- (IntEnum):
A member of the instrument’s InterfaceMode IntEnum class.
- get_self_test()
Instrument self test result completed at power up.
- Returns:
- (bool):
True = errors found. False = no errors found.
- get_sensor_name(input_channel)
Returns the name of the sensor on the specified channel.
- Args:
- input_channel (str or int):
Specifies which input_channel channel to read from.
- Returns:
- name (str):
Name associated with the sensor.
- get_sensor_reading(input_channel)
Returns the sensor reading in the sensor’s units.
- Returns:
- reading (float):
The raw sensor reading in the units of the connected sensor.
- get_service_request()
Returns the status byte register bits and their values as a class instance.
- get_setpoint_ramp_parameter(output)
Returns the control loop parameters of a particular output.
- Args:
- output (int):
Specifies which output’s control loop to return.
- Returns:
- (dict):
{“ramp_enable”: bool, “rate_value”: float}
- get_setpoint_ramp_status(output)
Returns whether the set-point is ramping.
- Args:
- output (int):
Specifies which output’s control loop to query.
- Returns:
- (bool):
Ramp status. False = Not ramping, True = Ramping.
- get_standard_event_enable_mask()
Returns the names of the standard event enable register bits and their values.
These values determine which bits propagate to the standard event register.
- get_status_byte()
Returns the status flag bits as a class instance without resetting the register.
- get_temperature_limit(input_channel)
Returns the value of the temperature limit in kelvin.
- Args:
- input_channel (str or int):
Specifies which input to query.
- query(*queries, check_errors=True)
Send a query to the instrument and return the response.
- Args:
- queries (str):
A serial query ending in a question mark.
- Returns:
The instrument query response as a string.
- reset_alarm_status()
Clears the high and low status of all alarms.
- reset_instrument()
Sets controller parameters to power-up settings.
- reset_min_max_data()
Resets the minimum and maximum input data.
- set_alarm_parameters(input_channel, alarm_enable, alarm_settings=None)
Configures the alarm parameters for an input.
- Args:
- input_channel (str):
Specifies which input to configure.
- alarm_enable (bool):
Specifies whether to turn on the alarm for the input, or turn the alarm off.
- alarm_settings (AlarmSettings):
See AlarmSettings class. Required only if alarm_enable is set to True.
- set_control_setpoint(output, value)
Set set-point for specific output’s control loop.
Control settings, that is, P, I, D, and Set-point, are assigned to outputs, which results in the settings being applied to the control loop formed by the output and its control input.
- Args:
- output (int):
Specifies which output’s control loop to configure.
- value (float):
The value for the set-point (in the preferred units of the control loop sensor).
- set_curve(curve, data_points)
Method to define a user curve using a list of data points.
- Args:
- curve (int):
Specifies which curve to set.
- data_points (list):
A list containing every point in the curve represented as a tuple. (sensor_units: float, temp_value: float, curvature_value: float (optional)).
- set_curve_data_point(curve, index, sensor_units, temperature, curvature=None)
Configures a user curve point.
- Args:
- curve (int or str):
Specifies which curve to configure.
- index (int):
Specifies the points index in the curve.
- sensor_units (float):
Specifies sensor units for this point to 6 digits.
- temperature (float):
Specifies the corresponding temperature in Kelvin for this point to 6 digits.
- curvature (float):
Specify only if the point is part of a cubic spindle curve. The curvature value scale used to calculate spindle coefficients to 6 digits. Optional parameter.
- set_curve_header(curve_number, curve_header)
Configures the user curve header.
- Args:
- curve_number:
Specifies which curve to configure.
- curve_header (CurveHeader):
Instrument’s CurveHeader class object containing the desired curve information.
- set_display_field_settings(field, input_channel, display_units)
Configures a display field when the display is in custom mode.
- Args:
- field (int):
Defines which field of the display is being configured.
- input_channel (IntEnum):
Defines which input to display. A member of the instrument’s InputChannel IntEnum class.
- display_units (IntEnum):
Defines which units to display reading in. A member of the instrument’s DisplayUnits IntEnum class.
- set_heater_pid(output, gain, integral, derivative)
Configure the closed loop control parameters of the heater output.
- Args:
- output (int):
Specifies which output’s control loop to configure.
- gain (float):
Proportional term in PID control. This controls how strongly the control output reacts to the present error.
- integral (float):
Integral term in PID control. This controls how strongly the control output reacts to the past error history.
- derivative (float):
Derivative term in PID control. This value controls how quickly the present field set point will transition to a new set-point. The ramp rate is configured in field units per second.
- set_ieee_488(address)
Specifies the IEEE address.
- Args:
- address (int):
1-30 (0 and 31 reserved).
- set_input_curve(input_channel, curve_number)
Specifies the curve an input uses for temperature conversion.
- Args:
- input_channel (str or int):
Specifies which input to configure.
- curve_number (int):
0 = none, 1-20 = standard curves, 21-59 = user curves.
- set_keypad_lock(state, code)
Locks or unlocks front panel keypad (except for alarms and disabling heaters).
- Args:
- state (bool):
Sets the keypad to locked or unlocked. Options are: False for unlocked or True for locked.
- code (int):
Specifies 3 digit lock-out code. Options are: 000 - 999.
- set_led_state(state)
Sets the front panel LEDs to on or off.
- Args:
- state (bool):
Sets the LEDs to functional or nonfunctional. False if disabled, True enabled.
- set_manual_output(output, value)
When instrument is in closed loop PID, Zone, or Open Loop modes a manual output may be set.
- Args:
- output (int):
Specifies output to configure.
- value (float):
Specifies value for manual output in percent.
- set_relay_alarms(relay_number, activating_input_channel, alarm_relay_trigger_type)
Sets a relay to turn on and off automatically based on the state of the alarm of the specified input channel.
- Args:
- relay_number (int):
The relay to configure. Options are: 1 or 2.
- activating_input_channel (str or int):
Specifies which input alarm activates the relay.
- alarm_relay_trigger_type (RelayControlAlarm):
Specifies the type of alarm that triggers the relay.
- set_remote_interface_mode(mode)
Places the instrument in one of three interface modes.
- Args:
- mode (IntEnum):
A member of the instrument’s InterfaceMode IntEnum class.
- set_sensor_name(input_channel, sensor_name)
Sets a given name to a sensor on the specified channel.
- Args:
- input_channel (str or int):
Specifies which input_channel channel to read from.
- sensor_name(str):
Name user wants to give to the sensor on the specified channel.
- set_service_request(register_mask)
Manually enable/disable the mask of the corresponding status-flag bit in the status byte register.
- Args:
- register_mask (service_request_enable):
A service_request_enable class object with all bits configured.
- set_setpoint_ramp_parameter(output, ramp_enable, rate_value)
Sets the control loop of a particular output.
- Args:
- output (int):
Specifies which output’s control loop to configure.
- ramp_enable (bool):
Specifies whether ramping is off or on (False = Off or True = On).
- rate_value (float):
Specifies set-point ramp rate in kelvin per minute. The rate is always positive but will respond to ramps up or down. A rate of 0 is interpreted as infinite, and will respond as if set-point ramping were off. (0.1 to 100)
- set_standard_event_enable_mask(register_mask)
Configures values of the standard event enable register bits.
These values determine which bits propagate to the standard event register.
- Args:
- register_mask (StandardEventRegister):
A StandardEventRegister class object with all bits set to a value.
- set_temperature_limit(input_channel, limit)
After a set temperature limit is exceeded, all control outputs will shut down.
- Args:
- input_channel (str or int):
Specifies which input to configure.
- limit (float):
The temperature limit in kelvin for which to shut down all control outputs when exceeded. A limit of zero will turn the feature off.
- turn_relay_off(relay_number)
Turns the specified relay off.
- Args:
- relay_number (int):
The relay to turn off. Options are: 1 or 2.
- turn_relay_on(relay_number)
Turns the specified relay on.
- Args:
- relay_number (int):
The relay to turn on. Options are: 1 or 2.
- write(command_string)
Alias of command. Send a command to the instrument.
- Args:
- command_string (str):
A serial command.
Settings classes
This section outlines the classes used to interact with methods which return or accept an argument of a class object, specific to the Lake Shore model 335.
- class lakeshore.model_335.Model335InputSensorSettings(sensor_type, autorange_enable, compensation, units, input_range=None)
Class object used in the get/set_input_sensor methods.
- __init__(sensor_type, autorange_enable, compensation, units, input_range=None)
Constructor for the InputSensor class.
- Args:
- sensor_type (self.InputSensorType):
Specifies input sensor type.
- autorange_enable (bool):
Specifies autoranging (False = off, True = on).
- compensation (bool):
Specifies input compensation. (False = off, True = on).
- units (self.InputSensorUnits):
Specifies the preferred units parameter for sensor readings and for the control set-point.
- input_range (IntEnum)
Specifies input range if autorange_enable is false. See IntEnum classes: self.DiodeRange, self.RTDRange, and self.ThermocoupleRange.
- class lakeshore.model_335.Model335ControlLoopZoneSettings(upper_bound, proportional, integral, derivative, manual_output_value, heater_range, channel, ramp_rate)
Control loop configuration for a particular heater output and zone.
- __init__(upper_bound, proportional, integral, derivative, manual_output_value, heater_range, channel, ramp_rate)
Constructor.
- Args:
- upper_bound (float):
Specifies the upper set-point boundary of this zone in kelvin.
- proportional (float):
Specifies the proportional gain for this zone (0.1 to 1000).
- integral (float):
Specifies the integral gain for this zone (0.1 to 1000).
- derivative (float):
Specifies the derivative gain for this zone (0 to 200 %).
- manual_output_value (float):
Specifies the manual output for this zone (0 to 100 %).
- heater_range (self.HeaterRange):
Specifies the heater range for this zone. See self.HeaterRange IntEnum class.
- channel (self.InputSensor):
See self.InputSensor IntEnum class.
- ramp_rate (float):
Specifies the ramp rate for this zone (0 - 100 K/min).
Status register classes
This section describes the register objects. Each bit in the register is represented as a member of the register’s class
- class lakeshore.model_335.Model335StatusByteRegister(message_available_summary_bit, event_status_summary_bit, service_request, operation_summary_bit)
Class object representing the status byte register LSB to MSB.
- class lakeshore.model_335.Model335ServiceRequestEnable(message_available_summary_bit, event_status_summary_bit, operation_summary_bit)
Class object representing the service request enable register LSB to MSB.
- lakeshore.model_335.Model335StandardEventRegister
alias of
StandardEventRegister
- class lakeshore.temperature_controllers.StandardEventRegister(operation_complete, query_error, execution_error, command_error, power_on)
Class object representing the standard event register.
- lakeshore.model_335.Model335OperationEvent
alias of
OperationEvent
- class lakeshore.temperature_controllers.OperationEvent(alarm, sensor_overload, loop_2_ramp_done, loop_1_ramp_done, new_sensor_reading, autotune_process_completed, calibration_error, processor_communication_error)
Class object representing the status byte register LSB to MSB.
- class lakeshore.model_335.Model335InputReadingStatus(invalid_reading, temp_underrange, temp_overrange, sensor_units_zero, sensor_units_overrange)
Class object representing the input status flag bits.
Enumeration objects
This section describes the Enum type objects that have been created to name various settings of the Model 335 series that are represented as an int or single character to the instrument. The purpose of these enum types is to make the settings more descriptive and obvious to the user rather than interpreting the ints taken by the instrument.
- class lakeshore.temperature_controllers_enums.TemperatureControllerEnums
Class containing the enums relevant to temperature controllers.
- class InputChannel(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)
Placeholder Enumeration of the display field input source.
- class DisplayFieldUnits(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)
Placeholder Enumeration of the display field units.
- class RelayControlMode(*values)
Relay operating mode enumeration.
- RELAY_OFF = 0
- RELAY_ON = 1
- ALARMS = 2
- class RelayControlAlarm(*values)
Enumeration of the setting determining which alarm(s) cause a relay to close in alarm mode.
- LOW_ALARM = 0
- HIGH_ALARM = 1
- BOTH_ALARMS = 2
- class InterfaceMode(*values)
Enumeration for the mode of the remote interface.
- LOCAL = 0
- REMOTE = 1
- REMOTE_LOCAL_LOCK = 2
- class HeaterError(*values)
Enumeration for possible errors flagged by the heater.
- NO_ERROR = 0
- HEATER_OPEN_LOAD = 1
- HEATER_SHORT = 2
- class CurveFormat(*values)
Enumerations specify formats for temperature sensor curves.
- MILLIVOLT_PER_KELVIN = 1
- VOLTS_PER_KELVIN = 2
- OHMS_PER_KELVIN = 3
- LOG_OHMS_PER_KELVIN = 4
- class CurveTemperatureCoefficient(*values)
Enumerations specify positive/negative temperature sensor curve coefficients.
- NEGATIVE = 1
- POSITIVE = 2
- class BrightnessLevel(*values)
Enumerator to specify the brightness level of an instrument display.
- QUARTER = 0
- HALF = 1
- THREE_QUARTERS = 2
- FULL = 3
- class AutotuneMode(*values)
Enumerator used to represent the different autotune control modes.
- P_ONLY = 0
- P_I = 1
- P_I_D = 2
- class HeaterResistance(*values)
Enumerator used to represent the different heater resistances.
- HEATER_25_OHM = 1
- HEATER_50_OHM = 2
- class Polarity(*values)
Enumerator for unipolar or bipolar output operation.
- UNIPOLAR = 0
- BIPOLAR = 1
- class DiodeCurrent(*values)
Enumerator used to represent diode current ranges.
- TEN_MICROAMPS = 0
- ONE_MILLIAMP = 1
- class HeaterOutputUnits(*values)
Enumerator used to represent heater output unit settings.
- CURRENT = 1
- POWER = 2
- class Interface(*values)
Enumerator used to represent remote interface communication methods.
- USB = 0
- ETHERNET = 1
- IEEE488 = 2
- class InputSensorUnits(*values)
Enumerator used to represent temperature sensor unit options.
- KELVIN = 1
- CELSIUS = 2
- SENSOR = 3
- class ControlTypes(*values)
Enumerator used to represent the control type settings.
- AUTO_OFF = 0
- CONTINUOUS = 1
- class LanStatus(*values)
Represents the different status states for the lan connection.
- STATIC_IP = 0
- DHCP = 1
- AUT0_IP = 2
- ADDRESS_NOT_ACQUIRED_ERROR = 3
- DUPLICATE_INITIAL_IP_ERROR = 4
- DUPLICATE_ONGOING_IP_ERROR = 5
- CABLE_UNPLUGGED = 6
- MODULE_ERROR = 7
- ACQUIRING_ADDRESS = 8
- ETHERNET_DISABLED = 9
- class DisplayFields(*values)
Enumeration of the possible number of fields to include in a custom display mode.
- LARGE_2 = 0
- LARGE_4 = 1
- SMALL_8 = 2
- class DisplayFieldsSize(*values)
Enumeration of the display fields when mode is set to all inputs.
- SMALL = 0
- LARGE = 1
- class lakeshore.model_335.Model335Enums
Class containing the enums relevant to the Model 335.
- class InputSensor(*values)
Enumeration when “NONE” is an option for sensor input.
- NONE = 0
- CHANNEL_A = 1
- CHANNEL_B = 2
- class MonitorOutUnits(*values)
Units associated with a sensor channel.
- KELVIN = 1
- CELSIUS = 2
- SENSOR = 3
- class InputSensorType(*values)
Sensor type enumeration.
- DISABLED = 0
- DIODE = 1
- PLATINUM_RTD = 2
- NTC_RTD = 3
- THERMOCOUPLE = 4
- class DiodeRange(*values)
Diode voltage range enumeration.
- TWO_POINT_FIVE_VOLTS = 0
- TEN_VOLTS = 1
- class RTDRange(*values)
RTD resistance range enumeration.
- TEN_OHM = 0
- THIRTY_OHM = 1
- HUNDRED_OHM = 2
- THREE_HUNDRED_OHM = 3
- ONE_THOUSAND_OHM = 4
- THREE_THOUSAND_OHM = 5
- TEN_THOUSAND_OHM = 6
- THIRTY_THOUSAND_OHM = 7
- ONE_HUNDRED_THOUSAND_OHM = 8
- class HeaterOutputDisplay(*values)
Heater output display units enumeration.
- CURRENT = 1
- POWER = 2
- class HeaterOutputMode(*values)
Control loop enumeration.
- OFF = 0
- CLOSED_LOOP = 1
- ZONE = 2
- OPEN_LOOP = 3
- MONITOR_OUT = 4
- WARMUP_SUPPLY = 5
- class WarmupControl(*values)
Heater output 2 voltage mode warmup enumerations.
- AUTO_OFF = 0
- CONTINUOUS = 1
- class HeaterRange(*values)
Control loop heater range enumeration.
- OFF = 0
- LOW = 1
- MEDIUM = 2
- HIGH = 3
- class DisplaySetup(*values)
Panel display setup enumeration.
- INPUT_A = 0
- INPUT_A_MAX_MIN = 1
- TWO_INPUT_A = 2
- INPUT_B = 3
- INPUT_B_MAX_MIN = 4
- TWO_INPUT_B = 5
- CUSTOM = 6
- TWO_LOOP = 7
- class HeaterVoltageRange(*values)
Voltage mode heater enumerations.
- VOLTAGE_OFF = 0
- VOLTAGE_ON = 1