pylab_ml.smu.keithley.base_keithley.Keithley

class Keithley(**kwargs)[source]

Bases: Measure

Baseclass Interface to the Keithley SMU Instruments.

The Keithley baseclass can connect to Keithley SMU instruments

inst.write('*RST')

write direct to instrument

ask=inst.query('

READ?’) write and read the answer

__init__(**kwargs)[source]

Connect and initialize.

Parameters:
  • addr (int) – interface address

  • interface (Interface) – gpib, usbserial

  • backend (str) – visa backend is either @ivi’ (or @ni’) for NI-Library or @py’ for pure python pyvisa-py backend. On default it uses @ivi’ (or @ni’) on win32 and @py’ on other platforms.

Example: Initialization
>>> instrument = Keithley(addr=24)   # GPIB or USB address
>>> instrument.init()                # connect and initialize instrument

Methods

__init__(**kwargs)

Connect and initialize.

clear()

Clear error status.

close([force])

Close connection to instrument.

com_recover([fix])

Detect & attempt to recover out of step communication (maybe after timeout).

error_list()

List of instrument errors.

find_names()

find_names() returns list of identifiers strings, lhs of = assignments

help()

identify([showInstName])

Identify message.

init([identify])

Connect to Keithley instrument and initialize.

local()

Switch back to local instrument control.

message([message])

Message display.

mfilter(input)

mqtt_add(client, instrument[, liste, qos])

Add the instrument to mqtt.

mqtt_disconnect()

Remove the instrument from mqtt.

publish(topic, value)

Publish topic as type='cmd' with paylad=value.

publish_get(function_name, value)

Publish function_name as type='get' with paylad=value.

publish_set(function_name, value)

Publish function_name as type='set' with paylad=value.

reset()

Reset and switch beep off.

setup_inst()

Setup the instrument settings.

Attributes

channel

Set/get channel number if the instrument have more than one channel.

command

id

Query IDN.

instName

Return with instname or instname[ch] if it has channels.

interchoices

measurecnt

Set/get the number of measurement to be carried out in a loop.

mqtt_enable

mqtt_list

mqtt_status

Getter for the mqtt_status.

property channel

Set/get channel number if the instrument have more than one channel.

you can also use:
>>> vdd[0].voltage = 5           # set voltage from channel 0
>>> vdd[1].current = 0.1         # set current from channel 1
>>> v = vdd[1].voltage           # measure voltage from channel 1
clear()[source]

Clear error status.

close(force=False)

Close connection to instrument.

com_recover(fix=False)[source]

Detect & attempt to recover out of step communication (maybe after timeout).

Can lose coherency between read request and data, usually because of Timeout this routine can diagnose such loss of coherency and attempt to fix it, when fix=True

error_list()[source]

List of instrument errors.

find_names()

find_names() returns list of identifiers strings, lhs of = assignments

property id

Query IDN.

identify(showInstName=False)

Identify message.

init(identify=False)[source]

Connect to Keithley instrument and initialize.

property instName

Return with instname or instname[ch] if it has channels.

json = <module 'json' from '/home/runner/miniconda3/envs/test/lib/python3.9/json/__init__.py'>
local()[source]

Switch back to local instrument control.

property measurecnt

Set/get the number of measurement to be carried out in a loop.

TODO: this function is not running yet, it is only a dummy

if the result == None than this function not implemented. The return value for the measurement is calculated togetheer with the mfilter setting.

message(message=None)[source]

Message display.

instrument message (“string”) or ()

mqtt_add(client, instrument, liste='#', qos=0)

Add the instrument to mqtt.

calling from base_instrument, after the instrument (device) has been create. Normally you have not to use this function, only base_instrument use it.

Returns:

None.

mqtt_disconnect()

Remove the instrument from mqtt.

calling from base_instrument, if the instrument are closing. Normally you have not to use this function, only base_instrument use it.

Returns:

None.

property mqtt_status

Getter for the mqtt_status.

publish(topic, value)

Publish topic as type=’cmd’ with paylad=value.

publish_get(function_name, value)

Publish function_name as type=’get’ with paylad=value.

publish_set(function_name, value)

Publish function_name as type=’set’ with paylad=value.

reset()[source]

Reset and switch beep off.

setup_inst()

Setup the instrument settings.