|
20 | 20 | "outputs": [], |
21 | 21 | "source": [ |
22 | 22 | "from pylabrobot.scales import Scale\n", |
23 | | - "from pylabrobot.scales.mettler_toledo import MettlerToledoWXS205SDU" |
| 23 | + "from pylabrobot.scales.mettler_toledo_backend import MettlerToledoWXS205SDUBackend" |
24 | 24 | ] |
25 | 25 | }, |
26 | 26 | { |
|
29 | 29 | "metadata": {}, |
30 | 30 | "outputs": [], |
31 | 31 | "source": [ |
32 | | - "backend = MettlerToledoWXS205SDU(port=\"/dev/cu.usbserial-110\") # take any ScaleBackend you want\n", |
33 | | - "scale = Scale(backend=backend, size_x=0, size_y=0, size_z=0)\n", |
| 32 | + "backend = MettlerToledoWXS205SDUBackend(port=\"/dev/cu.usbserial-110\") # take any ScaleBackend you want\n", |
| 33 | + "scale = Scale(name=\"scale\", backend=backend, size_x=0, size_y=0, size_z=0)\n", |
34 | 34 | "await scale.setup()" |
35 | 35 | ] |
36 | 36 | }, |
|
55 | 55 | "\n", |
56 | 56 | "## Mettler Toledo WXS205SDU\n", |
57 | 57 | "\n", |
58 | | - "The Mettler Toledo XS205 scale is controlled by the {class}`~pylabrobot.scales.mettler_toledo_backend.MettlerToledoWXS205SDU` class. This scale is used by the Hamilton Liquid Verification Kit (LVK).\n", |
| 58 | + "The Mettler Toledo XS205 scale is controlled by the {class}`~pylabrobot.scales.mettler_toledo_backend.MettlerToledoWXS205SDUBackend` class. This scale is used by the Hamilton Liquid Verification Kit (LVK).\n", |
59 | 59 | "\n", |
60 | 60 | "The scale comes with an RS-232 serial port. You'll probably want to use a USB to serial adapter to connect it to your computer. Any $10 generic USB to serial adapter should work (e.g. something that uses FTDI).\n", |
61 | 61 | "\n", |
|
79 | 79 | } |
80 | 80 | ], |
81 | 81 | "source": [ |
82 | | - "backend = MettlerToledoWXS205SDU(port=\"/dev/cu.usbserial-110\")\n", |
83 | | - "scale = Scale(backend=backend)\n", |
| 82 | + "backend = MettlerToledoWXS205SDUBackend(port=\"/dev/cu.usbserial-110\")\n", |
| 83 | + "scale = Scale(name=\"scale\", backend=backend, size_x=0, size_y=0, size_z=0)\n", |
84 | 84 | "await scale.setup()\n", |
85 | 85 | "await scale.get_weight(timeout=\"stable\")" |
86 | 86 | ] |
|
95 | 95 | "- 0: Read the value immediately\n", |
96 | 96 | "- n>0: Try to get a stable value for n seconds. If the value is stable before n seconds, return it immediately. Otherwise, return the value after n seconds.\n", |
97 | 97 | "\n", |
98 | | - "These parameters are available for {meth}`~pylabrobot.scales.mettler_toledo.MettlerToledoWXS205SDU.get_weight`, {meth}`~pylabrobot.scales.mettler_toledo.MettlerToledoWXS205SDU.tare`, and {meth}`~pylabrobot.scales.mettler_toledo.MettlerToledoWXS205SDU.zero`." |
| 98 | + "These parameters are available for {meth}`~pylabrobot.scales.mettler_toledo_backend.MettlerToledoWXS205SDUBackend.get_weight`, {meth}`~pylabrobot.scales.mettler_toledo_backend.MettlerToledoWXS205SDUBackend.tare`, and {meth}`~pylabrobot.scales.mettler_toledo_backend.MettlerToledoWXS205SDUBackend.zero`." |
99 | 99 | ] |
100 | 100 | }, |
101 | 101 | { |
|
133 | 133 | "metadata": {}, |
134 | 134 | "outputs": [], |
135 | 135 | "source": [ |
136 | | - "backend = MettlerToledoWXS205SDU(port=\"/dev/cu.usbserial-110\")\n", |
137 | | - "s = Scale(backend=backend)\n", |
| 136 | + "backend = MettlerToledoWXS205SDUBackend(port=\"/dev/cu.usbserial-110\")\n", |
| 137 | + "s = Scale(name=\"scale\", backend=backend, size_x=0, size_y=0, size_z=0)\n", |
138 | 138 | "await s.setup()" |
139 | 139 | ] |
140 | 140 | }, |
|
0 commit comments