Gamma ion pump QPC ethernet Python library & CLI utility

Overview

Unofficial Gamma ion pump ethernet control CLI utility and library

This is a mini Python 3 library and utility that exposes some of the functions of the Gamma Vacuum QPC ion pump controller via a CLI or via a library class via it's Ethernet port.

Note: This utility is in no way associated with Gamma Vacuum and is not an official product. It's just a simple tool that emerged out of my requirements to interact with their pump controllers. There is no guarantee that this utility will work under any circumstances, won't damage your controller or will work after firmware upgrades, etc.

Installation

This package can be installed by pip. Depending on the environment and operating system:

python -m pip install gammaionctl-tspspi

or simply

pip install gammaionctl-tspspi

In case one does not want to use pip one can also simply copy src/gammaionctl/gammaionctl.py and import from this file. There are no additional dependencies for the library.

Uninstalling

Uninstalling the package is also directly possible using pip if it has been installed that way:

python -m pip uninstall gammaionctl-tspspi

or

pip uninstall gammaionctl-tspspi

Library API

The library exposes a single GammaIonPump class inside the gammactl package.

Creating an instance / connecting

To connect to an ion pump controller one simply instantiates the GammaIonPump class passing the remote host address - one can either do this explicit and call close after one's done:

pump = GammaIonPump("10.0.0.11")
# ...
pump.close()

Or one can use the with construct which is highly encouraged:

with GammaIonPump("10.0.0.11") as pump:
    # Do whatever you want

There is a setVerbose method that one can use to dump debug information on stdout. This is primarily thought for debugging purposes during development though. To enable verbose mode one can simply execute

pump.setVerbose(True)

Error handling

All methods either:

  • Return a value
  • Return None in case there is no measurement value such as pressure for a disabled pump - in this case the connection stays active
  • False in case of I/O or network errors as well as protocol violations. In this case the connection is dropped and no further commands are possible until one reconnects by reinstantiation of the connection object.

Identifying the controller

The identify method returns the identification string of the controller or False in case of failure.

Example:

id = pump.identify()
print(id) # Prints "DIGITEL QPC" for our controller

Getting estimated vacuum pressure

The pumps are able to estimate the current pressure inside the pump volume based on their pumping current. The pump index has to be 1-4 for the quad pump controller.

The method returns either:

  • the pressure in millibar as float
  • None in case there is no measurement value (for example because the pump is currently disabled)
  • False in case of a protocol violation. Then the connection has been dropped.
# Querying pressure for pump 1
pressure = pump.getPressure(1)

Getting pump voltage

For every pump one can query the pump voltage of the ion pump using getVoltage. Again the pump index has to be 1-4 for the quad pump controller.

The method returns either:

  • the voltage in Volts as float.
  • None in case there is no measurement value. Note that for a disabled pump there is a standby current in the range of a few tens of volts that seems to be used to detect if there is an pump attached.
  • False in case of a protocol violation. Then the connection has been dropped.
# Querying voltage for pump 1
volts = pump.getVoltage(1)

Getting pump current

For every pump one can query the pump current of the ion pump using getCurrent. Again the pump index has to be 1-4 for the quad pump controller.

The method returns either:

  • the current in Millivolts as float.
  • None in case there is no measurement value (for example for a disabled pump)
  • False in case of a protocol violation. Then the connection has been dropped.
# Querying current for pump 1
amps = pump.getCurrent(1)

Querying the pump size

Using getPumpSize one can query the pump capacity of the pump in liters per second (L/S) for a pump index in the range from 1-4 for the quad pump controller.

The method returns either:

  • the pump capacity in liters per second as int.
  • None in case there is no configured size (in case no pump is connected for example)
  • False in case of a protocol violation. Then the connection has been dropped.
# Querying pump capacity for pump 1
capacity = pump.getPumpSize(1)

Querying the current supply status

In addition (for human interfacing) one can query the supply status - the string shown on the controllers display - for every pump. This is done using getSupplyStatus again for a pump index in the range from 1-4 for the quad pump controller.

The method returns either:

  • the pump status as string.
  • False in case of a protocol violation. Then the connection has been dropped.
# Querying pump status for pump 1
status = pump.getSupplyStatus(1)

Starting and stopping a pump

To enable a pump that's currently disabled on can use the enable method, to stop a running pump the disable method. These methods of course also require the pump index. They either return True in case the operation succeeded (note this is idempotent so disabling a disabled pump is successful) or False in case of a protocol violation or connection error in which case the connection has been dropped.

# Enabling pump 1
pump.enable(1)
# Disabling pump 1
pump.disable(1)
You might also like...
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

Library and command-line utility for rendering projects templates.
Library and command-line utility for rendering projects templates.

A library for rendering project templates. Works with local paths and git URLs. Your project can include any file and Copier can dynamically replace v

Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.
Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.

Baselining, on steroids! Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems. The proje

cli simple python script to interact with iphone afc api based on python library( tidevice )
cli simple python script to interact with iphone afc api based on python library( tidevice )

afcclient cli simple python script to interact with iphone afc api based on python library( tidevice ) installation pip3 install -U tidevice cp afccli

Python package with library and CLI tool for analyzing SeaFlow data

Seaflowpy A Python package for SeaFlow flow cytometer data. Table of Contents Install Read EVT/OPP/VCT Files Command-line Interface Configuration Inte

