This page was generated from docs/examples/driver_examples/QCodes example with Keithley S46.ipynb. Interactive online version: Binder badge.

QCoDeS Example with Tektronix Keithley S46

The S46 is an RF swicth with four relays “A” to “D”. These relays either have four or six poles, depending on the instrument model. Each pole constitutes a channel and can either be “open” or “closed”. Channel “A1” is attached to the first pole on relay “A”, channel “B2” is attached to the second pole of relay “B”, etc…

Channels “A1” to “D6” are all “normally open”. Only one channel per relay may be closed.

Additionally, there are optionally eight relays “R1” to “R8” which are two pole relays. One pole is “normally closed” and the other “normally open”. For these relays, we have one channel per relay, so “R1” is both a channel and a relay. Upon closing the channel, the normally open pole will close.

In this notebook, we have verified with a multi-meter that channels indeed open and close as expected.

Note: We have performed tests with a six pole instrument. Although it is expected that this driver should work with a four pole instrument, this has not been verified due to a lack of instrument availability

[1]:
from qcodes.instrument_drivers.Keithley import (
    KeithleyS46,
    KeithleyS46LockAcquisitionError,
)
[2]:
s46 = KeithleyS46("s2", "GPIB0::7::INSTR")
[3]:
print(s46.available_channels)
print(len(s46.available_channels))
['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'D1', 'D2', 'D3', 'D4', 'D5', 'D6', 'R5', 'R8']
26
[4]:
s46.closed_channels()
[4]:
['A2', 'B1']
[5]:
s46.open_all_channels()
[6]:
s46.closed_channels()
[6]:
[]
[7]:
s46.A1()
[7]:
'open'
[8]:
s46.A1("close")
[9]:
s46.A1()
[9]:
'close'
[10]:
s46.closed_channels()
[10]:
['A1']
[11]:
try:
    s46.A2("close")
    raise("We should not be here")
except KeithleyS46LockAcquisitionError as e:
    print(e)
Relay A is already in use by channel 1
[12]:
s46.A1("open")
[13]:
s46.A2("close")
[14]:
try:
    s46.A1("close")
    raise("We should not be here")
except KeithleyS46LockAcquisitionError as e:
    print(e)
Relay A is already in use by channel 2
[15]:
s46.B1("close")
[16]:
try:
    s46.B2("close")
    raise("We should not be here")
except KeithleyS46LockAcquisitionError as e:
    print(e)
Relay B is already in use by channel 7
[17]:
s46.closed_channels()
[17]:
['A2', 'B1']
[18]:
s46.open_all_channels()
[19]:
s46.closed_channels()
[19]:
[]
[ ]: