All Projects → OE-FET → keithley2600

OE-FET / keithley2600

Licence: MIT license
Python driver for Keithley 2600 series instruments.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to keithley2600

dev twitter
A module to make the /dev/twitter
Stars: ✭ 72 (+176.92%)
Mutual labels:  driver
mongodb-php-lib
MongoDB driver library for PHP
Stars: ✭ 16 (-38.46%)
Mutual labels:  driver
sx126x driver
Driver for SX126x radio
Stars: ✭ 41 (+57.69%)
Mutual labels:  driver
grabbitmq
A high-level RabbitMQ driver for Golang.
Stars: ✭ 16 (-38.46%)
Mutual labels:  driver
iomemory-vsl4
Updated Fusion-io iomemory VSL4 Linux (version 4.3.7) driver for recent kernels.
Stars: ✭ 42 (+61.54%)
Mutual labels:  driver
Driver-Collider
Blocks drivers from loading by using a name collision technique. #nsacyber
Stars: ✭ 40 (+53.85%)
Mutual labels:  driver
logisim-7-segment-display-driver
➿ TTL-7447-like implementation for logisim
Stars: ✭ 28 (+7.69%)
Mutual labels:  driver
node-drivers
Industrial protocol drivers in node.js
Stars: ✭ 20 (-23.08%)
Mutual labels:  driver
uchroma
An advanced driver for Razer Chroma hardware in Linux
Stars: ✭ 45 (+73.08%)
Mutual labels:  driver
windows-camera-class-filter-driver
An example of a camera class (upper) filter driver for Windows.
Stars: ✭ 27 (+3.85%)
Mutual labels:  driver
dragon
A host-based framework that transparently extends the GPU addressable global memory space beyond the host memory using NVM-backed data pointers
Stars: ✭ 49 (+88.46%)
Mutual labels:  driver
athenadriver
A fully-featured AWS Athena database driver (+ athenareader https://github.com/uber/athenadriver/tree/master/athenareader)
Stars: ✭ 116 (+346.15%)
Mutual labels:  driver
MacchinaM2-J2534-Rust
Cross platform J2534 API for Macchinas M2 UTD module
Stars: ✭ 17 (-34.62%)
Mutual labels:  driver
mongosh
The MongoDB Shell
Stars: ✭ 215 (+726.92%)
Mutual labels:  driver
stm32f7-qspi
QSPI serial flash driver for the STM32F7xx family of controllers
Stars: ✭ 14 (-46.15%)
Mutual labels:  driver
faunadb-ruby
Ruby driver for FaunaDB
Stars: ✭ 37 (+42.31%)
Mutual labels:  driver
laravel-sybase
Connection and Laravel Eloquent driver for Sybase
Stars: ✭ 29 (+11.54%)
Mutual labels:  driver
faunadb-csharp
C# driver for FaunaDB
Stars: ✭ 55 (+111.54%)
Mutual labels:  driver
rtl8822bu
RTL8822BU Wireless Driver for Linux
Stars: ✭ 59 (+126.92%)
Mutual labels:  driver
embedded-sht
Embedded SHT Drivers for Sensirion Temperature and Humidity Sensors - Download the Zip Package from the Release Page
Stars: ✭ 53 (+103.85%)
Mutual labels:  driver

PyPI Release Downloads Build Status Documentation Status

keithley2600

A full Python driver for the Keithley 2600B series of source measurement units. An accompanying GUI is provided by the sister project keithleygui. Documentation is available at https://keithley2600.readthedocs.io.

About

This driver provides access to base commands and higher level functions such as IV measurements, transfer and output curves, etc. Base commands replicate the functionality and syntax from the Keithley's internal TSP Lua functions. This is possible because the Lua programming language has a very limited syntax which can be represented by a subset of Python syntax.

All Keithley commands are dynamically queried from the Keithley itself after a successful connection. This means that essentially all Keithley instruments which use TSP scripting are supported and any commands introduced in the future will be recognised automatically (barring changes to the Lua syntax itself). Please refer to the respective reference manuals for a list of commands available on a particular model, for instance the Keithley 2600B reference manual.

This dynamic approach however means that most attributes will only be defined after connecting to an instrument. Several higher level functions for current-voltage sweeps are defined by the driver itself and may use functionality which is not available on some models. They have been tested with a Keithley 2612B.

Warning: There are currently no checks for allowed arguments by the driver itself. Passing invalid arguments to a Keithley command will fail silently in Python but will display an error message on the Keithley itself. To enable command checking, set the keyword argument raise_keithley_errors = True in the constructor. When set, most Keithley errors will be raised as Python errors. This is done by reading the Keithley's error queue after every command and will therefore result in some communication overhead.

Installation

Install the stable version from PyPi by running

$ pip install keithley2600

or the latest development version from GitHub:

$ pip install git+https://github.com/OE-FET/keithley2600

Usage

Connect to the Keithley 2600 and perform some base commands:

from keithley2600 import Keithley2600

k = Keithley2600('TCPIP0::192.168.2.121::INSTR')

k.smua.source.output = k.smua.OUTPUT_ON   # turn on SMUA
k.smua.source.levelv = -40  # sets SMUA source level to -40V
v = k.smua.measure.v()  # measures and returns the SMUA voltage
i = k.smua.measure.i()  # measures current at smuA

k.smua.measure.v(k.smua.nvbuffer1)  # measures the voltage, stores the result in buffer
k.smua.nvbuffer1.clear()  # clears nvbuffer1 of SMUA

Higher level commands defined in the driver:

data = k.read_buffer(k.smua.nvbuffer1)  # reads all entries from nvbuffer1 of SMUA
errs = k.read_error_queue()  # gets all entries from error queue

k.set_integration_time(k.smua, 0.001)  # sets integration time in sec
k.apply_voltage(k.smua, 10)  # turns on and applies 10V to SMUA
k.apply_current(k.smub, 0.1)  # sources 0.1A from SMUB
k.ramp_to_voltage(k.smua, 10, delay=0.1, stepSize=1)  # ramps SMUA to 10V in steps of 1V

# sweep commands
k.voltage_sweep_single_smu(
    k.smua, range(0, 61), t_int=0.1, delay=-1, pulsed=False
)
k.voltage_sweep_dual_smu(
    smu1=k.smua,
    smu2=k.smub,
    smu1_sweeplist=range(0, 61),
    smu2_sweeplist=range(0, 61),
    t_int=0.1,
    delay=-1,
    pulsed=False,
)
k.transfer_measurement( ... )
k.output_measurement( ... )

Singleton behaviour:

Once a Keithley2600 instance with a visa address 'address' has been created, repeated calls to Keithley2600('address') will return the existing instance instead of creating a new one. This prevents the user from opening multiple connections to the same instrument simultaneously and allows easy access to a Keithley2600 instance from different parts of a program. For example:

>>> from keithley2600 import Keithley2600
>>> k1 = Keithley2600('TCPIP0::192.168.2.121::INSTR')
>>> k2 = Keithley2600('TCPIP0::192.168.2.121::INSTR')
>>> print(k1 is k2)
True

Data structures:

The methods voltage_sweep_single_smu and voltage_sweep_dual_smu return lists with the measured voltages and currents. The higher level commands transfer_measurement and output_measurement return ResultTable objects which are somewhat similar to pandas dataframes but include support for column units. ResultTable stores the measurement data internally as a numpy array and provides information about column titles and units. It also provides a dictionary-like interface to access columns by name, methods to load and save the data to text files, and live plotting of the data (requires matplotlib).

For example:

import time
from  keithley2600 import Keithley2600, ResultTable

k = Keithley2600('TCPIP0::192.168.2.121::INSTR')

# create ResultTable with two columns
rt = ResultTable(
    column_titles=['Voltage', 'Current'],
    units=['V', 'A'],
    params={'recorded': time.asctime(), 'sweep_type': 'iv'},
)

# create live plot which updates as data is added
rt.plot(live=True)

# measure some currents
for v in range(0, 20):
    k.apply_voltage(k.smua, 10)
    i = k.smua.measure.i()
    rt.append_row([v, i])

# save the data
rt.save('~/iv_curve.txt')

See the documentation for all available methods.

Backend selection

keithley2600 uses PyVISA to connect to instruments. PyVISA supports both proprietray IVI libraries such as NI-VISA, Keysight VISA, R&S VISA, tekVISA etc. and the purely Python backend PyVISA-py. You can select a specific backend by giving its path to the Keithley2600 constructor in the visa_library argument. For example:

from  keithley2600 import Keithley2600

k = Keithley2600('TCPIP0::192.168.2.121::INSTR', visa_library='/usr/lib/libvisa.so.7')

keithley2600 defaults to using the PyVISA-py backend, selected by visa_library='@py', since this is only a pip-install away. If you pass an empty string, keithley2600 will use an installed IVI library if it can find one in standard locations or fall back to PyVISA-py otherwise.

You can find more information about selecting the backend in the PyVISA docs.

System requirements

  • Python 3.6 or higher

Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].