Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LakeShore335: add power output parameters #6248

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/changes/newsfragments/6248.improved_driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Add power output parameters to LakeShore335 driver,
this allows to configure the maximum heater current.
65 changes: 61 additions & 4 deletions src/qcodes/instrument_drivers/Lakeshore/lakeshore_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,67 @@ def __init__(
parameter_class=GroupParameter,
)
"""The value for closed control loop Derivative (rate)"""
self.pid_group = Group([self.P, self.I, self.D],
set_cmd=f'PID {output_index}, '
f'{{P}}, {{I}}, {{D}}',
get_cmd=f'PID? {output_index}')
self.pid_group = Group(
[self.P, self.I, self.D],
set_cmd=f"PID {output_index},{{P}},{{I}},{{D}}",
get_cmd=f"PID? {output_index}",
)

self.output_type: GroupParameter = self.add_parameter(
name="output_type",
docstring="Output type (Output 2 only): 0=Current, 1=Voltage",
val_mapping=(
{"current": 0, "voltage": 1} if output_index == 1 else {"current": 0}
),
parameter_class=GroupParameter,
)
"""Output type (Output 2 only): 0=Current, 1=Voltage"""

self.output_heater_resistance: GroupParameter = self.add_parameter(
name="output_heater_resistance",
docstring="Heater Resistance Setting: 25/50ohm",
val_mapping={"25ohm": 1, "50ohm": 2},
parameter_class=GroupParameter,
)
"""Heater Resistance Setting: 25/50ohm"""

self.output_max_current: GroupParameter = self.add_parameter(
name="output_max_current",
docstring="Specifies the maximum heater output current: User Specified, 0.707 A, 1 A, 1.141 A, 1.732",
val_mapping={"user": 0, "0.707A": 1, "1A": 2, "1.141A": 3, "1.732A": 4},
parameter_class=GroupParameter,
)
"""Specifies the maximum heater output current: User Specified, 0.707 A, 1 A, 1.141 A, 1.732"""

self.output_max_user_current: GroupParameter = self.add_parameter(
name="output_max_user_current",
docstring="Specifies the maximum heater output current if max current is set to User Specified.",
vals=vals.Numbers(0, 1.732),
unit="A",
get_parser=float,
parameter_class=GroupParameter,
)
"""Specifies the maximum heater output current if max current is set to User Specified."""

self.output_display: GroupParameter = self.add_parameter(
name="output_display",
docstring="Specifies whether the heater output displays in current or power (current mode only)",
val_mapping={"current": 1, "power": 2},
parameter_class=GroupParameter,
)
"""Specifies whether the heater output displays in current or power (current mode only)"""

self.heater_group = Group(
[
self.output_type,
self.output_heater_resistance,
self.output_max_current,
self.output_max_user_current,
self.output_display,
],
set_cmd=f"HTRSET {output_index},{{output_type}},{{output_heater_resistance}},{{output_max_current}},{{output_max_user_current}},{{output_display}}",
get_cmd=f"HTRSET? {output_index}",
)

self.output_range: Parameter = self.add_parameter(
"output_range",
Expand Down
Loading