Model 336 Cryogenic Temperature Controller

The Model 336 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

Below are a few example scripts for the Model 336 that use the Lake Shore Python driver.

Using calibration curves with a temperature instrument

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)

Setting up heater outputs on the Model 336

from lakeshore import Model336

# Connect to the first available Model 336 temperature controller over USB with a baud rate of 57600
my_model_336 = Model336()

# Set the control loop values for outputs 1 and 3
my_model_336.set_heater_pid(1, 40, 27, 0)
my_model_336.set_heater_pid(3, 35, 20, 0)

# Configure heater output 1 with a 50 ohm load, 0.75 amp max current, and screen display mode to power
my_model_336.set_heater_setup(1, my_model_336.HeaterResistance.HEATER_50_OHM, 0.75, my_model_336.HeaterOutputUnits.POWER)

# Configure analog heater output 3 to monitor sensor channel A, a high and low value of 3.65 and 1.02 kelvin
# respectively as a unipolar output
my_model_336.set_monitor_output_heater(3, my_model_336.InputChannel.CHANNEL_A, my_model_336.InputSensorUnits.KELVIN, 3.65, 1.02,
                                        my_model_336.Polarity.UNIPOLAR)

# Set closed loop output mode for heater 1
my_model_336.set_heater_output_mode(1, my_model_336.HeaterOutputMode.CLOSED_LOOP, my_model_336.InputChannel.CHANNEL_A)

# Set closed loop output mode for heater 3
my_model_336.set_heater_output_mode(3, my_model_336.HeaterOutputMode.CLOSED_LOOP, my_model_336.InputChannel.CHANNEL_B)

# Set a control setpoint for outputs 1 and 3 to 1.5 kelvin
my_model_336.set_control_setpoint(1, 1.5)
my_model_336.set_control_setpoint(3, 2.5)

# Turn the heaters on by setting the heater range
my_model_336.set_heater_range(1, my_model_336.HeaterRange.MEDIUM)
my_model_336.set_heater_range(3, my_model_336.HeaterVoltageRange.VOLTAGE_ON)

# Obtain the output percentage of output 1 and print it to the console
heater_one_output = my_model_336.get_heater_output(1)
print("Output 1: " + str(heater_one_output))

# Obtain the output percentage of output 3 and print it to the console
heater_three_output = my_model_336.get_analog_output_percentage(3)
print("Output 3: " + str(heater_three_output))

Instrument class methods

class lakeshore.model_336.Model336(serial_number=None, com_port=None, timeout=2.0, ip_address=None, tcp_port=7777, **kwargs)

A class object representing the Lake Shore Model 336 cryogenic temperature controller.

status_byte_register

alias of Model336StatusByteRegister

service_request_enable

alias of Model336ServiceRequestEnable

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_contrast_level(contrast_level)

Sets the display contrast level on the front panel.

Args:
contrast_level (int):

Contrast value: 1 - 32.

get_contrast_level()

Returns the contrast level of front display.

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_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_network_settings(dhcp_enable, auto_ip_enable, ip_address, sub_mask, gateway, primary_dns, secondary_dns, pref_host, pref_domain, description)

Network class constructor.

Args:
dhcp_enable (bool):

Enable or disable DHCP.

auto_ip_enable (bool):

Enable or disable dynamically configured link-local addressing (Auto IP).

ip_address (str):

IP address for static configuration.

sub_mask (str):

Subnet mask for static configuration.

gateway (str):

Gateway address for static configuration.

primary_dns (str):

Primary DNS address for static configuration.

secondary_dns (str):

Secondary DNS address for static configuration.

pref_host (str):

Preferred Hostname (15 character maximum).

pref_domain (str):

Preferred Domain name (64 character maximum).

description (str):

Instrument description (32 character maximum).

get_network_settings()

Method to retrieve the IP settings.

Returns:
(dict):

See set_network_settings arguments.

get_network_configuration()

Method to return the configured ethernet parameters.

Return:
(dict):
{“lan_status”: LanStatus, “ip_address”: str, “sub_mask”: str, “gateway”: str, “primary_dns”: str,

“secondary_dns”: str, “hostname” str, “domain”: str, “mac_address”: str} lan_status: Current status of the ethernet connection. Member of the instrument’s LanStatus IntEnum class. ip_address: Configured IP address. sub_mask: Configured subnet mask. gateway: Configured gateway address. primary_dns: Configured primary DNS address. secondary_dns: Configured secondary DNS address. hostname: Assigned hostname. domain: Assigned domain. mac_address: Module MAC address.

set_website_login(username, password)

Sets the username and password for the web interface.

Args:
username (str):

15 character string representing the website username.

password (str):

15 character string representing the website password.

get_website_login()

Method to return the username and password for the web interface.

Returns:
website_login (dict): A dictionary containing 15 character string type items.

{“username”: str, “password”: str}

get_celsius_reading(channel)

Returns the temperature in Celsius of any channel.

Args:
channel (str):

“A” - “D” (in addition, “D1” - “D5” for 3062 option).

set_interface(interface)

Selects the remote interface for the instrument,

Args:
interface (IntEnum):

Member of instrument’s Interface IntEnum class,

get_interface()

Returns the remote interface for the instrument.

Returns:
(IntEnum):

Member of instrument’s Interface IntEnum class.

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_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.

set_monitor_output_heater(output, channel, units, high_value, low_value, polarity)

Configures a voltage-controlled output.

Use the set_heater_output_mode command to set the output mode to Monitor Out.

Args:
output (int):

Voltage-controlled output to configure (3 or 4)

channel (InputChannel):

Specifies which sensor input to monitor. A member of the InputChannel IntEnum class.

units (self.InputSensorUnits):

Specifies the units on which to base the output voltage. A member of the self.InputSensorUnits IntEnum class.

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.

polarity (self.Polarity):

Specifies whether the output voltage is unipolar or bipolar. Member of the self.Polarity IntEnum class.

get_monitor_output_heater(output)

Used to obtain all monitor out parameters for a specific output.

Args:
output (int):

Voltage-controlled output to configure (3 or 4).

Returns:
(dict):

See set_monitor_output_heater arguments

set_display_setup(mode, num_fields='', displayed_output='')

Sets the display mode.

Args:
mode (self.DisplaySetupMode):

Member of self.DisplaySetupMode IntEnum class Specifies display mode for default and 3062 options

num_fields (IntEnum)

When mode is set to custom, specifies the number of fields (Member of self.DisplayFields). When mode is set to all inputs, specifies size of readings (Member of self.DisplayFieldsSize).

displayed_output (int):

Configures the bottom half of the custom display screen. Only required if mode is set to CUSTOM. Output: (1 - 4)

get_display_setup()

Returns the display mode.

Returns:
(dict):

See set_display_setup method arguments. Keys: “mode”, “num_fields”, “displayed_output”

set_heater_setup(output, heater_resistance, max_current, heater_output)

Method to configure the heaters.

Args:
output (int):

Specifies which heater output to configure (1 or 2).

heater_resistance (self.HeaterResistance):

Member of self.HeaterResistance IntEnum class.

max_current (float):

User defined maximum output current (see table 4-11 for max current and resistance relationships).

heater_output (self.HeaterOutputUnits):

Specifies whether the heater output displays in current or power. Member of self.HeaterOutputUnits IntEnum class.

get_heater_setup(heater_output)

Returns the heater configuration status.

Args:
heater_output (int):

Specifies which heater output to configure (1 or 2)

Returns:
(dict):

See set_heater_setup arguments Keys: heater_resistance, max_current, output_display_mode.

set_input_sensor(channel, sensor_parameters)

Sets the sensor type and associated parameters.

Args:
channel (str):

Specifies input to configure (“A” - “D”): 3062 option (“D1” - “D5”)

sensor_parameters (Model336InputSensorSettings):

See Model336InputSensorSettings class.

get_input_sensor(channel)

Returns the sensor type and associated parameters.

Args:
channel (str):

Specifies sensor input to configure (“A” or “B”)

Returns:
(Model336InputSensorSettings):

See Model336InputSensorSettings class.

get_all_kelvin_reading()

Returns the temperature value in kelvin of all channels.

Returns:
(list: float):

[channel_A, channel_B, channel_C, channel_D]

set_heater_output_mode(output, mode, channel, powerup_enable=False)

Configures the heater output mode.

Args:
output (int):

Specifies which output to configure (1 - 4)

mode (self.HeaterOutputMode):

Member of self.HeaterOutputMode IntEnum class. Specifies the control mode.

channel (InputChannel):

InputChannel IntEnum class. 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 retrieve (1 - 4).

Returns:
(dict):

