Skip to content

Commit f65c169

Browse files
committed
fix scale tutorial
1 parent a0bc733 commit f65c169

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/user_guide/02_analytical/scales.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"outputs": [],
2121
"source": [
2222
"from pylabrobot.scales import Scale\n",
23-
"from pylabrobot.scales.mettler_toledo import MettlerToledoWXS205SDU"
23+
"from pylabrobot.scales.mettler_toledo_backend import MettlerToledoWXS205SDUBackend"
2424
]
2525
},
2626
{
@@ -29,8 +29,8 @@
2929
"metadata": {},
3030
"outputs": [],
3131
"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",
3434
"await scale.setup()"
3535
]
3636
},
@@ -55,7 +55,7 @@
5555
"\n",
5656
"## Mettler Toledo WXS205SDU\n",
5757
"\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",
5959
"\n",
6060
"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",
6161
"\n",
@@ -79,8 +79,8 @@
7979
}
8080
],
8181
"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",
8484
"await scale.setup()\n",
8585
"await scale.get_weight(timeout=\"stable\")"
8686
]
@@ -95,7 +95,7 @@
9595
"- 0: Read the value immediately\n",
9696
"- 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",
9797
"\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`."
9999
]
100100
},
101101
{
@@ -133,8 +133,8 @@
133133
"metadata": {},
134134
"outputs": [],
135135
"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",
138138
"await s.setup()"
139139
]
140140
},

0 commit comments

Comments
 (0)