diff --git a/docs/examples/QDevil/QDAC2/DC_Constant.ipynb b/docs/examples/QDevil/QDAC2/DC_Constant.ipynb index 8511c7cea..219509b78 100644 --- a/docs/examples/QDevil/QDAC2/DC_Constant.ipynb +++ b/docs/examples/QDevil/QDAC2/DC_Constant.ipynb @@ -104,7 +104,7 @@ } ], "source": [ - "qdac.ch03.output_mode(range='low', low_current_limit_A=1e-7)\n", + "qdac.ch03.output_mode(range='low')\n", "scope.write('run')\n", "qdac.ch03.dc_constant_V(2)\n", "qdac.errors()" @@ -150,7 +150,7 @@ ], "source": [ "gate = qdac.channel(3)\n", - "gate.output_mode(range='high', high_current_limit_A=0.001)\n", + "gate.output_mode(range='high')\n", "scope.write('run')\n", "gate.dc_constant_V(10.0)\n", "qdac.errors()" diff --git a/qcodes_contrib_drivers/drivers/QDevil/QDAC2.py b/qcodes_contrib_drivers/drivers/QDevil/QDAC2.py index 13314645f..97fe7a15a 100644 --- a/qcodes_contrib_drivers/drivers/QDevil/QDAC2.py +++ b/qcodes_contrib_drivers/drivers/QDevil/QDAC2.py @@ -1103,22 +1103,6 @@ def __init__(self, parent: 'QDac2', name: str, channum: int): name='measurement_abort', call_cmd=f'sens{channum}:abor' ) - self.add_parameter( - name='low_current_limit_A', - label='low limit', - unit='A', - set_cmd='sour{1}:ilim:low {0}'.format('{}', channum), - get_cmd=f'sour{channum}:ilim:low?', - get_parser=float - ) - self.add_parameter( - name='high_current_limit_A', - label='high limit', - unit='A', - set_cmd='sour{1}:ilim:high {0}'.format('{}', channum), - get_cmd=f'sour{channum}:ilim:high?', - get_parser=float - ) self.add_parameter( name='measurement_count', label='count', @@ -1310,22 +1294,15 @@ def measurement(self, delay_s: float = 0.0, repetitions: int = 1, return Measurement_Context(self, delay_s, repetitions, current_range, aperture_s, nplc) - def output_mode(self, range: str = 'high', filter: str = 'high', - low_current_limit_A: float = 2e-7, - high_current_limit_A: float = 0.01 - ) -> None: - """Set the output voltage and current limits + def output_mode(self, range: str = 'high', filter: str = 'high') -> None: + """Set the output voltage Args: range (str, optional): Low or high (default) current range filter (str, optional): DC (10Hz), medium (10kHz) or high (300kHz, default) voltage filter - low_current_limit_A (float, optional): Current limit in low range - high_current_limit_A (float, optional): Current limit in high range """ self.output_range(range) self.output_filter(filter) - self.low_current_limit_A(low_current_limit_A) - self.high_current_limit_A(high_current_limit_A) def dc_list(self, voltages: Sequence[float], repetitions: int = 1, dwell_s: float = 1e-03, backwards: bool = False, diff --git a/qcodes_contrib_drivers/sims/QDAC2.yaml b/qcodes_contrib_drivers/sims/QDAC2.yaml index 2b33404f5..10057d798 100644 --- a/qcodes_contrib_drivers/sims/QDAC2.yaml +++ b/qcodes_contrib_drivers/sims/QDAC2.yaml @@ -171,20 +171,6 @@ devices: specs: valid: ["dc", "med", "high"] type: str - low_current_limit: - default: 0.0 - setter: - q: "sour{ch_id}:ilim:low {}" - getter: - q: "sour{ch_id}:ilim:low?" - r: "{}" - high_current_limit: - default: 0.0 - setter: - q: "sour{ch_id}:ilim:high {}" - getter: - q: "sour{ch_id}:ilim:high?" - r: "{}" current_count: default: 1 setter: diff --git a/qcodes_contrib_drivers/tests/QDevil/pytest.ini b/qcodes_contrib_drivers/tests/QDevil/pytest.ini index eea2c1802..38e7fabb6 100644 --- a/qcodes_contrib_drivers/tests/QDevil/pytest.ini +++ b/qcodes_contrib_drivers/tests/QDevil/pytest.ini @@ -1 +1,2 @@ [pytest] +console_output_style = classic diff --git a/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_dc.py b/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_dc.py index 7e71c535f..b6b1d0f54 100644 --- a/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_dc.py +++ b/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_dc.py @@ -70,32 +70,6 @@ def test_select_voltage_filter(selector, qdac): # noqa ] -def test_current_limit_low(qdac): # noqa - current = 5e-9 - # ----------------------------------------------------------------------- - qdac.ch02.low_current_limit_A(current) - limit = qdac.ch02.low_current_limit_A() - # ----------------------------------------------------------------------- - assert limit == current - assert qdac.get_recorded_scpi_commands() == [ - f'sour2:ilim:low {current}', - 'sour2:ilim:low?' - ] - - -def test_current_limit_high(qdac): # noqa - current = 5e-3 - # ----------------------------------------------------------------------- - qdac.ch02.high_current_limit_A(current) - limit = qdac.ch02.high_current_limit_A() - # ----------------------------------------------------------------------- - assert limit == current - assert qdac.get_recorded_scpi_commands() == [ - f'sour2:ilim:high {current}', - 'sour2:ilim:high?' - ] - - @pytest.mark.parametrize('u', [-1.0, 0.0, 1]) def test_dc_voltage_low(u, qdac): # noqa # ----------------------------------------------------------------------- diff --git a/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_list.py b/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_list.py index b61488a70..a9078a7f5 100644 --- a/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_list.py +++ b/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_list.py @@ -251,13 +251,10 @@ def test_list_trigger_on_external(qdac): # noqa def test_list_get_voltages(qdac): # noqa - qdac.start_recording_scpi() dc_list = qdac.ch01.dc_list(voltages=[-0.123, 0, 1.234]) # ----------------------------------------------------------------------- voltages = dc_list.values_V() # ----------------------------------------------------------------------- - x = qdac.get_recorded_scpi_commands() - print(x) assert voltages == [-0.123, 0, 1.234] diff --git a/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_output_mode.py b/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_output_mode.py index f38a68735..baed3526a 100644 --- a/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_output_mode.py +++ b/qcodes_contrib_drivers/tests/QDevil/test_sim_qdac2_source_output_mode.py @@ -1,4 +1,3 @@ -import pytest from .sim_qdac2_fixtures import qdac # noqa @@ -9,8 +8,6 @@ def test_output_mode_defaults(qdac): # noqa assert qdac.get_recorded_scpi_commands() == [ 'sour2:rang high', 'sour2:filt high', - 'sour2:ilim:low 2e-07', - 'sour2:ilim:high 0.01', ] @@ -19,13 +16,9 @@ def test_output_mode_arg(qdac): # noqa qdac.ch02.output_mode( range='low', filter='dc', - low_current_limit_A=50e-12, - high_current_limit_A=0.00001 ) # ----------------------------------------------------------------------- assert qdac.get_recorded_scpi_commands() == [ 'sour2:rang low', 'sour2:filt dc', - 'sour2:ilim:low 5e-11', - 'sour2:ilim:high 1e-05', ]