{ "cells": [ { "cell_type": "markdown", "id": "5pmhklv4dll", "metadata": {}, "source": [ "# Mettler Toledo WXS205SDU\n", "\n", "The WXS205SDU is a high-precision automated weigh module from Mettler Toledo, commonly used for gravimetric liquid transfer verification (e.g. in the Hamilton Liquid Verification Kit).\n", "\n", "| Property | Value |\n", "|---|---|\n", "| [OEM Link](https://www.mt.com/gb/en/home/products/Industrial_Weighing_Solutions/high-precision-weigh-sensors/weigh-module-wxs205sdu-15-11121008.html) | |\n", "| Communication | Serial / RS-232 |\n", "| VID:PID | `0x0403:0x6001` |\n", "| Load range | 0 -- 220 g |\n", "| Readability | 0.1 mg |\n", "\n", "The backend has been tested on the WXS205SDU but, per Mettler Toledo firmware documentation, should be applicable to other \"Automated Precision Weigh Modules\" in the WX and WMS series." ] }, { "cell_type": "markdown", "id": "8v1qlztfpn", "metadata": {}, "source": [ "## Physical setup\n", "\n", "The system consists of two required units and one optional unit:\n", "\n", "| Component | Required | Description |\n", "|---|---|---|\n", "| Load Cell | yes | The weighing platform where samples are placed |\n", "| Electronic Unit | yes | The control and communication module |\n", "| Terminal/Display | no | For manual reading; not needed when using PyLabRobot |\n", "\n", "Connect the electronic unit to your computer via the RS-232 serial port. You will likely need a USB-to-serial adapter (any generic FTDI-based adapter should work).\n", "\n", "```{warning}\n", "The scale requires a warm-up period after being powered on. Mettler Toledo specifies 60--90 minutes, though 30 minutes is often sufficient in practice. If you attempt measurements before warm-up, you may see: *\"Command understood but currently not executable\"*.\n", "```" ] }, { "cell_type": "markdown", "id": "1mzumf8u2bu", "metadata": {}, "source": [ "## Setup" ] }, { "cell_type": "code", "execution_count": null, "id": "djeqvngxd3c", "metadata": {}, "outputs": [], "source": [ "from pylabrobot.mettler_toledo import MettlerToledoWXS205SDU\n", "\n", "scale = MettlerToledoWXS205SDU(port=\"/dev/cu.usbserial-110\") # replace with your port\n", "await scale.setup()" ] }, { "cell_type": "markdown", "id": "opa273q0bvc", "metadata": {}, "source": [ "## Weighing\n", "\n", "The scale exposes `zero()`, `tare()`, and `read_weight()`.\n", "\n", "### Zero\n", "\n", "Calibrates the scale to read zero with an empty platform. Use at the start of a workflow." ] }, { "cell_type": "code", "execution_count": null, "id": "dqc8j70q1m", "metadata": {}, "outputs": [], "source": [ "await scale.zero()" ] }, { "cell_type": "markdown", "id": "jtaypw6mx8", "metadata": {}, "source": [ "### Tare\n", "\n", "Resets the displayed weight to zero while accounting for a container already on the platform. Place your container, then tare, so subsequent readings reflect only the added material." ] }, { "cell_type": "code", "execution_count": null, "id": "k0b0bx9qaqq", "metadata": {}, "outputs": [], "source": [ "await scale.tare()" ] }, { "cell_type": "markdown", "id": "i8ewtl6bitj", "metadata": {}, "source": [ "### Read weight\n", "\n", "Returns the current weight in grams." ] }, { "cell_type": "code", "execution_count": null, "id": "77so0rlhk39", "metadata": {}, "outputs": [], "source": [ "weight = await scale.read_weight()\n", "print(f\"Weight: {weight} g\")" ] }, { "cell_type": "markdown", "id": "p4p4hpeg11", "metadata": {}, "source": [ "### Further methods\n", "\n", "- `request_tare_weight()` -- retrieve the stored tare value\n", "- `request_serial_number()` -- read the scale's serial number\n", "- `clear_tare()` -- clear the stored tare weight\n", "- `zero(timeout=...)` / `tare(timeout=...)` / `read_weight(timeout=...)` -- pass a timeout mode (`\"stable\"`, `0`, or seconds)" ] }, { "cell_type": "code", "execution_count": null, "id": "7ha7yrkc069", "metadata": {}, "outputs": [], "source": [ "tare_value = await scale.request_tare_weight()\n", "print(f\"Stored tare: {tare_value} g\")" ] }, { "cell_type": "markdown", "id": "oq3ck6rntr", "metadata": {}, "source": [ "## Teardown" ] }, { "cell_type": "code", "execution_count": null, "id": "q7m594v11eb", "metadata": {}, "outputs": [], "source": [ "await scale.stop()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "name": "python", "version": "3.11.0" } }, "nbformat": 4, "nbformat_minor": 5 }