See set_heater_output_mode method arguments. Keys: mode, channel, powerup_enable.

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 - 4).

heater_range (IntEnum):

For Outputs 1 and 2: Member of self.HeaterRange IntEnum class. For Outputs 3 and 4: self.HeaterVoltageRange IntEnum class.

get_heater_range(output)

Returns the heater range for a particular output.

Args:
output (int):

Specifies which output to query (1 or 2).

Returns:
(IntEnum):

For Outputs 1 and 2: Member of self.HeaterRange IntEnum class. For Outputs 3 and 4: Member of self.HeaterVoltageRange IntEnum class.

all_heaters_off()

Recreates the front panel safety feature of shutting off all heaters.

get_input_reading_status(channel)

Reruns the state of the input status flag bits.

Args:
channel (str):

Specifies which channel to query (“A” - “D”). Use “D1” - “D5” for 3062 option.

Returns:
(Model336InputReadingStatus):

Boolean representation of each bit in the input status flag register.

get_all_sensor_reading()

Returns the sensor unit reading of all channels.

Returns:
(list: float):

[channel_A, channel_B, channel_C, channel_D]

set_warmup_supply_parameter(output, control, percentage)

Warmup mode applies only to voltage heater outputs 3 and 4.

The Output mode and Control Input parameters must be configured using the set_monitor_out_parameters() method.

Args:
output (int):

Specifies which output to configure (3 or 4).

control (self.ControlTypes):

Member of the self.ControlTypes IntEnum class.

percentage (float):

Specifies the percentage of full scale (10 V) Monitor Out voltage to apply to turn on the external power supply. (A value of 50.5 translates to a 50.5 percent output voltage).

get_warmup_supply_parameter(output)

Returns the warmup supply configuration for a particular output.

Args:
output (int):

Specifies which analog voltage heater output to retrieve (3 or 4).

Returns:
(dict):

See set_warmup_supply_parameter method arguments

set_control_loop_zone_table(output, zone, control_loop_zone)

Configures the output zone parameters.

Args:
output (int):

Specifies which analog voltage heater output to configure (1 or 2).

zone (int):

Specifies which zone in the table to configure (1 to 10).

control_loop_zone (Model336ControlLoopZoneSettings):

See Model336ControlLoopZoneSettings 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).

Returns:
(Model336ControlLoopZoneSettings):

See Model336ControlLoopZoneSettings 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 336.

