Is it possible to stop or pause protocol execution on OT-2 robots using PyLabRobot? Reading through the docs, I was not able to find this functionality however an Opentrons employee seemed to indicate that this is possible using HTTP requests, which as I understand it, is how PyLabRobot communicates with the Opentrons robots.
The lab I work in uses the Opentrons App to run our protocols but we are looking to move towards a custom interface. However, for our use-case we need to be able to pause/resume our protocols.
Thanks!
hello and welcome to the forum!
PLR indeed uses HTTP requests to communicate with the OT.
With PLR, you “start a protocol” by calling lh.setup
and “stop” it by calling lh.stop
. I put this in quotes because you can do work before you call lh.setup, and you can also call lh.setup multiple times (after lh.stop) if you need to.
Further, all commands in PLR are interactive, meaning they are just executed when a method is called. This is different from how protocols are run in the standard opentrons app, where they are executed start to finish.
With PLR, it’s very useful because you can use it to dynamically determine the steps while your “protocol” is running. Check out this demo for an example: GitHub - rickwierenga/pylabrobot-art-studio: Art Studio for PyLabRobot (demo project). Here, users can paint pictures on a 96-well plate and submit them to a server, and on the admin dashboard thse paintings can be dynamically chosen for execution _while the program/“protocol” is running… You can imagine a simpler system where single aspirations/dispenses are executed. The interactivity also allows you to develop protocols in a jupyter notebook.
If you need to be able to stop, you can simply have a check before your method is executed say if not stopped
, and then at a later point return to that checkpoint. This is relatively simple Python programming, and very much independent of lab automation/PLR. Similarly, you can simply send an interrupt using ctrl-z on unix/mac based systems.
It sounds like PLR can help you do what you want. Don’t hesitate if you have any furhter questions
Hi @lucorpo,
yes you can pause the protocol. We’ve built a connector for that based on the HTTP API. You can also upload new protocols, create runs etc. etc.
What exactly do you mean by custom interface? Are you building your web-app for this? If yes, let’s talk. There could be quite some overlap here.