{ "cells": [ { "cell_type": "markdown", "id": "entris2-intro", "source": "# Sartorius Entris II\n\nThe Entris II is a line of laboratory balances from Sartorius with an RS-232 serial interface (SBI protocol).\n\n| Property | Value |\n|---|---|\n| [OEM link](https://www.sartorius.com/en/products/weighing/laboratory-balances/entris-ii) | |\n| [Interface spec](https://www.sartorius.hr/media/dypfvdsn/entris-ii-technical-note-en-sartorius.pdf) | ([archived](https://archive.vn/NU6DW)) |\n| Communication | Serial / RS-232, SBI protocol |\n| Serial settings | 9600 baud, 8 data bits, odd parity, 1 stop bit |\n\n```{warning}\nThis driver has NOT been tested against hardware in PyLabRobot. The protocol\nfollows the Sartorius interface spec above. If you verify it on a balance,\nplease open a PR to remove the not-tested warning.\n```", "metadata": {} }, { "cell_type": "markdown", "id": "entris2-setup-md", "source": "## Physical setup\n\nConnect the balance's RS-232 port to your computer, typically through a USB-to-serial adapter (any generic FTDI-based adapter works).\n\nMake sure the balance's serial parameters match the driver defaults (9600 baud, 8 data bits, odd parity, 1 stop bit). These are set on the balance in the setup menu under the interface/SBI settings.\n\n```{note}\nThe balance's factory default is 7-bit ASCII with hardware (CTS/RTS) handshake. If the balance does not respond, check that its data-bits and handshake settings match the driver (8 data bits, no handshake).\n```", "metadata": {} }, { "cell_type": "markdown", "id": "entris2-connect-md", "source": "## Connect\n\n`setup()` opens the serial port and reads the serial number. It also logs the not-tested warning.", "metadata": {} }, { "cell_type": "code", "id": "entris2-connect-code", "source": "from pylabrobot.sartorius import SartoriusEntris2\n\nscale = SartoriusEntris2(port=\"/dev/ttyUSB0\") # replace with your port\nawait scale.setup()", "metadata": {}, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "id": "entris2-read-md", "source": "## Measure the weight\n\n`measure_weight()` returns the current value in grams (`P` print command).", "metadata": {} }, { "cell_type": "code", "id": "entris2-read-code", "source": "weight = await scale.measure_weight()\nprint(f\"Weight: {weight} g\")", "metadata": {}, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "id": "entris2-zero-md", "source": "## Zero\n\nZero the balance with an empty pan (`V`, Key ZERO). Use at the start of a workflow.", "metadata": {} }, { "cell_type": "code", "id": "entris2-zero-code", "source": "await scale.zero()", "metadata": {}, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "id": "entris2-tare-md", "source": "## Tare\n\nTare the balance to subtract a container already on the pan (`T`, Zero/Tara command). Place your container, tare, then subsequent reads reflect only the added material.", "metadata": {} }, { "cell_type": "code", "id": "entris2-tare-code", "source": "await scale.tare()", "metadata": {}, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "id": "entris2-info-md", "source": "## Device info\n\nQuery the model and serial number (`x1_` and `x2_`).", "metadata": {} }, { "cell_type": "code", "id": "entris2-info-code", "source": "print(\"Model:\", await scale.get_model())\nprint(\"Serial number:\", await scale.get_serial_number())", "metadata": {}, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "id": "entris2-teardown-md", "source": "## Teardown", "metadata": {} }, { "cell_type": "code", "id": "entris2-teardown-code", "source": "await scale.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 }