{ "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 }