electrical instrument control
Project description
instrbuilder is an open-source Python package for control of electrical instruments. This package eases the development of high-level "drivers" to interface with oscilloscopes, power supplies, function generators, multimeters, or any instrument that uses ASCII textual string communication (such as SCPI [@scpi1999standard]). instrbuilder is particularly suited for prototying and automating experiments in research laboratory setups within an IPython terminal. Our goals are to accelerate the development of automated data collection and improve the reproducibility of laboratory experiments.
Documentation
https://lucask07.github.io/instrbuilder/build/html/
Installation Steps
-
Install a VISA driver (National Instruments provides free downloads)
-
Install instrbuilder
username$ python -m pip instrbuilder
- If using the Bluesky suite uninstall ophyd and re-install from a git fork:
username$ python -m pip uninstall ophyd
username$ python -m pip install git+https://github.com/lucask07/ophyd@master#egg=ophyd
Getting Started
-
Command lists for Keysight oscilloscopes, function generator, DMM; Rigol DC Power Supply (commands.csv) are included in the package at: instrbuilder/instruments/
-
A YAML file is used to track your specific system configurations and instrument addresses (e.g.USB0::0x0957::0x0407::MY44060286::INSTR). Modify the example YAML file and move to ~/.instrbuilder/ OR create your own
-
Try an example in the source code at instrbuilder/examples/. For example: oscilloscope.py
Create Your Own YAML
- Initialize a YAML (specify the first parameter, the other 3 should always be default):
from instrbuilder import instrument_opening
instrument_opening.init_yaml(csv_dir = 'where/your/commands_csv/files/are',
cmd_name = 'commands.csv',
lookup_name = 'lookup.csv',
filename = 'config.yaml')
- Add instruments to the YAML function use the script found in instrbuilder\examples\add_instruments_to_config.py. This will prompt the user for information. Note that it may be helpful to have only one instrument connected/powered at a time so that there is no ambiguity:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for instrbuilder-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f05be7a5766eac44c76b2b38cd5edace7e4f3ec121ab4ad1ab1d515273daed77 |
|
MD5 | 799ba735ec3e9984f45cd9a719caff0d |
|
BLAKE2b-256 | f329bae1be2d92dae1f9ae22d5d94536a556f5348dfdd09e39b314abff22abf3 |