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
⌨ Toward a more useful keyboard

Toward a more useful keyboard Steve Losh's Modern Space Cadet is an inspiration. It opened my eyes to the fact that there's a more useful keyboard hid

Jason Rudolph 1.7k Jan 01, 2023
A CLI Spigot plugin manager that adheres to Unix conventions and Python best practices.

Spud A cross-platform, Spigot plugin manager that adheres to the Unix philosophy and Python best practices. Some focuses of the project are: Easy and

Tommy Dougiamas 9 Dec 02, 2022
Themes for Windows Terminal

Windows Terminal Themes Preview and copy themes for the new Windows Terminal. Use the project at windowsterminalthemes.dev How to use the themes This

Tom 1.1k Jan 03, 2023
A command line tool made in Python for the popular rhythm game

osr!name A command line tool made in Python for the popular rhythm game "osu!" that changes the player name of a .osr file (replay file). Example: Not

2 Dec 28, 2021
⚙ A lightweight command line interface library for creating commands.

⚙ A lightweight command line interface library for creating cli commands. About | Installation | Usage | Features | Contributors | License About Next:

Serum 16 Sep 25, 2022
organize your books on the command line

organize your books on the command line

Ben Winston 19 Jan 21, 2022
A clone of the popular online game Wordle

wordle_clone A CLI application for wordle. Description A clone of the popular online game Wordle.

0 Jan 29, 2022
OneDriveExplorer - A command line and GUI based application for reconstructing the folder structure of OneDrive from the UserCid.dat file

OneDriveExplorer - A command line and GUI based application for reconstructing the folder structure of OneDrive from the UserCid.dat file

Brian Maloney 100 Dec 13, 2022
Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Phil Wang 4.4k Jan 09, 2023
Juniper Command System is a Micro CLI Tool that allows you to manage your files, launch applications, as well as providing extra tools for OS Management.

Juniper Command System is a Micro CLI Tool that allows you to manage your files, launch applications, as well as providing extra tools for OS Management.

Juan Carlos Juárez 1 Feb 02, 2022
Python3 command-line tool for the inference of Boolean rules and pathway analysis on omics data

BONITA-Python3 BONITA was originally written in Python 2 and tested with Python 2-compatible packages. This version of the packages ports BONITA to Py

1 Dec 22, 2021
A simple cli tool to commit Conventional Commits

convmoji A simple cli tool to commit Conventional Commits. Requirements Install pip install convmoji convmoji --help Examples A conventianal commit co

3 Jul 04, 2022
A command line tool to query source code from your current Python env

wxc wxc (pronounced "which") allows you to inspect source code in your Python environment from the command line. It is based on the inspect module fro

Clément Robert 13 Nov 08, 2022
The Prisma Cloud CLI is a command line interface for Prisma Cloud by Palo Alto Networks.

Prisma Cloud CLI The Prisma Cloud CLI is a command line interface for Prisma Cloud by Palo Alto Networks. Support This project has been developed by P

Palo Alto Networks 13 Oct 14, 2022
topalias - Linux alias generator from bash/zsh command history with statistics, written on Python.

topalias topalias - Linux alias generator from bash/zsh command history with statistics, written on Python. Features Generate short alias for popular

Sergey Chudakov 38 May 26, 2022
Simple CLI tool to track your cryptocurrency portfolio in real time.

Simple tool to track your crypto portfolio in realtime. It can be used to track any coin on the BNB network, even obscure coins that are not listed or trackable by major portfolio tracking applicatio

Trevor White 69 Oct 24, 2022
Access hacksec.in from your command-line

Access hacksec.in from your command-line

hacksec.in 3 Oct 26, 2022
Python script to tabulate data formats like json, csv, html, etc

pyT PyT is a a command line tool and as well a library for visualising various data formats like: JSON HTML Table CSV XML, etc. Features Print table o

Mobolaji Abdulsalam 1 Dec 30, 2021
Voidlx is a terminal cli apps launcher made in python

Voidlx is a terminal cli apps launcher made in python

2 Nov 13, 2021
A command line interface to interact with the Hypixel api allowing the user to get stats, leaderboards, etc

HyConsole is a way to get data on players and leaderboards from the Hypixel Minecraft server from the command line. Keep in mind I have no a

1 Feb 14, 2022