Skip to main content

A Python interface to Hamilton liquid-handling robots

Project description

PyHamilton

Python for Hamilton liquid handling robots

Hamilton software only works on Windows, so the same goes for PyHamilton.

Developed for Hamilton STAR and STARlet on Windows XP, Windows 7, and Windows 10. VANTAGE series supported with plugin. Other robot models and operating systems not supported yet.

Contact: contactpyhamilton@gmail.com for questions, ideas, or help with installation.

Example usage

if __name__ == "__main__":

    from pyhamilton import HamiltonInterface, INITIALIZE
    with HamiltonInterface() as ham_int:
    
        ham_int.wait_on_response(ham_int.send_command(INITIALIZE))

Documentation

Available online.

Installation

  1. Install and test the standard Hamilton software suite for your system.

  2. Install 32-bit python 3.6.3, preferably using the executable installer at https://www.python.org/downloads/release/python-363/. Python 3.7+ is known to cause an installation issue with some required pythonnet/pywin32 modules.

  3. Make sure git is installed. https://git-scm.com/download/win

  4. Make sure you have .NET framework 4.0 or higher installed. https://www.microsoft.com/en-us/download/details.aspx?id=17851

  5. Install Hamilton library dependencies HSLJson and HSLHttp by running executable installers "HSLJson Library v1.6 Installer.exe" and "Hamilton HSLHttp Library Installer Version 2.7.exe" located in ./bin.

  6. Copy+paste the files from /library into your (path to hamilton install)/HAMILTON/Library folder These will ensure you have all the libraries you need in addition to the aforementioned HSLJson and HSLHttp libraries which are installed with executables.

  7. Update your pip and setuptools.

    > python -m pip install --upgrade pip
    > pip install --upgrade setuptools
    
  8. Install pyhamilton.

    pip install git+https://github.com/dgretton/pyhamilton.git#egg=pyhamilton
    
  9. Run. If you have other Python versions installed, always run pyhamilton with py yourmethod.py (the bundled Python launcher, which interprets shebangs) or python3 yourmethod.py

Installation Troubleshooting

  1. If you encounter an error relating to HxFan (i.e., your robot does not have a fan), open pyhamilton/star-oem/VENUS_Method/STAR_OEM_Test.med, navigate to the "HxFan" grouping, and delete all commands under this grouping.

  2. If you would like to test your PyHamilton installation on a computer not connected to a Hamilton robot, use HamiltonInterface(simulate=True) to open your interface inside your robot script.

  3. If your initialization hangs (such as on initial_error_example.py), try these steps:
    a. Make sure you don't have any other program running which is communicating with the robot e.g. Venus run control
    b. Make sure the .dlls referenced in __init__.py are unblocked. See this StackOverflow thread for more details.

Please see the list of Ongoing Projects for information on other issues with PyHamilton

Ongoing Projects

PyHamilton is an open-source project, and we have a ton of work to do! If you'd like to contribute to the PyHamilton project, please consider these following areas of ongoing work and don't hesitate to reach out if you want to discuss collaborating with the team.

  • PyHamilton for Nimbus: Right now PyHamilton only works on the STAR line of liquid-handling robots, but we have recently received the appropriate libraries for expanding the framework to Hamilton Nimbus, a much more affordable and low-footprint robot. This project is in its very early stages so collaborators will have the opportunity to influence crucial design decisions.
  • PyHamilton for Linux: One of the biggest limitations for PyHamilton, Hamilton robots, and much of lab automation in general is their exclusive dependence on Windows as an operating system. We are working to recreate the Venus application (which runs on Windows and which PyHamilton depends on in turn) as a Python library, so that PyHamilton will effectively become OS-agnostic. This is a truly massive undertaking but we have made considerable progress due to incredibly talented team member Rick Wierenga.
  • Host on a package management repository: PyHamilton is not available on any package managers such as PyPI or Conda except by installing from this repo. This has been a nightmare for distributing updates to the user community, who must delete and reclone the package anytime they wish to update.
  • Make PyHamilton compatible with recent releases of Python: PyHamilton is currently restricted to Python 3.6 due to its dependency tree including older versions of some packages. We'd massively appreciate any help in bringing us up to date with more recent versions of Python.

Applications

Developed for the Sculpting Evolution Group at the MIT Media Lab

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhamilton-1.5.tar.gz (6.5 MB view details)

Uploaded Source

Built Distribution

pyhamilton-1.5-py3-none-any.whl (916.2 kB view details)

Uploaded Python 3

File details

Details for the file pyhamilton-1.5.tar.gz.

File metadata

  • Download URL: pyhamilton-1.5.tar.gz
  • Upload date:
  • Size: 6.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for pyhamilton-1.5.tar.gz
Algorithm Hash digest
SHA256 e2036ed92b7c6fda72c77056b314f48e599ca00f90ccd7146903bdb444937041
MD5 7f3a11a58157090cd1ba4078b1642414
BLAKE2b-256 3e03d86c5ab2c9821168cd99e32ff22a5ff63c14f38247ab7cb84060137893f6

See more details on using hashes here.

File details

Details for the file pyhamilton-1.5-py3-none-any.whl.

File metadata

  • Download URL: pyhamilton-1.5-py3-none-any.whl
  • Upload date:
  • Size: 916.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for pyhamilton-1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 93bbdb7e28ae57c4b42a00b5278926413974971d810da550e38667de8213433f
MD5 f84b33d3300f8f7d4abea92d6b85cc29
BLAKE2b-256 fc05b130d43ef86420872c6e052ae2287ad93ca90b2fcd64e7d4f015b949136c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page