Comments
  • Added tests, checking high voltage status, reading other pressure units, etc

    Added tests, checking high voltage status, reading other pressure units, etc

    Hi, I've added a few things to your code,

    • Tests
    • getHighVoltageStatus()
    • Timeout setting
    • Reading pressure units (rather than throwing an exception when they aren't mBar)
    • Raising ConnectionError with a message rather than just generic runtime error

    I also ran it through pylint (hence the changes from repl == False to repl is False).

    I did sort of make a lot of changes though (some of which are just stylistic), so I'd understand if you don't want to merge this. Just figured I'd offer!

    opened by xkstein 3
  • serial port implementation?

    serial port implementation?

    Hi, thanks for sharing this code.

    Do you think it is possible to use this codebase for the serial port as well? Our controller does not have an ethernet port. I was thinking maybe a drop-in for the socket is sufficient. If you give me some pointers I can fork and implement it myself.

    Cheers!

    enhancement 
    opened by aktentasche 1
Releases(v0.0.1)
Owner
Existing since 1985, Programming since 1992; Physicist; Love C, Java, CoQ, Erlang; Programming also Python, C++,JavaScript; Always want to understand everything
Message commands extension for discord-py-interactions

interactions-message-commands Message commands extension for discord-py-interactions README IS NOT FINISHED YET BUT IT IS A GOOD START Installation pi

2 Aug 04, 2022
WebApp Maker make web apps (Duh). It is open source and make with python and shell.

WebApp Maker make web apps (Duh). It is open source and make with python and shell. This app can take any website and turn it into an app. I highly recommend turning these few websites into webapps:

2 Jan 09, 2022
Terminal epub reader with inline images

nuber Inspired by epy, nuber is an Epub terminal reader with inline images written with Rust and Python using Überzug. Features Display images in term

Moshe Sherman 73 Oct 12, 2022
Personal and work vim 8 configuration with submodules

vimfiles Windows Vim 8 configuration files based on the recommendations of Ruslan Osipov, Keep Your vimrc file clean and The musings of bluz71. :help

1 Aug 27, 2022
🖍️This is a feature-complete clone of the awesome Chalk (JavaScript) library.

Terminal string styling done right This is a feature-complete clone of the awesome Chalk (JavaScript) library. All credits go to Sindre Sorhus. Highli

Fabian Keller 132 Dec 27, 2022
cmsis-pack-manager is a python module, Rust crate and command line utility for managing current device information that is stored in many CMSIS PACKs

cmsis-pack-manager cmsis-pack-manager is a python module, Rust crate and command line utility for managing current device information that is stored i

pyocd 20 Dec 21, 2022
Lsp Plugin for working with Python virtual environments

py_lsp.nvim What is py_lsp? py_lsp.nvim is a neovim plugin that helps with using the lsp feature for python development. It tackles the problem about

Patrick Haller 55 Dec 27, 2022
LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.

LSD (Linux Spotify Downloader) is a command line tool for downloading or rather recording content on Spotify.

Jannis Zahn 7 Jun 21, 2022
Convert shellcode into :sparkles: different :sparkles: formats!

Bluffy Convert shellcode into ✨ different ✨ formats! Bluffy is a utility which was used in experiments to bypass Anti-Virus products (statically) by f

AD995 305 Dec 17, 2022
Bringing emacs' greatest feature to neovim - Tetris!

nvim-tetris Bringing emacs' greatest feature to neovim - Tetris! This plugin is written in Fennel using Olical's project Aniseed for creating the proj

129 Dec 26, 2022
Python and data science snippets on the command line

Python Snippet Tool A tool to get Python and data science snippets at Data Science Simplified on the command line. You can read my article to learn ho

Khuyen Tran 19 Dec 21, 2022
argofloats: Simple CLI for ArgoVis and Argofloats

argofloats: Simple CLI for ArgoVis and Argofloats Argo is an international program that collects information from inside the ocean using a fleet of ro

Samapriya Roy 2 Feb 13, 2022
GoSearch for anything from your terminal

GoSearch for anything from your terminal Requirements pip install beautifulsoup4

Malik Mouhiidine 1 Oct 02, 2021
Kattis shell for getting examples, testing and submitting.

Kattis shell for getting examples, testing and submitting.

Simon Green Kristensen 15 Sep 30, 2022
A simple python implementation of a reverse shell

llehs A python implementation of a reverse shell. Note for contributors The project is open for contributions and is hacktoberfest registered! llehs u

Archisman Ghosh 2 Jul 05, 2022
A CLI based task manager tool which helps you track your daily task and activity.

CLI based task manager tool This is the simple CLI tool can be helpful in increasing your productivity. More like your todolist. It uses Postgresql as

ritik 1 Jan 19, 2022
🌈 Generate color palettes based on Neovim colorschemes.

Iris Iris is a Neovim plugin that generates a normalized color palette based on your colorscheme. It is named for the goddess Iris of Greek mythology,

N. G. Scheurich 45 Jul 28, 2022
Command-line tool for downloading and extending the RedCaps dataset.

Command-line tool for downloading and extending the RedCaps dataset.

RedCaps dataset 33 Dec 14, 2022
GitFun - A Simplified Automated CLI tool for GIT😃

GitFun A Simplified Automated CLI tool for GIT, It's for Lazy Developers and Newbies 😜 Table of contents GitFun Installation Usage Development Contri

Astaqc 8 Feb 22, 2022
Wordle helper: help you print posible 5-character words based on you input

Wordle Helper This program help you print posible 5-character words based on you

Gwan Thanakrit Juthamongkhon 4 Jan 19, 2022