{ "cells": [ { "cell_type": "markdown", "id": "fc3ebf5f", "metadata": {}, "source": [ "# Inheco SCILA\n", "\n", "| Summary | Image |\n", "|------------|--------|\n", "| |
![scila](img/inheco_scila.png)
Figure: Inheco SCILA
|" ] }, { "cell_type": "markdown", "id": "201cd7c5", "metadata": {}, "source": "## Setup (Physical)\n\nThe SCILA communicates over Ethernet using the SiLA 2 protocol. To connect, you need:\n1. The IP address of the SCILA on your network.\n2. (Optional) The IP address of your client machine — auto-detected if omitted.\n\nThe backend starts a local HTTP server to receive asynchronous responses from the SCILA." }, { "cell_type": "markdown", "id": "ee0d5aa9-d897-480b-b292-9b375807ec5b", "metadata": {}, "source": "## Setup (Programmatic)" }, { "cell_type": "code", "execution_count": 1, "id": "be3f3cf1-9529-4fe1-a3dc-6e60adbfe979", "metadata": {}, "outputs": [], "source": [ "import asyncio" ] }, { "cell_type": "code", "execution_count": 2, "id": "474289aa", "metadata": {}, "outputs": [], "source": [ "from pylabrobot.storage.inheco.scila import SCILABackend\n", "\n", "scila = SCILABackend(scila_ip=\"169.254.1.117\")\n", "await scila.setup()" ] }, { "cell_type": "markdown", "id": "3cdfd2e4-90e5-46b9-a106-3d7b9f6afefd", "metadata": {}, "source": [ "## Usage" ] }, { "cell_type": "markdown", "id": "da156d46", "metadata": {}, "source": "### Status Requests" }, { "cell_type": "markdown", "id": "0lk1xxxljdj", "metadata": {}, "source": [ "Device status (`\"standBy\"`, `\"inError\"`, `\"startup\"`, ...):" ] }, { "cell_type": "code", "execution_count": 3, "id": "d5dc6eda", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'idle'" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.request_status()" ] }, { "cell_type": "markdown", "id": "s58zkv4u6in", "metadata": {}, "source": [ "Water level in the built-in humidification reservoir (e.g. `\"High\"`, `\"Low\"`). The SCILA uses this reservoir to maintain humidity inside the drawers:" ] }, { "cell_type": "code", "execution_count": 4, "id": "faaef501", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'Empty'" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.request_liquid_level()" ] }, { "cell_type": "markdown", "id": "lbq75ufdvi", "metadata": {}, "source": [ "Drawer status for all 4 drawers:" ] }, { "cell_type": "code", "execution_count": 5, "id": "5bc58e44", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'Closed'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.request_drawer_status(1)" ] }, { "cell_type": "code", "execution_count": 6, "id": "4251a9e7-4b9f-47ff-bae5-7b51cc9dc68a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{1: 'Closed', 2: 'Closed', 3: 'Closed', 4: 'Closed'}" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.request_drawer_statuses()" ] }, { "cell_type": "markdown", "id": "d65rfs6q106", "metadata": {}, "source": [ "CO₂ and H₂O valve status:" ] }, { "cell_type": "code", "execution_count": 7, "id": "6e7b7e2a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'H2O': 'Opened', 'CO2 Normal': 'Opened', 'CO2 Boost': 'Closed'}" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.request_valve_status()" ] }, { "cell_type": "markdown", "id": "xukq5oku2wr", "metadata": {}, "source": [ "CO₂ flow status:" ] }, { "cell_type": "code", "execution_count": 8, "id": "0b4dd0ce", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'NOK'" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.request_co2_flow_status()" ] }, { "cell_type": "markdown", "id": "cqkptekq5n", "metadata": {}, "source": [ "Status of a single drawer:" ] }, { "cell_type": "code", "execution_count": 9, "id": "d30745a8", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'Closed'" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.request_drawer_status(3)" ] }, { "cell_type": "markdown", "id": "e5c47abe", "metadata": {}, "source": "### Drawer Control\n\nOnly one drawer can be open at a time. Opening a second drawer while one is already open will raise an error." }, { "cell_type": "code", "execution_count": 10, "id": "63ea94b0", "metadata": {}, "outputs": [], "source": [ "await scila.open(2)" ] }, { "cell_type": "code", "execution_count": 11, "id": "3d1bca31", "metadata": {}, "outputs": [], "source": [ "await scila.close(2)" ] }, { "cell_type": "markdown", "id": "f6d1452a", "metadata": {}, "source": "### Temperature Control\n\nThe SCILA has a single temperature zone shared across all 4 drawers." }, { "cell_type": "markdown", "id": "bxbcga2l5a", "metadata": {}, "source": [ "Current temperature in °C:" ] }, { "cell_type": "code", "execution_count": 12, "id": "f88c9c83", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "23.65" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.measure_temperature()" ] }, { "cell_type": "code", "execution_count": 13, "id": "cc2f6063", "metadata": {}, "outputs": [], "source": [ "await scila.start_temperature_control(37.0)" ] }, { "cell_type": "markdown", "id": "dpc7iwuky", "metadata": {}, "source": [ "Check the target temperature and current temperature after starting:" ] }, { "cell_type": "code", "execution_count": 14, "id": "5f04d0ef", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "37.0" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.request_target_temperature()" ] }, { "cell_type": "code", "execution_count": 15, "id": "02a60f32", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "24.53" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await asyncio.sleep(4)\n", "\n", "await scila.measure_temperature()" ] }, { "cell_type": "code", "execution_count": 16, "id": "470241e1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.is_temperature_control_enabled()" ] }, { "cell_type": "markdown", "id": "mq0aijzng", "metadata": {}, "source": [ "Stop temperature control and verify it is disabled:" ] }, { "cell_type": "code", "execution_count": 17, "id": "5881c2ce", "metadata": {}, "outputs": [], "source": [ "await scila.stop_temperature_control()" ] }, { "cell_type": "code", "execution_count": 18, "id": "ac8ad797", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "False" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "await scila.is_temperature_control_enabled()" ] }, { "cell_type": "markdown", "id": "iq7rt8xr7zg", "metadata": {}, "source": "## Closing Connection\n\nClose the SiLA 2 HTTP server and disconnect from the SCILA." }, { "cell_type": "code", "execution_count": 19, "id": "oshdz1zxyz", "metadata": {}, "outputs": [], "source": [ "await scila.stop()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.11" } }, "nbformat": 4, "nbformat_minor": 5 }