Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/api/pylabrobot.kbioscience.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. currentmodule:: pylabrobot.kbioscience

pylabrobot.kbioscience package
==============================

.. currentmodule:: pylabrobot.kbioscience.kube

.. autosummary::
:toctree: _autosummary
:nosignatures:
:recursive:

KBioscienceKUBE
KUBEStatus
SealPreset
KBioscienceError
1 change: 1 addition & 0 deletions docs/api/pylabrobot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Manufacturers
pylabrobot.byonoy
pylabrobot.hamilton
pylabrobot.inheco
pylabrobot.kbioscience
pylabrobot.kbiosystems
pylabrobot.liconic
pylabrobot.mettler_toledo
Expand Down
1 change: 1 addition & 0 deletions docs/user_guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ brooks/index
byonoy/index
hamilton/index
inheco/index
kbioscience/index
kbiosystems/index
liconic/index
mettler_toledo/index
Expand Down
7 changes: 7 additions & 0 deletions docs/user_guide/kbioscience/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# KBioscience

```{toctree}
:maxdepth: 1

kube/hello-world
```
113 changes: 113 additions & 0 deletions docs/user_guide/kbioscience/kube/hello-world.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "kube-intro",
"source": "# KBioscience KUBE\n\nThe KUBE is a thermal plate sealer for microplates from KBioscience, controlled over an RS-232 serial interface.\n\n| Property | Value |\n|---|---|\n| Communication | Serial / RS-232, ASCII command protocol |\n| Serial settings | 9600 baud, 8 data bits, no parity, 1 stop bit, no handshake |\n| Terminator | CR (`\\r`) |\n\n```{warning}\nThis driver has NOT been tested against hardware in PyLabRobot. If you verify\nit on a sealer, please open a PR to remove the not-tested warning.\n```",
"metadata": {}
},
{
"cell_type": "markdown",
"id": "kube-setup-md",
"source": "## Physical setup\n\nConnect the sealer's RS-232 port to your computer, typically through a USB-to-serial adapter. Make sure the sealer's serial parameters match the driver defaults (9600 baud, 8 data bits, no parity, 1 stop bit, no handshake). A unit running the older ALPS300 protocol is not supported and is rejected at setup.",
"metadata": {}
},
{
"cell_type": "markdown",
"id": "kube-connect-md",
"source": "## Connect\n\n`setup()` opens the serial port, waits for the device to be ready, reads the firmware version and product name, sets the plate orientation, and pre-heats to the preheating temperature. It also logs the not-tested warning.",
"metadata": {}
},
{
"cell_type": "code",
"id": "kube-connect-code",
"source": "from pylabrobot.kbioscience import KBioscienceKUBE\n\nsealer = KBioscienceKUBE(port=\"/dev/ttyUSB0\") # replace with your port\nawait sealer.setup()",
"metadata": {},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"id": "kube-seal-md",
"source": "## Seal a plate\n\n`seal()` applies the time and temperature, waits for the heater to reach the setpoint, seals the plate, then returns to the idle temperature. Sealing time is 0.5–9.9 s; temperature is 5–199 °C.",
"metadata": {}
},
{
"cell_type": "code",
"id": "kube-seal-code",
"source": "await sealer.seal(temperature=170, duration=2.5)",
"metadata": {},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"id": "kube-preset-md",
"source": "## Seal with a stored preset\n\nInstead of a user-defined time and temperature, seal with one of the six presets stored on the instrument.",
"metadata": {}
},
{
"cell_type": "code",
"id": "kube-preset-code",
"source": "from pylabrobot.kbioscience import SealPreset\n\nawait sealer.seal(preset=SealPreset.ONE)",
"metadata": {},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"id": "kube-temp-md",
"source": "## Temperature\n\nSet the sealing temperature setpoint and read the current heater temperature.",
"metadata": {}
},
{
"cell_type": "code",
"id": "kube-temp-code",
"source": "await sealer.set_temperature(160)\nprint(\"Current temperature:\", await sealer.request_temperature(), \"C\")",
"metadata": {},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"id": "kube-status-md",
"source": "## Status\n\nRead the status byte as a set of flags.",
"metadata": {}
},
{
"cell_type": "code",
"id": "kube-status-code",
"source": "print(\"Status:\", await sealer.request_status())",
"metadata": {},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"id": "kube-teardown-md",
"source": "## Teardown",
"metadata": {}
},
{
"cell_type": "code",
"id": "kube-teardown-code",
"source": "await sealer.stop()",
"metadata": {},
"execution_count": null,
"outputs": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.11.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
6 changes: 6 additions & 0 deletions pylabrobot/kbioscience/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from .kube import (
KBioscienceError,
KBioscienceKUBE,
KUBEStatus,
SealPreset,
)
Loading
Loading