I would like to know if it’s possible to use Hamilton Library with integrations with other laboratory machines using PyHamilton.
Yes absolutely. You will want to navigate to the universal method at pyhamilton\star-oem\VENUS_Method\STAR_OEM_noFan.med. There are many equipment interfaces in that file that you can use as references for how to do this. Here is a small guide that can help you get started:
We may already have the equipment you need integrated with the universal method, so check for that first.
Also, if your equipment is not Hamilton issued, we tend to not integrate this directly into the PyHamilton library. Instead, we use the API the manufacturer for that equipment provided to create a pure Python interface. This achieves the same functionality but with much greater flexibility, especially with being able to do parallelized operations with multithreading. For instance, if you want to integrate a centrifuge, you can run the centrifuge and do robot actions simultaneously through a pure Python interface.
After adding the command to default commands and utils, what’s the best way to reinstall the package so that I can import the function/command? I know this question doesn’t only pertain to pyhamilton, though I’m struggling to find an answer online anywhere. Thanks!
Best way to do this is to git clone the repo and then cd inside the repo and do a project install with
pip install -e .
Once you’ve done that any changes you make to the local repo are immediately reflected in the installed library. There’s no reinstall or updates necessary. I do this all the time for packages that I continuously develop.
Just curious what did you add/ do you plan on adding?
I added a command to move the auto load. I was actually a little surprised it wasn’t already in there. We have an annoying problem on our machine where sometimes after initialization the auto load stays at track 1 so I’ve made it a habit to always move it to the last track after initialization.
Edit: also thanks, your method to install worked and was easy
Thats awesome! Id love to get it pulled into the main repo if you want to open a pull request.
Just created the pull request, I also had made some changes because one of the Inheco TEC commands was throwing an error for me in the toolkit sub method, but feel free to edit that out.
Cool thanks! Ill check it out soon.