Skip to content
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/8756.improved_driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The `Keithley_2600.yaml` pyvisa-sim file now also defines the resources `GPIB::3::INSTR` and `GPIB::4::INSTR`,
so that up to four simulated Keithley 2600 instruments with independent state can be used at the same time.
6 changes: 6 additions & 0 deletions src/qcodes/instrument/sims/Keithley_2600.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,9 @@ resources:

GPIB::2::INSTR:
device: Keithley

GPIB::3::INSTR:
device: Keithley

GPIB::4::INSTR:
device: Keithley
24 changes: 24 additions & 0 deletions tests/drivers/test_keithley_26xx.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from qcodes.dataset import LinSweep
from qcodes.instrument_drivers.Keithley import (
Keithley2600,
Keithley2600MeasurementStatus,
Keithley2614B,
)
Expand Down Expand Up @@ -47,6 +48,29 @@ def test_idn(driver: Keithley2614B) -> None:
} == driver.IDN()


def test_four_sim_addresses_have_independent_state() -> None:
voltages = {1: 1.5, 2: -0.5, 3: 0.25, 4: 2.0}
drivers: list[Keithley2600] = []
try:
for gpib_address in voltages:
drivers.append(
Keithley2600(
f"Keithley_2600_{gpib_address}",
address=f"GPIB::{gpib_address}::INSTR",
pyvisa_sim_file="Keithley_2600.yaml",
)
)

for driver, voltage in zip(drivers, voltages.values(), strict=True):
driver.smua.volt(voltage)

for driver, voltage in zip(drivers, voltages.values(), strict=True):
assert driver.smua.volt() == voltage
finally:
for driver in drivers:
driver.close()


def test_smu_channels_and_their_parameters(driver: Keithley2614B) -> None:
assert {"smua", "smub"} == set(driver.submodules.keys())

Expand Down
Loading