Skip to content

Lakeshore_340

Lakeshore_340(*args, **kwargs)

Bases: Instrument

Class for controlling the Lakeshore 340 temperature controller.

Initializes the Lakeshore 340 instrument.

clear()

Clears the instrument's status.

Returns:

Name Type Description
int int

Status code indicating the success of the operation.

clear_event_register()

Clears the event status register.

Returns:

Name Type Description
int int

Status code indicating the success of the operation.

get_alarm()

Queries the alarm status of the instrument.

Returns:

Name Type Description
dict dict

A dictionary containing alarm details: - state (str): The alarm state. - high_value (str): The high alarm value. - low_value (str): The low alarm value. - deadband (str): The deadband value. - latch (str): The latch state. - audible (str): The audible alarm state. - visible (str): The visible alarm state.

get_analog_output()

Queries the analog output value.

Returns:

Name Type Description
float float

The analog output value.

get_curve_header(curve_index)

Queries the curve header information.

Parameters:

Name Type Description Default
curve_index int

The index of the curve.

required

Returns:

Name Type Description
str str

The curve header information.

get_curve_point(curve_index, point_index)

Queries a specific point on a curve.

Parameters:

Name Type Description Default
curve_index int

The index of the curve.

required
point_index int

The index of the point on the curve.

required

Returns:

Name Type Description
str str

The curve point information.

get_display_contrast()

Queries the current display contrast level.

Returns:

Name Type Description
int int

The current display contrast level.

get_display_setup()

Queries the current display setup.

Returns:

Type Description
List[int]

List[int]: A list of integers representing the display setup.

get_ramp(output_channel)

Queries the ramp rate for a specific output channel.

Parameters:

Name Type Description Default
output_channel OutputChannel

The output channel to query.

required

Returns:

Name Type Description
float float

The ramp rate.

get_setpoint(output_channel)

Queries the setpoint for a specific output channel.

Parameters:

Name Type Description Default
output_channel OutputChannel

The output channel to query.

required

Returns:

Name Type Description
float float

The setpoint value.

get_temperature(input_channel)

Queries the temperature reading for a specific input channel.

Parameters:

Name Type Description Default
input_channel InputChannel

The input channel to query.

required

Returns:

Name Type Description
float float

The temperature reading.

identify()

Identifies the instrument.

Returns:

Name Type Description
str str

The identification string of the instrument.

reset()

Resets the instrument to its default state.

Returns:

Name Type Description
int int

Status code indicating the success of the operation.

set_autotune_pid(output, mode)

Sets the autotune PID mode for a specific output channel.

Parameters:

Name Type Description Default
output int

The output channel to configure.

required
mode int

The autotune mode to set.

required

Returns:

Name Type Description
int int

Status code indicating the success of the operation.

set_curve_header(curve_index, name, serial_no, curve_format, upper_limit, coefficient)

Sets the curve header information.

Parameters:

Name Type Description Default
curve_index int

The index of the curve.

required
name str

The name of the curve.

required
serial_no str

The serial number of the curve.

required
curve_format int

The format of the curve.

required
upper_limit int

The upper limit of the curve.

required
coefficient int

The coefficient of the curve.

required

Returns:

Name Type Description
int int

Status code indicating the success of the operation.

set_curve_point(curve_index, point_index, sensor, temperature)

Sets a specific point on a curve.

Parameters:

Name Type Description Default
curve_index int

The index of the curve.

required
point_index int

The index of the point on the curve.

required
sensor float

The sensor value.

required
temperature float

The temperature value.

required

Returns:

Name Type Description
int int

Status code indicating the success of the operation.

set_display_contrast(contrast)

Sets the display contrast level.

Parameters:

Name Type Description Default
contrast int

The desired display contrast level.

required

Returns:

Name Type Description
int int

Status code indicating the success of the operation.

set_display_setup(mode)

Sets the display mode.

Parameters:

Name Type Description Default
mode int

The desired display mode.

required

Returns:

Name Type Description
int int

Status code indicating the success of the operation.

set_ramp(output_channel, state, rate)

Sets the ramp configuration for a specific output channel.

Parameters:

Name Type Description Default
output_channel OutputChannel

The output channel to configure.

required
state State

The state of the ramp (ON/OFF).

required
rate float

The ramp rate.

required

Returns:

Name Type Description
int int

Status code indicating the success of the operation.

set_setpoint(output_channel, setpoint)

Sets the setpoint for a specific output channel.

Parameters:

Name Type Description Default
output_channel OutputChannel

The output channel to configure.

required
setpoint float

The desired setpoint value.

required

Returns:

Name Type Description
int int

Status code indicating the success of the operation.