class lakeshore.model_336.Model336InputSensorSettings(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 InputSensorSettings class.

Args:
sensor_type (self.InputSensorType):

Specifies input sensor type

autorange_enable (bool):

Specifies auto-ranging (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, andself.ThermocoupleRange.

class lakeshore.model_336.Model336ControlLoopZoneSettings(upper_bound, proportional, integral, derivative, manual_out_value, heater_range, channel, rate)

Control loop configuration for a particular heater output and zone.

__init__(upper_bound, proportional, integral, derivative, manual_out_value, heater_range, channel, 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_out_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 (InputChannel):

See InputChannel IntEnum class. Passing the NONE member will use the previously assigned sensor.

rate (float):

Specifies the ramp rate for this zone ( 0 - 100 K/min).

lakeshore.model_336.Model336AlarmSettings

alias of AlarmSettings

class lakeshore.temperature_controllers.AlarmSettings(high_value, low_value, deadband, latch_enable, audible=None, visible=None, alarm_enable=None)

Class used to disable or configure an alarm in conjunction with the set/get_alarm_parameters() method.

__init__(high_value, low_value, deadband, latch_enable, audible=None, visible=None, alarm_enable=None)

Constructor for AlarmSettings class.

Args:
high_value (float):

Sets the value the source is checked against to activate the high alarm.

low_value (float):

Sets the value the source is checked against to activate low alarm.

deadband (float):

Sets the value that the source must change outside an alarm. condition to deactivate an unlatched alarm.

latch_enable (bool):

Specifies a latched alarm. False = off, True = on

audible (bool):

Specifies if the internal speaker will beep when an alarm condition occurs. False = off, True = on

visible (bool):

Specifies if the Alarm LED on the instrument front panel will blink when an alarm condition occurs. False = off, True = on

lakeshore.model_336.Model336CurveHeader

alias of CurveHeader

class lakeshore.temperature_controllers.CurveHeader(curve_name, serial_number, curve_data_format, temperature_limit, coefficient)

A class to configure the temperature sensor curve header parameters.

__init__(curve_name, serial_number, curve_data_format, temperature_limit, coefficient)

Constructor for CurveHeader class.

Args:
curve_name (str):

Specifies curve name (limit of 15 characters).

serial_number (str):

Specifies curve serial number (limit of 10 characters).

curve_data_format (IntEnum):

Member of the instrument’s CurveFormat IntEnum class. Specifies the curve data format.

temperature_limit (float):

Specifies the curve temperature limit in Kelvin.

coefficient (IntEnum):

Member of instrument’s CurveTemperatureCoefficient IntEnum class. Specifies the curve temperature coefficient.

Status Register Classes

This page describes the register objects. Each bit in the register is represented as a member of the register’s class

lakeshore.model_336.Model336StandardEventRegister

alias of StandardEventRegister

class lakeshore.model_336.Model336StatusByteRegister(message_available_summary_bit, event_status_summary_bit, service_request, operation_summary_bit)

Class object representing the status byte register LSB to MSB.

bit_names = ['', '', '', '', 'message_available_summary_bit', 'event_status_summary_bit', 'service_request', 'operation_summary_bit']
class lakeshore.model_336.Model336ServiceRequestEnable(message_available_summary_bit, event_status_summary_bit, operation_summary_bit)

Class object representing the service request enable register LSB to MSB.

bit_names = ['', '', '', '', 'message_available_summary_bit', 'event_status_summary_bit', '', 'operation_summary_bit']
lakeshore.model_336.Model336OperationEvent

alias of OperationEvent

class lakeshore.model_336.Model336InputReadingStatus(invalid_reading, temp_underrange, temp_overrange, sensor_units_zero, sensor_units_overrange)

Class object representing the input status flag bits.

bit_names = ['invalid_reading', '', '', '', 'temp_underrange', 'temp_overrange', 'sensor_units_zero', 'sensor_units_overrange']

Enumeration objects

This section describes the Enum type objects that have been created to name various settings of the Model 336 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_336.Model336Enums

Class containing the enums relevant to the Model 336.

class InputChannel(*values)

Enumeration where “NONE” is an option for sensor input.

NONE = 0
CHANNEL_A = 1
CHANNEL_B = 2
CHANNEL_C = 3
CHANNEL_D = 4
CHANNEL_D2 = 5
CHANNEL_D3 = 6
CHANNEL_D4 = 7
CHANNEL_D5 = 8
class DisplaySetupMode(*values)

Front panel display setup enum.

INPUT_A = 0
INPUT_B = 1
INPUT_C = 2
INPUT_D = 3
CUSTOM = 4
FOUR_LOOP = 5
ALL_INPUTS = 6
INPUT_D2 = 7
INPUT_D3 = 8
INPUT_D4 = 9
INPUT_D5 = 10
class InputSensorType(*values)

Sensor type enumeration.

THERMOCOUPLE is only valid with the 3060 option, CAPACITANCE is only valid with the 3061 option.

DISABLED = 0
DIODE = 1
PLATINUM_RTD = 2
NTC_RTD = 3
THERMOCOUPLE = 4
CAPACITANCE = 5
class DiodeRange(*values)

Diode voltage range enumeration

TWO_POINT_FIVE_VOLTS = 0
TEN_VOLTS = 1
class RTDRange(*values)

RTD resistance range enumeration.

THIRTY_THOUSAND_OHM and ONE_HUNDRED_THOUSAND_OHM are only valid for NTC RTDs.

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 ThermocoupleRange(*values)

Thermocouple range enumeration.

FIFTY_MILLIVOLT = 0
class HeaterOutputMode(*values)

Control loop enumeration.

OFF = 0
CLOSED_LOOP = 1
ZONE = 2
OPEN_LOOP = 3
MONITOR_OUT = 4
WARMUP_SUPPLY = 5
class HeaterRange(*values)

Current mode heater enumerations.

OFF = 0
LOW = 1
MEDIUM = 2
HIGH = 3
class HeaterVoltageRange(*values)

Voltage mode heater enumerations.

VOLTAGE_OFF = 0
VOLTAGE_ON = 1
class DisplayFieldUnits(*values)

Panel display units enumeration.

KELVIN = 1
CELSIUS = 2
SENSOR_UNITS = 3
MINIMUM_DATA = 4
MAXIMUM_DATA = 5
SENSOR_NAME = 6